subtree updates

meta-raspberrypi: 90b3ac6fb3..836755370f:
  Alexandru Costache (3):
        conf/machine: Add Pi Zero 2 Wifi 64bit yocto machine
        linux-firmware-rpidistro: Package bcm43436 and bcm43436s firmware
        linux-raspberrypi: Bump to 5.10.78

  Andrei Gherzan (14):
        raspberrypi-firmware: Bump to 20211007
        linux-raspberrypi: Bump 5.10 to 5.10.76
        linux-raspberrypi: Drop 5.4
        README.md: Fix docs and minor tweaks
        docs: Bump copyright year
        README.md: Fix sponsor table
        README.md: Fix sponsor table take two
        docs: Fix RtD build
        docs: Add module dependency/requirement for RtD
        docs: Advertise raspberrypi0-2w-64 supported machine
        Update references to Yocto mailing list
        README.md: Fix the matrix chat link
        libwpe: Migrate build workaround from oe-core
        rpi-config: Take into consideration ENABLE_UART value of 0

  Cameron Kellough (1):
        rpi-base.inc: Added gpio-poweroff overlay. Some machines need to have the kernel toggle a gpio when an external power source needs to shut off power to complete a shutdown and de-energize the processor.  gpio-poweroff provides this functionality but was omitted from the kernel overlays brought oveer by the rpi-layer from the kernel. Signed-off-by: Cameron Kellough <cameron@telemetrak.com>

  Joel Winarske (1):
        mesa: Enable building vulkan driver

  Khem Raj (4):
        linux-firmware-rpidistro: Use bullseye branch
        parselogs: Update the error regexps to 5.10 kernel
        linux-raspberrypi: Upgrade to 5.10.81
        weston-init: Add --continue-without-input option to weston

  Marcel Hamer (1):
        recipes: Update SRC_URI protocols for github

  Martin Jansa (1):
        rpi-config: don't trigger bbfatal for empty ENABLE_UART

  Peter A. Bigot (1):
        conf/machine: add variant Wi-Fi/BT drivers for CM4 and Pi 400

meta-openembedded: 2f6797d8d6..6b63095946:
  Alex Kiernan (2):
        ntpsec: Add recipe
        ntpsec: Add glibc-2.34/kernel-5.14 seccomp fixes

  Alexander Kanavin (23):
        libstatgrab: update 0.92 -> 0.92.1
        open-vpm-tools: update 11.2.5 -> 11.3.5
        libid3tag: add from oe-core
        libportal: add from oe-core
        gtkmm3: add gdk-pixbuf-native to satisfy meson 0.61
        gjs: drop patch to satisfy meson 0.61
        gnome-terminal: backport a meson 0.61 patch
        gnome-bluetooth: backport a meson 0.61 patch
        gnome-font-viewer: backport a meson 0.61 patch
        gnome-session: update 40.1.1 -> 41.3
        gnome-settings-daemon: add a meson 0.61 patch
        gnome-shell: backport a meson 0.61 patch
        accountsservice: backport a meson 0.61 patch
        gnome-screenshot: backport a meson 0.61 patch
        evince: fix meson 0.61 builds
        gnome-calendar: fix meson 0.61 builds
        gthumb: fix meson 0.61 builds
        gedit: add a meson 0.61 patch
        gnome-disk-utility: add a meson 0.61 patch
        gnome-control-center: add a meson 0.61 patch
        gnome-photos: add a meson 0.61 patch
        dconf-editor: add a meson 0.61 patch
        network-manager-applet: add meson 0.61 patch

  Andreas Müller (111):
        xfce4-sensors-plugin: upgrade 1.3.95 -> 1.4.1
        fftw: remove unused patch
        mozjs: Move back to recipes-extended - no meta-python specifics required
        Rename mozjs -> mozjs-91 to allow multiple versions of mozjs
        polkit: Adjust to mozjs-91 in DEPENDS
        mozjs-91: remove static library
        mozjs-78: Initial add
        graphene: enable introspection by default - gtk4 & mutter 41 require it
        graphene: extend to native and nativesdk
        graphene: Tidy up recipe a bit
        gtk4: initial add 4.4.0
        gjs: upgrade 1.58.8 -> 1.70.0
        mutter: upgrade 3.34.6 -> 41.0
        gdm: upgrade 3.36.3 -> 41.0
        upower: upgrade 0.99.11 -> 0.99.13
        udisks2: upgrade 2.9.3 -> 2.9.4
        gnome-settings-daemon: upgrade 3.36.1 -> 41.0
        gnome-shell: upgrade 3.34.5 -> 41.0
        gnome-shell-extensions: upgrade 3.34.2 -> 40.1
        gnome-desktop: upgrade 3.38.8 -> 41.0 and give up '3' receipe name suffix
        gnome-session: upgrade 3.36.0 -> 40.1.1
        gnome-control-center: upgrade 3.36.4 -> 41.1
        gexiv2: upgrade 0.12.2 -> 0.14.0
        gparted: upgrade 1.3.0 -> 1.3.1
        gnome-backgrounds: upgrade 3.38.0 -> 41.0
        gnome-tweaks: upgrade 3.34.0 -> 40.0
        gnome-terminal: upgrade 3.40.2 -> 3.42.0 / meson build
        gnome-panel: upgrade 3.36.1 -> 3.38.0
        grilo: upgrade 0.3.13 -> 0.3.14
        grilo-plugins: upgrade 0.3.13 -> 0.3.14
        mozjs-91: Fix build on powerpc
        gdm: Fix REQUIRED_DISTRO_FEATURES broken by adding introspection
        gnome-control-center: Add libhandy to DEPENDS
        gnome-backgrounds: Fix licenses
        poppler: upgrade 21.10.0 -> 21.11.0
        xfce4-whiskermenu-plugin: upgrade 2.5.3 -> 2.6.2
        ristretto: upgrade 0.11.0 -> 0.12.0
        xfce4-cpugraph-plugin: upgrade 1.2.3 -> 1.2.5
        xfce4-sensors-plugin: upgrade 1.4.1 -> 1.4.2
        catfish: upgrade 4.16.0 -> 4.16.3
        mousepad: upgrade 0.5.5 -> 0.5.7
        libxfce4ui: upgrade 4.16.0 -> 4.16.1
        fluidsynth: upgrade 2.2.2 -> 2.2.3
        vlc: Fix build with un-renameed native libtool
        fltk: upgrade 1.3.7 -> 1.3.8
        xfce4-whiskermenu-plugin: upgrade 2.6.2 -> 2.7.1
        ristretto: upgrade 0.12.0 -> 0.12.1
        mousepad: upgrade 0.5.7 -> 0.5.8
        poppler: upgrade 21.11.0 -> 21.12.0
        menulibre: upgrade 2.2.1 -> 2.2.3
        fluidsynth: upgrade 2.2.3 -> 2.2.4
        gegl: upgrade 0.4.30 -> 0.4.34
        gimp: upgrade 2.10.24 -> 2.10.30
        mpv: upgrade 0.33.1 -> 0.34.0
        gupnp: upgrade 1.2.7 -> 1.4.1
        gupnp: merge recipe with inc-file
        gupnp-av: upgrade 0.12.11 -> 0.14.0 / build with mesa
        gupnp-av: merge recipe with inc-file
        gupnp-dlna: upgrade 0.10.5 -> 0.12.0 / build with meson
        gupnp-igd: upgrade 0.2.5 -> 1.2.0 / build with meson
        gupnp-tools: upgrade 0.10.0 -> 0.10.2 / prettify recipe
        gtkwave: upgrade 3.3.109 -> 3.3.111
        blueman: upgrade 2.2.1 -> 2.2.3
        geany: upgrade 1.37.1 -> 1.38
        geany-plugins: upgrade 1.37 -> 1.3.8
        gnuplot: upgrade 5.4.1 -> 5.4.2
        gtksourceview5: initial add 5.2.0
        amtk: upgrade 5.2.0 -> 5.3.1 / build with meson
        evince: upgrade 40.4 -> 41.3
        evolution-data-server: upgrade 3.40.2 -> 3.42.2
        gnome-autoar: upgrade 0.3.3 -> 0.4.1 / build with meson
        gnome-calculator: upgrade 40.1 -> 41.1
        gnome-calendar; upgrade 41.0 -> 41.2
        gnome-control-center: upgrade 41.1 -> 41.2
        gnome-desktop: upgrade 41.0 -> 41.2
        gnome-disk-utility: upgrade 40.1 -> 41.0
        gnome-flashback: upgrade 3.40.0 -> 3.42.1
        gnome-font-viewer: upgrade 40.0 -> 41.0
        gnome-screenshot: upgrade 40.0 -> 41.0
        gnome-shell: upgrade 41.0 -> 41.2
        gnome-shell-extensions: upgrade 41.0 -> 41.1
        gnome-system-monitor: upgrade 40.1 -> 41.0
        gnome-terminal: upgrade 3.42.0 -> 3.42.1
        gsound: upgrade 1.0.2 -> 1.0.3 / build with meson
        gthumb: upgrade 3.10.3 -> 3.12.0
        gtksourceview4: upgrade 4.8.1 -> 4.8.2
        libgsf: upgrade 1.14.47 -> 1.14.48
        libgtkstylus: remove
        metacity: upgrade 3.40.0 -> 3.42.0
        mutter: upgrade 41.0 -> 41.2
        nautilus: upgrade 40.2 -> 41.1
        gnome-shell: Add gnome-desktop to RDEPENDS
        Drop gnome-desktop3 providers
        Rename gnome-menus3 -> gnome-menus
        packagegroup-gnome-desktop: Mark TUNE_PKGARCH specific
        mozjs-78: Shelve breaking lib rename/linking & split lib to separate package
        mozjs-78: renumber patches
        gnome-shell-extensions: Enable gnome-classic session for wayland
        zenity: Upgrade 3.32.0 -> 3.41.0 / meson build / rework
        yelp: upgrade 41.1 -> 41.2
        yelp-xsl: upgrade 41.0 -> 41.1
        usermode: upgrade 1.113 -> 1.114
        sysprof: upgrade 3.42.0 -> 3.42.1
        gnome-terminal: upgrade 3.42.1 -> 3.42.2
        gnome-panel: upgrade 3.38.0 -> 3.42.0
        gnome-autoar: upgrade 0.4.1 -> 0.4.2
        evolution-data-server: upgrade 3.42.2 -> 3.42.3
        poppler: upgrade 21.12.0 -> 22.01.0
        exo: upgrade 4.16.1 -> 4.16.3
        imsettings: upgrade 1.8.2 -> 1.8.3
        thunar: upgrade 4.16.8 -> 4.16.9

  Andrei Gherzan (2):
        mosquitto: Don't depends on dlt-daemon unconditionally
        python3-pymetno: Introduce recipe on 0.7.0

  Andrey Zhizhikin (1):
        gpsd: fix clang buid via export CC explicitly

  Armin Kuster (6):
        ldns: update to 1.8.1
        strongswan: provide PACKAGECONFIG for cureve25519
        strongswan: add tpm PACKAGECONFIG
        strongswan: add integrity options
        strongswan: remove redundant DEPENDS
        wireshark: update to latest stable 3.4.11

  Bartosz Golaszewski (6):
        python3-email-validator: new package
        libgpiod: ptest: rrecommend python3-unittest when building python tests
        libgpiod: ptest: rrecommend coreutils
        libgpiod: ptest: redirect stderr to stdout for test executables
        cmatrix: new package
        python3-zeroconf: bump version 0.36.13 -> 0.38.1

  Bhargav Das (1):
        python3-colorzero: add recipe for python colorzero

  Bruce Ashfield (2):
        vboxguestdrivers: fix build against 5.15 kernel/libc-headers headers
        python: remove recipes imported to oe-core

  Changqing Li (5):
        mozjs-78: fix do_configure failure
        mozjs-91: fix do_configure failure
        mozjs-91/mozjs-78: fix compile failure on centos7
        php: correct module name and library name
        postgresql: fix CVE-2021-23214,CVE-2021-23222

  Christian Eggers (5):
        gpsd: remove obsolete files from FILES:${PN}-dev
        gpsd: remove obsolete libgpsd package
        gpsd: remove obsolete files from FILES:gps-utils
        gpsd: list files for gps-utils individually
        python3-gcovr: add recipe

  Claude Bing (2):
        php: update from 7.4.21 to 8.0.12
        php: use qemu wrapper to build minilua

  Claus Stovgaard (3):
        Added usbip-tools for kernel USB/IP
        Add gutenprint to meta-oe
        Add pycups - python bindings for CUPS

  Ed Tanous (1):
        Update to new version of boost-uri

  Fathi Boudra (1):
        makedumpfile: upgrade from 1.6.9 to 1.7.0

  Geoff Parker (2):
        python3-cchardet: add BBCLASSEXTEND = "native nativesdk"
        python3-aiosignal, python3-frozenlist: Add native & nativestdk package support

  Gianfranco (2):
        vboxguestdrivers: upgrade 6.1.28 -> 6.1.30
        vboxguestdrivers: drop md5sum from SRC_URI.

  He Zhe (1):
        protobuf: Fix static init fiasco

  Hongxu Jia (5):
        ostree: add nativesdk support
        ostree: use Yocto mirror
        ostree: workaround compile error with option gcc option -Og
        libblockdev: Do not include duplicate entries in bd_lvm_lvs output
        grubby: fix conflict with debianutils

  Jacob Kroon (1):
        Revert "ccid: Fix floating runtime dependency on flex"

  Jan Vermaete (6):
        netdata: Using the github.com release + upstream_check.
        netdata: from 1.22.1 to 1.32.0
        netdata: version bump from 1.32.0 to 1.32.1
        netdata: fixed some oelint-adv issues in the recipe.
        netdata: do not send anonymous statistics by default.
        netdata: fix for commit 8554624cc7f84e6b63b2ea4b94ee5fd2821021ca

  Jeremy A. Puhlman (1):
        cdrkit: remove ${PN} from ${PN}-dev RDEPENDS

  Jeremy Kerr (4):
        mctp: upgrade to v1.0
        mctp: install dbus service configuration
        contrib: allow override-style syntax for vars & routines
        contrib: fix python warnings for oe-stylize

  Joshua Watt (8):
        colord: introspection is not valid meson option
        gdm: introspection is not valid meson option
        gnome-settings-daemon: introspection is not valid meson option
        gnome-shell: introspection is not valid meson option
        gnome-control-center: Fixup polkit directory permissions
        gnome-online-accounts: Switch back to libsoup2
        graphene: Move from meta-gnome -> meta-oe
        jemalloc: Fix license file

  Kai Kang (1):
        libqb: use branch main

  Khem Raj (97):
        bitwise: Fix build with latest ncurses 6.3+
        libcdio: Fix build with ncurses 6.3+
        nmon: Upgrade to 16m
        sysdig: Fix build with ncurses 6.3+
        iptraf-ng: Upgrade to 1.2.1
        tiptop: Fix build with ncurses 6.3+
        mtr: Fix build with ncurses 6.3+
        mtr: Explicitly use branch= in SRC_URI
        liburing: Use libc mmap() wrapper instead of calling __NR_mmap syscall directly
        protobuf: Upgrade to 3.19.1
        protobuf: Disable tailcall on mips/clang
        packagegroup-meta-python: Add python3-imgtool
        python3-prctl: Use https protocol for git fetcher
        mozjs-78: Check for big-endian icu data file existence before creating it
        mozjs-78: Set X lib/include paths
        mozjs-78: Pass C/C++ flags to js configure
        libjs-jquery-globalize: Use a proper SHA in SRCREV instead of tag
        iptraf-ng: Create /var/log and /var/lib subdirs at runtime
        gstd: Remove empty /var/volatile/log
        monkey: Keep /var/volatile empty
        hiawatha: Create /var/log /var/run at runtime
        python3-kivy: Use branch parameter in SRC_URI
        mdns: Upgrade to 1310.140.1
        packagegroup-meta-networking: Enable mdns on musl systems
        ntpsec: Disable seccomp on musl/rv32
        ntpsec: Disable documentation
        packagegroup-meta-networking: Add ntpsec
        sdbus-c++-libsystemd: Fix build with kernel 5.15+
        mctp: Fix build with 5.15+ kernel headers
        packagegroup-meta-python.bb: Add python3-pytz-deprecation-shim
        packagegroup-meta-oe: Add fwupd and fwupd-efi
        protobuf-c: Export native protoc
        linpack: Build both sp and dp binaries
        php: Build minilua for build host
        xf86-video-ati: Upgrade to 19.1.0
        sdbus-c++-libsystemd: Upgrade to 249.5
        xf86-video-nouveau: fixup driver for new X server ABI
        tracker: introspection is not valid meson option
        gnome-desktop: introspection is not valid meson option
        libmediaart: introspection is not valid meson option
        libgweather: introspection is not valid meson option
        tepl: introspection is not valid meson option
        gjs: introspection is not valid meson option
        tracker-miners: introspection is not valid meson option
        gedit: introspection is not valid meson option
        tracker,tracker-miners: Upgrade to 3.2.1
        gnome-tweaks: introspection is not valid meson option
        colord-gtk: introspection is not valid meson option
        packagegroup-meta-python: Add python3-gcovr
        ippool: silence a DeprecationWarning
        packagegroup-meta-oe: Add pim435
        influxdb: Upgrade to 1.8.10
        influxdb: Fix build with Go 1.17 on x86_64
        packagegroup-core-clutter: Mark TUNE_PKGARCH specific
        packagegroup-xfce-base: Mark TUNE_PKGARCH specific
        libcamera: Fix build break on musl
        meta-networking,meta-python: Fix README for yocto check layer
        gjs: Link with libatomic on rv32
        ntpsec: Disable seccomp on riscv32
        libunix-statgrab: Use compiler driver for linking as well
        tbb: Upgrade to 2021.4.0
        packagegroup-meta-oe: Add unifex
        gjs: Fix build failures with meson 0.60.2
        packagegroup-meta-perl: Add new packages
        packagegroup-meta-python: Add python3-pymetno
        yelp: Add option to support webkit2gtk-4-0
        surf: Add soup3 patch conditionally
        netdata: Link libatomic on mips
        gssdp: Use sniffer only when gnome layer is in mix
        packagegroup-meta-oe: Add graphene
        inotify-tools: Upgrade to 3.21.9.6
        inotify-tools: Disable -Werror
        python3-matplotlib: Generate correctly names setup config file
        inotify-tools: Fix build on musl
        libkcapi: Fix build with musl
        packagegroup-meta-oe: Add gutenprint, python3-pycups and usbip-tools
        tvheadend: Disable dvbscan
        pkcs11-helper: Fix build with nss >= 3.73.1
        tbb: Disable LTO on rv64
        packagegroup-meta-python: Add python3-colorzero
        packagegroup-meta-oe: Add cmatrix
        pcp: Fix build to exclude qt5
        packagegroup-meta-oe: Add dool and pcp
        nautilus: Fix build with libportal >= 0.5
        influxdb: Enable network during do_compile
        meta-oe: Use setuptools3-base
        thunar: Depend on libxml-parser-perl-native
        python3-matplotlib: Do not use setuptools_scm_git_archive
        python3-pytest-helpers-namespace: Enable network during do_compile
        python3-pybind11: Use setuptools3 instead of distutils3 functions
        pcp: Fix build race condition
        tnftp: Add missing header stdc-predef.h
        jemalloc: Fix build with glibc 2.35+clang
        packagegroup-meta-oe: Add duktape
        iotop: Use lld with clang on arm
        meta-xfce: Convert catfish and menulibre to use setuptools3
        sdbus-c++-libsystemd: Fix build on musl

  Konrad Weihmann (3):
        python3-wtforms: add missing dependencies
        python3-execnet: depend on setuptools-scm
        python3-lazy-object-proxy: upgrade 1.6.0 > 1.7.1

  Lei Maohui (1):
        sysprof: Added json-glib into DEPENDS to fix build error.

  Leif Middelschulte (1):
        dbus-daemon-proxy: add missing `return` statement

  Leon Anavi (92):
        python3-qrcode: Upgrade 7.3 -> 7.3.1
        python3-bidict: Upgrade 0.21.2 -> 0.21.4
        python3-pint: Upgrade 0.17 -> 0.18
        python3-prettytable: Upgrade 2.2.1 -> 2.3.0
        python3-astroid: Upgrade 2.8.2 -> 2.8.4
        python3-isort: Upgrade 5.9.3 -> 5.10.0
        python3-aenum: Upgrade 3.1.0 -> 3.1.2
        python3-natsort: Upgrade 7.1.1 -> 8.0.0
        python3-cachecontrol: Upgrade 0.12.6 -> 0.12.9
        python3-wrapt: Upgrade 1.13.2 -> 1.13.3
        python3-prettytable: Upgrade 2.3.0 -> 2.4.0
        python3-imageio: Upgrade 2.10.1 -> 2.10.3
        python3-pytz-deprecation-shim: Add recipe
        python3-tzlocal: Upgrade 4.0.1 -> 4.1
        python3-soupsieve: Upgrade 2.2.1 -> 2.3
        python3-configparser: Upgrade 5.0.2 -> 5.1.0
        python3-yappi: Upgrade 1.3.2 -> 1.3.3
        python3-pydicti: Upgrade 1.1.4 -> 1.1.6
        python3-zeroconf: Upgrade 0.36.9 -> 0.36.12
        python3-yarl: Upgrade 1.7.0 -> 1.7.2
        python3-elementpath: Upgrade 2.3.2 -> 2.4.0
        python3-astroid: Upgrade 2.8.4 -> 2.8.5
        python3-coverage: Upgrade 6.1.1 -> 6.1.2
        python3-aenum: Upgrade 3.1.3 -> 3.1.5
        python3-zeroconf: Upgrade 0.36.12 -> 0.36.13
        python3-bandit: Uprade 1.7.0 -> 1.7.1
        python3-colorlog: Upgrade 6.5.0 -> 6.6.0
        python3-soupsieve: Upgrade 2.3 -> 2.3.1
        python3-cchardet: Add recipe
        python3-charset-normalizer: Add recipe
        python3-frozenlist: Add recipe
        python3-aiosignal: Add recipe
        python3-aiohttp: Upgrade 3.8.0 -> 3.8.1
        packagegroup-meta-python.bb: Add new packages
        python3-eventlet: Upgrade 0.32.0 -> 0.33.0
        python3-imageio: Upgrade 2.10.3 -> 2.10.5
        python3-deprecated: Upgrade 1.2.12 -> 1.2.13
        python3-parso: Add runtime dependencies
        python3-jedi: Upgrade 0.18.0 -> 0.18.1
        python3-prompt-toolkit: Upgrade 3.0.21 -> 3.0.22
        python3-imageio: Upgrade 2.10.5 -> 2.11.0
        python3-cmd2: Upgrade 2.3.0 -> 2.3.1
        python3-simplejson: Upgrade 3.17.5 -> 3.17.6
        python3-aiohue: Upgrade 2.6.3 -> 3.0.1
        python3-imageio: Upgrade 2.11.0 -> 2.11.1
        python3-marshmallow: Upgrade 3.14.0 -> 3.14.1
        python3-jsonpointer: Upgrade 2.1 -> 2.2
        python3-humanize: Upgrade 3.12.0 -> 3.13.1
        python3-cachecontrol: Upgrade 0.12.9 -> 0.12.10
        python3-prompt-toolkit: Upgrade 3.0.22 -> 3.0.24
        python3-isodate: Upgrade 0.6.0 -> 0.6.1
        python3-pychromecast: Upgrade 10.1.1 -> 10.2.3
        python3-imageio: Upgrade 2.13.3 -> 2.13.5
        python3-psutil: Upgrade 5.8.0 -> 5.9.0
        python3-astroid: Upgrade 2.9.0 -> 2.9.2
        python3-robotframework: Upgrade 4.1.2 -> 4.1.3
        python3-cantools: Upgrade 37.0.0 -> 37.0.1
        python3-diskcache: Upgrade 5.3.0 -> 5.4.0
        python3-typeguard: Upgrade 2.13.2 -> 2.13.3
        python3-huey: Upgrade 2.4.2 -> 2.4.3
        python3-ujson: Upgrade 5.0.0 -> 5.1.0
        python3-google-api-core: Upgrade 2.2.0 -> 2.3.2
        python3-astroid: Upgrade 2.9.2 -> 2.9.3
        python3-urllib3: Upgrade 1.26.7 -> 1.26.8
        python3-rdflib: Upgrade 6.0.2 -> 6.1.1
        python3-bitarray: Upgrade 2.3.4 -> 2.3.5
        python3-asyncio-throttle: Add recipe
        python3-aiohue: Upgrade 3.0.1 -> 3.0.11
        python3-requests: Upgrade 2.26.0 -> 2.27.1
        python3-natsort: Upgrade 8.0.0 -> 8.0.2
        python3-sentry-sdk: Upgrade 1.4.3 -> 1.5.2
        python3-regex: Upgrade 2021.10.8 -> 2021.11.10
        python3-wtforms: Upgrade 3.0.0 -> 3.0.1
        python3-charset-normalizer: Upgarde 2.0.7 -> 2.0.10
        python3-gmpy2: Upgrade 2.1.1 -> 2.1.2
        python3-jdatetime: Upgrade 3.6.4 -> 3.8.1
        python3-fasteners: Upgrade 0.16.3 -> 0.17.2
        python3-jsmin: Upgrade 3.0.0 -> 3.0.1
        python3-croniter: Upgrade 1.1.0 -> 1.2.0
        python3-fastjsonschema: Upgrade 2.15.1 -> 2.15.3
        python3-aenum: Upgrade 3.1.5 -> 3.1.6
        python3-decorator: Upgrade 5.1.0 -> 5.1.1
        python3-pythonping: Upgrade 1.1.0 -> 1.1.1
        python3-dnspython: Upgrade 2.1.0 -> 2.2.0
        python3-frozenlist: Upgrade 1.2.0 -> 1.3.0
        python3-simpleeval: Upgrade 0.9.10 -> 0.9.12
        python3-twine: Upgrade 3.4.1 -> 3.7.1
        python3-pillow: Upgrade 8.3.2 -> 9.0.0
        python3-pycocotools: Upgrade 2.0.2 -> 2.0.4
        python3-paramiko: Upgrade 2.9.1 -> 2.9.2
        python3-sentry-sdk: Upgrade 1.5.2 -> 1.5.3
        imageio: Upgrade 2.13.5 -> 2.14.0

  Luca Boccassi (2):
        lvm2: do not install systemd units/initscripts when building native SDK tools
        Add recipe for duktape

  Marek Vasut (4):
        libsdl2-ttf: Remove incorrect x11 from REQUIRED_DISTRO_FEATURES
        freerdp: Upgrade 2.3.0 -> 2.4.1
        freerdp: Add missing libusb1 dependency
        freerdp: Make PCSC dependency optional

  Mark Hatle (1):
        python3-matplotlib: Disable automatic download during do_compile

  Markus Volk (5):
        libgdata: add vala PACKAGECONFIG
        gspell: inherit vala
        gmime: inherit vala
        evolution-data-server: cleanup; enable vala introspection
        folks: initial add recipe

  Martin Jansa (7):
        nodejs: fix build without scrypt
        unicode-ucd: set downloadfilename to include PV
        ntpsec: require x11 in DISTRO_FEATURES
        libgusb: add PACKAGECONFIG for vapi and keep it enabled only when introspection is
        Revert "libgusb: Use the correct args to disable vala support"
        packagegroup-meta-multimedia: include x265 only with commercial in LICENSE_FLAGS_WHITELIST
        simple-mtpfs: add dependency on autoconf-archive

  Matthias Klein (2):
        paho-mqtt-c: upgrade 1.3.8 -> 1.3.9
        paho-mqtt-cpp: new package

  Mauro Anjo (2):
        Upgrade libcamera
        libcamera: Update to latest commit

  Michael Vetter (1):
        jasper: upgrade 2.0.26 -> 2.0.33

  Mingli Yu (6):
        mariadb: Fix openssl 3.x compatibility
        libteam: switch to python3
        libteam: improve the ptest output
        php: Upgrade to 8.1.0
        php: avoid textrel QA Issue warning
        python3-lxml: check the return value

  Nisha Parrakat (1):
        nodejs_16.11.1.bb: only handle npm if configured

  Oleksandr Kravchuk (48):
        python3-protobuf: update to 3.19.0
        python3-google-api-core: update to 2.2.0
        python3-google-api-python-client: update to 2.28.0
        python3-imageio: update to 2.10.1
        python3-pybind11: update to 2.8.1
        liburing: update to 2.1
        protobuf: update to 3.19.0
        wolfssl: update to 5.0.0
        fb-test: fix SRC_URI
        bmon: fix PV
        cpuid: update to 20211129
        gtk4: set UPSTREAM_CHECK_REGEX to stable versions
        iwd: update to 1.20
        libnma: update to 1.8.32
        python3-astroid: update to 2.9.0
        python3-coverage: update to 6.2
        python3-croniter: update to 1.1.0
        python3-diskcache: update to 5.3.0
        python3-graphviz: update to 0.19
        python3-imageio: update to 2.13.3
        python3-iso8601: update to 1.0.2
        python3-ldap: update to 3.4.0
        python3-lz4: update to 3.1.10
        python3-matplotlib: update to 3.5.1
        python3-pymetno: update to 0.9.0
        python3-pywbem: update to 1.3.0
        python3-redis: update to 4.0.2
        python3-wtforms: update to 3.0.0
        soci: update to 4.0.2
        uftrace: update to 0.11
        librdkafka: update to 1.8.2
        gparted: add UPSTREAM_CHECK_URI
        libwacom: update to 1.12
        libsrtp: update to 2.4.2
        dbus-cxx: update to 2.1.0
        sysprof: update to 3.42.0
        gssdp: update to 1.4.0.1
        libkcapi: update to 1.3.1
        python3-lxml: update to 4.7.1
        python3-icu: update to 2.8
        python3-googleapis-common-protos: update to 1.54.0
        python3-gevent: update to 21.12.0
        python3-twitter: update 4.4.0
        python3-contextlib2: update to 21.6.0
        simple-mtpfs: update to 0.4.0
        xl2tpd: update to 1.3.16
        python-cantools: update to 37.0.0
        lirc: replace setuptools3-bas with distutils-common-base

  Ovidiu Panait (1):
        syslog-ng: adjust control socket location

  Patrick Williams (1):
        unifex: add recipe

  Peter Kjellerstedt (16):
        libssh: Support building for native and nativesdk
        corosync: Clean up leftover support for qdevice and qnetd
        corosync: Do not install the /var/log/cluster directory
        collectd: Do not install /var/log
        atop: Do not install the /var/log/atop directory
        openflow: Create /var/log/openflow in runtime
        mongodb: A little clean up
        mongodb: Create /var/log/mongodb in runtime
        opensaf: Create /var/log/opensaf/saflog in runtime
        opensaf: Make sure a file needed by opensafd.service is not removed
        gattlib: Explicitly disable Python support
        googletest: Switch branch from master to main
        libsrtp: Add support for specifying the crypto library
        nodejs: Drop workaround for a Python 2 dependency
        nodejs: Drop workaround for an absolute path in the npm shebang
        nodejs: A little clean up

  Philip Balister (1):
        fftw: Update to fftw-3.3.10

  Philippe Coval (7):
        lv-drivers: Lint recipe
        lv-lib-png: Lint recipe
        lvgl: Introduce global variable for configuration
        lvgl: Add hints about using configuration variables
        lvgl: Support external wayland config
        lvgl: Update to 8.1.0
        pim435: Add recipe for C implementation for userspace driver app

  Pierre-Jean Texier (1):
        libmxml: upgrade 3.2 -> 3.3

  Ramon Fried (1):
        bitwise: Upgrade 0.42 -> 0.43

  Richard Hughes (4):
        libgusb: Use the correct args to disable vala support
        libjcat: Update to 0.1.9
        libxmlb: Update to 0.3.6
        fwupd: Update to 1.7.3

  Richard Purdie (1):
        recipes: Update SRC_URI branch and protocols

  Robert Joslyn (2):
        htop: Update to 3.1.2
        postgresql: Update to 14.1

  Ross Burton (58):
        python3-imgtool: add recipe
        modemmanager: remove intltool-native DEPENDS
        python3-cryptography: backport patches to make this work against OpenSSL 3
        fwupd-efi: add new recipe
        fwupd: add new recipe
        nginx: use ln -rs
        libxmlb: put binary into separate package
        imlib2: clarify license
        xmlrpc-c: set precise BSD license
        xmlrpc-c: remove unused libxml2 dependency
        xmlrpc-c: clean up PACKAGECONFIG
        xmlrpc-c: use gnu-configize
        dash: set precise BSD license
        sg3-utils: set precise BSD license
        nodejs: set precise BSD license
        libkcapi: remove DEPENDS on target libtool
        libkcapi: set precise BSD license
        pcsc-lite: set precise BSD license
        python3-cryptography: set precise BSD license
        python3-crypto-vectors: set precise BSD license
        python3-gevent: use system libraries instead of embedding
        python3-gevent: update license
        python3-lxml: set precise BSD license
        python3-posix-ipc: set precise BSD license
        python3-posix-ipc: remove spurious dependencies
        python3-pyzmq: set precise BSD license
        fwupd: upgrade to 1.7.2
        fwupd: fix dependency typo
        net-snmp: use precise BSD license
        gnome-themes-extra: set correct SRC_URI
        qpdf: remove obsolete support for renamed libtool
        php: remove obsolete support for renamed libtool
        dhcp-relay: remove obsolete support for renamed libtool
        apache2: remove obsolete support for renamed libtool
        xfsdump: remove obsolete support for renamed libtool
        unbound: remove obsolete support for renamed libtool
        cpufrequtils: remove obsolete support for renamed libtool
        gtk+: remove obsolete support for renamed libtool
        apache-websocket: remove obsolete support for renamed libtool
        srecord: remove obsolete support for renamed libtool
        srecord: add libgcrypt PACKAGECONFIG
        srecord: properly initialize libtool
        dhcp-relay: fix rebuilds
        tbb: enable native/nativesdk builds
        fwts: do out-of-tree builds
        tbb: upgrade to 2021.5.0
        python3-scapy: remove redundant pycrypto RDEPENDS
        python3-smbbus: use DISTUTILS_SETUP_PATH
        python3-pycrypto: remove obsolete pycrypto module
        python3-smbus: use setuptools
        python3-greenlet: remove redundant distutils3 inherit
        python3-hexdump: remove
        python3-pyparted: port to setuptools
        python3-dbussy: port to setuptools
        cxxtest: move to setuptools
        iotop: move to the C port of iotop
        sanlock: port to setuptools
        pyxdg: upgrade and remove distutils

  Sakib Sajal (2):
        io-compress-lzma-perl: add recipe for version 2.096
        nss: upgrade 3.64 -> 3.73.1

  Salman Ahmed (2):
        openldap: upgrade 2.4.58 -> 2.5.8
        python3-ldap: for openldap v2.5.8, link with libldap instead of libldap_r

  Sean Nyekjaer (1):
        msgpack-cpp: fix msgpack-cpp is a header only library

  Stanislav Angelovic (1):
        Bump sdbus-c++ to version v1.0.0

  Tim Orling (12):
        python3-gammu: add recipe for v3.2.4
        python3-setuptools-rust-native: add v1.1.2 recipe
        python3-pyruvate: add recipe for v1.1.2
        python3-pytest-subtests: upgrade 0.5.0 -> 0.6.0
        python3-cryptography-vectors: upgrade 35.0.0 => 36.0.1
        python3-cryptography: upgrade 3.3.2 -> 36.0.1
        gammu: upgrade 1.32.0 -> 1.42.0
        tiptop: update download URL and HOMEPAGE
        cmocka: use https protocol for fetching
        pyo3.bbclass: add class for PyO3 cross-compilation
        setuptools3_rust.bbclass: setuptoools Rust plugin
        python3-pyruvate: disable 64 bit atomics for mips

  Trevor Gamblin (7):
        python3-pycparser: RSUGGESTS cpp and cpp-symlinks
        libnftnl: upgrade 1.2.0 -> 1.2.1
        python3-django: upgrade 3.2.5 -> 3.2.10
        libnftnl: add ptest
        python3-django: upgrade 2.2.25 -> 2.2.26
        python3-django: upgrade 3.2.10 -> 3.2.11
        python3-django: Add recipe for 4.0.1

  Wang Mingyu (10):
        gsl: upgrade 2.7 -> 2.7.1
        mozjs: upgrade 91.2.0 -> 91.4.0
        libgusb: upgrade 0.3.8 -> 0.3.9
        python3-pychromecast: upgrade 10.1.0 -> 10.1.1
        python3-websocket-client: upgrade 1.2.1 -> 1.2.3
        python3-sqlalchemy: upgrade 1.4.27 -> 1.4.28
        dnf-plugin-tui: Fix bug when generating CSV file
        sdbus-c++-tools: upgrade 1.0.0 -> 1.1.0
        sdbus-c++-libsystemd: upgrade 249 -> 250.3
        fmt: upgrade 8.0.1 -> 8.1.1

  William A. Kennington III (2):
        ipmitool: Split ipmievd into a separate package
        jq: upgrade 1.6 -> 2021-10-24 git

  Windel Bouwman (1):
        python3-coloredlogs: Added nativesdk

  Xu Huan (35):
        python3-websockets: upgrade 10.0 -> 10.1
        python3-xlsxwriter: upgrade 3.0.1 -> 3.0.2
        python3-socketio: upgrade 5.4.1 -> 5.5.0
        python3-pymongo: upgrade 3.12.0 -> 4.0
        python3-pyephem: upgrade 4.1 -> 4.1.1
        python3-pycparser: upgrade 2.20 -> 2.21
        python3-aiofiles: upgrade 0.7.0 -> 0.8.0
        python3-bitstruct: upgrade 8.11.1 -> 8.12.1
        python3-cmd2: upgrade 2.3.1 -> 2.3.3
        python3-configparser: upgrade 5.1.0 -> 5.2.0
        python3-rsa: upgrade 4.7.2 -> 4.8
        python3-django: upgrade 2.2.24 -> 2.2.25
        python3-gnupg: upgrade 0.4.7 ->0.4.8
        python3-graphviz: upgrade 0.19 -> 0.19.1
        python3-gmpy2: upgrade 2.1.0rc1 -> 2.1.1
        python3-grpcio: upgrade 1.41.1 -> 1.43.0
        python3-sqlalchemy: upgrade 1.4.28 ->1.4.29
        python3-pyro4: upgrade 4.81 -> 4.82
        python3-huey: upgrade 2.4.1 -> 2.4.2
        python3-msgpack: upgrade 1.0.2 -> 1.0.3
        python3-smpplib: upgrade 2.2.0 -> 2.2.1
        python3-wheel: upgrade 0.37.0 -> 0.37.1
        python3-meh: upgrade 0.50 -> 0.50.1
        python3-pandas: upgrade 1.3.4 -> 1.3.5
        python3-paramiko: upgrade 2.8.0 ->2.9.1
        python3-parso: upgrade 0.8.2 -> 0.8.3
        python3-protobuf: upgrade 3.19.0 ->3.19.3
        python3-pymongo: upgrade 4.0 -> 4.0.1
        python3-pynacl: upgrade 1.4.0 -> 1.5.0
        python3-pytest-timeout: upgrade 2.0.1 -> 2.0.2
        python3-socketio: upgrade 5.5.0 -> 5.5.1
        python3-argcomplete upgrade 1.12.3 -> 2.0.0
        python3-async-timeout: upgrade 4.0.0 -> 4.0.2
        python3-engineio: upgrade 4.3.0 -> 4.3.1
        python3-google-api-python-client: upgrade 2.33.0 -> 2.36.0

  Yi Zhao (31):
        netplan: fix hardcoded path for /lib/netplan
        libssh: use https instead of git in SRC_URI
        strongswan: add required kernel modules to RRECOMMENDS
        libldb: upgrade 2.3.0 -> 2.3.2
        samba: upgrade 4.14.8 -> 4.14.10
        libtalloc: fix pyext_PATTERN for cross compilation
        libtdb: fix pyext_PATTERN for cross compilation
        libtevent: fix pyext_PATTERN for cross compilation
        libldb: fix pyext_PATTERN for cross compilation
        samba: fix pyext_PATTERN for cross compilation
        samba: add pyldb to rdepends for samba-python3
        samba: update cross-answers files
        openldap: fix parallel build failure
        openldap: upgrade 2.5.8 -> 2.5.9
        openldap: fix strip issue with new patch
        postfix: upgrade 3.6.2 -> 3.6.3
        openipmi: upgrade 2.0.31 -> 2.0.32
        xmlsec1: enable native build
        upower: add UPSTREAM_CHECK_GITTAGREGEX
        lvm2: add UPSTREAM_CHECK_GITTAGREGEX
        ndctl: add UPSTREAM_CHECK_GITTAGREGEX
        nftables: upgrade 1.0.0 -> 1.0.1
        ipset: upgrade 7.11 -> 7.15
        libnetfilter-queue: upgrade 1.0.3 -> 1.0.5
        bridge-utils: upgrade 1.7 -> 1.7.1
        iscsi-initiator-utils: upgrade 2.1.4. -> 2.1.5
        openldap: ignore the mkdir errors in Makefile
        tnftp: upgrade 20151004 -> 20210827
        dracut: upgrade 051 -> 055
        tree: upgrade 2.0.0 -> 2.0.1
        postfix: upgrade 3.6.3 -> 3.6.4

  Zheng Ruoqin (4):
        spitools: upgrade 1.0.0 -> 1.0.1
        python3-rdflib: upgrade 6.0.0 -> 6.0.2
        python3-typeguard: upgrade 2.13.0 -> 2.13.2
        python3-ujson: upgrade 4.2.0 -> 4.3.0

  leimaohui (5):
        dstat: Deleted terminated project.
        pcp: Added a new recipe which provides dstat command.
        dool: Added a new OSS that forked from dstat project.
        xrdp: Fixed build error with openssl 3.0 and upgraded from 0.9.17 to 0.9.18.
        xorg-xrdp: Upgraded from 0.2.5 to 0.2.18.

  mk (1):
        python3-marshmallow: add recipe at version 3.14.0

  wangmy (79):
        avro-c: upgrade 1.10.2 -> 1.11.0
        botan: upgrade 2.18.1 -> 2.18.2
        c-ares: upgrade 1.17.2 -> 1.18.1
        grpc: upgrade 1.41.0 -> 1.41.1
        libcrypt-openssl-guess-perl: upgrade 0.13 -> 0.14
        fetchmail: upgrade 6.4.21 -> 6.4.23
        iwd: upgrade 1.18 -> 1.19
        debootstrap: upgrade 1.0.124 -> 1.0.126
        jsoncpp: upgrade 1.9.4 -> 1.9.5
        python3-aenum: upgrade 3.1.2 -> 3.1.3
        python3-aiohttp: upgrade 3.7.4 -> 3.8.0
        python3-async-timeout: upgrade 3.0.1 -> 4.0.0
        python3-fastnumbers: upgrade 3.1.0 -> 3.2.1
        python3-google-api-python-client: upgrade 2.28.0 -> 2.30.0
        python3-graphviz: upgrade 0.17 -> 0.18
        python3-httplib2: upgrade 0.20.1 -> 0.20.2
        openvpn: Change the default cipher to AES-256-GCM for server configurations
        ctags: upgrade 5.9.20210905.0 -> 5.9.20211114.0
        libmbim: upgrade 1.26.0 -> 1.26.2
        smcroute: upgrade 2.5.3 -> 2.5.4
        python3-absl: upgrade 0.15.0 -> 1.0.0
        python3-alembic: upgrade 1.7.4 -> 1.7.5
        python3-cmd2: upgrade 2.2.0 -> 2.3.0
        python3-gast: upgrade 0.5.2 -> 0.5.3
        python3-isort: upgrade 5.10.0 -> 5.10.1
        python3-pychromecast: upgrade 9.3.1 -> 10.1.0
        python3-sqlalchemy: upgrade 1.4.26 -> 1.4.27
        wireguard-tools: upgrade 1.0.20210315 -> 1.0.20210914
        cryptsetup: upgrade 2.4.1 -> 2.4.2
        libqb: upgrade 2.0.3 -> 2.0.4
        qpdf: upgrade 10.3.2 -> 10.4.0
        tesseract: upgrade 4.1.1 -> 4.1.3
        thin-provisioning-tools: upgrade 0.8.5 -> 0.9.0
        xmlsec1: upgrade 1.2.32 -> 1.2.33
        libnetfilter-log: upgrade 1.0.1 -> 1.0.2
        python3-autobahn: upgrade 21.3.1 -> 21.11.1
        pure-ftpd: upgrade 1.0.49 -> 1.0.50
        icewm: upgrade 2.8.0 -> 2.9.0
        ostree: upgrade 2021.5 -> 2021.6
        ply: upgrade 2.1.1 -> 2.2.0
        pps-tools: upgrade 1.0.2 -> 1.0.3
        dnf-plugin-tui: Fix a bug with newer version rpm.
        snort: upgrade 2.9.18.1 -> 2.9.19
        cloc: upgrade 1.90 -> 1.92
        python3-scrypt: upgrade 0.8.18 -> 0.8.19
        fio: upgrade 3.28 -> 3.29
        mpich: upgrade 3.4.2 -> 3.4.3
        nano: upgrade 5.9 -> 6.0
        redis-plus-plus: upgrade 1.3.2 -> 1.3.3
        satyr: upgrade 0.38 -> 0.39
        qpdf: upgrade 10.4.0 -> 10.5.0
        tree: upgrade 1.8.0 -> 2.0.0
        libfile-slurper-perl: upgrade 0.012 -> 0.013
        libio-socket-ssl-perl: upgrade 2.072 -> 2.073
        python3-ipython: upgrade 7.28.0 -> 7.30.1
        apache2: upgrade 2.4.51 -> 2.4.52
        python3-pyhamcrest: upgrade 2.0.2 -> 2.0.3
        python3-pymisp: upgrade 2.4.148 -> 2.4.152
        weechat: upgrade 3.0 -> 3.4
        wolfssl: upgrade 5.0.0 -> 5.1.0
        pkcs11-helper: upgrade 1.27 -> 1.28
        bats: upgrade 1.4.1 -> 1.5.0
        doxygen: upgrade 1.9.2 -> 1.9.3
        pcsc-tools: upgrade 1.5.7 -> 1.5.8
        dnfdragora: upgrade 1.1.2 -> 2.1.2
        iwd: upgrade 1.20 -> 1.21
        python3-pyscaffold: upgrade 4.1.1 -> 4.1.4
        python3-supervisor: upgrade 4.2.2 -> 4.2.4
        rdma-core: upgrade 36.0 -> 38.0
        nlohmann-json: upgrade 3.10.4 -> 3.10.5
        protobuf: upgrade 3.19.1 -> 3.19.3
        uriparser: upgrade 0.9.5 -> 0.9.6
        mtr: upgrade 0.94 -> 0.95
        networkmanager: upgrade 1.32.12 -> 1.34.0
        cryptsetup: upgrade 2.4.2 -> 2.4.3
        cups-filters: upgrade 1.27.2 -> 1.28.11
        libmodbus: upgrade 3.1.6 -> 3.1.7
        libsdl2-ttf: upgrade 2.0.15 -> 2.0.18
        monit: upgrade 5.29.0 -> 5.30.0

  zangrc (1):
        python3-smpplib: upgrade 2.1.0 -> 2.2.0

  zhengruoqin (18):
        python3-cantools: upgrade 36.4.0 -> 36.5.0
        python3-coverage: upgrade 6.0.2 -> 6.1.1
        python3-cycler: upgrade 0.10.0 -> 0.11.0
        python3-engineio: upgrade 4.2.1 -> 4.3.0
        python3-grpcio-tools: upgrade 1.41.0 -> 1.41.1
        python3-grpcio: upgrade 1.41.0 -> 1.41.1
        python3-ujson: upgrade 4.3.0 -> 5.0.0
        chrony: upgrade 4.1 -> 4.2
        openvpn: upgrade 2.5.4 -> 2.5.5
        samba: upgrade 4.14.10 -> 4.14.11
        libnet-dns-perl: upgrade 1.32 -> 1.33
        byacc: upgrade 20210808 -> 20211224
        glmark2: upgrade 2021.02 -> 2021.12
        python3-djangorestframework: upgrade 3.12.4 -> 3.13.1
        python3-google-api-python-client: upgrade 2.30.0 -> 2.33.0
        python3-networkx: upgrade 2.6.2 -> 2.6.3
        python3-pyatspi: upgrade 2.38.1 -> 2.38.2
        pugixml: upgrade 1.11.2 -> 1.11.4

poky: d78650b980..27ff420543:
  Adrian Freihofer (1):
        runqemu: support rootfs mounted ro

  Alejandro Hernandez Samaniego (3):
        tclibc-newlib: Supply missing /bin/sh target in newlib sdk
        tclibc-baremetal: Supply missing /bin/sh target in the baremetal sdk
        gcc-cross-canadian: Fix cross canadian compiler for baremetal targets

  Alexander Kanavin (262):
        runqemu: unbreak non-gl displays
        curl: submit patch upstream
        libxml2: submit patch upstream
        psplash: upgrade to latest revision
        python3-gitdb: upgrade 4.0.7 -> 4.0.9
        python3-pyparsing: upgrade 3.0.0 -> 3.0.4
        vala: upgrade 0.54.2 -> 0.54.3
        asciidoc: upgrade 10.0.0 -> 10.0.1
        lighttpd: upgrade 1.4.60 -> 1.4.61
        stress-ng: upgrade 0.13.00 -> 0.13.06
        mesa: upgrade 21.2.4 -> 21.2.5
        linux-firmware: upgrade 20210919 -> 20211027
        puzzles: upgrade to latest revision
        libsoup: upgrade 3.0.1 -> 3.0.2
        libsoup-2.4: upgrade 2.74.0 -> 2.74.1
        nghttp2: upgrade 1.45.1 -> 1.46.0
        diffoscope: upgrade 188 -> 189
        gawk: update 5.1.0 -> 5.1.1
        cmake: update 3.21.3 -> 3.21.4
        ffmpeg: update 4.4 -> 4.4.1
        icu: update 69.1 -> 70.1
        librsvg: update 2.52.2 -> 2.52.3
        xf86-video-intel: update to latest commit
        cracklib: update 2.9.5 -> 2.9.7
        cracklib: patches submitted upstream
        docbook-xml: patch is not upstreamable
        lrzsz: patch is not upstreamable
        libjitterentropy: upgrade 3.3.0 -> 3.3.1
        gdbm: upgrade 1.19 -> 1.22
        perl: backport gdbm 1.2x compatibility fixes
        valgrind: mark ptest-specific patch as inappropriate
        systemd-bootchart: submit musl patches upstream
        librsvg: set the needed atomic configuration flags directly per-target
        libxml2: mark patch as non-upstreamable
        libpcre/libpcre2: correct SRC_URI
        ovmf: submit patch upstream
        mesa-demos: drop glx option and patch
        mesa-demos: mark glew/glu patch as non-upstreamable
        xserver-xorg: update 1.20.13 -> 21.1.1
        xserver-xorg: convert from autotools to meson
        xserver-xorg: add missing libtirpc dependency
        rust: update 1.56.0 -> 1.56.1
        libgpg-error: update 1.42 -> 1.43
        socat: upgrade 1.7.4.1 -> 1.7.4.2
        kexec-tools: update 2.0.22 -> 2.0.23
        python3-hypothesis: upgrade 6.24.0 -> 6.24.2
        python3-numpy: upgrade 1.21.3 -> 1.21.4
        python3-packaging: upgrade 21.0 -> 21.2
        python3-pbr: upgrade 5.6.0 -> 5.7.0
        python3-py: upgrade 1.10.0 -> 1.11.0
        python3-setuptools: upgrade 58.3.0 -> 58.5.3
        python3-pyparsing: update 3.0.4 -> 3.0.5
        vulkan-samples: update to latest revision
        gnu-config: update to latest revision
        libgpg-error: mark patch as non-upstreamable
        valgrind: submit patch upstream
        meson: upgrade 0.59.2 -> 0.60.1
        shared-mime-info: fix meson 0.60 builds
        webkitgtk: submit patches upstream
        webkitgtk: remove unneeded patch
        spirv-headers: PV should be 1.5.4
        ovmf: submit patch upstream
        weston: submit patch upstream
        db: mark all patches as non-upstreamable
        unzip/zip: mark all patches as non-upstreamable
        automake: update 1.16.3 -> 1.16.5
        libunistring: address automake 1.16.5 failures
        gettext: address automake 1.16.5 failures
        ccache: upgrade 4.4.2 -> 4.5
        python3-hypothesis: upgrade 6.24.2 -> 6.24.3
        python3-pyparsing: upgrade 3.0.5 -> 3.0.6
        asciidoc: upgrade 10.0.1 -> 10.0.2
        libpipeline: upgrade 1.5.3 -> 1.5.4
        diffoscope: upgrade 190 -> 192
        piglit: upgrade to latest revision
        systemd: upgrade 249.5 -> 249.6
        xwayland: upgrade 21.1.2 -> 21.1.3
        librstd-rs: submit patches upstream
        curl: update 7.79.1 -> 7.80.0
        librsvg: update 2.52.3 -> 2.52.4
        libsamplerate0: update 0.1.9 -> 0.2.2
        patches: correct whitespace/spelling for Upstream-Status tags
        autoconf: add missing Upstream-Status to patches
        libxml2: add missing Upstream-Status tag
        unfs3: add missing Upstream-Status tag
        kea: add missing Upstream-Status to a patch
        libnl: add missing Upstream-Status tag
        rust-hello-world: add missing Upstream-Status to a patch
        numactl: add missing Upstream-Status to a patch
        expect: do not install examples, drop related patch
        slang: mark patch as inappropriate for upstream submission
        busybox: drop 0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch
        librsvg: submit system-deps patch upstream
        groff: include references to corresponding upstream commits in a patch
        logrotate: add a link to upstream review for one of the patch
        glib-2.0: submit patch upstream
        ell: remove unneeded patch
        apt: drop unneeded chunk from a musl patch, submit the rest upstream
        diffstat: remove unneeded patch
        dpkg: replace a patch with a tweak to an already existing sed fixup
        elfutils: update 0.185 -> 0.186
        elfutils: submit patch upstream
        weston: mark patch as denied
        gptfdisk: submit patch upstream
        git: update 2.33.1 -> 2.34.0
        cmake: update 3.21.4 -> 3.22.0
        systemd: update 249.6 -> 249.7
        vulkan: update 1.2.191.0 -> 1.2.198.0
        bind: update 9.16.22 -> 9.16.23
        python3-packaging: update 21.2 -> 21.3
        python3-setuptools: update 58.5.3 -> 59.2.0
        libcomps: remove unneeded patch
        libdnf: submit patches upstream
        meson: submit patch upstream
        perl-cross: submit patches upstream
        perl: submitted patch upstream
        testimage.bbclass: request the use of kvm by default
        go-helloworld: update to latest revision
        go-helloworld: test at runtime
        python3-rfc3339/3986-validator: correct upstream version check
        go: update 1.16.10 -> 1.17.3
        ovmf: remove patch merged upstream
        insane.bbclass: add a check that Upstream-Status patch tag is present and correctly formed
        perl: replace a patch with a config option
        meson: configure and use generic exe_wrapper
        perlcross: do not copy ${S}/patches into sysroot
        python3: mark patch as inappropriate, with better explanation
        vala: submit patch upstream
        valgrind: remove unneeded patch
        lighttpd: remove unneeded (since meson switch) patch
        stress-ng: submit patch upstream
        zstd: submit patch upstream
        sudo: submit patch upstream
        adwaita-icon-theme: submit patch upstream
        igt-gpu-tools: correct patch status
        wayland: drop unnecessary patch
        xserver-xorg: remove unneeded patch
        kexec-tools: drop unneeded patch
        piglit: submit patches upstream
        systemtap: submit patch upstream
        ffmpeg: submit patch upstream
        libfm: submit patches upstream
        libgcrypt: submit patch upstream
        libgpg-error: submit patch upstream
        lttng: submit patches upstream
        rustfmt: remove the recipe
        python3-pycryptodome: update to 3.12.0
        strace: update 5.14 -> 5.15
        cups: update 2.3.3op2 -> 2.4.0
        erofs-utils: update 1.3 -> 1.4
        rust: update 1.56.1 -> 1.57.0
        git: upgrade 2.34.0 -> 2.34.1
        go: update 1.17.3 -> 1.17.4
        libunwind: update 1.6.0 -> 1.6.2
        libseccomp: update 2.5.2 -> 2.5.3
        bitbake: fetch2/wget: do not hardcode tarball compressors in version check
        ruby: update 3.0.2 -> 3.0.3
        glib-2.0: upgrade 2.70.1 -> 2.70.2
        ell: upgrade 0.45 -> 0.46
        ccache: upgrade 4.5 -> 4.5.1
        mmc-utils: upgrade to latest revision
        python3-hypothesis: upgrade 6.24.3 -> 6.30.0
        python3-markdown: upgrade 3.3.4 -> 3.3.6
        python3-more-itertools: upgrade 8.11.0 -> 8.12.0
        python3-pbr: upgrade 5.7.0 -> 5.8.0
        python3-ruamel-yaml: upgrade 0.17.16 -> 0.17.17
        python3-setuptools: upgrade 59.2.0 -> 59.4.0
        freetype: upgrade 2.11.0 -> 2.11.1
        harfbuzz: upgrade 3.1.1 -> 3.1.2
        vulkan-loader: upgrade 1.2.198.0 -> 1.2.198.1
        mesa: upgrade 21.3.0 -> 21.3.1
        piglit: upgrade to latest revision
        webkitgtk: upgrade 2.34.1 -> 2.34.2
        diffoscope: upgrade 192 -> 194
        enchant2: upgrade 2.3.1 -> 2.3.2
        libsoup: upgrade 3.0.2 -> 3.0.3
        xxhash: upgrade 0.8.0 -> 0.8.1
        kern-tools-native: check tags, not commits for new versions
        libid3tag: move to meta-oe
        bitbake: fetch: add a test for version check where compression changes
        meson: upgrade 0.60.1 -> 0.60.2
        sstatetests: add a test for moving oe-core around in the filesystem
        serf: mark upstream as inactive
        rust-hello-world: test at runtime
        btrfs-tools: upgrade 5.15 -> 5.15.1
        python3-hypothesis: upgrade 6.30.0 -> 6.31.4
        elfutils: update patch submitted upstream
        python3-setuptools: upgrade 59.4.0 -> 59.5.0
        lighttpd: upgrade 1.4.61 -> 1.4.63
        vim: do not report upstream version check as broken
        harfbuzz: upgrade 3.1.2 -> 3.2.0
        less: upgrade 590 -> 598
        alsa: upgrade 1.2.5 -> 1.2.6
        dpkg: update 1.20.9 -> 1.21.1
        piglit: upgrade to latest revision
        go: upgrade 1.17.4 -> 1.17.5
        repo: update 2.18 -> 2.19
        libptytty: add recipe
        boost: update 1.77.0 -> 1.78.0
        rxvt-unicode: upgrade 9.26 -> 9.30
        diffoscope: upgrade 194 -> 196
        debianutils: update 4.11.2 -> 5.5
        libx11: update 1.7.3 -> 1.7.3.1
        libsdl2: update 2.0.16 -> 2.0.18
        runqemu: additional setting to force software rendering with sdl 2.0.18
        cantarell-fonts: update 0.301 -> 0.303.1
        go: log build id computations
        lib/oe/reproducible: correctly set .git location when recursively looking for git repos
        go: correctly set debug-prefix-map and build directory
        go: additional patches to help reproducibility
        selftest/reproducible: drop go items from exception list
        virgl: skip headless test on alma 8
        ruby: disable rdoc due to non-reproducibility
        rust-llvm: apply the same reproducibility patch as for llvm proper
        busybox: update 1.34.1 -> 1.35.0
        systemd: update 249.7 -> 250.1
        python3-numpy: update 1.21.4 -> 1.22.0
        mdadm: update 4.1 -> 4.2
        libportal: update 0.4 -> 0.5
        epiphany: make libportal optional, and move it to meta-oe
        librsvg: update 2.52.4 -> 2.52.5
        qemuboot/runqemu: fully form the ip= kernel parameter
        parselogs: add a couple systemd false positives
        systemd-boot: restore reproducibility
        connman-conf: do nothing in qemu, do not touch eth0
        python3: drop unneeded multiprocessing module patch
        ruby: update 3.0.3 -> 3.1.0
        meson: fold nativesdk into the main recipe
        meson: update 0.60.3 -> 0.61.1
        efivar: update 37 -> 38
        libuv: update 1.42.0 -> 1.43.0
        resolvconf: update 1.87 -> 1.91
        systemd: update 250.1 -> 250.3
        python3: update 3.10.1 -> 3.10.2
        logrotate: update 3.18.1 -> 3.19.0, drop rotate-across-filesystems patches
        sqlite: update 3.37.1 -> 3.37.2
        rust: update 1.57.0 -> 1.58.0
        readline: upgrade 8.1 -> 8.1.2
        socat: upgrade 1.7.4.2 -> 1.7.4.3
        go: upgrade 1.17.5 -> 1.17.6
        shadow: upgrade 4.10 -> 4.11.1
        e2fsprogs: upgrade 1.46.4 -> 1.46.5
        mtools: upgrade 4.0.36 -> 4.0.37
        python3-pygments: upgrade 2.11.1 -> 2.11.2
        python3-pyrsistent: upgrade 0.18.0 -> 0.18.1
        python3-ruamel-yaml: upgrade 0.17.19 -> 0.17.20
        vala: upgrade 0.54.4 -> 0.54.6
        pigz: upgrade 2.6 -> 2.7
        rpcsvc-proto: upgrade 1.4.2 -> 1.4.3
        piglit: upgrade to latest revision
        libinput: upgrade 1.19.2 -> 1.19.3
        xwayland: upgrade 21.1.3 -> 21.1.4
        puzzles: upgrade to latest revision
        webkitgtk: upgrade 2.34.2 -> 2.34.3
        diffoscope: upgrade 199 -> 200
        libsoup: upgrade 3.0.3 -> 3.0.4
        liburcu: upgrade 0.13.0 -> 0.13.1
        ffmpeg: upgrade 4.4.1 -> 5.0
        p11-kit: update 0.24.0 -> 0.24.1
        libunistring: update 0.9.10 -> 1.0
        repo: upgrade 2.19 -> 2.20
        stress-ng: upgrade 0.13.09 -> 0.13.10

  Alexey Brodkin (1):
        openssl: Use linux-latomic target for ARC

  Andreas Müller (1):
        libsdl2: Move to CMake build

  Andrei Gherzan (2):
        gcc: Fix compile of gcc plugins
        gcc: Fix typo in linux64.h install patch

  Andres Beltran (2):
        create-spdx: Set the Organization field via a variable
        create-spdx: Fix key errors in do_create_runtime_spdx

  Anton Mikanovich (1):
        bitbake: process: Do not mix stderr with stdout

  Anuj Mittal (3):
        glibc-version.inc: remove branch= from GLIBC_GIT_URI
        releases.rst: move gatesgarth to outdated releases section
        xserver-xorg: update CVE_PRODUCT

  Bruce Ashfield (69):
        linux-yocto/5.14: update to v5.14.15
        linux-yocto/5.10: update to v5.10.76
        linux-yocto-rt/5.10: update to -rt54
        strace: fix build against 5.15 kernel/kernel-headers
        ppp: fix build against 5.15 headers
        linux-libc-headers: update to v5.15
        linux-yocto/5.15: introduce recipes
        linux-yocto-rt/5.15: update to -rt17
        linux-yocto/5.14: update to v5.14.16
        linux-yocto/5.10: update to v5.10.77
        linux-yocto/5.14: update to v5.14.17
        linux-yocto/5.15: update to v5.15.1
        linux-yocto/5.10: update to v5.10.78
        kernel: provide virtual/kernel for all kernels
        linux-yocto/5.15: update to v5.15.2
        linux-yocto/5.14: update to v5.14.18
        linux-yocto/5.10: update to v5.10.79
        kernel-yocto: conditionally enable stack protection checking on x86-64
        linux-yocto-dev: bump to v5.16+
        kernel: export native PKGCONFIG variables
        python: introduce python3-dtschema
        python: import jsonpointer from meta-python
        python3-jsonpointer: Update 2.1 to 2.2
        python: import jsonschema from meta-python
        python: import idna from meta-python
        python: import rfc3339-validator from meta-python
        python: import rfc3986-validator from meta-python
        python: import webcolors from meta-python
        python: import ruamel-yaml from meta-python
        python: import pyrsistent from meta-python
        python: import rfc3987 from meta-pyton
        python: import strict-rfc3339 from meta-python
        python: import vcversioner from meta-python
        maintainers: update for kernel dtschema checking dependencies
        linux-yocto: export pkgconfig variables to devshell
        kernel: introduce python3-dtschema-wrapper
        linux-yocto-dev: introduce dt-validation PACKAGECONFIG
        linux-yocto/5.14: update to v5.14.21
        linux-yocto/5.15: update to v5.15.5
        linux-yocto/5.10: update to v5.10.82
        linux-yocto/5.15: update to v5.15.6
        linux-yocto-dev: use versioned branch as default
        linux-yocto-rt/5.10: update to -rt56
        kern-tools: bug fixes and kgit-gconfig
        linux-yocto/5.10: update to v5.10.84
        linux-yocto/5.15: update to v5.15.7
        linux-yocto/5.15: update to v5.15.8
        linux-yocto/5.10: update to v5.10.85
        linux-yocto/5.15: update to v5.15.10
        linux-yocto/5.10: update to v5.10.87
        linux-yocto/5.10: update to v5.10.89
        linux-yocto/5.15: update to v5.15.12
        linux-yocto/5.14: fix arm 32bit -rt warnings
        linux-yocto/5.15: fix arm 32bit -rt warnings
        linux-yocto/5.10/cfg: add kcov feature fragment
        linux-yocto/5.15/cfg: add kcov feature fragment
        linux-yocto/5.15: update to v5.15.13
        linux-yocto/5.10: update to v5.10.90
        conf/machine: bump qemu preferred versions to 5.15
        linux-yocto: drop 5.14 recipes
        yocto-bsp: change default to 5.15
        yocto-bsp/5.14: drop recipes
        poky: set default kernel to 5.15
        linux-yocto/5.15: fix arm defconfig warnings
        lttng-modules: update to 2.13.1
        linux-yocto/5.10: amdgpu: updates for CVE-2021-42327
        linux-yocto/5.15: update to v5.15.14
        linux-yocto/5.10: update to v5.10.91
        linux-yocto-rt/5.15: update to -rt22

  Chaitanya Vadrevu (1):
        python3-pyelftools: Depend on debugger, pprint

  Changhyeok Bae (2):
        iputils: update 20210722 to 20211215
        iproute2: update 5.15.0 to 5.16.0

  Changqing Li (3):
        cmake: upgrade 3.22.0 -> 3.22.1
        rpm: fix CVE-2021-3521
        pigz: fix one failure of command "unpigz -l"

  Chen Qi (7):
        bitbake: tests/fetch.py: fix premirror test cases
        bitbake: tests/fetch.py: add test case to ensure downloadfilename is used for premirror
        bitbake: fetch2: fix downloadfilename issue with premirror
        opkg: use oe.qa.add_message istead of package_qa_add_message
        avahi: update CVE id fixed by local-ping.patch
        waffle: add cmake-native to DEPENDS
        populate_sdk_base: remove unneeded dirs such as /dev

  Claus Stovgaard (1):
        cups: Fix missing installation of cups sysv init scripts

  Daniel Gomez (1):
        os-release: Add DISTRO_CODENAME as vardeps for do_compile

  Denys Dmytriyenko (3):
        wayland-protocols: upgrade 1.23 -> 1.24
        wayland: upgrade 1.19.0 -> 1.20.0
        mtd-utils: upgrade 2.1.3 -> 2.1.4

  Dhruva Gole (2):
        scripts/checklayer/common.py: Fixed a minor grammatical error
        yocto-check-layer: Add additional README checks

  Dmitry Baryshkov (1):
        go: fix building without SECURITY_LDFLAGS

  Florian Amstutz (1):
        systemd: Fix systemd-journal-gateway user/groups

  He Zhe (1):
        linux-yocto-dev: Set KBRANCH with =

  Jacob Kroon (3):
        native/cross: Add ar wrapper for determinism
        no-static-libs.inc: Fixes
        sstate: Preserve permissions when extracting tar archive

  Jagadeesh Krishnanjanappa (1):
        tune-cortexa72: remove crypto for the default cortex-a72

  Jasper Orschulko (4):
        repo: Add recipe for 2.17.3
        base.bbclass: Add sysroot deps for repo fetcher
        repo: Use separate task for patching repo rev
        repo: upgrade 2.17.3 -> 2.18

  Jim Wilson (1):
        gdb-common: Add --with-liblzma-prefix in xz PACKAGECONFIG.

  Joel Winarske (1):
        mesa: Add PACKAGECONFIG option for broadcom v3d Vulkan driver

  Jon Mason (3):
        runqemu: work without SERIAL_CONSOLES being defined
        scripts/lib/wic/help.py: Update Fedora Kickstart URLs
        yocto-check-layer: disregard checks if referencing another README file

  Jose Quaresma (11):
        sstate: another fix for touching files inside pseudo
        bitbake: cooker: check if upstream hash equivalence server is available
        spirv-headers: upgrade 1.5.4 -> 1.5.5
        spirv-headers: bump to last master
        spirv-tools: upgrade 2021.3 -> 2021.4
        glslang: upgrade 11.6.0 -> 11.7.0
        shaderc: upgrade 2021.2 -> 2021.3
        sstate: cleanup the sstate mirror progress check
        sstate: only search on the mirrors for the missing files
        sstate: add a function to get the sstate file name in sstate_checkhashes
        glslang: upgrade 11.7.0 -> 11.7.1

  Joshua Watt (7):
        classes/meson: Add optional rust definitions
        classes/crate-fetch: Ensure crate fetcher is available
        yocto-check-layer: Relax README case checks
        webkitgtk: Add packageconfig for libsoup2
        epiphany: Add packageconfig for libsoup2
        selftest: reproducible: Set maximum report size
        classes/native: Propagate dependencies to outhash

  Justin Bronder (1):
        bitbake: fetch2/wget: add redirectauth parameter

  Kai Kang (7):
        squashfs-tools: fix CVE-2021-41072
        squashfs-tools: follow-up fix for CVE-2021-41072
        convert-srcuri.py: use regex to check space in SRC_URI
        packagegroup-core-tools-testapps: clear GOTOOLS for riscv32
        xserver-xorg: 21.1.2 -> 21.1.3
        multilib.bbclass: set rpm file color for 32-bit multilib image
        speex: fix CVE-2020-23903

  Kamil Dziezyk (1):
        grub-efi: Add xen_boot support when 'xen' is in DISTRO_FEATURES for aarch64

  Kevin Hao (6):
        meta-yocto-bsp: Introduce the v5.15 bbappend
        tune-cortexa72: Enable the crc extension by default for cortexa72
        arch-armv8-5a.inc: Add tune include for armv8.5a
        armv9a/tune: Add the support for the Neoverse N2 core
        tune-cortexa72: Drop the redundant cortexa72-crc tune
        tune-cortexa73: Introduce cortexa73-crypto tune

  Khairul Rohaizzat Jamaluddin (1):
        epiphany: update 41.0 -> 41.3

  Khem Raj (37):
        wpebackend-fdo: Add -Wno-c++11-narrowing
        musl: Update to tip of trunk
        site/common-musl: Enable qsort_r in glib
        libsolv: Enable correct qsort_r on musl
        kernel-devsrc: Add vdso.lds and other build files for riscv64 as well
        gdb: Upgrade to 11.1
        gdb: Add dependency on libgmp
        librsvg: Disable 64bit atomics on riscv32/mipsel in crossbeam
        qemu: Build on musl targets
        qemu: Fix build on aarch64/musl
        wic: Use os.rename instead of bb.utils.rename
        qemu: Exclude building on riscv32
        ptest-packagelists: Remove qemu ptests for rv32
        gobject-introspection: Add -Dintrospection only when GIR_MESON_OPTION is not empty
        gstreamer1.0-python: Improve introspection option handling
        python3-pygobject: Improve introspection handling
        vulkan-samples: Fix cmake errors about plain signature
        vulkan-samples: Enable for architectures where it builds
        glibc-tests: Do not set SYSTEMD_SERVICE
        image: Include psplash only when screen machine feature is enabled
        weston-init: Pass --continue-without-input when launching weston
        Revert "weston-init: Pass --continue-without-input when launching weston"
        boost: Fix build on arches with no atomics
        glibc: Drop patch to support/workaround prelinked apps on armv5
        libunwind: Enable for rv64
        perf: Enable libunwind packageconfig on riscv64
        glibc: Drop ppc sqrt optimisations
        ffmpeg: Fix build on ppc32
        mesa: Fix build on ARM systems without Neon
        gdb: Drop sh4 support patch
        binutils: Drop patch to wider sh regexp
        mesa: Fix broadcom vulkan driver build on 32bit arches with 64bit time_t
        mesa: Define broadcom packageconfig knob
        glibc: Redo tzselect bash dependency problem
        gcc: Update status of musl stddef.h patch
        libsdl2: Fix build when libunwind is not used
        valgrind: Avoid accessing network in ptest task

  Konrad Weihmann (3):
        insane: add Inactive-Upstream to Upstream-Status
        insane: move src-uri-bad checks to unpack stage
        cve-check: add lockfile to task

  Leif Middelschulte (1):
        meson: improve SDK's wrapper to make Wraps work

  Li Wang (1):
        libtool: change the default AR_FLAGS from "cru" to "cr"

  Lukasz Majewski (1):
        glibc: ptest: Add running glibc time related test suite (Y2038) with ptest

  Manuel Leonhardt (2):
        sstate: Account for reserved characters when shortening sstate filenames
        dpkg: Install dkpg-perl scripts to versioned perl directory

  Marek Vasut (2):
        bootchart2: Add missing python3-math dependency
        u-boot: upgrade 2021.10 -> 2022.01

  Markus Volk (2):
        libva: move PACKAGECONFIG options to libva.inc
        vulkan-loader: inherit pkgconfig

  Martin Jansa (1):
        gdb-cross: add dependency on gmp-native

  Matt Madison (2):
        qemu.bbclass: drop OLDEST_KERNEL reference
        qemu: add patch to set minimum kernel version for riscv32

  Matthias Klein (1):
        gdb: fix aarch64 remote debugging gdb/28355

  Max Krummenacher (4):
        perf: sort-pmuevents: don't drop elements
        perf: sort-pmuevents: allow for additional type qualifiers and storage class
        ref-manual: fix patch documentation
        libsdl2: fix build if egl.pc sets macros in cflags

  Michael Halstead (3):
        releases: update to include 3.3.4
        releases: update to include 3.4.1
        releases: update to include 3.1.13

  Michael Opdenacker (35):
        manuals: correct "take affect" by "take effect"
        manuals: start of documentation standards document
        bitbake: doc: bitbake-user-manual: expand SRC_URI description
        ref-manual: remove reference to TOPDIR
        ref-manual: BBFILES_DYNAMIC - fix punctuation and quoting issues
        ref-manual: simplify SRC_URI reference
        documentation: prepare for 3.1.12 release
        bitbake: bitbake-user-manual: quoting fixes
        bitbake: bitbake-user-manual: fix typo
        bitbake: bitbake-user-manual: add missing reference
        bitbake: bitbake-user-manual: fix backslash issues
        bitbake: bitbake-user-manual: SRC_URI: mention gitsm fetcher
        ref-manual: drop support for Ubuntu 16.04
        ref-manual: drop support for Fedora 30-32
        dev-manual: remove warning about += and :append
        manuals: add hyperlinks to files in meta-skeleton
        dev-manual: how to purge duplicate sstate cache files
        migration-guides: add more class references
        ref-manual: add more class references
        misc manuals: add further class references
        ref-manual: remove newline string in PREMIRRORS
        bitbake: doc: bitbake-user-manual: expand BB_HASHSERVE and document BB_HASHSERVE_UPSTREAM
        documentation: add comment to releases.rst switchers.js
        overview-manual: fix typo
        manuals: replace "rootfs" by "root filesystem"
        quick start manual: update Share State and Hash Equivalence settings
        documentation/README: trivial typo fix
        manuals: document hash equivalence
        dev-manual: update bitbake.conf sample for static libs
        manuals: add reference to GIR_EXTRA_LIBS_PATH plus minor improvements
        migration-guides: prepare for release 3.5
        manuals: simplify references to class sections
        ref-manual: Drop TUNEABI, TUNEABI_WHITELIST, TUNEABI_OVERRIDE
        dev-manual: stop mentioning nightly builds
        bitbake: doc: bitbake-user-manual: expand BB_HASHSERVE explanations

  Mike Crowe (3):
        kernel: improve transformation from KERNEL_IMAGETYPE_FOR_MAKE
        package: Only snap libraries if they would be processed by ldconfig OS-12840
        documentation: Document PACKAGE_SNAP_LIB_SYMLINKS

  Mingli Yu (4):
        wic: use shutil.which
        libpam: Backport ptest fix checking whether files exist
        libhandy: Backport a makefile header race
        bootchart2: remove wait_boot logic

  Oleksandr Kravchuk (5):
        libxcvt: add recipe
        python3: udpate to 3.10.1
        libx11: update to 1.7.3
        xserver-xorg: update to 21.1.2
        ofono: update to 1.34

  Oleksiy Obitotskyy (1):
        package_manager: ipk: Fix host manifest generation

  Otavio Salvador (20):
        acpica: upgrade 20210930 -> 20211217
        asciidoc: upgrade 10.0.2 -> 10.1.1
        alsa-ucm-conf: upgrade 1.2.6.2 -> 1.2.6.3
        bind: upgrade 9.16.23 -> 9.16.24
        kea: upgrade 2.0.0 -> 2.0.1
        meson: upgrade 0.60.2 -> 0.60.3
        mmc-utils: upgrade to latest revision
        python3-attrs: upgrade 21.2.0 -> 21.4.0
        python3-cython: upgrade 0.29.25 -> 0.29.26
        python3-hypothesis: upgrade 6.31.4 -> 6.34.1
        python3-importlib-metadata: upgrade 4.9.0 -> 4.10.0
        python3-pygments: upgrade 2.10.0 -> 2.11.1
        python3-ruamel-yaml: upgrade 0.17.17 -> 0.17.19
        python3-tomli: upgrade 1.2.2 -> 2.0.0
        python3-zipp: upgrade 3.6.0 -> 3.7.0
        sqlite3: upgrade 3.37.0 -> 3.37.1
        stress-ng: upgrade 0.13.08 -> 0.13.09
        python3-dtschema: upgrade 2021.10 -> 2021.12
        mesa: 21.3.1 -> 21.3.3
        libxcrypt, libxcrypt-compat: upgrade 4.4.26 -> 4.4.27

  Paul Eggleton (4):
        classes/kernel*: allow disabling symlink creation
        classes/qemuboot: allow IMAGE_LINK_NAME to be empty
        classes/kernel*: add variables to allow changing artifact extension
        classes/create-spdx: handle if IMAGE_LINK_NAME is empty

  Pavel Zhukov (2):
        go: upgrade 1.16.8 -> 1.16.10
        patch.py: Initialize git repo before patching

  Peter Kjellerstedt (22):
        systemd: Do not install anything in /var/volatile
        base-files: Ignore the empty-dirs QA error due to files in /var/volatile
        apt: Do not install /var/log/apt for target
        insane.bbclass: Add a check for directories that are expected to be empty
        libx11: Update LICENSE to better reflect reality
        libx11-compose-data: Update LICENSE to better reflect reality
        ncurses.inc: Remove a no longer relevant comment
        systemd: Revert inappropriate use of ${systemd_system_unitdir}
        systemd-conf: Revert inappropriate use of ${systemd_system_unitdir}
        systemd-bootchart: Revert inappropriate use of ${systemd_system_unitdir}
        mirrors.bbclass: Clean up the additions to MIRRORS
        own-mirrors.bbclass: Clean up the additions to PREMIRRORS
        gcc-common.inc: Clean up the additions to MIRRORS
        slang: Clean up the additions to PREMIRRORS
        testsdk.py: Clean up the additions to PREMIRRORS and SSTATE_MIRRORS
        gcc-common.inc: Remove mirrors that are no longer available
        tzdata: Make it compatible with devtool modify
        tzdata: Remove unnecessary RPROVIDES
        tzdata: Clean up
        tzdata: Remove no longer relevant RCONFLICTS:${PN}
        rootfs-postcommands.bbclass: Make two comments use the new variable syntax
        systemd: Avoid a Python deprecation warning

  Pgowda (2):
        gcc: Fix CVE-2021-35465
        rust-cross: Replace TARGET_ARCH with TUNE_PKGARCH

  Quentin Schulz (10):
        README.OE-Core.md: update URLs
        ptest-packagelists: Add missing python3-webcolors entry
        make the documentation a bit more inclusive
        docs: dev-manual: common-tasks: highlight creating your own layer is not required
        documentation: conf.py: add knob for loading appropriate objects.inv
        kmscube: fix build on OpenGL ES 3 dependencies not providing GLES3/gl3ext.h
        mesa: PROVIDES virtual/libgles3
        kmscube: add build dependency on virtual/libgles3
        mesa: make ligles3-dev RDEPENDS on libgles2-dev
        bitbake: doc: bitbake-user-manual: specify the URL to be used with SSH over git is different from `git clone`'s

  Randy MacLeod (5):
        valgrind: Add util-linux-taskset ptest dependency
        valgrind: backport rseq work-around
        valgrind: remove duplicate and skipped tests from remove-for-aarch64
        valgrind: skip boost_thread for aarch64 ptests
        valgrind: make run-ptest better

  Richard Purdie (133):
        meta: Add explict branch to git SRC_URIs
        meta/scripts: Manual git url branch additions
        linunistring: Add missing gperf-native dependency
        archiver: Default to xz compresison instead of gz
        gcc: Drop libgfortran patch
        pseudo: Add fcntl64 wrapper
        libgfortran: Set GFORTRAN
        bitbake: fetch2/git: Allow git fetcher to support subdir param
        bitbake: fetch2/git: Add a warning asking users to set a branch in git urls
        bitbake: tests/fetch: Update github urls
        bitbake: fetch/git: Handle github dropping git:// support
        bitbake: fetch/git: Show warning for invalid github urls
        bitbake: lib/bb: Clean up use of len()
        bitbake: daemonize: Avoid unclosed file warning
        bitbake: lib/bb: Fix string concatination potential performance issues
        bitbake: fetch: Handle mirror user/password replacements correctly
        bitbake: tests/fetch: Add test for url parameter rewriting
        bitbake.conf: Fix corruption of GNOME mirror url
        scripts/convert-srcuri: Update SRC_URI conversion script to handle github url changes
        recipes: Update github.com urls to use https
        go-helloworld/glide: Fix urls
        opkg: Fix poor operator combination choice
        bitbake: runqueue: Fix runall option task deletion ordering issue
        bitbake: tests/fetch: Update pcre.org address after github changes
        bitbake: cooker: Handle parse threads disappearing to avoid hangs
        bitbake: fetch2/checksum/siggen: Fix taskhashes not tracking file directories
        bitbake: runqueue: Fix runall option handling
        bitbake: cooker: Remove debug code, oops :(
        bitbake: parse/ast: Show warnings for append/prepend/remove operators combined with +=/.=
        bitbake: fetch/wget: Add timeout for checkstatus calls (30s)
        bitbake: cooker: Handle parsing results queue race
        mirrors: Add uninative mirror on kernel.org
        scripts/oe-package-browser: Fix after overrides change
        scripts/oe-package-browser: Handle no packages being built
        xserver-xorg: Remove orphaned comment
        bitbake: fetch: Add README on fetcher design constraints
        wpa-supplicant: Match package override to PACKAGES for pkg_postinst
        uninative: Add version to uninative tarball name
        packagegroup-core-buildessential: Mark as TUNE_PKGARCH specific
        packagegroups-core-full-cmdline: Drop libraries packagegroup and gmp
        packagegroup-core-full-cmdline: Drop compatibility mappings
        packagegroup-core-x11-base: Drop dbus dependency
        mirrors: Add kernel.org sources mirror for downloads.yoctoproject.org
        bitbake: cooker: Fix task-depends.dot for multiconfig targets
        bitbake: tests/runqueue: Set TOPDIR in test
        bitbake: cookerdata: Set TOPDIR explicitly and fix broken findTopdir()
        bitbake: cache/ConfHandler: Drop TOPDIR/chdir manipulations
        package: Add sanity check for allarch packagegroups
        gcc: Dropping mips workaround
        lua: Backport fix for CVE-2021-43396
        glibc: Backport fix for CVE-2021-43396
        gcc: Tweak Upstream-Status formatting
        bitbake: utils: Handle lockfile filenames that are too long for filesystems
        bitbake: fetch2: Fix url remap issue and add testcase
        bitbake: bitbake-user-manual: Remove newline string in MIRRORS/PREMIRRORS
        buildhistory: Drop support for older bitbakes
        buildhistory: Fix srcrevs output
        ptest-packagelists: Handle glibc vs musl for ptest
        buildhistory: Fix do_package race issues
        bitbake.conf: Pass -D option to ranlib for determisim
        glibc: Fix i586/c3 support
        gcc: Drop no longer needed patch
        ptest-packagelists: Add missing python3-jsonpointer entry
        python3: Add missing HOMEPAGE entries
        nativesdk: Handle chown/chgrp calls in nativesdk do_install tasks
        gcc: Drop mips default ABI patch
        gcc: Drop further unneeded precompiled header patch
        oeqa/utils/dump: Fix typo
        oeqa/parselogs: Fix quoting
        sanity/lib: Replace usage of LooseVersion() with bb.utils.vercmp_string_op()
        patchelf: Upgrade 0.14.1 -> 0.14.2
        debian: Fix renaming packagedata dependencies
        gst-plugins-bad: Add missing libxkbcommon vulkan dependency
        gcc: Update patch status submitted->backport
        minicom: Mark patches as backports
        minicom: Upgrade 2.7.1 -> 2.8
        glibc: Drop patch for obsolete conflict issue
        gst-plugins-bad: Bump cache versions to avoid libxkbcommon sstate issues
        puzzles: Refresh patches based upon upstream discussion
        gcc: Add CVE-2021-37322 to the list of CVEs to ignore
        bitbake: siggen: Ensure dumpsig output is deterministic
        build-appliance-image: Update to master head revision
        binutils: Drop mips gold patch
        binutils: Add more detail to the ppc patch
        binutils: Drop mips default target patch
        perf: Tweak for mips n64
        binutils: Drop mips XLP support patch
        puzzles: Upgrade to latest git with patches merged
        lttng-ust: upgrade 2.13.0 -> 2.13.1
        patchelf: upgrade 0.14.2 -> 0.14.3
        lttng-tools: Backport ptest fix
        lttng-tools: Disable problem tests
        bitbake: tests/runqueue: Improve lockfile handling race
        python3-idna: Update license to Unicode-TOU
        bitbake: tests/fetch: Drop gnu urls from wget connectivity test
        manpages: Fix override/append ordering and hence task signatures
        qemu: Upgrade 6.1.0 -> 6.2.0
        lttng-tools: Upgrade 2.13.1 -> 2.13.2
        oeqa/selftest/bbtests: Use YP sources mirror instead of GNU
        qemu: Add selinux PACKAGECONFIG
        package_deb/ipk/rpm: Add more minimal do_build dependencies back
        meson: Handle qemu riscv issues
        openssl: Add reproducibility fix
        webkitgtk: Add reproducibility fix
        scripts: Update to use exec_module() instead of load_module()
        bitbake: utils: Update to use exec_module() instead of load_module()
        gtk-doc/meson: Fix typos
        libsdl2: Fix X11 configure options
        Revert "qemu.bbclass: drop OLDEST_KERNEL reference"
        allarch: Fix interaction with qemu class
        expat: Update HOMEPAGE to current url
        wayland-protocols: Change inherit order
        sstatetests: Add OLDEST_KERNEL to allarch tests
        oeqa/sstate: Fix allarch samesigs test
        buildtools-installer: Update to use 3.4
        bitbake: utils: Add disable_network function
        bitbake: bitbake-worker: Add/support network task flag
        bitbake: runqueue: Drop BB_STAMP_POLICY/BB_STAMP_WHITELIST
        classes: Only allow network in existing network accessing code
        sanity: Drop TUNEABI, TUNEABI_WHITELIST, TUNEABI_OVERRIDE
        expat: Upgrade 2.4.2 -> 2.4.3
        expat: Drop unneeded libtool patch, we use cmake
        bitbake: doc: Drop BB_STAMP_POLICY/BB_STAMP_WHITELIST
        expat: Simplify ptest-runner
        build-appliance-image: Update to master head revision
        bitbake: build: Tweak exception handling for setscene tasks
        bitbake: fetch2: Add crate fetcher
        sstate: Show better exception information for failures
        sstate: Improve failure to obtain archive message/handling
        abi_version: Bump HASHEQUIV_HASH_VERSION
        crate-fetch: Switch to version contained in bitbake
        build-appliance-image: Update to master head revision
        build-appliance-image: Update to master head revision

  Robert Joslyn (4):
        ref-manual: Fix module_conf typo
        curl: Update to 7.81.0
        curl: Rework openssl and random PACKAGECONFIGs
        maintainers.inc: Add myself as maintainer for curl

  Robert P. J. Day (1):
        ref-manual: generalize definition of "container layer"

  Robert Yang (3):
        sanity.bbclass: Update required gcc version to v7.5
        bitbake: lib/pyinotify.py: Remove deprecated module asyncore
        bitbake: data_smart.py: Skip old override syntax checking for anonymous functions

  Ross Burton (61):
        openssl: fix builds on ARMv8 targets without Aarch64
        python3: silence DeprecationWarnings in python3-config
        meson: set objcopy in the cross and native toolchain files
        ref-manual: improve documentation for SDKMACHINE
        kickstart: update busybox note regarding PARTUUID
        scons: support out-of-tree builds
        vim: fix CVE-2021-3796, CVE-2021-3872, and CVE-2021-3875
        vim: add patch number to CVE-2021-3778 patch
        meta: use ln -rs instead of lnr
        insane: remove unrecognised option check for Meson
        dtc: merge .bb/.inc
        dtc: use Meson to build
        dtc: add PACKAGECONFIGs for tools and yaml
        dtc: fix mingw build
        ncurses: poll() works, but only on Linux
        vim: fix CVE-2021-3927 and CVE-2021-3928
        scripts/lnr: remove
        gmp: fix CVE-2021-43618
        oe/utils: allow naming threads in ThreadedPool
        sstate: explicitly name the checkhashes thread pool
        oe/utils: by default cap cpu_count() to 64 cores
        vim: fix CVE-2021-3968 and CVE-2021-3973
        vim: set PACKAGECONFIG idiomatically
        openssl: fix EVP_PKEY_CTX_get_rsa_pss_saltlen() not returning a value
        recipetool: handle GitLab URLs like we do GitHub
        recipetool: extend curl detection when creating recipes
        glew: update patch status
        libx11: update patch status
        libxkbcommon: remove obsolete util-macros dependency
        libxkbcommon: allow building of API documentation
        xkbcommon: split xkbcli into a separate package
        libxkbcommon: split libraries into separate packages
        xkbcommon: add option for xkbregistry
        tcf-agent: cleanup patches
        vim: upgrade to 8.2 patch 3752
        runqemu: check the qemu PID has been set before kill()ing it
        gstreamer1.0-plugins-bad: clean up X11 dependencies
        libtool: don't prefix the installed binary
        binutils: don't expect libtool to be host-prefixed
        pkgconfig: remove obsolete support for renamed libtool
        gtk+3: remove obsolete support for renamed libtool
        db: remove obsolete support for renamed libtool
        freetype: remove obsolete support for renamed libtool
        apr: remove obsolete support for renamed libtool
        qemu: remove obsolete support for renamed libtool
        subversion: remove obsolete support for renamed libtool
        apmd: remove obsolete support for renamed libtool
        libical: upgrade to 3.0.12
        python3: backport a fix so the test suite passes with OpenSSL 3.0.1
        openssl: upgrade to 3.0.1
        kmod: remove obsolete ac_pwd manipulation
        kmod: merge target/native recipes
        kmod: expand compression PACKAGECONFIGs
        gawk: remove load-sensitive tests
        linux-yocto: add libmpc-native to DEPENDS
        xserver-xorg: whitelist two CVEs
        systemtap: fix vsprintf errors
        oeqa/runtime/stap: rewrite test
        vim: update to include latest CVE fixes
        lighttpd: backport a fix for CVE-2022-22707
        oeqa/runtime/stap: increase buffer size

  S. Lockwood-Childs (1):
        cups: fix typo in flags to disable avahi

  Samuli Piippo (1):
        rpm: remove tmp folder created during install

  Saul Wold (7):
        create_spdx: ensure is_work_shared() is unique
        create-spdx: Protect against None from LICENSE_PATH
        kernel: add -dbg package
        perl: Enable threading
        kernel.bbclass: use common strip()
        package: Add support for kernel stripping
        create-spdx: Add kernel work-shared source

  Schmidt, Adriaan (1):
        wic: support rootdev identified by partition label

  Stefan Herbrechtsmeier (17):
        bitbake: fetch2: npmsw: Add support for duplicate dependencies without url
        bitbake: fetch2: npmsw: Add support for github prefix in npm shrinkwrap version
        bitbake: fetch2: Unify tar command in unpack
        bitbake: fetch2: Add striplevel support to unpack
        bitbake: bitbake-user-manual: Add striplevel unpack parameter
        bitbake: test/fetch: Add striplevel unpack parameter test
        recipetool: Set master branch only as fallback
        selftest/devtool: Check branch in git fetch
        selftest/recipetool: Split tests into separate test classes
        selftest: devtool: Separate common functions and devtool sstate setup into two classes
        selftest/recipetool: Add tests for branch parameter and srcbranch option
        bitbake: fetch: npm: Quote destdir in run chmod command
        bitbake: fetch: npm: Use temporary file for empty user config
        recipetool: Sort output of guess_license function to be deterministic
        recipetool: Separate licenses with & operator
        selftest: recipetool: Add test for split_pkg_licenses function
        selftest: recipetool: Add test for handle_license_vars function

  Steve Sakoman (4):
        ref-system-requirements.rst: Add Debian 11 to list of supported distros
        ref-system-requirements.rst: Add Fedora 33 and 34 to list of supported distros
        ref-system-requirements.rst: Add openSUSE Leap 15.2 to list of supported distros
        cve-extra-exclusions: add db CVEs to exclusion list

  Sundeep KOKKONDA (2):
        glibc : Fix CVE-2022-23218
        glibc : Fix CVE-2022-23219

  Teoh Jay Shen (2):
        linux-yocto/5.10: update genericx86* machines to v5.10.87
        linux-yocto/5.14: update genericx86* machines to v5.14.21

  Thomas Perrot (1):
        uboot-sign: fix the concatenation when multiple U-BOOT configurations are specified

  Tim Orling (29):
        scripts/buildhistory-diff: drop use of distutils
        maintainers.inc: update email address
        poky.yaml: centos-7 python36-pip -> python3-pip
        classes/distutils-*: add warning of deprecation
        setuptools3: refactor for no distutils bbclasses
        dnf: inherit setuptools3-base instead of distutils
        libdnf: inherit setuptools3-base not distutils
        python3-cython: DISTUTILS_* -> SETUPTOOLS_*
        python3-dbus: inherit setuptools3-base not distuils
        gpgme: inherit setuptools-base not distuils
        python3-pip: inherit setuptools3 not distuils3
        systemtap: use setuptools-base not distutils
        libcomps: inherit setuptools3-base not distutils
        createrepo-c: inherit setuptools3-base not distutils
        librepo: inherit setuptools3-base not distutils
        btrfs-tools: use setuptools3-base not distutils
        bind: inherit setuptools3-base instead of distutils
        python3-pygobject: setuptools instead of distuils
        python3-setuptools: do not depend on distutils
        gstreamer1.0-python: inherit setuptools3-base
        recipetool/create_buildsys_python.py: less distutils
        waf.bbclass: drop usage of distutils
        dnf: drop python3-distutils dependency
        python3native.bbclass: distutils -> sysconfig
        rootfs_rpm.bbclass: distutils -> sysconfig module
        python3-hypothesis: upgrade 6.34.1 -> 6.35.0
        ref-manual/variables.rst: add SETUPTOOLS_SETUP_PATH
        ref-manual/variables.rst: add SETUPTOOLS_*_ARGS
        ref-manual/classes.rst: add setuptools3-base

  Tom Hochstein (3):
        wayland: Fix wayland-tools packaging
        nativesdk-packagegroup-sdk-host.bb: Update host tools for wayland
        bitbake.conf: Use wayland distro feature for native builds

  Ulrich Ölmann (1):
        gstreamer1.0-plugins-base: add support for graphene

  Valerii Chernous (1):
        elf: Discard input .note.gnu.build-id sections

  Vivien Didelot (2):
        beaglebone-yocto: prefer u-boot
        beaglebone-yocto: move kernel and dtb to packagegroup-core-boot

  Vyacheslav Yurkov (17):
        overlayfs: all overlays unit
        oeqa/selftest: refactor common functions
        overlayfs: meta-selftest recipe fix
        oeqa/selftest: extend overlayfs test
        overlayfs: add debug information
        ref-manual: update overlayfs class
        rootfs-postcommands: update systemd_create_users
        files: add overlayfs-etc-preinit.sh.in
        wic: image for overlayfs-etc tests
        overlayfs-etc: mount etc as overlayfs
        image: add overlayfs-etc image feature
        oeqa/selftest: overlayfs helper function
        oeqa/selftest: unit tests for overlayfs-etc
        overlayfs: update notes on /etc
        overlayfs: move templates to files directory
        ref-manual: add overlayfs-etc class
        ref-manual: document overlayfs-etc image feature

  Yi Zhao (6):
        bind: remove -r option from rndc-confgen in initscript
        rpcbind: install rpcbind.conf
        python3-numpy: move recipe to python directory
        python3-numpy: add python3-json to RDEPENDS
        oeqa: fix warnings for append operators combined with +=
        meta-skeleton: fix warnings for append operators combined with +=

  Yongxin Liu (1):
        grub2: fix CVE-2021-3981

  Zev Weiss (1):
        u-boot: Split do_configure logic into separate file

  pgowda (2):
        gcc: Fix CVE-2021-42574
        binutils: CVE-2021-42574

  wangmy (67):
        bind: upgrade 9.16.21 -> 9.16.22
        glib-2.0: upgrade 2.70.0 -> 2.70.1
        python3-dbusmock: upgrade 0.24.0 -> 0.24.1
        python3-docutils: upgrade 0.17.1 -> 0.18
        btrfs-tools: upgrade 5.14.2 -> 5.15
        diffoscope: upgrade 189 -> 190
        ell: upgrade 0.44 -> 0.45
        harfbuzz: upgrade 3.0.0 -> 3.1.1
        iproute2: upgrade 5.14.0 -> 5.15.0
        iso-codes: upgrade 4.7.0 -> 4.8.0
        iw: upgrade 5.9 -> 5.16
        libpcre2: upgrade 10.37 -> 10.39
        msmtp: upgrade 1.8.18 -> 1.8.19
        libevdev: upgrade 1.11.0 -> 1.12.0
        libdrm: upgrade 2.4.107 -> 2.4.108
        libhandy: upgrade 1.4.0 -> 1.5.0
        python3-importlib-metadata: upgrade 4.8.1 -> 4.8.2
        python3-jinja2: upgrade 3.0.2 -> 3.0.3
        python3-more-itertools: upgrade 8.10.0 -> 8.11.0
        libtasn1: upgrade 4.17.0 -> 4.18.0
        ethtool: upgrade 5.14 -> 5.15
        stress-ng: upgrade 0.13.06 -> 0.13.07
        systemtap: upgrade 4.5 -> 4.6
        python3-scons: upgrade 4.2.0 -> 4.3.0
        libcap: upgrade 2.60 -> 2.61
        mesa: upgrade 21.2.5 -> 21.3.0
        python3-mako: upgrade 1.1.5 -> 1.1.6
        libjpeg-turbo: upgrade 2.1.1 -> 2.1.2
        libdrm: upgrade 2.4.108 -> 2.4.109
        libsoup-2.4: upgrade 2.74.1 -> 2.74.2
        libunwind: upgrade 1.5.0 -> 1.6.0
        libexif: upgrade 0.6.23 -> 0.6.24
        mtools: upgrade 4.0.35 -> 4.0.36
        patchelf: upgrade 0.13 -> 0.14.1
        sqlite3: upgrade 3.36.0 -> 3.37.0
        sysklogd: upgrade 2.2.3 -> 2.3.0
        ovmf: upgrade 202108 -> 202111
        python3-docutils: upgrade 0.18 -> 0.18.1
        python3-libarchive-c: upgrade 3.1 -> 3.2
        sysstat: upgrade 12.4.3 -> 12.4.4
        vala: upgrade 0.54.3 -> 0.54.4
        xauth: upgrade 1.1 -> 1.1.1
        mpg123: upgrade 1.29.2 -> 1.29.3
        python3-cython: upgrade 0.29.24 -> 0.29.25
        libcap: upgrade 2.61 -> 2.62
        linux-firmware: upgrade 20211027 -> 20211216
        python3-importlib-metadata: upgrade 4.8.2 -> 4.9.0
        sysvinit: upgrade 3.00 -> 3.01
        python3-dbusmock: upgrade 0.24.1 -> 0.25.0
        python3-numpy: upgrade 1.21.4 -> 1.21.5
        expat: upgrade 2.4.1 -> 2.4.2
        gnupg: upgrade 2.3.3 -> 2.3.4
        ell: upgrade 0.46 -> 0.47
        bash: upgrade 5.1.8 -> 5.1.16
        createrepo-c: upgrade 0.17.7 -> 0.18.0
        bluez5: upgrade 5.62 -> 5.63
        iso-codes: upgrade 4.8.0 -> 4.9.0
        less: upgrade 598 -> 600
        libpipeline: upgrade 1.5.4 -> 1.5.5
        diffoscope: upgrade 196 -> 199
        libsdl2: upgrade 2.0.18 -> 2.0.20
        hdparm: upgrade 9.62 -> 9.63
        mesa: upgrade 21.3.3 -> 21.3.4
        python3-git: upgrade 3.1.24 -> 3.1.26
        python3-numpy: upgrade 1.22.0 -> 1.22.1
        strace: upgrade 5.15 -> 5.16
        btrfs-tools: upgrade 5.15.1 -> 5.16

  zhengruoqin (9):
        opkg-utils: upgrade 0.4.5 -> 0.5.0
        opkg: upgrade 0.4.5 -> 0.5.0
        glib-networking: upgrade 2.70.0 -> 2.70.1
        stress-ng: upgrade 0.13.07 -> 0.13.08
        vte: upgrade 0.66.0 -> 0.66.2
        rt-tests: upgrade 2.2 -> 2.3
        shadow: upgrade 4.9 -> 4.10
        libmicrohttpd: upgrade 0.9.73 -> 0.9.75
        gtk+3: upgrade 3.24.30 -> 3.24.31

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I11c88e9f9999d629de5a0ecdb44ccc1003b02376
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch b/poky/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch
index a6e8ef1..0cefbed 100644
--- a/poky/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch
+++ b/poky/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch
@@ -1,22 +1,18 @@
-From 081c6be2f2f1cd77f399ea414f8d89c107826624 Mon Sep 17 00:00:00 2001
+From 6b8547161b902b01b639d05a4cdf849d7694556f Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 22 May 2020 15:29:23 +0000
-Subject: [PATCH] Fix musl build
+Subject: [PATCH] apt-pkg/contrib/srvrec.h: Explicitly include sys/types.h
 
-methods/connect.cc: Musl doesn't support AI_IDN flag in netdb.h
-header so define it manually.
-apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h
-to avoid errors in types u_int_SIZE.
+This avoids type errors with musl C library.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/200]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
  apt-pkg/contrib/srvrec.h | 1 +
- methods/connect.cc       | 5 +++++
- 2 files changed, 6 insertions(+)
+ 1 file changed, 1 insertion(+)
 
 diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
-index e22b7a1..b1115f5 100644
+index e5d0f43..2010184 100644
 --- a/apt-pkg/contrib/srvrec.h
 +++ b/apt-pkg/contrib/srvrec.h
 @@ -9,6 +9,7 @@
@@ -27,19 +23,6 @@
  #include <string>
  #include <vector>
  #include <arpa/nameser.h>
-diff --git a/methods/connect.cc b/methods/connect.cc
-index 1d6f891..122df35 100644
---- a/methods/connect.cc
-+++ b/methods/connect.cc
-@@ -42,6 +42,11 @@
- #include "connect.h"
- #include "rfc2553emu.h"
- #include <apti18n.h>
-+
-+#ifndef AI_IDN
-+#define AI_IDN 0x0040
-+#endif
-+
- 									/*}}}*/
- 
- static std::string LastHost;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/apt/apt_2.2.4.bb b/poky/meta/recipes-devtools/apt/apt_2.2.4.bb
index 29fc49f..4e710e1 100644
--- a/poky/meta/recipes-devtools/apt/apt_2.2.4.bb
+++ b/poky/meta/recipes-devtools/apt/apt_2.2.4.bb
@@ -51,9 +51,8 @@
     -DWITH_TESTS=False \
 "
 
-do_configure:prepend () {
-    echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >>  ${WORKDIR}/toolchain.cmake
-
+do_configure:prepend() {
+	echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >>  ${WORKDIR}/toolchain.cmake
 }
 
 # Unfortunately apt hardcodes this all over the place
@@ -61,7 +60,7 @@
 RDEPENDS:${PN} += "bash perl dpkg"
 
 customize_apt_conf_sample() {
-    cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF
+	cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF
 Dir "${STAGING_DIR_NATIVE}/"
 {
    State "var/lib/apt/"
@@ -114,22 +113,25 @@
 }
 
 do_install:append:class-native() {
-    customize_apt_conf_sample
+	customize_apt_conf_sample
 }
 
 do_install:append:class-nativesdk() {
-    customize_apt_conf_sample
+	customize_apt_conf_sample
 }
 
-
 do_install:append:class-target() {
-    #Write the correct apt-architecture to apt.conf
-    APT_CONF=${D}/etc/apt/apt.conf
-    echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF}
+	# Write the correct apt-architecture to apt.conf
+	APT_CONF=${D}${sysconfdir}/apt/apt.conf
+	echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF}
+
+	# Remove /var/log/apt. /var/log is normally a link to /var/volatile/log
+	# and /var/volatile is a tmpfs mount. So anything created in /var/log
+	# will not be available when the tmpfs is mounted.
+	rm -rf ${D}${localstatedir}/log
 }
 
-# Avoid non-reproducible -src package
-do_install:append () {
-        sed -i -e "s,${B},,g" \
-            ${B}/apt-pkg/tagfile-keys.cc
+do_install:append() {
+	# Avoid non-reproducible -src package
+	sed -i -e "s,${B},,g" ${B}/apt-pkg/tagfile-keys.cc
 }
diff --git a/poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-exclude.patch b/poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-exclude.patch
index 374b939..c73aca4 100644
--- a/poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-exclude.patch
+++ b/poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-exclude.patch
@@ -3,6 +3,7 @@
 Date: Thu, 12 Mar 2020 17:25:23 +0000
 Subject: [PATCH 4/7] autoreconf-exclude.patch
 
+Upstream-Status: Inappropriate [oe specific]
 ---
  bin/autoreconf.in | 26 ++++++++++++++++++++++++++
  1 file changed, 26 insertions(+)
diff --git a/poky/meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch b/poky/meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch
index de048d2..23329f7 100644
--- a/poky/meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch
+++ b/poky/meta/recipes-devtools/autoconf/autoconf/autotest-automake-result-format.patch
@@ -3,6 +3,7 @@
 Date: Thu, 12 Mar 2020 17:25:45 +0000
 Subject: [PATCH 6/7] autotest-automake-result-format.patch
 
+Upstream-Status: Inappropriate [oe specific]
 ---
  lib/autotest/general.m4 | 39 +++++++++++++++++++++++++++++----------
  1 file changed, 29 insertions(+), 10 deletions(-)
diff --git a/poky/meta/recipes-devtools/autoconf/autoconf/preferbash.patch b/poky/meta/recipes-devtools/autoconf/autoconf/preferbash.patch
index 3979e83..cfb145a 100644
--- a/poky/meta/recipes-devtools/autoconf/autoconf/preferbash.patch
+++ b/poky/meta/recipes-devtools/autoconf/autoconf/preferbash.patch
@@ -14,6 +14,8 @@
 
 Change the search order to bash then sh, so that a known-good shell (bash)
 is used if available over something which is merely POSIX compliant.
+
+Upstream-Status: Inappropriate [oe specific]
 ---
  lib/m4sugar/m4sh.m4 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/poky/meta/recipes-devtools/autoconf/autoconf/program_prefix.patch b/poky/meta/recipes-devtools/autoconf/autoconf/program_prefix.patch
index 4ff535f..657cbb3 100644
--- a/poky/meta/recipes-devtools/autoconf/autoconf/program_prefix.patch
+++ b/poky/meta/recipes-devtools/autoconf/autoconf/program_prefix.patch
@@ -3,6 +3,7 @@
 Date: Thu, 12 Mar 2020 17:28:38 +0000
 Subject: [PATCH 3/7] program_prefix.patch
 
+Upstream-Status: Inappropriate [oe specific]
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 ---
  lib/autoconf/general.m4 | 2 +-
diff --git a/poky/meta/recipes-devtools/autoconf/autoconf/remove-usr-local-lib-from-m4.patch b/poky/meta/recipes-devtools/autoconf/autoconf/remove-usr-local-lib-from-m4.patch
index b842f14..f387801 100644
--- a/poky/meta/recipes-devtools/autoconf/autoconf/remove-usr-local-lib-from-m4.patch
+++ b/poky/meta/recipes-devtools/autoconf/autoconf/remove-usr-local-lib-from-m4.patch
@@ -3,6 +3,7 @@
 Date: Thu, 12 Mar 2020 17:25:37 +0000
 Subject: [PATCH 1/7] remove-usr-local-lib-from-m4.patch
 
+Upstream-Status: Inappropriate [oe specific]
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 ---
  lib/autoconf/functions.m4 | 9 ---------
diff --git a/poky/meta/recipes-devtools/automake/automake/0001-automake-Update-for-python.m4-to-respect-libdir.patch b/poky/meta/recipes-devtools/automake/automake/0001-automake-Update-for-python.m4-to-respect-libdir.patch
new file mode 100644
index 0000000..d280456
--- /dev/null
+++ b/poky/meta/recipes-devtools/automake/automake/0001-automake-Update-for-python.m4-to-respect-libdir.patch
@@ -0,0 +1,83 @@
+From dff74c5b19935cc11b30116a7ae9c8affdff246b Mon Sep 17 00:00:00 2001
+From: Kumar Gala <galak@kernel.crashing.org>
+Date: Thu, 11 Aug 2011 01:26:33 -0500
+Subject: [PATCH] automake: Update for python.m4 to respect libdir
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+
+Updated for automake-1.12.6
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ m4/python.m4 | 24 ++++++------------------
+ 1 file changed, 6 insertions(+), 18 deletions(-)
+
+diff --git a/m4/python.m4 b/m4/python.m4
+index 4e7de9427..40fc5b396 100644
+--- a/m4/python.m4
++++ b/m4/python.m4
+@@ -96,6 +96,8 @@ AC_DEFUN([AM_PATH_PYTHON],
+     [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`])
+   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+ 
++  AC_SUBST([PYTHON_LIB_PREFIX], ['${libdir}'])
++
+   dnl At times, e.g., when building shared libraries, you may want
+   dnl to know which OS platform Python thinks this is.
+   dnl
+@@ -251,14 +253,7 @@ except ImportError:
+    else
+      am_py_prefix=$am_cv_python_prefix
+    fi
+-   am_cv_python_pythondir=`$PYTHON -c "
+-$am_python_setup_sysconfig
+-if can_use_sysconfig:
+-  sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
+-else:
+-  from distutils import sysconfig
+-  sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+-sys.stdout.write(sitedir)"`
++   am_cv_python_pythondir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
+    #
+    case $am_cv_python_pythondir in
+    $am_py_prefix*)
+@@ -268,7 +263,7 @@ sys.stdout.write(sitedir)"`
+    *)
+      case $am_py_prefix in
+        /usr|/System*) ;;
+-       *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
++       *) am_cv_python_pythondir=$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages
+           ;;
+      esac
+      ;;
+@@ -293,14 +288,7 @@ sys.stdout.write(sitedir)"`
+    else
+      am_py_exec_prefix=$am_cv_python_exec_prefix
+    fi
+-   am_cv_python_pyexecdir=`$PYTHON -c "
+-$am_python_setup_sysconfig
+-if can_use_sysconfig:
+-  sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'})
+-else:
+-  from distutils import sysconfig
+-  sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
+-sys.stdout.write(sitedir)"`
++   am_cv_python_pyexecdir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
+    #
+    case $am_cv_python_pyexecdir in
+    $am_py_exec_prefix*)
+@@ -310,7 +298,7 @@ sys.stdout.write(sitedir)"`
+    *)
+      case $am_py_exec_prefix in
+        /usr|/System*) ;;
+-       *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
++       *) am_cv_python_pyexecdir=$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages
+           ;;
+      esac
+      ;;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/automake/automake/python-libdir.patch b/poky/meta/recipes-devtools/automake/automake/python-libdir.patch
deleted file mode 100644
index f319fc0..0000000
--- a/poky/meta/recipes-devtools/automake/automake/python-libdir.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 61bd143910001aaf610416d7ca56c52c0b081318 Mon Sep 17 00:00:00 2001
-From: Kumar Gala <galak@kernel.crashing.org>
-Date: Thu, 11 Aug 2011 01:26:33 -0500
-Subject: [PATCH] automake: Update for python.m4 to respect libdir
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-
-Updated for automake-1.12.6
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- m4/python.m4 | 27 +++++++--------------------
- 1 file changed, 7 insertions(+), 20 deletions(-)
-
-diff --git a/m4/python.m4 b/m4/python.m4
-index b2302ba..dbc6954 100644
---- a/m4/python.m4
-+++ b/m4/python.m4
-@@ -96,12 +96,13 @@ AC_DEFUN([AM_PATH_PYTHON],
-     [am_cv_python_version=`$PYTHON -c "import sys; print('%u.%u' % sys.version_info[[:2]])"`])
-   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
- 
--  dnl Use the values of $prefix and $exec_prefix for the corresponding
--  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
-+  dnl Use the values of $prefix, $libdir and $exec_prefix for the corresponding
-+  dnl values of PYTHON_PREFIX PYTHON_LIB_PREFIX, and PYTHON_EXEC_PREFIX.  These are made
-   dnl distinct variables so they can be overridden if need be.  However,
-   dnl general consensus is that you shouldn't need this ability.
- 
-   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
-+  AC_SUBST([PYTHON_LIB_PREFIX], ['${libdir}'])
-   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
- 
-   dnl At times (like when building shared libraries) you may want
-@@ -146,14 +147,7 @@ except ImportError:
-      else
-        am_py_prefix=$prefix
-      fi
--     am_cv_python_pythondir=`$PYTHON -c "
--$am_python_setup_sysconfig
--if can_use_sysconfig:
--    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
--else:
--    from distutils import sysconfig
--    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
--sys.stdout.write(sitedir)"`
-+     am_cv_python_pythondir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
-      case $am_cv_python_pythondir in
-      $am_py_prefix*)
-        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
-@@ -163,7 +157,7 @@ sys.stdout.write(sitedir)"`
-        case $am_py_prefix in
-          /usr|/System*) ;;
-          *)
--	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
-+	  am_cv_python_pythondir=$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages
- 	  ;;
-        esac
-        ;;
-@@ -188,14 +182,7 @@ sys.stdout.write(sitedir)"`
-      else
-        am_py_exec_prefix=$exec_prefix
-      fi
--     am_cv_python_pyexecdir=`$PYTHON -c "
--$am_python_setup_sysconfig
--if can_use_sysconfig:
--    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
--else:
--    from distutils import sysconfig
--    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
--sys.stdout.write(sitedir)"`
-+     am_cv_python_pyexecdir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
-      case $am_cv_python_pyexecdir in
-      $am_py_exec_prefix*)
-        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-@@ -205,7 +192,7 @@ sys.stdout.write(sitedir)"`
-        case $am_py_exec_prefix in
-          /usr|/System*) ;;
-          *)
--	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
-+	   am_cv_python_pyexecdir=$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages
- 	   ;;
-        esac
-        ;;
diff --git a/poky/meta/recipes-devtools/automake/automake_1.16.3.bb b/poky/meta/recipes-devtools/automake/automake_1.16.5.bb
similarity index 85%
rename from poky/meta/recipes-devtools/automake/automake_1.16.3.bb
rename to poky/meta/recipes-devtools/automake/automake_1.16.5.bb
index 1882eed..6a9c185 100644
--- a/poky/meta/recipes-devtools/automake/automake_1.16.3.bb
+++ b/poky/meta/recipes-devtools/automake/automake_1.16.5.bb
@@ -18,7 +18,8 @@
 
 RDEPENDS:${PN}:class-native = "autoconf-native hostperl-runtime-native"
 
-SRC_URI += "file://python-libdir.patch \
+SRC_URI += "\
+           file://0001-automake-Update-for-python.m4-to-respect-libdir.patch \
            file://buildtest.patch \
            file://performance.patch \
            file://new_rt_path_for_test-driver.patch \
@@ -26,7 +27,7 @@
            file://0001-build-fix-race-in-parallel-builds.patch \
            "
 
-SRC_URI[sha256sum] = "ce010788b51f64511a1e9bb2a1ec626037c6d0e7ede32c1c103611b9d3cba65f"
+SRC_URI[sha256sum] = "07bd24ad08a64bc17250ce09ec56e921d6343903943e99ccf63bbf0705e34605"
 
 PERL = "${USRBINPATH}/perl"
 PERL:class-native = "${USRBINPATH}/env perl"
diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.37.inc b/poky/meta/recipes-devtools/binutils/binutils-2.37.inc
index 6093558..043f7f8 100644
--- a/poky/meta/recipes-devtools/binutils/binutils-2.37.inc
+++ b/poky/meta/recipes-devtools/binutils/binutils-2.37.inc
@@ -22,19 +22,17 @@
 BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=git"
 SRC_URI = "\
      ${BINUTILS_GIT_URI} \
-     file://0004-configure-widen-the-regexp-for-SH-architectures.patch \
      file://0005-Point-scripts-location-to-libdir.patch \
      file://0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
      file://0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
      file://0008-warn-for-uses-of-system-directories-when-cross-linki.patch \
-     file://0009-Change-default-emulation-for-mips64-linux.patch \
-     file://0010-Add-support-for-Netlogic-XLP.patch \
      file://0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
-     file://0012-Detect-64-bit-MIPS-targets.patch \
      file://0013-Use-libtool-2.4.patch \
      file://0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
      file://0015-sync-with-OE-libtool-changes.patch \
      file://0016-Check-for-clang-before-checking-gcc-version.patch \
      file://0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch \
+     file://0001-elf-Discard-input-.note.gnu.build-id-sections.patch \
+     file://0001-CVE-2021-42574.patch \
 "
 S  = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0001-CVE-2021-42574.patch b/poky/meta/recipes-devtools/binutils/binutils/0001-CVE-2021-42574.patch
new file mode 100644
index 0000000..0622ae3
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/0001-CVE-2021-42574.patch
@@ -0,0 +1,2001 @@
+From b3aa80b45c4f46029efeb204bb9f2d2c4278a0e5 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Tue, 9 Nov 2021 13:25:42 +0000
+Subject: [PATCH] Add --unicode option to control how unicode characters are
+ handled by display tools.
+
+	* nm.c: Add --unicode option to control how unicode characters are
+	handled.
+	* objdump.c: Likewise.
+	* readelf.c: Likewise.
+	* strings.c: Likewise.
+	* binutils.texi: Document the new feature.
+	* NEWS: Document the new feature.
+	* testsuite/binutils-all/unicode.exp: New file.
+	* testsuite/binutils-all/nm.hex.unicode
+	* testsuite/binutils-all/strings.escape.unicode
+	* testsuite/binutils-all/objdump.highlight.unicode
+	* testsuite/binutils-all/readelf.invalid.unicode
+
+CVE: CVE-2021-42574
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b3aa80b45c4f46029efeb204bb9f2d2c4278a0e5]
+
+RP: Added tweak uint -> unsigned int partial backport of
+https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=795588aec4f894206863c938bd6d716895886009
+
+Signed-off-by: pgowda <pgowda.cve@gmail.com>
+---
+ binutils/ChangeLog         |  15 +
+ binutils/NEWS              |   9 +
+ binutils/doc/binutils.texi |  78 ++++
+ binutils/nm.c              | 228 ++++++++++-
+ binutils/objdump.c         | 235 ++++++++++--
+ binutils/readelf.c         | 190 +++++++++-
+ binutils/strings.c         | 757 ++++++++++++++++++++++++++++++++++---
+ 7 files changed, 1409 insertions(+), 103 deletions(-)
+
+diff --git a/binutils/ChangeLog b/binutils/ChangeLog
+--- a/binutils/ChangeLog	2021-12-19 19:00:27.038540406 -0800
++++ b/binutils/ChangeLog	2021-12-19 19:28:42.733565078 -0800
+@@ -1,3 +1,18 @@
++2021-11-09  Nick Clifton  <nickc@redhat.com>
++
++	* nm.c: Add --unicode option to control how unicode characters are
++	handled.
++	* objdump.c: Likewise.
++	* readelf.c: Likewise.
++	* strings.c: Likewise.
++	* binutils.texi: Document the new feature.
++	* NEWS: Document the new feature.
++	* testsuite/binutils-all/unicode.exp: New file.
++	* testsuite/binutils-all/nm.hex.unicode
++	* testsuite/binutils-all/strings.escape.unicode
++	* testsuite/binutils-all/objdump.highlight.unicode
++	* testsuite/binutils-all/readelf.invalid.unicode
++
+ 2021-07-16  Nick Clifton  <nickc@redhat.com>
+ 
+ 	* po/sv.po: Updated Swedish translation.
+diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
+--- a/binutils/doc/binutils.texi	2021-12-19 19:00:27.042540338 -0800
++++ b/binutils/doc/binutils.texi	2021-12-19 19:27:56.526354667 -0800
+@@ -812,6 +812,7 @@ nm [@option{-A}|@option{-o}|@option{--pr
+    [@option{-s}|@option{--print-armap}]
+    [@option{-t} @var{radix}|@option{--radix=}@var{radix}]
+    [@option{-u}|@option{--undefined-only}]
++   [@option{-U} @var{method}] [@option{--unicode=}@var{method}]
+    [@option{-V}|@option{--version}]
+    [@option{-X 32_64}]
+    [@option{--defined-only}]
+@@ -1132,6 +1133,21 @@ Use @var{radix} as the radix for printin
+ @cindex undefined symbols
+ Display only undefined symbols (those external to each object file).
+ 
++@item -U @var{[d|i|l|e|x|h]}
++@itemx --unicode=@var{[default|invalid|locale|escape|hex|highlight]}
++Controls the display of UTF-8 encoded mulibyte characters in strings.
++The default (@option{--unicode=default}) is to give them no special
++treatment.  The @option{--unicode=locale} option displays the sequence
++in the current locale, which may or may not support them.  The options
++@option{--unicode=hex} and @option{--unicode=invalid} display them as
++hex byte sequences enclosed by either angle brackets or curly braces.
++
++The @option{--unicode=escape} option displays them as escape sequences
++(@var{\uxxxx}) and the @option{--unicode=highlight} option displays
++them as escape sequences highlighted in red (if supported by the
++output device).  The colouring is intended to draw attention to the
++presence of unicode sequences where they might not be expected.
++
+ @item -V
+ @itemx --version
+ Show the version number of @command{nm} and exit.
+@@ -2247,6 +2263,7 @@ objdump [@option{-a}|@option{--archive-h
+         [@option{--prefix-strip=}@var{level}]
+         [@option{--insn-width=}@var{width}]
+         [@option{--visualize-jumps[=color|=extended-color|=off]}
++        [@option{-U} @var{method}] [@option{--unicode=}@var{method}]
+         [@option{-V}|@option{--version}]
+         [@option{-H}|@option{--help}]
+         @var{objfile}@dots{}
+@@ -2921,6 +2938,21 @@ When displaying symbols include those wh
+ special in some way and which would not normally be of interest to the
+ user.
+ 
++@item -U @var{[d|i|l|e|x|h]}
++@itemx --unicode=@var{[default|invalid|locale|escape|hex|highlight]}
++Controls the display of UTF-8 encoded mulibyte characters in strings.
++The default (@option{--unicode=default}) is to give them no special
++treatment.  The @option{--unicode=locale} option displays the sequence
++in the current locale, which may or may not support them.  The options
++@option{--unicode=hex} and @option{--unicode=invalid} display them as
++hex byte sequences enclosed by either angle brackets or curly braces.
++
++The @option{--unicode=escape} option displays them as escape sequences
++(@var{\uxxxx}) and the @option{--unicode=highlight} option displays
++them as escape sequences highlighted in red (if supported by the
++output device).  The colouring is intended to draw attention to the
++presence of unicode sequences where they might not be expected.
++
+ @item -V
+ @itemx --version
+ Print the version number of @command{objdump} and exit.
+@@ -3197,6 +3229,7 @@ strings [@option{-afovV}] [@option{-}@va
+         [@option{-n} @var{min-len}] [@option{--bytes=}@var{min-len}]
+         [@option{-t} @var{radix}] [@option{--radix=}@var{radix}]
+         [@option{-e} @var{encoding}] [@option{--encoding=}@var{encoding}]
++        [@option{-U} @var{method}] [@option{--unicode=}@var{method}]
+         [@option{-}] [@option{--all}] [@option{--print-file-name}]
+         [@option{-T} @var{bfdname}] [@option{--target=}@var{bfdname}]
+         [@option{-w}] [@option{--include-all-whitespace}]
+@@ -3288,6 +3321,28 @@ single-8-bit-byte characters, @samp{b} =
+ littleendian.  Useful for finding wide character strings. (@samp{l}
+ and @samp{b} apply to, for example, Unicode UTF-16/UCS-2 encodings).
+ 
++@item -U @var{[d|i|l|e|x|h]}
++@itemx --unicode=@var{[default|invalid|locale|escape|hex|highlight]}
++Controls the display of UTF-8 encoded mulibyte characters in strings.
++The default (@option{--unicode=default}) is to give them no special
++treatment, and instead rely upon the setting of the
++@option{--encoding} option.  The other values for this option
++automatically enable @option{--encoding=S}.
++
++The @option{--unicode=invalid} option treats them as non-graphic
++characters and hence not part of a valid string.  All the remaining
++options treat them as valid string characters.
++
++The @option{--unicode=locale} option displays them in the current
++locale, which may or may not support UTF-8 encoding.  The
++@option{--unicode=hex} option displays them as hex byte sequences
++enclosed between @var{<>} characters.  The @option{--unicode=escape}
++option displays them as escape sequences (@var{\uxxxx}) and the
++@option{--unicode=highlight} option displays them as escape sequences
++highlighted in red (if supported by the output device).  The colouring
++is intended to draw attention to the presence of unicode sequences
++where they might not be expected.
++
+ @item -T @var{bfdname}
+ @itemx --target=@var{bfdname}
+ @cindex object code format
+@@ -4796,6 +4851,7 @@ readelf [@option{-a}|@option{--all}]
+         [@option{--demangle@var{=style}}|@option{--no-demangle}]
+         [@option{--quiet}]
+         [@option{--recurse-limit}|@option{--no-recurse-limit}]
++        [@option{-U} @var{method}|@option{--unicode=}@var{method}]
+         [@option{-n}|@option{--notes}]
+         [@option{-r}|@option{--relocs}]
+         [@option{-u}|@option{--unwind}]
+@@ -4962,6 +5018,28 @@ necessary in order to demangle truly com
+ that if the recursion limit is disabled then stack exhaustion is
+ possible and any bug reports about such an event will be rejected.
+ 
++@item -U @var{[d|i|l|e|x|h]}
++@itemx --unicode=[default|invalid|locale|escape|hex|highlight]
++Controls the display of non-ASCII characters in identifier names.
++The default (@option{--unicode=locale} or @option{--unicode=default}) is
++to treat them as multibyte characters and display them in the current
++locale.  All other versions of this option treat the bytes as UTF-8
++encoded values and attempt to interpret them.  If they cannot be
++interpreted or if the @option{--unicode=invalid} option is used then
++they are displayed as a sequence of hex bytes, encloses in curly
++parethesis characters.
++
++Using the @option{--unicode=escape} option will display the characters
++as as unicode escape sequences (@var{\uxxxx}).  Using the
++@option{--unicode=hex} will display the characters as hex byte
++sequences enclosed between angle brackets.
++
++Using the @option{--unicode=highlight} will display the characters as 
++unicode escape sequences but it will also highlighted them in red,
++assuming that colouring is supported by the output device.  The
++colouring is intended to draw attention to the presence of unicode
++sequences when they might not be expected.
++
+ @item -e
+ @itemx --headers
+ Display all the headers in the file.  Equivalent to @option{-h -l -S}.
+diff --git a/binutils/NEWS b/binutils/NEWS
+--- a/binutils/NEWS	2021-12-19 19:00:27.038540406 -0800
++++ b/binutils/NEWS	2021-12-19 19:30:04.764162972 -0800
+@@ -1,5 +1,14 @@
+ -*- text -*-
+ 
++* Tools which display symbols or strings (readelf, strings, nm, objdump)
++  have a new command line option which controls how unicode characters are
++  handled.  By default they are treated as normal for the tool.  Using
++  --unicode=locale will display them according to the current locale.
++  Using --unicode=hex will display them as hex byte values, whilst
++  --unicode=escape will display them as escape sequences.  In addition
++  using --unicode=highlight will display them as unicode escape sequences
++  highlighted in red (if supported by the output device).
++
+ Changes in 2.37:
+ 
+ * The readelf tool has a new command line option which can be used to specify
+diff --git a/binutils/nm.c b/binutils/nm.c
+--- a/binutils/nm.c	2021-12-19 19:00:27.046540270 -0800
++++ b/binutils/nm.c	2021-12-19 19:36:34.797491555 -0800
+@@ -38,6 +38,11 @@
+ #include "bucomm.h"
+ #include "plugin-api.h"
+ #include "plugin.h"
++#include "safe-ctype.h"
++
++#ifndef streq
++#define streq(a,b) (strcmp ((a),(b)) == 0)
++#endif
+ 
+ /* When sorting by size, we use this structure to hold the size and a
+    pointer to the minisymbol.  */
+@@ -216,6 +221,18 @@ static const char *plugin_target = NULL;
+ static bfd *lineno_cache_bfd;
+ static bfd *lineno_cache_rel_bfd;
+ 
++typedef enum unicode_display_type
++{
++  unicode_default = 0,
++  unicode_locale,
++  unicode_escape,
++  unicode_hex,
++  unicode_highlight,
++  unicode_invalid
++} unicode_display_type;
++
++static unicode_display_type unicode_display = unicode_default;
++
+ enum long_option_values
+ {
+   OPTION_TARGET = 200,
+@@ -260,6 +277,7 @@ static struct option long_options[] =
+   {"target", required_argument, 0, OPTION_TARGET},
+   {"defined-only", no_argument, &defined_only, 1},
+   {"undefined-only", no_argument, &undefined_only, 1},
++  {"unicode", required_argument, NULL, 'U'},
+   {"version", no_argument, &show_version, 1},
+   {"with-symbol-versions", no_argument, &with_symbol_versions, 1},
+   {"without-symbol-versions", no_argument, &with_symbol_versions, 0},
+@@ -313,6 +331,8 @@ usage (FILE *stream, int status)
+   -t, --radix=RADIX      Use RADIX for printing symbol values\n\
+       --target=BFDNAME   Specify the target object format as BFDNAME\n\
+   -u, --undefined-only   Display only undefined symbols\n\
++  -U {d|s|i|x|e|h}       Specify how to treat UTF-8 encoded unicode characters\n\
++      --unicode={default|show|invalid|hex|escape|highlight}\n\
+       --with-symbol-versions  Display version strings after symbol names\n\
+   -X 32_64               (ignored)\n\
+   @FILE                  Read options from FILE\n\
+@@ -432,6 +452,187 @@ get_coff_symbol_type (const struct inter
+   return bufp;
+ }
+ 
++/* Convert a potential UTF-8 encoded sequence in IN into characters in OUT.
++   The conversion format is controlled by the unicode_display variable.
++   Returns the number of characters added to OUT.
++   Returns the number of bytes consumed from IN in CONSUMED.
++   Always consumes at least one byte and displays at least one character.  */
++   
++static unsigned int
++display_utf8 (const unsigned char * in, char * out, unsigned int * consumed)
++{
++  char *        orig_out = out;
++  unsigned int  nchars = 0;
++  unsigned int j;
++
++  if (unicode_display == unicode_default)
++    goto invalid;
++
++  if (in[0] < 0xc0)
++    goto invalid;
++
++  if ((in[1] & 0xc0) != 0x80)
++    goto invalid;
++
++  if ((in[0] & 0x20) == 0)
++    {
++      nchars = 2;
++      goto valid;
++    }
++
++  if ((in[2] & 0xc0) != 0x80)
++    goto invalid;
++
++  if ((in[0] & 0x10) == 0)
++    {
++      nchars = 3;
++      goto valid;
++    }
++
++  if ((in[3] & 0xc0) != 0x80)
++    goto invalid;
++
++  nchars = 4;
++
++ valid:
++  switch (unicode_display)
++    {
++    case unicode_locale:
++      /* Copy the bytes into the output buffer as is.  */
++      memcpy (out, in, nchars);
++      out += nchars;
++      break;
++
++    case unicode_invalid:
++    case unicode_hex:
++      out += sprintf (out, "%c", unicode_display == unicode_hex ? '<' : '{');
++      out += sprintf (out, "0x");
++      for (j = 0; j < nchars; j++)
++	out += sprintf (out, "%02x", in [j]);
++      out += sprintf (out, "%c", unicode_display == unicode_hex ? '>' : '}');
++      break;
++      
++    case unicode_highlight:
++      if (isatty (1))
++	out += sprintf (out, "\x1B[31;47m"); /* Red.  */
++      /* Fall through.  */
++    case unicode_escape:
++      switch (nchars)
++	{
++	case 2:
++	  out += sprintf (out, "\\u%02x%02x",
++		  ((in[0] & 0x1c) >> 2), 
++		  ((in[0] & 0x03) << 6) | (in[1] & 0x3f));
++	  break;
++
++	case 3:
++	  out += sprintf (out, "\\u%02x%02x",
++		  ((in[0] & 0x0f) << 4) | ((in[1] & 0x3c) >> 2),
++		  ((in[1] & 0x03) << 6) | ((in[2] & 0x3f)));
++	  break;
++
++	case 4:
++	  out += sprintf (out, "\\u%02x%02x%02x",
++		  ((in[0] & 0x07) << 6) | ((in[1] & 0x3c) >> 2),
++		  ((in[1] & 0x03) << 6) | ((in[2] & 0x3c) >> 2),
++		  ((in[2] & 0x03) << 6) | ((in[3] & 0x3f)));
++	  break;
++	default:
++	  /* URG.  */
++	  break;
++	}
++
++      if (unicode_display == unicode_highlight && isatty (1))
++	out += sprintf (out, "\033[0m"); /* Default colour.  */
++      break;
++
++    default:
++      /* URG */
++      break;
++    }
++
++  * consumed = nchars;
++  return out - orig_out;
++
++ invalid:
++  /* Not a valid UTF-8 sequence.  */
++  *out = *in;
++  * consumed = 1;
++  return 1;
++}
++
++/* Convert any UTF-8 encoded characters in NAME into the form specified by
++   unicode_display.  Also converts control characters.  Returns a static
++   buffer if conversion was necessary.
++   Code stolen from objdump.c:sanitize_string().  */
++
++static const char *
++convert_utf8 (const char * in)
++{
++  static char *  buffer = NULL;
++  static size_t  buffer_len = 0;
++  const char *   original = in;
++  char *         out;
++
++  /* Paranoia.  */
++  if (in == NULL)
++    return "";
++
++  /* See if any conversion is necessary.
++     In the majority of cases it will not be needed.  */
++  do
++    {
++      unsigned char c = *in++;
++
++      if (c == 0)
++	return original;
++
++      if (ISCNTRL (c))
++	break;
++
++      if (unicode_display != unicode_default && c >= 0xc0)
++	break;
++    }
++  while (1);
++
++  /* Copy the input, translating as needed.  */
++  in = original;
++  if (buffer_len < (strlen (in) * 9))
++    {
++      free ((void *) buffer);
++      buffer_len = strlen (in) * 9;
++      buffer = xmalloc (buffer_len + 1);
++    }
++
++  out = buffer;
++  do
++    {
++      unsigned char c = *in++;
++
++      if (c == 0)
++	break;
++
++      if (ISCNTRL (c))
++	{
++	  *out++ = '^';
++	  *out++ = c + 0x40;
++	}
++      else if (unicode_display != unicode_default && c >= 0xc0)
++	{
++	  unsigned int num_consumed;
++
++	  out += display_utf8 ((const unsigned char *)(in - 1), out, & num_consumed);
++	  in += num_consumed - 1;
++	}
++      else
++	*out++ = c;
++    }
++  while (1);
++
++  *out = 0;
++  return buffer;
++}
++
+ /* Print symbol name NAME, read from ABFD, with printf format FORM,
+    demangling it if requested.  */
+ 
+@@ -444,6 +645,7 @@ print_symname (const char *form, struct
+ 
+   if (name == NULL)
+     name = info->sinfo->name;
++
+   if (!with_symbol_versions
+       && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+     {
+@@ -451,6 +653,7 @@ print_symname (const char *form, struct
+       if (atver)
+ 	*atver = 0;
+     }
++
+   if (do_demangle && *name)
+     {
+       alloc = bfd_demangle (abfd, name, demangle_flags);
+@@ -458,6 +661,11 @@ print_symname (const char *form, struct
+ 	name = alloc;
+     }
+ 
++  if (unicode_display != unicode_default)
++    {
++      name = convert_utf8 (name);
++    }
++
+   if (info != NULL && info->elfinfo && with_symbol_versions)
+     {
+       const char *version_string;
+@@ -1807,7 +2015,7 @@ main (int argc, char **argv)
+     fatal (_("fatal error: libbfd ABI mismatch"));
+   set_default_bfd_target ();
+ 
+-  while ((c = getopt_long (argc, argv, "aABCDef:gHhjJlnopPrSst:uvVvX:",
++  while ((c = getopt_long (argc, argv, "aABCDef:gHhjJlnopPrSst:uU:vVvX:",
+ 			   long_options, (int *) 0)) != EOF)
+     {
+       switch (c)
+@@ -1900,6 +2108,24 @@ main (int argc, char **argv)
+ 	case 'u':
+ 	  undefined_only = 1;
+ 	  break;
++
++	case 'U':
++	  if (streq (optarg, "default") || streq (optarg, "d"))
++	    unicode_display = unicode_default;
++	  else if (streq (optarg, "locale") || streq (optarg, "l"))
++	    unicode_display = unicode_locale;
++	  else if (streq (optarg, "escape") || streq (optarg, "e"))
++	    unicode_display = unicode_escape;
++	  else if (streq (optarg, "invalid") || streq (optarg, "i"))
++	    unicode_display = unicode_invalid;
++	  else if (streq (optarg, "hex") || streq (optarg, "x"))
++	    unicode_display = unicode_hex;
++	  else if (streq (optarg, "highlight") || streq (optarg, "h"))
++	    unicode_display = unicode_highlight;
++	  else
++	    fatal (_("invalid argument to -U/--unicode: %s"), optarg);
++	  break;
++
+ 	case 'V':
+ 	  show_version = 1;
+ 	  break;
+diff --git a/binutils/objdump.c b/binutils/objdump.c
+--- a/binutils/objdump.c	2021-12-19 19:00:27.046540270 -0800
++++ b/binutils/objdump.c	2021-12-19 19:43:09.438736729 -0800
+@@ -204,6 +204,18 @@ static const struct objdump_private_desc
+ 
+ /* The list of detected jumps inside a function.  */
+ static struct jump_info *detected_jumps = NULL;
++
++typedef enum unicode_display_type
++{
++  unicode_default = 0,
++  unicode_locale,
++  unicode_escape,
++  unicode_hex,
++  unicode_highlight,
++  unicode_invalid
++} unicode_display_type;
++
++static unicode_display_type unicode_display = unicode_default;
+ 
+ static void usage (FILE *, int) ATTRIBUTE_NORETURN;
+ static void
+@@ -330,6 +342,9 @@ usage (FILE *stream, int status)
+       fprintf (stream, _("\
+   -w, --wide                     Format output for more than 80 columns\n"));
+       fprintf (stream, _("\
++  -U[d|l|i|x|e|h]                Controls the display of UTF-8 unicode characters\n\
++  --unicode=[default|locale|invalid|hex|escape|highlight]\n"));
++      fprintf (stream, _("\
+   -z, --disassemble-zeroes       Do not skip blocks of zeroes when disassembling\n"));
+       fprintf (stream, _("\
+       --start-address=ADDR       Only process data whose address is >= ADDR\n"));
+@@ -420,17 +435,23 @@ static struct option long_options[]=
+ {
+   {"adjust-vma", required_argument, NULL, OPTION_ADJUST_VMA},
+   {"all-headers", no_argument, NULL, 'x'},
+-  {"private-headers", no_argument, NULL, 'p'},
+-  {"private", required_argument, NULL, 'P'},
+   {"architecture", required_argument, NULL, 'm'},
+   {"archive-headers", no_argument, NULL, 'a'},
++#ifdef ENABLE_LIBCTF
++  {"ctf", required_argument, NULL, OPTION_CTF},
++  {"ctf-parent", required_argument, NULL, OPTION_CTF_PARENT},
++#endif
+   {"debugging", no_argument, NULL, 'g'},
+   {"debugging-tags", no_argument, NULL, 'e'},
+   {"demangle", optional_argument, NULL, 'C'},
+   {"disassemble", optional_argument, NULL, 'd'},
+   {"disassemble-all", no_argument, NULL, 'D'},
+-  {"disassembler-options", required_argument, NULL, 'M'},
+   {"disassemble-zeroes", no_argument, NULL, 'z'},
++  {"disassembler-options", required_argument, NULL, 'M'},
++  {"dwarf", optional_argument, NULL, OPTION_DWARF},
++  {"dwarf-check", no_argument, 0, OPTION_DWARF_CHECK},
++  {"dwarf-depth", required_argument, 0, OPTION_DWARF_DEPTH},
++  {"dwarf-start", required_argument, 0, OPTION_DWARF_START},
+   {"dynamic-reloc", no_argument, NULL, 'R'},
+   {"dynamic-syms", no_argument, NULL, 'T'},
+   {"endian", required_argument, NULL, OPTION_ENDIAN},
+@@ -440,16 +461,23 @@ static struct option long_options[]=
+   {"full-contents", no_argument, NULL, 's'},
+   {"headers", no_argument, NULL, 'h'},
+   {"help", no_argument, NULL, 'H'},
++  {"include", required_argument, NULL, 'I'},
+   {"info", no_argument, NULL, 'i'},
++  {"inlines", no_argument, 0, OPTION_INLINES},
++  {"insn-width", required_argument, NULL, OPTION_INSN_WIDTH},
+   {"line-numbers", no_argument, NULL, 'l'},
+-  {"no-show-raw-insn", no_argument, &show_raw_insn, -1},
+   {"no-addresses", no_argument, &no_addresses, 1},
+-  {"process-links", no_argument, &process_links, true},
++  {"no-recurse-limit", no_argument, NULL, OPTION_NO_RECURSE_LIMIT},
++  {"no-recursion-limit", no_argument, NULL, OPTION_NO_RECURSE_LIMIT},
++  {"no-show-raw-insn", no_argument, &show_raw_insn, -1},
++  {"prefix", required_argument, NULL, OPTION_PREFIX},
+   {"prefix-addresses", no_argument, &prefix_addresses, 1},
++  {"prefix-strip", required_argument, NULL, OPTION_PREFIX_STRIP},
++  {"private", required_argument, NULL, 'P'},
++  {"private-headers", no_argument, NULL, 'p'},
++  {"process-links", no_argument, &process_links, true},
+   {"recurse-limit", no_argument, NULL, OPTION_RECURSE_LIMIT},
+   {"recursion-limit", no_argument, NULL, OPTION_RECURSE_LIMIT},
+-  {"no-recurse-limit", no_argument, NULL, OPTION_NO_RECURSE_LIMIT},
+-  {"no-recursion-limit", no_argument, NULL, OPTION_NO_RECURSE_LIMIT},
+   {"reloc", no_argument, NULL, 'r'},
+   {"section", required_argument, NULL, 'j'},
+   {"section-headers", no_argument, NULL, 'h'},
+@@ -457,28 +485,16 @@ static struct option long_options[]=
+   {"source", no_argument, NULL, 'S'},
+   {"source-comment", optional_argument, NULL, OPTION_SOURCE_COMMENT},
+   {"special-syms", no_argument, &dump_special_syms, 1},
+-  {"include", required_argument, NULL, 'I'},
+-  {"dwarf", optional_argument, NULL, OPTION_DWARF},
+-#ifdef ENABLE_LIBCTF
+-  {"ctf", required_argument, NULL, OPTION_CTF},
+-  {"ctf-parent", required_argument, NULL, OPTION_CTF_PARENT},
+-#endif
+   {"stabs", no_argument, NULL, 'G'},
+   {"start-address", required_argument, NULL, OPTION_START_ADDRESS},
+   {"stop-address", required_argument, NULL, OPTION_STOP_ADDRESS},
+   {"syms", no_argument, NULL, 't'},
+   {"target", required_argument, NULL, 'b'},
++  {"unicode", required_argument, NULL, 'U'},
+   {"version", no_argument, NULL, 'V'},
+-  {"wide", no_argument, NULL, 'w'},
+-  {"prefix", required_argument, NULL, OPTION_PREFIX},
+-  {"prefix-strip", required_argument, NULL, OPTION_PREFIX_STRIP},
+-  {"insn-width", required_argument, NULL, OPTION_INSN_WIDTH},
+-  {"dwarf-depth", required_argument, 0, OPTION_DWARF_DEPTH},
+-  {"dwarf-start", required_argument, 0, OPTION_DWARF_START},
+-  {"dwarf-check", no_argument, 0, OPTION_DWARF_CHECK},
+-  {"inlines", no_argument, 0, OPTION_INLINES},
+   {"visualize-jumps", optional_argument, 0, OPTION_VISUALIZE_JUMPS},
+-  {0, no_argument, 0, 0}
++  {"wide", no_argument, NULL, 'w'},
++  {NULL, no_argument, NULL, 0}
+ };
+ 
+ static void
+@@ -488,9 +504,121 @@ nonfatal (const char *msg)
+   exit_status = 1;
+ }
+ 
++/* Convert a potential UTF-8 encoded sequence in IN into characters in OUT.
++   The conversion format is controlled by the unicode_display variable.
++   Returns the number of characters added to OUT.
++   Returns the number of bytes consumed from IN in CONSUMED.
++   Always consumes at least one byte and displays at least one character.  */
++   
++static unsigned int
++display_utf8 (const unsigned char * in, char * out, unsigned int * consumed)
++{
++  char *        orig_out = out;
++  unsigned int  nchars = 0;
++  unsigned int j;
++
++  if (unicode_display == unicode_default)
++    goto invalid;
++
++  if (in[0] < 0xc0)
++    goto invalid;
++
++  if ((in[1] & 0xc0) != 0x80)
++    goto invalid;
++
++  if ((in[0] & 0x20) == 0)
++    {
++      nchars = 2;
++      goto valid;
++    }
++
++  if ((in[2] & 0xc0) != 0x80)
++    goto invalid;
++
++  if ((in[0] & 0x10) == 0)
++    {
++      nchars = 3;
++      goto valid;
++    }
++
++  if ((in[3] & 0xc0) != 0x80)
++    goto invalid;
++
++  nchars = 4;
++
++ valid:
++  switch (unicode_display)
++    {
++    case unicode_locale:
++      /* Copy the bytes into the output buffer as is.  */
++      memcpy (out, in, nchars);
++      out += nchars;
++      break;
++
++    case unicode_invalid:
++    case unicode_hex:
++      out += sprintf (out, "%c", unicode_display == unicode_hex ? '<' : '{');
++      out += sprintf (out, "0x");
++      for (j = 0; j < nchars; j++)
++	out += sprintf (out, "%02x", in [j]);
++      out += sprintf (out, "%c", unicode_display == unicode_hex ? '>' : '}');
++      break;
++      
++    case unicode_highlight:
++      if (isatty (1))
++	out += sprintf (out, "\x1B[31;47m"); /* Red.  */
++      /* Fall through.  */
++    case unicode_escape:
++      switch (nchars)
++	{
++	case 2:
++	  out += sprintf (out, "\\u%02x%02x",
++		  ((in[0] & 0x1c) >> 2), 
++		  ((in[0] & 0x03) << 6) | (in[1] & 0x3f));
++	  break;
++
++	case 3:
++	  out += sprintf (out, "\\u%02x%02x",
++		  ((in[0] & 0x0f) << 4) | ((in[1] & 0x3c) >> 2),
++		  ((in[1] & 0x03) << 6) | ((in[2] & 0x3f)));
++	  break;
++
++	case 4:
++	  out += sprintf (out, "\\u%02x%02x%02x",
++		  ((in[0] & 0x07) << 6) | ((in[1] & 0x3c) >> 2),
++		  ((in[1] & 0x03) << 6) | ((in[2] & 0x3c) >> 2),
++		  ((in[2] & 0x03) << 6) | ((in[3] & 0x3f)));
++	  break;
++	default:
++	  /* URG.  */
++	  break;
++	}
++
++      if (unicode_display == unicode_highlight && isatty (1))
++	out += sprintf (out, "\033[0m"); /* Default colour.  */
++      break;
++
++    default:
++      /* URG */
++      break;
++    }
++
++  * consumed = nchars;
++  return out - orig_out;
++
++ invalid:
++  /* Not a valid UTF-8 sequence.  */
++  *out = *in;
++  * consumed = 1;
++  return 1;
++}
++
+ /* Returns a version of IN with any control characters
+    replaced by escape sequences.  Uses a static buffer
+-   if necessary.  */
++   if necessary.
++
++   If unicode display is enabled, then also handles the
++   conversion of unicode characters.  */
+ 
+ static const char *
+ sanitize_string (const char * in)
+@@ -508,40 +636,50 @@ sanitize_string (const char * in)
+      of cases it will not be needed.  */
+   do
+     {
+-      char c = *in++;
++      unsigned char c = *in++;
+ 
+       if (c == 0)
+ 	return original;
+ 
+       if (ISCNTRL (c))
+ 	break;
++
++      if (unicode_display != unicode_default && c >= 0xc0)
++	break;
+     }
+   while (1);
+ 
+   /* Copy the input, translating as needed.  */
+   in = original;
+-  if (buffer_len < (strlen (in) * 2))
++  if (buffer_len < (strlen (in) * 9))
+     {
+       free ((void *) buffer);
+-      buffer_len = strlen (in) * 2;
++      buffer_len = strlen (in) * 9;
+       buffer = xmalloc (buffer_len + 1);
+     }
+ 
+   out = buffer;
+   do
+     {
+-      char c = *in++;
++      unsigned char c = *in++;
+ 
+       if (c == 0)
+ 	break;
+ 
+-      if (!ISCNTRL (c))
+-	*out++ = c;
+-      else
++      if (ISCNTRL (c))
+ 	{
+ 	  *out++ = '^';
+ 	  *out++ = c + 0x40;
+ 	}
++      else if (unicode_display != unicode_default && c >= 0xc0)
++	{
++	  unsigned int num_consumed;
++
++	  out += display_utf8 ((const unsigned char *)(in - 1), out, & num_consumed);
++	  in += num_consumed - 1;
++	}
++      else
++	*out++ = c;
+     }
+   while (1);
+ 
+@@ -4529,6 +4667,24 @@ dump_symbols (bfd *abfd ATTRIBUTE_UNUSED
+ 		  free (alloc);
+ 		}
+ 	    }
++	  else if (unicode_display != unicode_default
++		   && name != NULL && *name != '\0')
++	    {
++	      const char * sanitized_name;
++
++	      /* If we want to sanitize the name, we do it here, and
++		 temporarily clobber it while calling bfd_print_symbol.
++		 FIXME: This is a gross hack.  */
++	      sanitized_name = sanitize_string (name);
++	      if (sanitized_name != name)
++		(*current)->name = sanitized_name;
++	      else
++		sanitized_name = NULL;
++	      bfd_print_symbol (cur_bfd, stdout, *current,
++				bfd_print_symbol_all);
++	      if (sanitized_name != NULL)
++		(*current)->name = name;
++	    }
+ 	  else
+ 	    bfd_print_symbol (cur_bfd, stdout, *current,
+ 			      bfd_print_symbol_all);
+@@ -5212,7 +5368,7 @@ main (int argc, char **argv)
+   set_default_bfd_target ();
+ 
+   while ((c = getopt_long (argc, argv,
+-			   "pP:ib:m:M:VvCdDlfFaHhrRtTxsSI:j:wE:zgeGW::",
++			   "CDE:FGHI:LM:P:RSTU:VW::ab:defghij:lm:prstvwxz",
+ 			   long_options, (int *) 0))
+ 	 != EOF)
+     {
+@@ -5495,6 +5651,23 @@ main (int argc, char **argv)
+ 	  seenflag = true;
+ 	  break;
+ 
++	case 'U':
++	  if (streq (optarg, "default") || streq (optarg, "d"))
++	    unicode_display = unicode_default;
++	  else if (streq (optarg, "locale") || streq (optarg, "l"))
++	    unicode_display = unicode_locale;
++	  else if (streq (optarg, "escape") || streq (optarg, "e"))
++	    unicode_display = unicode_escape;
++	  else if (streq (optarg, "invalid") || streq (optarg, "i"))
++	    unicode_display = unicode_invalid;
++	  else if (streq (optarg, "hex") || streq (optarg, "x"))
++	    unicode_display = unicode_hex;
++	  else if (streq (optarg, "highlight") || streq (optarg, "h"))
++	    unicode_display = unicode_highlight;
++	  else
++	    fatal (_("invalid argument to -U/--unicode: %s"), optarg);
++	  break;
++
+ 	case 'H':
+ 	  usage (stdout, 0);
+ 	  /* No need to set seenflag or to break - usage() does not return.  */
+diff --git a/binutils/readelf.c b/binutils/readelf.c
+--- a/binutils/readelf.c	2021-12-19 19:00:27.058540065 -0800
++++ b/binutils/readelf.c	2021-12-19 19:27:56.538354462 -0800
+@@ -328,6 +328,19 @@ typedef enum print_mode
+ }
+ print_mode;
+ 
++typedef enum unicode_display_type
++{
++  unicode_default = 0,
++  unicode_locale,
++  unicode_escape,
++  unicode_hex,
++  unicode_highlight,
++  unicode_invalid
++} unicode_display_type;
++
++static unicode_display_type unicode_display = unicode_default;
++
++  
+ /* Versioned symbol info.  */
+ enum versioned_symbol_info
+ {
+@@ -632,11 +645,18 @@ print_symbol (signed int width, const ch
+       if (c == 0)
+ 	break;
+ 
+-      /* Do not print control characters directly as they can affect terminal
+-	 settings.  Such characters usually appear in the names generated
+-	 by the assembler for local labels.  */
+-      if (ISCNTRL (c))
++      if (ISPRINT (c))
++	{
++	  putchar (c);
++	  width_remaining --;
++	  num_printed ++;
++	}
++      else if (ISCNTRL (c))
+ 	{
++	  /* Do not print control characters directly as they can affect terminal
++	     settings.  Such characters usually appear in the names generated
++	     by the assembler for local labels.  */
++
+ 	  if (width_remaining < 2)
+ 	    break;
+ 
+@@ -644,11 +664,137 @@ print_symbol (signed int width, const ch
+ 	  width_remaining -= 2;
+ 	  num_printed += 2;
+ 	}
+-      else if (ISPRINT (c))
++      else if (c == 0x7f)
+ 	{
+-	  putchar (c);
+-	  width_remaining --;
+-	  num_printed ++;
++	  if (width_remaining < 5)
++	    break;
++	  printf ("<DEL>");
++	  width_remaining -= 5;
++	  num_printed += 5;
++	}
++      else if (unicode_display != unicode_locale
++	       && unicode_display != unicode_default)
++	{
++	  /* Display unicode characters as something else.  */
++	  unsigned char bytes[4];
++	  bool          is_utf8;
++	  unsigned int          nbytes;
++
++	  bytes[0] = c;
++
++	  if (bytes[0] < 0xc0)
++	    {
++	      nbytes = 1;
++	      is_utf8 = false;
++	    }
++	  else
++	    {
++	      bytes[1] = *symbol++;
++
++	      if ((bytes[1] & 0xc0) != 0x80)
++		{
++		  is_utf8 = false;
++		  /* Do not consume this character.  It may only
++		     be the first byte in the sequence that was
++		     corrupt.  */
++		  --symbol;
++		  nbytes = 1;
++		}
++	      else if ((bytes[0] & 0x20) == 0)
++		{
++		  is_utf8 = true;
++		  nbytes = 2;
++		}
++	      else
++		{
++		  bytes[2] = *symbol++;
++
++		  if ((bytes[2] & 0xc0) != 0x80)
++		    {
++		      is_utf8 = false;
++		      symbol -= 2;
++		      nbytes = 1;
++		    }
++		  else if ((bytes[0] & 0x10) == 0)
++		    {
++		      is_utf8 = true;
++		      nbytes = 3;
++		    }
++		  else
++		    {
++		      bytes[3] = *symbol++;
++
++		      nbytes = 4;
++
++		      if ((bytes[3] & 0xc0) != 0x80)
++			{
++			  is_utf8 = false;
++			  symbol -= 3;
++			  nbytes = 1;
++			}
++		      else
++			is_utf8 = true;
++		    }
++		}
++	    }
++
++	  if (unicode_display == unicode_invalid)
++	    is_utf8 = false;
++
++	  if (unicode_display == unicode_hex || ! is_utf8)
++	    {
++	      unsigned int i;
++
++	      if (width_remaining < (nbytes * 2) + 2)
++		break;
++	  
++	      putchar (is_utf8 ? '<' : '{');
++	      printf ("0x");
++	      for (i = 0; i < nbytes; i++)
++		printf ("%02x", bytes[i]);
++	      putchar (is_utf8 ? '>' : '}');
++	    }
++	  else
++	    {
++	      if (unicode_display == unicode_highlight && isatty (1))
++		printf ("\x1B[31;47m"); /* Red.  */
++	      
++	      switch (nbytes)
++		{
++		case 2:
++		  if (width_remaining < 6)
++		    break;
++		  printf ("\\u%02x%02x",
++			  (bytes[0] & 0x1c) >> 2, 
++			  ((bytes[0] & 0x03) << 6) | (bytes[1] & 0x3f));
++		  break;
++		case 3:
++		  if (width_remaining < 6)
++		    break;
++		  printf ("\\u%02x%02x",
++			  ((bytes[0] & 0x0f) << 4) | ((bytes[1] & 0x3c) >> 2),
++			  ((bytes[1] & 0x03) << 6) | (bytes[2] & 0x3f));
++		  break;
++		case 4:
++		  if (width_remaining < 8)
++		    break;
++		  printf ("\\u%02x%02x%02x",
++			  ((bytes[0] & 0x07) << 6) | ((bytes[1] & 0x3c) >> 2),
++			  ((bytes[1] & 0x03) << 6) | ((bytes[2] & 0x3c) >> 2),
++			  ((bytes[2] & 0x03) << 6) | (bytes[3] & 0x3f));
++		  
++		  break;
++		default:
++		  /* URG.  */
++		  break;
++		}
++
++	      if (unicode_display == unicode_highlight && isatty (1))
++		printf ("\033[0m"); /* Default colour.  */
++	    }
++	  
++	  if (bytes[nbytes - 1] == 0)
++	    break;
+ 	}
+       else
+ 	{
+@@ -4668,6 +4814,7 @@ static struct option options[] =
+   {"syms",	       no_argument, 0, 's'},
+   {"silent-truncation",no_argument, 0, 'T'},
+   {"section-details",  no_argument, 0, 't'},
++  {"unicode",          required_argument, NULL, 'U'},
+   {"unwind",	       no_argument, 0, 'u'},
+   {"version-info",     no_argument, 0, 'V'},
+   {"version",	       no_argument, 0, 'v'},
+@@ -4744,6 +4891,12 @@ usage (FILE * stream)
+   fprintf (stream, _("\
+      --no-recurse-limit  Disable a demangling recursion limit\n"));
+   fprintf (stream, _("\
++     -U[dlexhi] --unicode=[default|locale|escape|hex|highlight|invalid]\n\
++                         Display unicode characters as determined by the current locale\n\
++                          (default), escape sequences, \"<hex sequences>\", highlighted\n\
++                          escape sequences, or treat them as invalid and display as\n\
++                          \"{hex sequences}\"\n"));
++  fprintf (stream, _("\
+   -n --notes             Display the core notes (if present)\n"));
+   fprintf (stream, _("\
+   -r --relocs            Display the relocations (if present)\n"));
+@@ -4928,7 +5081,7 @@ parse_args (struct dump_data *dumpdata,
+     usage (stderr);
+ 
+   while ((c = getopt_long
+-	  (argc, argv, "ACDHILNPR:STVWacdeghi:lnp:rstuvw::x:z", options, NULL)) != EOF)
++	  (argc, argv, "ACDHILNPR:STU:VWacdeghi:lnp:rstuvw::x:z", options, NULL)) != EOF)
+     {
+       switch (c)
+ 	{
+@@ -5130,6 +5283,25 @@ parse_args (struct dump_data *dumpdata,
+ 	  /* Ignored for backward compatibility.  */
+ 	  break;
+ 
++	case 'U':
++	  if (optarg == NULL)
++	    error (_("Missing arg to -U/--unicode")); /* Can this happen ?  */
++	  else if (streq (optarg, "default") || streq (optarg, "d"))
++	    unicode_display = unicode_default;
++	  else if (streq (optarg, "locale") || streq (optarg, "l"))
++	    unicode_display = unicode_locale;
++	  else if (streq (optarg, "escape") || streq (optarg, "e"))
++	    unicode_display = unicode_escape;
++	  else if (streq (optarg, "invalid") || streq (optarg, "i"))
++	    unicode_display = unicode_invalid;
++	  else if (streq (optarg, "hex") || streq (optarg, "x"))
++	    unicode_display = unicode_hex;
++	  else if (streq (optarg, "highlight") || streq (optarg, "h"))
++	    unicode_display = unicode_highlight;
++	  else
++	    error (_("invalid argument to -U/--unicode: %s"), optarg);
++	  break;
++
+ 	case OPTION_SYM_BASE:
+ 	  sym_base = 0;
+ 	  if (optarg != NULL)
+diff --git a/binutils/strings.c b/binutils/strings.c
+--- a/binutils/strings.c	2021-12-19 19:00:27.058540065 -0800
++++ b/binutils/strings.c	2021-12-19 19:48:26.205313218 -0800
+@@ -55,6 +55,19 @@
+    -T {bfdname}
+ 		Specify a non-default object file format.
+ 
++  --unicode={default|locale|invalid|hex|escape|highlight}
++  -u {d|l|i|x|e|h}
++                Determine how to handle UTF-8 unicode characters.  The default
++		is no special treatment.  All other versions of this option
++		only apply if the encoding is valid and enabling the option
++		implies --encoding=S.
++		The 'locale' option displays the characters according to the
++		current locale.  The 'invalid' option treats them as
++		non-string characters.  The 'hex' option displays them as hex
++		byte sequences.  The 'escape' option displays them as escape
++		sequences and the 'highlight' option displays them as
++		coloured escape sequences.
++
+   --output-separator=sep_string
+   -s sep_string	String used to separate parsed strings in output.
+ 		Default is newline.
+@@ -76,6 +89,22 @@
+ #include "safe-ctype.h"
+ #include "bucomm.h"
+ 
++#ifndef streq
++#define streq(a,b) (strcmp ((a),(b)) == 0)
++#endif
++
++typedef enum unicode_display_type
++{
++  unicode_default = 0,
++  unicode_locale,
++  unicode_escape,
++  unicode_hex,
++  unicode_highlight,
++  unicode_invalid
++} unicode_display_type;
++
++static unicode_display_type unicode_display = unicode_default;
++
+ #define STRING_ISGRAPHIC(c) \
+       (   (c) >= 0 \
+        && (c) <= 255 \
+@@ -94,7 +123,7 @@ extern int errno;
+ static int address_radix;
+ 
+ /* Minimum length of sequence of graphic chars to trigger output.  */
+-static int string_min;
++static unsigned int string_min;
+ 
+ /* Whether or not we include all whitespace as a graphic char.   */
+ static bool include_all_whitespace;
+@@ -121,21 +150,22 @@ static char *output_separator;
+ static struct option long_options[] =
+ {
+   {"all", no_argument, NULL, 'a'},
++  {"bytes", required_argument, NULL, 'n'},
+   {"data", no_argument, NULL, 'd'},
++  {"encoding", required_argument, NULL, 'e'},
++  {"help", no_argument, NULL, 'h'},
++  {"include-all-whitespace", no_argument, NULL, 'w'},
++  {"output-separator", required_argument, NULL, 's'},
+   {"print-file-name", no_argument, NULL, 'f'},
+-  {"bytes", required_argument, NULL, 'n'},
+   {"radix", required_argument, NULL, 't'},
+-  {"include-all-whitespace", no_argument, NULL, 'w'},
+-  {"encoding", required_argument, NULL, 'e'},
+   {"target", required_argument, NULL, 'T'},
+-  {"output-separator", required_argument, NULL, 's'},
+-  {"help", no_argument, NULL, 'h'},
++  {"unicode", required_argument, NULL, 'U'},
+   {"version", no_argument, NULL, 'v'},
+   {NULL, 0, NULL, 0}
+ };
+ 
+ static bool strings_file (char *);
+-static void print_strings (const char *, FILE *, file_ptr, int, int, char *);
++static void print_strings (const char *, FILE *, file_ptr, int, char *);
+ static void usage (FILE *, int) ATTRIBUTE_NORETURN;
+ 
+ int main (int, char **);
+@@ -171,7 +201,7 @@ main (int argc, char **argv)
+   encoding = 's';
+   output_separator = NULL;
+ 
+-  while ((optc = getopt_long (argc, argv, "adfhHn:wot:e:T:s:Vv0123456789",
++  while ((optc = getopt_long (argc, argv, "adfhHn:wot:e:T:s:U:Vv0123456789",
+ 			      long_options, (int *) 0)) != EOF)
+     {
+       switch (optc)
+@@ -244,6 +274,23 @@ main (int argc, char **argv)
+ 	  output_separator = optarg;
+           break;
+ 
++	case 'U':
++	  if (streq (optarg, "default") || streq (optarg, "d"))
++	    unicode_display = unicode_default;
++	  else if (streq (optarg, "locale") || streq (optarg, "l"))
++	    unicode_display = unicode_locale;
++	  else if (streq (optarg, "escape") || streq (optarg, "e"))
++	    unicode_display = unicode_escape;
++	  else if (streq (optarg, "invalid") || streq (optarg, "i"))
++	    unicode_display = unicode_invalid;
++	  else if (streq (optarg, "hex") || streq (optarg, "x"))
++	    unicode_display = unicode_hex;
++	  else if (streq (optarg, "highlight") || streq (optarg, "h"))
++	    unicode_display = unicode_highlight;
++	  else
++	    fatal (_("invalid argument to -U/--unicode: %s"), optarg);
++	  break;
++
+ 	case 'V':
+ 	case 'v':
+ 	  print_version ("strings");
+@@ -258,6 +305,9 @@ main (int argc, char **argv)
+ 	}
+     }
+ 
++  if (unicode_display != unicode_default)
++    encoding = 'S';
++
+   if (numeric_opt != 0)
+     {
+       string_min = (int) strtoul (argv[numeric_opt - 1] + 1, &s, 0);
+@@ -293,14 +343,14 @@ main (int argc, char **argv)
+     {
+       datasection_only = false;
+       SET_BINARY (fileno (stdin));
+-      print_strings ("{standard input}", stdin, 0, 0, 0, (char *) NULL);
++      print_strings ("{standard input}", stdin, 0, 0, (char *) NULL);
+       files_given = true;
+     }
+   else
+     {
+       for (; optind < argc; ++optind)
+ 	{
+-	  if (strcmp (argv[optind], "-") == 0)
++	  if (streq (argv[optind], "-"))
+ 	    datasection_only = false;
+ 	  else
+ 	    {
+@@ -342,7 +392,7 @@ strings_a_section (bfd *abfd, asection *
+     }
+ 
+   *got_a_section = true;
+-  print_strings (filename, NULL, sect->filepos, 0, sectsize, (char *) mem);
++  print_strings (filename, NULL, sect->filepos, sectsize, (char *) mem);
+   free (mem);
+ }
+ 
+@@ -427,7 +477,7 @@ strings_file (char *file)
+ 	  return false;
+ 	}
+ 
+-      print_strings (file, stream, (file_ptr) 0, 0, 0, (char *) 0);
++      print_strings (file, stream, (file_ptr) 0, 0, (char *) NULL);
+ 
+       if (fclose (stream) == EOF)
+ 	{
+@@ -551,6 +601,626 @@ unget_part_char (long c, file_ptr *addre
+ 	}
+     }
+ }
++
++static void
++print_filename_and_address (const char * filename, file_ptr address)
++{
++  if (print_filenames)
++    printf ("%s: ", filename);
++
++  if (! print_addresses)
++    return;
++
++  switch (address_radix)
++    {
++    case 8:
++      if (sizeof (address) > sizeof (long))
++	{
++#ifndef __MSVCRT__
++	  printf ("%7llo ", (unsigned long long) address);
++#else
++	  printf ("%7I64o ", (unsigned long long) address);
++#endif
++	}
++      else
++	printf ("%7lo ", (unsigned long) address);
++      break;
++
++    case 10:
++      if (sizeof (address) > sizeof (long))
++	{
++#ifndef __MSVCRT__
++	  printf ("%7llu ", (unsigned long long) address);
++#else
++	  printf ("%7I64d ", (unsigned long long) address);
++#endif
++	}
++      else
++	printf ("%7ld ", (long) address);
++      break;
++
++    case 16:
++      if (sizeof (address) > sizeof (long))
++	{
++#ifndef __MSVCRT__
++	  printf ("%7llx ", (unsigned long long) address);
++#else
++	  printf ("%7I64x ", (unsigned long long) address);
++#endif
++	}
++      else
++	printf ("%7lx ", (unsigned long) address);
++      break;
++    }
++}
++
++/* Return non-zero if the bytes starting at BUFFER form a valid UTF-8 encoding.
++   If the encoding is valid then returns the number of bytes it uses.  */
++
++static unsigned int
++is_valid_utf8 (const unsigned char * buffer, unsigned long buflen)
++{
++  if (buffer[0] < 0xc0)
++    return 0;
++
++  if (buflen < 2)
++    return 0;
++
++  if ((buffer[1] & 0xc0) != 0x80)
++    return 0;
++
++  if ((buffer[0] & 0x20) == 0)
++    return 2;
++
++  if (buflen < 3)
++    return 0;
++
++  if ((buffer[2] & 0xc0) != 0x80)
++    return 0;
++
++  if ((buffer[0] & 0x10) == 0)
++    return 3;
++
++  if (buflen < 4)
++    return 0;
++
++  if ((buffer[3] & 0xc0) != 0x80)
++    return 0;
++
++  return 4;
++}
++
++/* Display a UTF-8 encoded character in BUFFER according to the setting
++   of unicode_display.  The character is known to be valid.
++   Returns the number of bytes consumed.  */
++
++static unsigned int
++display_utf8_char (const unsigned char * buffer)
++{
++  unsigned int j;
++  unsigned int utf8_len;
++
++  switch (buffer[0] & 0x30)
++    {
++    case 0x00:
++    case 0x10:
++      utf8_len = 2;
++      break;
++    case 0x20:
++      utf8_len = 3;
++      break;
++    default:
++      utf8_len = 4;
++    }
++
++  switch (unicode_display)
++    {
++    default:
++      fprintf (stderr, "ICE: unexpected unicode display type\n");
++      break;
++
++    case unicode_escape:
++    case unicode_highlight:
++      if (unicode_display == unicode_highlight && isatty (1))
++	printf ("\x1B[31;47m"); /* Red.  */
++
++      switch (utf8_len)
++	{
++	case 2:
++	  printf ("\\u%02x%02x",
++		  ((buffer[0] & 0x1c) >> 2),
++		  ((buffer[0] & 0x03) << 6) | (buffer[1] & 0x3f));
++	  break;
++
++	case 3:
++	  printf ("\\u%02x%02x",
++		  ((buffer[0] & 0x0f) << 4) | ((buffer[1] & 0x3c) >> 2),
++		  ((buffer[1] & 0x03) << 6) | ((buffer[2] & 0x3f)));
++	  break;
++
++	case 4:
++	  printf ("\\u%02x%02x%02x",
++		  ((buffer[0] & 0x07) << 6) | ((buffer[1] & 0x3c) >> 2),
++		  ((buffer[1] & 0x03) << 6) | ((buffer[2] & 0x3c) >> 2),
++		  ((buffer[2] & 0x03) << 6) | ((buffer[3] & 0x3f)));
++	  break;
++	default:
++	  /* URG.  */
++	  break;
++	}
++
++      if (unicode_display == unicode_highlight && isatty (1))
++	printf ("\033[0m"); /* Default colour.  */
++      break;
++
++    case unicode_hex:
++      putchar ('<');
++      printf ("0x");
++      for (j = 0; j < utf8_len; j++)
++	printf ("%02x", buffer [j]);
++      putchar ('>');
++      break;
++
++    case unicode_locale:
++      printf ("%.1s", buffer);
++      break;
++    }
++
++  return utf8_len;
++}
++
++/* Display strings in BUFFER.  Treat any UTF-8 encoded characters encountered
++   according to the setting of the unicode_display variable.  The buffer
++   contains BUFLEN bytes.
++
++   Display the characters as if they started at ADDRESS and are contained in
++   FILENAME.  */
++
++static void
++print_unicode_buffer (const char *            filename,
++		      file_ptr                address,
++		      const unsigned char *   buffer,
++		      unsigned long           buflen)
++{
++  /* Paranoia checks...  */
++  if (filename == NULL
++      || buffer == NULL
++      || unicode_display == unicode_default
++      || encoding != 'S'
++      || encoding_bytes != 1)
++    {
++      fprintf (stderr, "ICE: bad arguments to print_unicode_buffer\n");
++      return;
++    }
++
++  if (buflen == 0)
++    return;
++
++  /* We must only display strings that are at least string_min *characters*
++     long.  So we scan the buffer in two stages.  First we locate the start
++     of a potential string.  Then we walk along it until we have found
++     string_min characters.  Then we go back to the start point and start
++     displaying characters according to the unicode_display setting.  */
++
++  unsigned long start_point = 0;
++  unsigned long i = 0;
++  unsigned int char_len = 1;
++  unsigned int num_found = 0;
++
++  for (i = 0; i < buflen; i += char_len)
++    {
++      int c = buffer[i];
++
++      char_len = 1;
++
++      /* Find the first potential character of a string.  */
++      if (! STRING_ISGRAPHIC (c))
++	{
++	  num_found = 0;
++	  continue;
++	}
++
++      if (c > 126)
++	{
++	  if (c < 0xc0)
++	    {
++	      num_found = 0;
++	      continue;
++	    }
++
++	  if ((char_len = is_valid_utf8 (buffer + i, buflen - i)) == 0)
++	    {
++	      char_len = 1;
++	      num_found = 0;
++	      continue;
++	    }
++
++	  if (unicode_display == unicode_invalid)
++	    {
++	      /* We have found a valid UTF-8 character, but we treat it as non-graphic.  */
++	      num_found = 0;
++	      continue;
++	    }
++	}
++
++      if (num_found == 0)
++	/* We have found a potential starting point for a string.  */
++	start_point = i;
++
++      ++ num_found;
++
++      if (num_found >= string_min)
++	break;
++    }
++
++  if (num_found < string_min)
++    return;
++
++  print_filename_and_address (filename, address + start_point);
++
++  /* We have found string_min characters.  Display them and any
++     more that follow.  */
++  for (i = start_point; i < buflen; i += char_len)
++    {
++      int c = buffer[i];
++
++      char_len = 1;
++
++      if (! STRING_ISGRAPHIC (c))
++	break;
++      else if (c < 127)
++	putchar (c);
++      else if (! is_valid_utf8 (buffer + i, buflen - i))
++	break;
++      else if (unicode_display == unicode_invalid)
++	break;
++      else
++	char_len = display_utf8_char (buffer + i);
++    }
++
++  if (output_separator)
++    fputs (output_separator, stdout);
++  else
++    putchar ('\n');
++
++  /* FIXME: Using tail recursion here is lazy programming...  */
++  print_unicode_buffer (filename, address + i, buffer + i, buflen - i);
++}
++
++static int
++get_unicode_byte (FILE *          stream,
++		  unsigned char * putback,
++		  unsigned int *  num_putback,
++		  unsigned int *  num_read)
++{
++  if (* num_putback > 0)
++    {
++      * num_putback = * num_putback - 1;
++      return putback [* num_putback];
++    }
++
++  * num_read = * num_read + 1;
++
++#if defined(HAVE_GETC_UNLOCKED) && HAVE_DECL_GETC_UNLOCKED
++  return getc_unlocked (stream);
++#else
++  return getc (stream);
++#endif
++}
++
++/* Helper function for print_unicode_stream.  */
++
++static void
++print_unicode_stream_body (const char *     filename,
++			   file_ptr         address,
++			   FILE *           stream,
++			   unsigned char *  putback_buf,
++			   unsigned int     num_putback,
++			   unsigned char *  print_buf)
++{
++  /* It would be nice if we could just read the stream into a buffer
++     and then process if with print_unicode_buffer.  But the input
++     might be huge or it might time-locked (eg stdin).  So instead
++     we go one byte at a time...  */
++
++  file_ptr start_point = 0;
++  unsigned int num_read = 0;
++  unsigned int num_chars = 0;
++  unsigned int num_print = 0;
++  int c = 0;
++
++  /* Find a series of string_min characters.  Put them into print_buf.  */
++  do
++    {
++      if (num_chars >= string_min)
++	break;
++
++      c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++      if (c == EOF)
++	break;
++
++      if (! STRING_ISGRAPHIC (c))
++	{
++	  num_chars = num_print = 0;
++	  continue;
++	}
++
++      if (num_chars == 0)
++	start_point = num_read - 1;
++
++      if (c < 127)
++	{
++	  print_buf[num_print] = c;
++	  num_chars ++;
++	  num_print ++;
++	  continue;
++	}
++
++      if (c < 0xc0)
++	{
++	  num_chars = num_print = 0;
++	  continue;
++	}
++
++      /* We *might* have a UTF-8 sequence.  Time to start peeking.  */
++      char utf8[4];
++
++      utf8[0] = c;
++      c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++      if (c == EOF)
++	break;
++      utf8[1] = c;
++
++      if ((utf8[1] & 0xc0) != 0x80)
++	{
++	  /* Invalid UTF-8.  */
++	  putback_buf[num_putback++] = utf8[1];
++	  num_chars = num_print = 0;
++	  continue;
++	}
++      else if ((utf8[0] & 0x20) == 0)
++	{
++	  /* A valid 2-byte UTF-8 encoding.  */
++	  if (unicode_display == unicode_invalid)
++	    {
++	      putback_buf[num_putback++] = utf8[1];
++	      num_chars = num_print = 0;
++	    }
++	  else
++	    {
++	      print_buf[num_print ++] = utf8[0];
++	      print_buf[num_print ++] = utf8[1];
++	      num_chars ++;
++	    }
++	  continue;
++	}
++
++      c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++      if (c == EOF)
++	break;
++      utf8[2] = c;
++
++      if ((utf8[2] & 0xc0) != 0x80)
++	{
++	  /* Invalid UTF-8.  */
++	  putback_buf[num_putback++] = utf8[2];
++	  putback_buf[num_putback++] = utf8[1];
++	  num_chars = num_print = 0;
++	  continue;
++	}
++      else if ((utf8[0] & 0x10) == 0)
++	{
++	  /* A valid 3-byte UTF-8 encoding.  */
++	  if (unicode_display == unicode_invalid)
++	    {
++	      putback_buf[num_putback++] = utf8[2];
++	      putback_buf[num_putback++] = utf8[1];
++	      num_chars = num_print = 0;
++	    }
++	  else
++	    {
++	      print_buf[num_print ++] = utf8[0];
++	      print_buf[num_print ++] = utf8[1];
++	      print_buf[num_print ++] = utf8[2];
++	      num_chars ++;
++	    }
++	  continue;
++	}
++
++      c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++      if (c == EOF)
++	break;
++      utf8[3] = c;
++
++      if ((utf8[3] & 0xc0) != 0x80)
++	{
++	  /* Invalid UTF-8.  */
++	  putback_buf[num_putback++] = utf8[3];
++	  putback_buf[num_putback++] = utf8[2];
++	  putback_buf[num_putback++] = utf8[1];
++	  num_chars = num_print = 0;
++	}
++      /* We have a valid 4-byte UTF-8 encoding.  */
++      else if (unicode_display == unicode_invalid)
++	{
++	  putback_buf[num_putback++] = utf8[3];
++	  putback_buf[num_putback++] = utf8[1];
++	  putback_buf[num_putback++] = utf8[2];
++	  num_chars = num_print = 0;
++	}
++      else
++	{
++	  print_buf[num_print ++] = utf8[0];
++	  print_buf[num_print ++] = utf8[1];
++	  print_buf[num_print ++] = utf8[2];
++	  print_buf[num_print ++] = utf8[3];
++	  num_chars ++;
++	}
++    }
++  while (1);
++
++  if (num_chars >= string_min)
++    {
++      /* We know that we have string_min valid characters in print_buf,
++	 and there may be more to come in the stream.  Start displaying
++	 them.  */
++
++      print_filename_and_address (filename, address + start_point);
++
++      unsigned int i;
++      for (i = 0; i < num_print;)
++	{
++	  if (print_buf[i] < 127)
++	    putchar (print_buf[i++]);
++	  else
++	    i += display_utf8_char (print_buf + i);
++	}
++
++      /* OK so now we have to start read unchecked bytes.  */
++
++      /* Find a series of string_min characters.  Put them into print_buf.  */
++      do
++	{
++	  c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++	  if (c == EOF)
++	    break;
++
++	  if (! STRING_ISGRAPHIC (c))
++	    break;
++
++	  if (c < 127)
++	    {
++	      putchar (c);
++	      continue;
++	    }
++
++	  if (c < 0xc0)
++	    break;
++
++	  /* We *might* have a UTF-8 sequence.  Time to start peeking.  */
++	  unsigned char utf8[4];
++
++	  utf8[0] = c;
++	  c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++	  if (c == EOF)
++	    break;
++	  utf8[1] = c;
++
++	  if ((utf8[1] & 0xc0) != 0x80)
++	    {
++	      /* Invalid UTF-8.  */
++	      putback_buf[num_putback++] = utf8[1];
++	      break;
++	    }
++	  else if ((utf8[0] & 0x20) == 0)
++	    {
++	      /* Valid 2-byte UTF-8.  */
++	      if (unicode_display == unicode_invalid)
++		{
++		  putback_buf[num_putback++] = utf8[1];
++		  break;
++		}
++	      else
++		{
++		  (void) display_utf8_char (utf8);
++		  continue;
++		}
++	    }
++
++	  c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++	  if (c == EOF)
++	    break;
++	  utf8[2] = c;
++
++	  if ((utf8[2] & 0xc0) != 0x80)
++	    {
++	      /* Invalid UTF-8.  */
++	      putback_buf[num_putback++] = utf8[2];
++	      putback_buf[num_putback++] = utf8[1];
++	      break;
++	    }
++	  else if ((utf8[0] & 0x10) == 0)
++	    {
++	      /* Valid 3-byte UTF-8.  */
++	      if (unicode_display == unicode_invalid)
++		{
++		  putback_buf[num_putback++] = utf8[2];
++		  putback_buf[num_putback++] = utf8[1];
++		  break;
++		}
++	      else
++		{
++		  (void) display_utf8_char (utf8);
++		  continue;
++		}
++	    }
++
++	  c = get_unicode_byte (stream, putback_buf, & num_putback, & num_read);
++	  if (c == EOF)
++	    break;
++	  utf8[3] = c;
++
++	  if ((utf8[3] & 0xc0) != 0x80)
++	    {
++	      /* Invalid UTF-8.  */
++	      putback_buf[num_putback++] = utf8[3];
++	      putback_buf[num_putback++] = utf8[2];
++	      putback_buf[num_putback++] = utf8[1];
++	      break;
++	    }
++	  else if (unicode_display == unicode_invalid)
++	    {
++	      putback_buf[num_putback++] = utf8[3];
++	      putback_buf[num_putback++] = utf8[2];
++	      putback_buf[num_putback++] = utf8[1];
++	      break;
++	    }
++	  else
++	    /* A valid 4-byte UTF-8 encoding.  */
++	    (void) display_utf8_char (utf8);
++	}
++      while (1);
++
++      if (output_separator)
++	fputs (output_separator, stdout);
++      else
++	putchar ('\n');
++    }
++
++  if (c != EOF)
++    /* FIXME: Using tail recursion here is lazy, but it works.  */
++    print_unicode_stream_body (filename, address + num_read, stream, putback_buf, num_putback, print_buf);
++}
++
++/* Display strings read in from STREAM.  Treat any UTF-8 encoded characters
++   encountered according to the setting of the unicode_display variable.
++   The stream is positioned at ADDRESS and is attached to FILENAME.  */
++
++static void
++print_unicode_stream (const char * filename,
++		      file_ptr     address,
++		      FILE *       stream)
++{
++  /* Paranoia checks...  */
++  if (filename == NULL
++      || stream == NULL
++      || unicode_display == unicode_default
++      || encoding != 'S'
++      || encoding_bytes != 1)
++    {
++      fprintf (stderr, "ICE: bad arguments to print_unicode_stream\n");
++      return;
++    }
++
++  /* Allocate space for string_min 4-byte utf-8 characters.  */
++  unsigned char * print_buf = xmalloc ((4 * string_min) + 1);
++  /* We should never have to put back more than 4 bytes.  */
++  unsigned char putback_buf[5];
++  unsigned int num_putback = 0;
++
++  print_unicode_stream_body (filename, address, stream, putback_buf, num_putback, print_buf);
++  free (print_buf);
++}
+ 
+ /* Find the strings in file FILENAME, read from STREAM.
+    Assume that STREAM is positioned so that the next byte read
+@@ -566,20 +1236,29 @@ unget_part_char (long c, file_ptr *addre
+ 
+ static void
+ print_strings (const char *filename, FILE *stream, file_ptr address,
+-	       int stop_point, int magiccount, char *magic)
++	       int magiccount, char *magic)
+ {
++  if (unicode_display != unicode_default)
++    {
++      if (magic != NULL)
++	print_unicode_buffer (filename, address,
++			      (const unsigned char *) magic, magiccount);
++
++      if (stream != NULL)
++	print_unicode_stream (filename, address, stream);
++      return;
++    }
++
+   char *buf = (char *) xmalloc (sizeof (char) * (string_min + 1));
+ 
+   while (1)
+     {
+       file_ptr start;
+-      int i;
++      unsigned int i;
+       long c;
+ 
+       /* See if the next `string_min' chars are all graphic chars.  */
+     tryline:
+-      if (stop_point && address >= stop_point)
+-	break;
+       start = address;
+       for (i = 0; i < string_min; i++)
+ 	{
+@@ -601,51 +1280,7 @@ print_strings (const char *filename, FIL
+ 
+       /* We found a run of `string_min' graphic characters.  Print up
+ 	 to the next non-graphic character.  */
+-
+-      if (print_filenames)
+-	printf ("%s: ", filename);
+-      if (print_addresses)
+-	switch (address_radix)
+-	  {
+-	  case 8:
+-	    if (sizeof (start) > sizeof (long))
+-	      {
+-#ifndef __MSVCRT__
+-		printf ("%7llo ", (unsigned long long) start);
+-#else
+-		printf ("%7I64o ", (unsigned long long) start);
+-#endif
+-	      }
+-	    else
+-	      printf ("%7lo ", (unsigned long) start);
+-	    break;
+-
+-	  case 10:
+-	    if (sizeof (start) > sizeof (long))
+-	      {
+-#ifndef __MSVCRT__
+-		printf ("%7llu ", (unsigned long long) start);
+-#else
+-		printf ("%7I64d ", (unsigned long long) start);
+-#endif
+-	      }
+-	    else
+-	      printf ("%7ld ", (long) start);
+-	    break;
+-
+-	  case 16:
+-	    if (sizeof (start) > sizeof (long))
+-	      {
+-#ifndef __MSVCRT__
+-		printf ("%7llx ", (unsigned long long) start);
+-#else
+-		printf ("%7I64x ", (unsigned long long) start);
+-#endif
+-	      }
+-	    else
+-	      printf ("%7lx ", (unsigned long) start);
+-	    break;
+-	  }
++      print_filename_and_address (filename, start);
+ 
+       buf[i] = '\0';
+       fputs (buf, stdout);
+@@ -697,6 +1332,8 @@ usage (FILE *stream, int status)
+   -T --target=<BFDNAME>     Specify the binary file format\n\
+   -e --encoding={s,S,b,l,B,L} Select character size and endianness:\n\
+                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit\n\
++  --unicode={default|show|invalid|hex|escape|highlight}\n\
++  -u {d|s|i|x|e|h}          Specify how to treat UTF-8 encoded unicode characters\n\
+   -s --output-separator=<string> String used to separate strings in output.\n\
+   @<file>                   Read options from <file>\n\
+   -h --help                 Display this information\n\
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0001-elf-Discard-input-.note.gnu.build-id-sections.patch b/poky/meta/recipes-devtools/binutils/binutils/0001-elf-Discard-input-.note.gnu.build-id-sections.patch
new file mode 100644
index 0000000..c93af4e
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/0001-elf-Discard-input-.note.gnu.build-id-sections.patch
@@ -0,0 +1,215 @@
+From b2e18d3ea300f7491705b6e86a7cc3d6366e3b1f Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Tue, 30 Nov 2021 20:40:38 -0800
+Subject: [PATCH] elf: Discard input .note.gnu.build-id sections
+
+1. Discard input .note.gnu.build-id sections.
+2. Clear the build ID field before writing.
+3. Use bfd_make_section_anyway_with_flags to create the output
+.note.gnu.build-id section.
+
+	PR ld/28639
+	* ldelf.c (ldelf_after_open): Discard input .note.gnu.build-id
+	sections, excluding the first one.
+	(write_build_id): Clear the build ID field before writing.
+	(ldelf_setup_build_id): Use bfd_make_section_anyway_with_flags
+	to create the output .note.gnu.build-id section.
+	* testsuite/ld-elf/build-id.exp: New file.
+	* testsuite/ld-elf/pr28639a.rd: Likewise.
+	* testsuite/ld-elf/pr28639b.rd: Likewise.
+	* testsuite/ld-elf/pr28639c.rd: Likewise.
+	* testsuite/ld-elf/pr28639d.rd: Likewise.
+
+Upstream-Status: Backport
+
+Reference to upstream patch:
+[https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1f1d0f8888a6c944e612b416a2a6e11abcf5199f]
+---
+ ld/ldelf.c                       | 15 ++++++-
+ ld/testsuite/ld-elf/build-id.exp | 77 ++++++++++++++++++++++++++++++++
+ ld/testsuite/ld-elf/pr28639a.rd  |  6 +++
+ ld/testsuite/ld-elf/pr28639b.rd  |  6 +++
+ ld/testsuite/ld-elf/pr28639c.rd  | 10 +++++
+ ld/testsuite/ld-elf/pr28639d.rd  |  4 ++
+ 6 files changed, 117 insertions(+), 1 deletion(-)
+ create mode 100644 ld/testsuite/ld-elf/build-id.exp
+ create mode 100644 ld/testsuite/ld-elf/pr28639a.rd
+ create mode 100644 ld/testsuite/ld-elf/pr28639b.rd
+ create mode 100644 ld/testsuite/ld-elf/pr28639c.rd
+ create mode 100644 ld/testsuite/ld-elf/pr28639d.rd
+
+diff --git a/ld/ldelf.c b/ld/ldelf.c
+index 21e655bb55c..8501d98b48f 100644
+--- a/ld/ldelf.c
++++ b/ld/ldelf.c
+@@ -1043,6 +1043,15 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
+   /* Do not allow executable files to be used as inputs to the link.  */
+   for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
+     {
++      /* Discard input .note.gnu.build-id sections.  */
++      s = bfd_get_section_by_name (abfd, ".note.gnu.build-id");
++      while (s != NULL)
++	{
++	  if (s != elf_tdata (link_info.output_bfd)->o->build_id.sec)
++	    s->flags |= SEC_EXCLUDE;
++	  s = bfd_get_next_section_by_name (NULL, s);
++	}
++
+       if (abfd->xvec->flavour == bfd_target_elf_flavour
+ 	  && !bfd_input_just_syms (abfd)
+ 	  && elf_tdata (abfd) != NULL
+@@ -1387,6 +1396,9 @@ write_build_id (bfd *abfd)
+   id_bits = contents + size;
+   size = asec->size - size;
+ 
++  /* Clear the build ID field.  */
++  memset (id_bits, 0, size);
++
+   bfd_h_put_32 (abfd, sizeof "GNU", &e_note->namesz);
+   bfd_h_put_32 (abfd, size, &e_note->descsz);
+   bfd_h_put_32 (abfd, NT_GNU_BUILD_ID, &e_note->type);
+@@ -1418,7 +1430,8 @@ ldelf_setup_build_id (bfd *ibfd)
+ 
+   flags = (SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY
+ 	   | SEC_LINKER_CREATED | SEC_READONLY | SEC_DATA);
+-  s = bfd_make_section_with_flags (ibfd, ".note.gnu.build-id", flags);
++  s = bfd_make_section_anyway_with_flags (ibfd, ".note.gnu.build-id",
++					  flags);
+   if (s != NULL && bfd_set_section_alignment (s, 2))
+     {
+       struct elf_obj_tdata *t = elf_tdata (link_info.output_bfd);
+diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp
+new file mode 100644
+index 00000000000..19c22a75c4d
+--- /dev/null
++++ b/ld/testsuite/ld-elf/build-id.exp
+@@ -0,0 +1,77 @@
++# Expect script for --build-id tests.
++#   Copyright (C) 2021 Free Software Foundation, Inc.
++#
++# This file is part of the GNU Binutils.
++#
++# 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, write to the Free Software
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
++# MA 02110-1301, USA.
++#
++
++# Exclude non-ELF targets.
++
++if ![is_elf_format] {
++    return
++}
++
++if { [istarget frv-*-*] || [istarget lm32-*-*] } {
++    return
++}
++
++if { !([istarget *-*-linux*]
++       || [istarget arm*-*-uclinuxfdpiceabi]
++       || [istarget *-*-nacl*]
++       || [istarget *-*-gnu*]) } then {
++    return
++}
++
++run_ld_link_tests [list \
++    [list \
++	"pr28639a.o" \
++	"-r --build-id=md5" \
++	"" \
++	"" \
++	{start.s} \
++	{{readelf {--notes} pr28639a.rd}} \
++	"pr28639a.o" \
++    ] \
++    [list \
++	"pr28639a.o" \
++	"-r --build-id" \
++	"" \
++	"" \
++	{dummy.s} \
++	{{readelf {--notes} pr28639b.rd}} \
++	"pr28639b.o" \
++    ] \
++    [list \
++	"pr28639a" \
++	"--build-id tmpdir/pr28639a.o tmpdir/pr28639b.o" \
++	"" \
++	"" \
++	{dummy.s} \
++	{{readelf {--notes} pr28639b.rd}  \
++	 {readelf {--notes} pr28639c.rd}} \
++	"pr28639a" \
++    ] \
++    [list \
++	"pr28639b" \
++	"--build-id=none tmpdir/pr28639a.o tmpdir/pr28639b.o" \
++	"" \
++	"" \
++	{dummy.s} \
++	{{readelf {--notes} pr28639d.rd}} \
++	"pr28639b" \
++    ] \
++]
+diff --git a/ld/testsuite/ld-elf/pr28639a.rd b/ld/testsuite/ld-elf/pr28639a.rd
+new file mode 100644
+index 00000000000..e85087064d0
+--- /dev/null
++++ b/ld/testsuite/ld-elf/pr28639a.rd
+@@ -0,0 +1,6 @@
++#...
++Displaying notes found in: \.note\.gnu\.build-id
++  Owner                Data size 	Description
++  GNU                  0x00000010	NT_GNU_BUILD_ID \(unique build ID bitstring\)
++    Build ID: [0-9a-f]+
++#pass
+diff --git a/ld/testsuite/ld-elf/pr28639b.rd b/ld/testsuite/ld-elf/pr28639b.rd
+new file mode 100644
+index 00000000000..04dcb04bec2
+--- /dev/null
++++ b/ld/testsuite/ld-elf/pr28639b.rd
+@@ -0,0 +1,6 @@
++#...
++Displaying notes found in: \.note\.gnu\.build-id
++  Owner                Data size 	Description
++  GNU                  0x00000014	NT_GNU_BUILD_ID \(unique build ID bitstring\)
++    Build ID: [0-9a-f]+
++#pass
+diff --git a/ld/testsuite/ld-elf/pr28639c.rd b/ld/testsuite/ld-elf/pr28639c.rd
+new file mode 100644
+index 00000000000..64221e5fa51
+--- /dev/null
++++ b/ld/testsuite/ld-elf/pr28639c.rd
+@@ -0,0 +1,10 @@
++#failif
++#...
++Displaying notes found in: \.note\.gnu\.build-id
++  Owner                Data size 	Description
++  GNU                  0x[0-9a-f]+	NT_GNU_BUILD_ID \(unique build ID bitstring\)
++    Build ID: [0-9a-f]+
++  Owner                Data size 	Description
++  GNU                  0x[0-9a-f]+	NT_GNU_BUILD_ID \(unique build ID bitstring\)
++    Build ID: [0-9a-f]+
++#...
+diff --git a/ld/testsuite/ld-elf/pr28639d.rd b/ld/testsuite/ld-elf/pr28639d.rd
+new file mode 100644
+index 00000000000..897c8493efa
+--- /dev/null
++++ b/ld/testsuite/ld-elf/pr28639d.rd
+@@ -0,0 +1,4 @@
++#failif
++#...
++Displaying notes found in: \.note\.gnu\.build-id
++#...
+-- 
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0004-configure-widen-the-regexp-for-SH-architectures.patch b/poky/meta/recipes-devtools/binutils/binutils/0004-configure-widen-the-regexp-for-SH-architectures.patch
deleted file mode 100644
index f476ff2..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0004-configure-widen-the-regexp-for-SH-architectures.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b8d43b6b8d98e176346871c92935458b06598c5b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:07:33 +0000
-Subject: [PATCH] configure: widen the regexp for SH architectures
-
-gprof needs to know about uclibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure    | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 3dd206525a7..e8ba1a1d3de 100755
---- a/configure
-+++ b/configure
-@@ -3892,7 +3892,7 @@ case "${target}" in
-   nvptx*-*-*)
-     noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
-     ;;
--  sh-*-*)
-+  sh*-*-* | sh64-*-*)
-     case "${target}" in
-       sh*-*-elf)
-          ;;
-diff --git a/configure.ac b/configure.ac
-index 797a624621e..3a8a3ae1f3b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1175,7 +1175,7 @@ case "${target}" in
-   nvptx*-*-*)
-     noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
-     ;;
--  sh-*-*)
-+  sh*-*-* | sh64-*-*)
-     case "${target}" in
-       sh*-*-elf)
-          ;;
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch b/poky/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch
deleted file mode 100644
index fab92d5..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From fb6d52dda9c230baf869ed5f981581a7b5094b70 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:44:14 +0000
-Subject: [PATCH] Change default emulation for mips64*-*-linux
-
-we change the default emulations to be N64 instead of N32
-
-Upstream-Status: Inappropriate [ OE configuration Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- bfd/config.bfd   | 8 ++++----
- ld/configure.tgt | 8 ++++----
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 30087e3b8f8..1896e11790c 100644
---- a/bfd/config.bfd
-+++ b/bfd/config.bfd
-@@ -891,12 +891,12 @@ case "${targ}" in
-     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
-     ;;
-   mips64*el-*-linux*)
--    targ_defvec=mips_elf32_ntrad_le_vec
--    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
-+    targ_defvec=mips_elf64_trad_le_vec
-+    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
-     ;;
-   mips64*-*-linux*)
--    targ_defvec=mips_elf32_ntrad_be_vec
--    targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
-+    targ_defvec=mips_elf64_trad_be_vec
-+    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_be_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
-     ;;
-   mips*el-*-linux*)
-     targ_defvec=mips_elf32_trad_le_vec
-diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 6205d7c9872..c08533658e5 100644
---- a/ld/configure.tgt
-+++ b/ld/configure.tgt
-@@ -530,12 +530,12 @@ mips*-*-vxworks*)	targ_emul=elf32ebmipvxworks
- 			;;
- mips*-*-windiss)	targ_emul=elf32mipswindiss
- 			;;
--mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
--			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
-+mips64*el-*-linux-*)	targ_emul=elf64ltsmip
-+			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
- 			targ_extra_libpath=$targ_extra_emuls
- 			;;
--mips64*-*-linux-*)	targ_emul=elf32btsmipn32
--			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
-+mips64*-*-linux-*)	targ_emul=elf64btsmip
-+			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
- 			targ_extra_libpath=$targ_extra_emuls
- 			;;
- mips*el-*-linux-*)	targ_emul=elf32ltsmip
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0010-Add-support-for-Netlogic-XLP.patch b/poky/meta/recipes-devtools/binutils/binutils/0010-Add-support-for-Netlogic-XLP.patch
deleted file mode 100644
index b2f7448..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0010-Add-support-for-Netlogic-XLP.patch
+++ /dev/null
@@ -1,415 +0,0 @@
-From 21920b7a3d10a7dae4c1f18a4bb185de78048e3f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 14 Feb 2016 17:06:19 +0000
-Subject: [PATCH] Add support for Netlogic XLP
-
-Patch From: Nebu Philips <nphilips@netlogicmicro.com>
-
-Using the mipsisa64r2nlm target, add support for XLP from
-Netlogic. Also, update vendor name to NLM wherever applicable.
-
-Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been
-assigned to INSN_OCTEON3
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
- bfd/aoutx.h           |  1 +
- bfd/archures.c        |  1 +
- bfd/bfd-in2.h         |  1 +
- bfd/config.bfd        |  5 +++++
- bfd/cpu-mips.c        |  6 ++++--
- bfd/elfxx-mips.c      |  8 ++++++++
- binutils/readelf.c    |  1 +
- gas/config/tc-mips.c  |  4 +++-
- gas/configure         |  3 +++
- gas/configure.ac      |  3 +++
- include/elf/mips.h    |  1 +
- include/opcode/mips.h |  8 +++++++-
- ld/configure.tgt      |  3 +++
- opcodes/mips-dis.c    | 12 +++++-------
- opcodes/mips-opc.c    | 31 ++++++++++++++++++++-----------
- 15 files changed, 66 insertions(+), 22 deletions(-)
-
-diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index 17560bd8f54..10b1cad74e6 100644
---- a/bfd/aoutx.h
-+++ b/bfd/aoutx.h
-@@ -810,6 +810,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
- 	case bfd_mach_mipsisa64r6:
- 	case bfd_mach_mips_sb1:
- 	case bfd_mach_mips_xlr:
-+	case bfd_mach_mips_xlp:
- 	  /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc.  */
- 	  arch_flags = M_MIPS2;
- 	  break;
-diff --git a/bfd/archures.c b/bfd/archures.c
-index 390691bfba1..b0b7a5fa7a0 100644
---- a/bfd/archures.c
-+++ b/bfd/archures.c
-@@ -185,6 +185,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeon3		6503
- .#define bfd_mach_mips_xlr		887682	 {* decimal 'XLR'.  *}
- .#define bfd_mach_mips_interaptiv_mr2	736550	 {* decimal 'IA2'.  *}
-+.#define bfd_mach_mips_xlp              887680   {* decimal 'XLP'.  *}
- .#define bfd_mach_mipsisa32		32
- .#define bfd_mach_mipsisa32r2		33
- .#define bfd_mach_mipsisa32r3		34
-diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index 57b3c453649..a00b0d44359 100644
---- a/bfd/bfd-in2.h
-+++ b/bfd/bfd-in2.h
-@@ -1562,6 +1562,7 @@ enum bfd_architecture
- #define bfd_mach_mips_octeon3          6503
- #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'.  */
- #define bfd_mach_mips_interaptiv_mr2   736550   /* decimal 'IA2'.  */
-+#define bfd_mach_mips_xlp              887680   /* decimal 'XLP'.  */
- #define bfd_mach_mipsisa32             32
- #define bfd_mach_mipsisa32r2           33
- #define bfd_mach_mipsisa32r3           34
-diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 1896e11790c..8270fd2708d 100644
---- a/bfd/config.bfd
-+++ b/bfd/config.bfd
-@@ -874,6 +874,11 @@ case "${targ}" in
-     targ_defvec=mips_elf32_le_vec
-     targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
-     ;;
-+  mipsisa64*-*-elf*)
-+	targ_defvec=mips_elf32_trad_be_vec
-+	targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
-+	want64=true
-+	;;
-   mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
-     targ_defvec=mips_elf32_be_vec
-     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
-diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index 76b507e3c77..c1563cf4319 100644
---- a/bfd/cpu-mips.c
-+++ b/bfd/cpu-mips.c
-@@ -108,7 +108,8 @@ enum
-   I_mipsocteon3,
-   I_xlr,
-   I_interaptiv_mr2,
--  I_micromips
-+  I_micromips,
-+  I_xlp
- };
- 
- #define NN(index) (&arch_info_struct[(index) + 1])
-@@ -163,7 +164,8 @@ static const bfd_arch_info_type arch_info_struct[] =
-   N (64, 64, bfd_mach_mips_xlr, "mips:xlr",	   false, NN(I_xlr)),
-   N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", false,
-      NN(I_interaptiv_mr2)),
--  N (64, 64, bfd_mach_mips_micromips, "mips:micromips", false, NULL)
-+  N (64, 64, bfd_mach_mips_micromips, "mips:micromips", false, NN(I_micromips)),
-+  N (64, 64, bfd_mach_mips_xlp, "mips:xlp", false, NULL)
- };
- 
- /* The default architecture is mips:3000, but with a machine number of
-diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index e4827fd17de..fa8c2512837 100644
---- a/bfd/elfxx-mips.c
-+++ b/bfd/elfxx-mips.c
-@@ -6980,6 +6980,9 @@ _bfd_elf_mips_mach (flagword flags)
-     case E_MIPS_MACH_IAMR2:
-       return bfd_mach_mips_interaptiv_mr2;
- 
-+    case E_MIPS_MACH_XLP:
-+      return bfd_mach_mips_xlp;
-+
-     default:
-       switch (flags & EF_MIPS_ARCH)
- 	{
-@@ -12339,6 +12342,10 @@ mips_set_isa_flags (bfd *abfd)
-       val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
-       break;
- 
-+	case bfd_mach_mips_xlp:
-+	  val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP;
-+	  break;
-+
-     case bfd_mach_mipsisa32:
-       val = E_MIPS_ARCH_32;
-       break;
-@@ -14428,6 +14435,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
-   { bfd_mach_mips_gs264e, bfd_mach_mips_gs464e },
-   { bfd_mach_mips_gs464e, bfd_mach_mips_gs464 },
-   { bfd_mach_mips_gs464, bfd_mach_mipsisa64r2 },
-+  { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 },
- 
-   /* MIPS64 extensions.  */
-   { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
-diff --git a/binutils/readelf.c b/binutils/readelf.c
-index a6073f7ec80..2f2448b5eba 100644
---- a/binutils/readelf.c
-+++ b/binutils/readelf.c
-@@ -3613,6 +3613,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
- 	    case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
- 	    case E_MIPS_MACH_XLR:  strcat (buf, ", xlr"); break;
- 	    case E_MIPS_MACH_IAMR2:  strcat (buf, ", interaptiv-mr2"); break;
-+	    case E_MIPS_MACH_XLP:  strcat (buf, ", xlp"); break;
- 	    case 0:
- 	    /* We simply ignore the field in this case to avoid confusion:
- 	       MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
-diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index 0201f816814..a3cfcdbe982 100644
---- a/gas/config/tc-mips.c
-+++ b/gas/config/tc-mips.c
-@@ -570,6 +570,7 @@ static int mips_32bitmode = 0;
-    || mips_opts.arch == CPU_RM7000                    \
-    || mips_opts.arch == CPU_VR5500                    \
-    || mips_opts.micromips                             \
-+   || mips_opts.arch == CPU_XLP                       \
-    )
- 
- /* Whether the processor uses hardware interlocks to protect reads
-@@ -599,6 +600,7 @@ static int mips_32bitmode = 0;
-     && mips_opts.isa != ISA_MIPS3)                    \
-    || mips_opts.arch == CPU_R4300                     \
-    || mips_opts.micromips                             \
-+   || mips_opts.arch == CPU_XLP                       \
-    )
- 
- /* Whether the processor uses hardware interlocks to protect reads
-@@ -20157,7 +20159,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
-   /* Broadcom XLP.
-      XLP is mostly like XLR, with the prominent exception that it is
-      MIPS64R2 rather than MIPS64.  */
--  { "xlp",	      0, 0,			ISA_MIPS64R2, CPU_XLR },
-+  { "xlp",	      0, 0,			ISA_MIPS64R2, CPU_XLP },
- 
-   /* MIPS 64 Release 6.  */
-   { "i6400",	      0, ASE_VIRT | ASE_MSA,	ISA_MIPS64R6, CPU_MIPS64R6},
-diff --git a/gas/configure b/gas/configure
-index 110d707f079..789d1b38b33 100755
---- a/gas/configure
-+++ b/gas/configure
-@@ -12083,6 +12083,9 @@ _ACEOF
- 	  mipsisa64r6 | mipsisa64r6el)
- 	    mips_cpu=mips64r6
- 	    ;;
-+	  mipsisa64r2nlm | mipsisa64r2nlmel)
-+	    mips_cpu=xlp
-+	    ;;
- 	  mipstx39 | mipstx39el)
- 	    mips_cpu=r3900
- 	    ;;
-diff --git a/gas/configure.ac b/gas/configure.ac
-index 78efba88e23..c1b4ef6b3b0 100644
---- a/gas/configure.ac
-+++ b/gas/configure.ac
-@@ -331,6 +331,9 @@ changequote([,])dnl
- 	  mipsisa64r6 | mipsisa64r6el)
- 	    mips_cpu=mips64r6
- 	    ;;
-+	  mipsisa64r2nlm | mipsisa64r2nlmel)
-+	    mips_cpu=xlp
-+	    ;;
- 	  mipstx39 | mipstx39el)
- 	    mips_cpu=r3900
- 	    ;;
-diff --git a/include/elf/mips.h b/include/elf/mips.h
-index 4bd86307120..2d7df22abf2 100644
---- a/include/elf/mips.h
-+++ b/include/elf/mips.h
-@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
- #define E_MIPS_MACH_SB1         0x008a0000
- #define E_MIPS_MACH_OCTEON	0x008b0000
- #define E_MIPS_MACH_XLR     	0x008c0000
-+#define E_MIPS_MACH_XLP         0x008f0000
- #define E_MIPS_MACH_OCTEON2	0x008d0000
- #define E_MIPS_MACH_OCTEON3	0x008e0000
- #define E_MIPS_MACH_5400	0x00910000
-diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index 9add3c9d5bf..a99c53f652f 100644
---- a/include/opcode/mips.h
-+++ b/include/opcode/mips.h
-@@ -1157,7 +1157,7 @@ mips_opcode_32bit_p (const struct mips_opcode *mo)
- #define INSN_ISA32R3              8
- #define INSN_ISA32R5              9
- #define INSN_ISA32R6              10
--#define INSN_ISA64                11 
-+#define INSN_ISA64                11
- #define INSN_ISA64R2              12
- #define INSN_ISA64R3              13
- #define INSN_ISA64R5              14
-@@ -1265,6 +1265,8 @@ static const unsigned int mips_isa_table[] = {
- #define INSN_XLR                 0x00000020
- /* Imagination interAptiv MR2.  */
- #define INSN_INTERAPTIV_MR2	  0x04000000
-+/* Netlogic XlP instruction */
-+#define INSN_XLP		0x00000080
- 
- /* DSP ASE */
- #define ASE_DSP			0x00000001
-@@ -1389,6 +1391,7 @@ static const unsigned int mips_isa_table[] = {
- #define CPU_OCTEON3	6503
- #define CPU_XLR     	887682   	/* decimal 'XLR'   */
- #define CPU_INTERAPTIV_MR2 736550	/* decimal 'IA2'  */
-+#define CPU_XLP         887680      /* decimal 'XLP'   */
- 
- /* Return true if the given CPU is included in INSN_* mask MASK.  */
- 
-@@ -1459,6 +1462,9 @@ cpu_is_member (int cpu, unsigned int mask)
-     case CPU_INTERAPTIV_MR2:
-       return (mask & INSN_INTERAPTIV_MR2) != 0;
- 
-+    case CPU_XLP:
-+      return (mask & INSN_XLP) != 0;
-+
-     default:
-       return false;
-     }
-diff --git a/ld/configure.tgt b/ld/configure.tgt
-index c08533658e5..7abf32215c2 100644
---- a/ld/configure.tgt
-+++ b/ld/configure.tgt
-@@ -509,6 +509,9 @@ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
- 			targ_emul=elf32btsmip
- 			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
- 			;;
-+mipsisa64*-*-elf*)	targ_emul=elf32btsmip
-+			targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
-+			;;
- mips64*el-ps2-elf*)	targ_emul=elf32lr5900n32
- 			targ_extra_emuls="elf32lr5900"
- 			targ_extra_libpath=$targ_extra_emuls
-diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 591caf11e28..00120afed47 100644
---- a/opcodes/mips-dis.c
-+++ b/opcodes/mips-dis.c
-@@ -698,13 +698,11 @@ const struct mips_arch_choice mips_arch_choices[] =
-     mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
-     mips_cp1_names_mips3264, mips_hwr_names_numeric },
- 
--  /* XLP is mostly like XLR, with the prominent exception it is being
--     MIPS64R2.  */
--  { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR,
--    ISA_MIPS64R2 | INSN_XLR, 0,
--    mips_cp0_names_xlr,
--    mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
--    mips_cp1_names_mips3264, mips_hwr_names_numeric },
-+  { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP,
-+    ISA_MIPS64R2 | INSN_XLP, 0,
-+    mips_cp0_names_mips3264r2,
-+    mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
-+    mips_cp1_names_mips3264, mips_hwr_names_mips3264r2 },
- 
-   /* This entry, mips16, is here only for ISA/processor selection; do
-      not print its name.  */
-diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index db72c039bfd..ff2fa614de1 100644
---- a/opcodes/mips-opc.c
-+++ b/opcodes/mips-opc.c
-@@ -329,6 +329,7 @@ decode_mips_operand (const char *p)
- #define IOCT3	INSN_OCTEON3
- #define XLR     INSN_XLR
- #define IAMR2	INSN_INTERAPTIV_MR2
-+#define XLP	INSN_XLP
- #define IVIRT	ASE_VIRT
- #define IVIRT64	ASE_VIRT64
- 
-@@ -991,6 +992,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"clo",			"U,s",		0x70000021, 0xfc0007ff, WR_1|RD_2,		0,		I32|N55,	0,	I37 },
- {"clz",			"d,s",		0x00000050, 0xfc1f07ff, WR_1|RD_2,		0,		I37,		0,	0 },
- {"clz",			"U,s",		0x70000020, 0xfc0007ff, WR_1|RD_2,		0,		I32|N55,	0,	I37 },
-+{"crc",			"d,s,t",	0x7000001c, 0xfc0007ff,	WR_1|RD_2|RD_3,	0,		XLP, 		0,	0 },
- /* ctc0 is at the bottom of the table.  */
- {"ctc1",		"t,g",		0x44c00000, 0xffe007ff,	RD_1|WR_CC|CM,		0,		I1,		0,	0 },
- {"ctc1",		"t,S",		0x44c00000, 0xffe007ff,	RD_1|WR_CC|CM,		0,		I1,		0,	0 },
-@@ -1023,12 +1025,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"daddiu",		"t,r,j",	0x64000000, 0xfc000000, WR_1|RD_2,		0,		I3,		0,	0 },
- {"daddu",		"d,v,t",	0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I3,		0,	0 },
- {"daddu",		"t,r,I",	0,    (int) M_DADDU_I,	INSN_MACRO,		0,		I3,		0,	0 },
--{"daddwc",		"d,s,t", 	0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0,		XLR,		0,	0 },
-+{"daddwc",		"d,s,t", 	0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0,		XLR|XLP,	0,	0 },
- {"dbreak",		"",		0x7000003f, 0xffffffff,	0,			0,		N5,		0,	0 },
- {"dclo",		"d,s",		0x00000053, 0xfc1f07ff, WR_1|RD_2,		0,		I69,		0,	0 },
- {"dclo",		"U,s",	 	0x70000025, 0xfc0007ff, WR_1|RD_2, 	0,		I64|N55,	0,	I69 },
- {"dclz",		"d,s",		0x00000052, 0xfc1f07ff, WR_1|RD_2,		0,		I69,		0,	0 },
- {"dclz",		"U,s",	 	0x70000024, 0xfc0007ff, WR_1|RD_2, 	0,		I64|N55,	0,	I69 },
-+{"dcrc",		"d,s,t",	0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3,	0,		XLP, 		0,	0 },
- /* dctr and dctw are used on the r5000.  */
- {"dctr",		"o(b)",	 	0xbc050000, 0xfc1f0000, RD_2,			0,		I3,		0,	0 },
- {"dctw",		"o(b)",		0xbc090000, 0xfc1f0000, RD_2,			0,		I3,		0,	0 },
-@@ -1100,6 +1103,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"dmfc0",		"t,G,H",	0x40200000, 0xffe007f8,	WR_1|RD_C0|LC,		0,		I64,		0,	0 },
- {"dmfgc0",		"t,G",		0x40600100, 0xffe007ff, WR_1|RD_C0|LC,		0,		0,		IVIRT64, 0 },
- {"dmfgc0",		"t,G,H",	0x40600100, 0xffe007f8, WR_1|RD_C0|LC,		0,		0,		IVIRT64, 0 },
-+{"dmfur",		"t,d",		0x7000001e, 0xffe007ff, WR_1,			0,		XLP,		0,	0 },
- {"dmt",			"",		0x41600bc1, 0xffffffff, TRAP,			0,		0,		MT32,	0 },
- {"dmt",			"t",		0x41600bc1, 0xffe0ffff, WR_1|TRAP,		0,		0,		MT32,	0 },
- {"dmtc0",		"t,G",		0x40a00000, 0xffe007ff,	RD_1|WR_C0|WR_CC|CM,	0,		I3,		0,	EE },
-@@ -1113,6 +1117,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
- /* dmfc2 is at the bottom of the table.  */
- /* dmtc2 is at the bottom of the table.  */
- {"dmuh",		"d,s,t",	0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
-+{"dmtur",		"t,d",		0x7000001f, 0xffe007ff,	RD_1,			0,		XLP,		0,	0 },
-+{"dmul",		"d,s,t",	0x70000006, 0xfc0007ff,	WR_1|RD_2|RD_3,		0,		XLP,		0,	0 },
- {"dmul",		"d,s,t",	0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
- {"dmul",		"d,v,t",	0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		IOCT,		0,	0 },
- {"dmul",		"d,v,t",	0,    (int) M_DMUL,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
-@@ -1266,9 +1272,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"ld",			"s,-b(+R)",	0xec180000, 0xfc1c0000, WR_1,			RD_pc,		I69,		0,	0 },
- {"ld",			"t,A(b)",	0,    (int) M_LD_AB,	INSN_MACRO,		0,		I1,		0,	0 },
- {"ld",			"t,o(b)",	0xdc000000, 0xfc000000, WR_1|RD_3|LM,		0,		I3,		0,	0 },
--{"ldaddw",		"t,b",		0x70000010, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"ldaddwu",		"t,b",		0x70000011, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"ldaddd",		"t,b",		0x70000012, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
-+{"ldaddw",		"t,b",		0x70000010, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"ldaddwu",		"t,b",		0x70000011, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"ldaddd",		"t,b",		0x70000012, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
- {"ldc1",		"T,o(b)",	0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D,	0,		I2,		0,	SF },
- {"ldc1",		"E,o(b)",	0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D,	0,		I2,		0,	SF },
- {"ldc1",		"T,A(b)",	0,    (int) M_LDC1_AB,	INSN_MACRO,		INSN2_M_FP_D,	I2,		0,	SF },
-@@ -1437,7 +1443,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"mflo",		"d,9",		0x00000012, 0xff9f07ff, WR_1|RD_LO,		0,		0,		D32,	0 },
- {"mflo1",		"d",		0x70000012, 0xffff07ff,	WR_1|RD_LO,		0,		EE,		0,	0 },
- {"mflhxu",		"d",		0x00000052, 0xffff07ff,	WR_1|MOD_HILO,		0,		0,		SMT,	0 },
--{"mfcr",		"t,s",		0x70000018, 0xfc00ffff, WR_1|RD_2,		0,		XLR,		0,	0 },
-+{"mfcr",		"t,s",		0x70000018, 0xfc00ffff, WR_1,			0,		XLR|XLP,	0,	0 },
- {"mfsa",		"d",		0x00000028, 0xffff07ff,	WR_1,			0,		EE,		0,	0 },
- {"min.ob",		"X,Y,Q",	0x78000006, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		SB1,		MX,	0 },
- {"min.ob",		"D,S,Q",	0x48000006, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		N54,		0,	0 },
-@@ -1482,10 +1488,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
- /* move is at the top of the table.  */
- {"msgn.qh",		"X,Y,Q",	0x78200000, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		0,		MX,	0 },
- {"msgsnd",		"t",		0,    (int) M_MSGSND,	INSN_MACRO,		0,		XLR,		0,	0 },
-+{"msgsnds",		"d,t",		0x4a000001, 0xffe007ff,	WR_1|RD_2|RD_C0|WR_C0,	0,		XLP,		0,	0 },
- {"msgld",		"", 		0,    (int) M_MSGLD,	INSN_MACRO,		0,		XLR,		0,	0 },
- {"msgld",		"t",		0,    (int) M_MSGLD_T,	INSN_MACRO,		0,		XLR,		0,	0 },
--{"msgwait",		"", 		0,    (int) M_MSGWAIT,	INSN_MACRO,		0,		XLR,		0,	0 },
--{"msgwait",		"t",		0,    (int) M_MSGWAIT_T,INSN_MACRO,		0,		XLR,		0,	0 },
-+{"msglds",		"d,t",		0x4a000002, 0xffe007ff,	WR_1|RD_2|RD_C0|WR_C0,	0,		XLP,		0,	0 },
-+{"msgwait",		"",		0,    (int) M_MSGWAIT,  INSN_MACRO,		0,		XLR|XLP,	0,	0 },
-+{"msgwait",		"t",		0,    (int) M_MSGWAIT_T,INSN_MACRO,		0,		XLR|XLP,	0,	0 },
-+{"msgsync",		"",		0x4a000004, 0xffffffff,0,			0,		XLP,		0,	0 },
- {"msub.d",		"D,R,S,T",	0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0,		I4_33,		0,	I37 },
- {"msub.d",		"D,S,T",	0x46200019, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		IL2E,		0,	0 },
- {"msub.d",		"D,S,T",	0x72200019, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		IL2F,		0,	0 },
-@@ -1535,7 +1544,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"mtlo",		"s,7",		0x00000013, 0xfc1fe7ff, RD_1|WR_LO,		0,		0,		D32,	0 },
- {"mtlo1",		"s",		0x70000013, 0xfc1fffff,	RD_1|WR_LO,		0,		EE,		0,	0 },
- {"mtlhx",		"s",		0x00000053, 0xfc1fffff,	RD_1|MOD_HILO,		0,		0,		SMT,	0 },
--{"mtcr",		"t,s",		0x70000019, 0xfc00ffff, RD_1|RD_2,		0,		XLR,		0,	0 },
-+{"mtcr",		"t,s",		0x70000019, 0xfc00ffff, RD_1,			0,		XLR|XLP,	0,	0 },
- {"mtm0",		"s",		0x70000008, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
- {"mtm0",    		"s,t",		0x70000008, 0xfc00ffff, RD_1|RD_2,		0,		IOCT3,		0,	0 },
- {"mtm1",		"s",		0x7000000c, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-@@ -1977,9 +1986,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"suxc1",		"S,t(b)",	0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D,	0,		I5_33|N55,	0,	I37},
- {"sw",			"t,o(b)",	0xac000000, 0xfc000000,	RD_1|RD_3|SM,		0,		I1,		0,	0 },
- {"sw",			"t,A(b)",	0,    (int) M_SW_AB,	INSN_MACRO,		0,		I1,		0,	0 },
--{"swapw",		"t,b",		0x70000014, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"swapwu",		"t,b",		0x70000015, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"swapd",		"t,b",		0x70000016, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
-+{"swapw",		"t,b",		0x70000014, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"swapwu",		"t,b",		0x70000015, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"swapd",		"t,b",		0x70000016, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
- {"swc0",		"E,o(b)",	0xe0000000, 0xfc000000,	RD_3|RD_C0|SM,		0,		I1,		0,	I2 },
- {"swc0",		"E,A(b)",	0,    (int) M_SWC0_AB,	INSN_MACRO,		0,		I1,		0,	I2 },
- {"swc1",		"T,o(b)",	0xe4000000, 0xfc000000,	RD_1|RD_3|SM|FP_S,	0,		I1,		0,	0 },
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/poky/meta/recipes-devtools/binutils/binutils/0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
index 389232c..a271f55 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -3,6 +3,10 @@
 Date: Sat, 11 Jun 2016 22:08:29 -0500
 Subject: [PATCH] fix the incorrect assembling for ppc wait mnemonic
 
+The wait mnemonic for ppc targets is incorrectly assembled into 0x7c00003c due
+to duplicated address definition with waitasec instruction. The issue causes
+kernel boot calltrace for ppc targets when wait instruction is executed.
+
 Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
 
 Upstream-Status: Pending
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0012-Detect-64-bit-MIPS-targets.patch b/poky/meta/recipes-devtools/binutils/binutils/0012-Detect-64-bit-MIPS-targets.patch
deleted file mode 100644
index 04f81c6..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0012-Detect-64-bit-MIPS-targets.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 02374940dd34fddd2b04624af3f23e01f9cb81cd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 31 Mar 2017 11:42:03 -0700
-Subject: [PATCH] Detect 64-bit MIPS targets
-
-Add mips64 target triplets and default to N64
-
-Upstream-Status: Submitted
-https://sourceware.org/ml/binutils/2016-08/msg00048.html
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gold/configure.tgt | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/gold/configure.tgt b/gold/configure.tgt
-index cac0866e628..24fbf641456 100644
---- a/gold/configure.tgt
-+++ b/gold/configure.tgt
-@@ -153,6 +153,13 @@ aarch64*-*)
-  targ_big_endian=false
-  targ_extra_big_endian=true
-  ;;
-+mips*64*el*-*-*|mips*64*le*-*-*)
-+ targ_obj=mips
-+ targ_machine=EM_MIPS_RS3_LE
-+ targ_size=64
-+ targ_big_endian=false
-+ targ_extra_big_endian=true
-+ ;;
- mips*el*-*-*|mips*le*-*-*)
-  targ_obj=mips
-  targ_machine=EM_MIPS_RS3_LE
-@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
-  targ_big_endian=false
-  targ_extra_big_endian=true
-  ;;
-+mips*64*-*-*)
-+ targ_obj=mips
-+ targ_machine=EM_MIPS
-+ targ_size=64
-+ targ_big_endian=true
-+ targ_extra_big_endian=false
-+ ;;
- mips*-*-*)
-  targ_obj=mips
-  targ_machine=EM_MIPS
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch b/poky/meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch
index a75e721..8f87cfd 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch
@@ -796,25 +796,6 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7706,7 +8201,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7795,7 +8291,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -8093,8 +8589,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -2757,25 +2738,6 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7593,7 +8088,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7682,7 +8178,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7980,8 +8476,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -4696,25 +4658,6 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7318,7 +7813,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7407,7 +7903,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7705,8 +8201,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -6638,25 +6581,6 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7220,7 +7715,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7309,7 +7805,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7607,8 +8103,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -8597,25 +8521,6 @@
  
  
  # Set options
-@@ -8077,7 +8582,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -8166,7 +8672,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -8464,8 +8970,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -11220,25 +11125,6 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8248,7 +8742,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -8337,7 +8832,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -8635,8 +9130,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -12422,16 +12308,6 @@
  
  
  # LT_PREREQ(VERSION)
-@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
- 
- _LT_SETUP
 @@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  dnl
  m4_require([_LT_FILEUTILS_DEFAULTS])dnl
@@ -12446,15 +12322,6 @@
  
  _LT_CONFIG_LIBTOOL_INIT([
  # See if we are running on zsh, and set the options which allow our
-@@ -199,7 +205,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  configured by $[0], generated by m4_PACKAGE_STRING.
@@ -20267,25 +20134,6 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7470,7 +7965,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7559,7 +8055,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7857,8 +8353,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -22209,25 +22057,6 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7300,7 +7795,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7389,7 +7885,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7687,8 +8183,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch b/poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch
index 9becee3..924980b 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch
@@ -33,7 +33,7 @@
 (cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742)
 (cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2)
 
-Upstream-Status: Accepted[https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1c611b40e6bfc8029bff7696814330b5bc0ee5c0]
+Upstream-Status: Accepted [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1c611b40e6bfc8029bff7696814330b5bc0ee5c0]
 ---
  bfd/plugin.c                       |  8 +++++++
  ld/testsuite/ld-plugin/lto.exp     | 34 ++++++++++++++++++++++++++++++
diff --git a/poky/meta/recipes-devtools/binutils/binutils_2.37.bb b/poky/meta/recipes-devtools/binutils/binutils_2.37.bb
index 7430bf1..12a6fb5 100644
--- a/poky/meta/recipes-devtools/binutils/binutils_2.37.bb
+++ b/poky/meta/recipes-devtools/binutils/binutils_2.37.bb
@@ -27,10 +27,6 @@
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
 PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
-# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target
-# So remove -O2 and use -Os as workaround
-SELECTED_OPTIMIZATION:remove:mipsarch = "-O2"
-SELECTED_OPTIMIZATION:append:mipsarch = " -Os"
 
 do_install:class-native () {
 	autotools_do_install
diff --git a/poky/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch b/poky/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch
index 8ee6723..88597cf 100644
--- a/poky/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch
+++ b/poky/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchart2-support-usrmerge.patch
@@ -3,7 +3,7 @@
 Date: Thu, 5 Sep 2019 18:37:31 +0800
 Subject: [PATCH] bootchart2: support usrmerge
 
-Upstream-Status: Inappropriate[oe-specific]
+Upstream-Status: Inappropriate [oe-specific]
 
 Signed-off-by: Changqing Li <changqing.li@windriver.com>
 ---
diff --git a/poky/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchartd.in-make-sure-only-one-bootchartd-process.patch b/poky/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchartd.in-make-sure-only-one-bootchartd-process.patch
new file mode 100644
index 0000000..3cb8a3c
--- /dev/null
+++ b/poky/meta/recipes-devtools/bootchart2/bootchart2/0001-bootchartd.in-make-sure-only-one-bootchartd-process.patch
@@ -0,0 +1,68 @@
+From 988ca784d4840c87509e770a21d5d22105af8668 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Fri, 5 Nov 2021 11:18:07 +0800
+Subject: [PATCH] bootchartd.in: make sure only one bootchartd process
+
+When boot with "init=/sbin/bootchartd" as below:
+ # runqemu qemux86 bootparams="init=/sbin/bootchartd"
+
+There are two bootchartd process after boot [1].
+ # ps -ef | grep bootchart
+root       101     1  0 03:27 ?        00:00:00 /bin/sh /sbin/bootchartd
+root       103   101  8 03:27 ?        00:00:02 /lib64/bootchart/bootchart-collector 50
+root       106     1  0 03:27 ?        00:00:00 /bin/sh /sbin/bootchartd
+root       792   106  0 03:27 ?        00:00:00 /lib64/bootchart/bootchart-collector --usleep 1000000
+root       794   725  0 03:27 ttyS0    00:00:00 grep bootchart
+
+ # /sbin/bootchartd stop
+[bootchart] bootchart-collector started as pid 596 with 2 args:
+[bootchart] '--dump'
+[bootchart] '/tmp/bootchart.3lXpVDAq3v'
+[bootchart] Extracting profile data from pid 204
+[bootchart] map 0xbed9a000 -> 0xbedbb000 size: 132k from 'bed9a000' 'bedbb000'
+[bootchart] read 135168 bytes of 135168
+[bootchart] reading 150 chunks (of 150) ...
+[bootchart] wrote 18760 kbB
+[bootchart] bootchart-collector pid: 596 unmounted proc / clean exit
+
+But there still one process exist after the above stop command finish.
+ # ps -ef | grep bootchartd
+root 202 1 0 09:09 ? 00:00:00 /bin/sh /sbin/bootchartd
+root 629 516 0 09:10 ? 00:00:00 grep bootchartd
+
+Remove the wait_boot which used to wait the boot process to finish to
+make sure only one bootchartd process and meanwhile we don't need the
+wait_boot logic because we either use "/sbin/bootchartd stop" to stop
+the bootchartd manually or install package bootchartd-stop-initscript
+altogether with bootchart2 to stop bootchartd automatically after boot.
+
+After patch:
+ # ps -ef | grep bootchart
+ root       101     1  0 03:36 ?        00:00:00 /bin/sh /sbin/bootchartd
+ root       103   101  6 03:36 ?        00:00:04 /lib64/bootchart/bootchart-collector 50
+ root       596   592  0 03:37 ttyS0    00:00:00 grep bootchart
+
+[1] https://github.com/xrmx/bootchart/issues/94
+
+Upstream-Status: Submitted [https://github.com/xrmx/bootchart/pull/95]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ bootchartd.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/bootchartd.in b/bootchartd.in
+index 7979ef9..f0e466d 100755
+--- a/bootchartd.in
++++ b/bootchartd.in
+@@ -183,7 +183,6 @@ if [ $$ -eq 1 ]; then
+ 	else # running inside the main system
+ 		echo "bootchart: no initrd used; starting"
+ 		start &
+-		wait_boot &
+ 		# wait a little, until the collector is going, before allowing
+ 		# the rest of the system to charge ahead, so we catch it
+ 		$USLEEP 250000
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb b/poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb
index c24613b..f0349da 100644
--- a/poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb
+++ b/poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.9.bb
@@ -90,10 +90,11 @@
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
 
-SRC_URI = "git://github.com/xrmx/bootchart.git \
+SRC_URI = "git://github.com/xrmx/bootchart.git;branch=master;protocol=https \
            file://bootchartd_stop.sh \
            file://0001-collector-Allocate-space-on-heap-for-chunks.patch \
            file://0001-bootchart2-support-usrmerge.patch \
+           file://0001-bootchartd.in-make-sure-only-one-bootchartd-process.patch \
           "
 
 S = "${WORKDIR}/git"
@@ -150,7 +151,7 @@
 
 PACKAGES =+ "pybootchartgui"
 FILES:pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS:pybootchartgui = "python3-pycairo python3-compression python3-image python3-shell python3-compression python3-codecs"
+RDEPENDS:pybootchartgui = "python3-pycairo python3-compression python3-image python3-math python3-shell python3-compression python3-codecs"
 RDEPENDS:${PN}:class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
 RDEPENDS:${PN}:class-target += "lsb-release"
 DEPENDS:append:class-native = " python3-pycairo-native"
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch
new file mode 100644
index 0000000..b0fe679
--- /dev/null
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch
@@ -0,0 +1,46 @@
+From b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58 Mon Sep 17 00:00:00 2001
+From: David Sterba <dsterba@suse.com>
+Date: Thu, 13 Jan 2022 14:47:08 +0100
+Subject: [PATCH] btrfs-progs: kerncompat: add local definition for alignment
+ macros
+
+There's still problem left with compilation on musl and kernel < 5.11,
+because __ALIGN_KERNEL is not defined anymore:
+
+../bin/ld: kernel-shared/volumes.o: in function `create_chunk':
+volumes.c:(.text+0x17f8): undefined reference to `__ALIGN_KERNEL'
+
+Due to the entangled includes and unconditional definition of
+__ALIGN_KERNEL, we can't use #ifdef in kerncompat.h to define it
+eventually (as kerncompat.h is the first include). Instead add local
+definitions of the macros and rename them to avoid name clashes.
+
+Pull-request: #433
+
+Upstream-Status: Backport [https://github.com/kdave/btrfs-progs/commit/b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58]
+
+Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
+---
+ kerncompat.h | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/kerncompat.h b/kerncompat.h
+index 6ca1526e2..f0a6e196e 100644
+--- a/kerncompat.h
++++ b/kerncompat.h
+@@ -359,7 +359,14 @@ do {					\
+ 
+ /* Alignment check */
+ #define IS_ALIGNED(x, a)                (((x) & ((typeof(x))(a) - 1)) == 0)
+-#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))
++
++/*
++ * Alignment, copied and renamed from /usr/include/linux/const.h to work around
++ * issues caused by moving the definition in 5.12
++ */
++#define __ALIGN_KERNEL__(x, a)		__ALIGN_KERNEL_MASK__(x, (typeof(x))(a) - 1)
++#define __ALIGN_KERNEL_MASK__(x, mask)	(((x) + (mask)) & ~(mask))
++#define ALIGN(x, a)		__ALIGN_KERNEL__((x), (a))
+ 
+ static inline int is_power_of_2(unsigned long n)
+ {
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
deleted file mode 100644
index be94238..0000000
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-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: Inappropriate [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.14.2.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb
similarity index 90%
rename from poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.14.2.bb
rename to poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb
index 3270527..fa7abcf 100644
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.14.2.bb
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb
@@ -15,11 +15,11 @@
 SECTION = "base"
 DEPENDS = "lzo util-linux zlib"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \
            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 \
+           file://0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch \
            "
-SRCREV = "35f17bc49cdf760d8f3710fe2c301b933d991fd6"
+SRCREV = "8ad326b2f28c044cb6ed9016d7c3285e23b673c8"
 S = "${WORKDIR}/git"
 
 PACKAGECONFIG ??= " \
@@ -43,7 +43,7 @@
 PACKAGECONFIG[crypto-libkcapi] = "--with-crypto=libkcapi,,libkcapi"
 
 inherit autotools-brokensep pkgconfig manpages
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'distutils3-base', '', d)}
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3-base', '', d)}
 
 CLEANBROKEN = "1"
 
diff --git a/poky/meta/recipes-devtools/cargo/cargo-cross-canadian_1.56.0.bb b/poky/meta/recipes-devtools/cargo/cargo-cross-canadian_1.58.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cargo/cargo-cross-canadian_1.56.0.bb
rename to poky/meta/recipes-devtools/cargo/cargo-cross-canadian_1.58.0.bb
diff --git a/poky/meta/recipes-devtools/cargo/cargo_1.56.0.bb b/poky/meta/recipes-devtools/cargo/cargo_1.58.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cargo/cargo_1.56.0.bb
rename to poky/meta/recipes-devtools/cargo/cargo_1.58.0.bb
diff --git a/poky/meta/recipes-devtools/ccache/ccache_4.4.2.bb b/poky/meta/recipes-devtools/ccache/ccache_4.5.1.bb
similarity index 82%
rename from poky/meta/recipes-devtools/ccache/ccache_4.4.2.bb
rename to poky/meta/recipes-devtools/ccache/ccache_4.5.1.bb
index dd0ad64..26f8089 100644
--- a/poky/meta/recipes-devtools/ccache/ccache_4.4.2.bb
+++ b/poky/meta/recipes-devtools/ccache/ccache_4.5.1.bb
@@ -7,12 +7,12 @@
 SECTION = "devel"
 
 LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=985be6d06a50f60a9893a19a6d2550b8"
+LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=8fe0fdfdc7a892516526b86c28d06a16"
 
 DEPENDS = "zstd"
 
 SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
-SRC_URI[sha256sum] = "357a2ac55497b39ad6885c14b00cda6cf21d1851c6290f4288e62972665de417"
+SRC_URI[sha256sum] = "f0d3cff5d555d6868f14a7d05696f0370074e475304fd5aa152b98f892364981"
 
 UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
 
diff --git a/poky/meta/recipes-devtools/cmake/cmake-native_3.21.3.bb b/poky/meta/recipes-devtools/cmake/cmake-native_3.22.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cmake/cmake-native_3.21.3.bb
rename to poky/meta/recipes-devtools/cmake/cmake-native_3.22.1.bb
diff --git a/poky/meta/recipes-devtools/cmake/cmake.inc b/poky/meta/recipes-devtools/cmake/cmake.inc
index 43d4fe5..628734a 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] = "d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f"
+SRC_URI[sha256sum] = "0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0"
 
 UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
 
diff --git a/poky/meta/recipes-devtools/cmake/cmake_3.21.3.bb b/poky/meta/recipes-devtools/cmake/cmake_3.22.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cmake/cmake_3.21.3.bb
rename to poky/meta/recipes-devtools/cmake/cmake_3.22.1.bb
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.7.bb b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.18.0.bb
similarity index 91%
rename from poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.7.bb
rename to poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.18.0.bb
index 739a2dc..d5fa38d 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.7.bb
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.18.0.bb
@@ -4,18 +4,18 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
+SRC_URI = "git://github.com/rpm-software-management/createrepo_c;branch=master;protocol=https \
            file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
            "
 
-SRCREV = "c4e6808c710ec68e56bd93b0366f3b6cbeee3167"
+SRCREV = "09ea861c8ef11927de5a276116ecb83ab8e93462"
 
 S = "${WORKDIR}/git"
 
 DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
 DEPENDS:append:class-native = " file-replacement-native"
 
-inherit cmake pkgconfig bash-completion distutils3-base
+inherit cmake pkgconfig bash-completion setuptools3-base
 
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 -DWITH_ZCHUNK=OFF -DENABLE_DRPM=OFF -DWITH_LIBMODULEMD=OFF"
 
diff --git a/poky/meta/recipes-devtools/diffstat/diffstat/0001-aclocal.m4-add-missing-header-defines.patch b/poky/meta/recipes-devtools/diffstat/diffstat/0001-aclocal.m4-add-missing-header-defines.patch
deleted file mode 100644
index 5bd94d7..0000000
--- a/poky/meta/recipes-devtools/diffstat/diffstat/0001-aclocal.m4-add-missing-header-defines.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 004bd80d2523f538467b5ada2623eb207b55dad7 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 20 Dec 2019 15:44:28 +0100
-Subject: [PATCH] aclocal.m4: add missing header defines
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- aclocal.m4 | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 3b19e82..c0c4acb 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1927,3 +1927,8 @@ make an error
- fi
- fi # cf_cv_posix_visible
- ])
-+
-+AC_DEFINE([HAVE_TCGETATTR], [], [Description])
-+AC_DEFINE([HAVE_TCSETATTR], [], [Description])
-+AC_DEFINE([HAVE_TERMIOS_H], [], [Description])
-+
diff --git a/poky/meta/recipes-devtools/diffstat/diffstat_1.64.bb b/poky/meta/recipes-devtools/diffstat/diffstat_1.64.bb
index 76ca30c..717f503 100644
--- a/poky/meta/recipes-devtools/diffstat/diffstat_1.64.bb
+++ b/poky/meta/recipes-devtools/diffstat/diffstat_1.64.bb
@@ -10,7 +10,6 @@
 SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \
            file://run-ptest \
            file://avoid-check-user-break-cc.patch \
-           file://0001-aclocal.m4-add-missing-header-defines.patch \
            "
 
 SRC_URI[sha256sum] = "b8aee38d9d2e1d05926e6b55810a9d2c2dd407f24d6a267387563a4436e3f7fc"
diff --git a/poky/meta/recipes-devtools/distcc/distcc_3.4.bb b/poky/meta/recipes-devtools/distcc/distcc_3.4.bb
index 7adf8a8..93983f6 100644
--- a/poky/meta/recipes-devtools/distcc/distcc_3.4.bb
+++ b/poky/meta/recipes-devtools/distcc/distcc_3.4.bb
@@ -15,7 +15,7 @@
 
 RRECOMMENDS:${PN}-server = "avahi-daemon"
 
-SRC_URI = "git://github.com/distcc/distcc.git \
+SRC_URI = "git://github.com/distcc/distcc.git;branch=master;protocol=https \
            file://default \
            file://distcc \
            file://distcc.service \
diff --git a/poky/meta/recipes-devtools/dnf/dnf_4.10.0.bb b/poky/meta/recipes-devtools/dnf/dnf_4.10.0.bb
index b7273d4..3fc24b1 100644
--- a/poky/meta/recipes-devtools/dnf/dnf_4.10.0.bb
+++ b/poky/meta/recipes-devtools/dnf/dnf_4.10.0.bb
@@ -8,7 +8,7 @@
                     file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \
                     "
 
-SRC_URI = "git://github.com/rpm-software-management/dnf.git \
+SRC_URI = "git://github.com/rpm-software-management/dnf.git;branch=master;protocol=https \
            file://0001-Corretly-install-tmpfiles.d-configuration.patch \
            file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
            file://0005-Do-not-prepend-installroot-to-logdir.patch \
@@ -23,7 +23,7 @@
 
 S = "${WORKDIR}/git"
 
-inherit cmake gettext bash-completion distutils3-base systemd
+inherit cmake gettext bash-completion setuptools3-base systemd
 
 DEPENDS += "libdnf librepo libcomps python3-iniparse"
 
@@ -38,7 +38,6 @@
   python3-netclient \
   python3-email \
   python3-threading \
-  python3-distutils \
   python3-logging \
   python3-fcntl \
   librepo \
@@ -63,8 +62,8 @@
 # .spec file in dnf source tree does (and then Fedora and dnf documentation
 # says that dnf binary is plain 'dnf').
 do_install:append() {
-        lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
-        lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
+        ln -rs ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
+        ln -rs ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
 }
 
 # Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
diff --git a/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch b/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch
index 5970360..c138563 100644
--- a/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch
+++ b/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch
@@ -2,7 +2,7 @@
 
 Refer Ubuntu 13.04 to update catalog.xml
 
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [docbook 4.x development has ceased, docbook 5 is entirely different]
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
  docbook-4.0/catalog.xml   | 72 +++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg.inc b/poky/meta/recipes-devtools/dpkg/dpkg.inc
index b6807b0..00b1e91 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/poky/meta/recipes-devtools/dpkg/dpkg.inc
@@ -15,7 +15,7 @@
 
 PERL:class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
 
-export PERL_LIBDIR = "${libdir}/perl/${@get_perl_version(d)}"
+export PERL_LIBDIR = "${libdir}/perl5/${@get_perl_version(d)}"
 PERL_LIBDIR:class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}"
 
 EXTRA_OECONF = "\
@@ -49,9 +49,9 @@
 	if [ "${PN}" = "dpkg-native" ]; then
 		# update-alternatives doesn't have an offline mode
 		rm ${D}${bindir}/update-alternatives
-		sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
+		sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-*
 	else
-		sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
+		sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-*
 	fi
 }
 
@@ -61,12 +61,14 @@
 
 PROVIDES += "${PROV}"
 
+FILES:${PN} += "${datadir}/zsh"
+
 PACKAGES =+ "update-alternatives-dpkg"
 FILES:update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
 RPROVIDES:update-alternatives-dpkg += "update-alternatives"
 
 PACKAGES += "${PN}-perl"
-FILES:${PN}-perl = "${libdir}/perl/${@get_perl_version(d)}"
+FILES:${PN}-perl = "${libdir}/perl5/${@get_perl_version(d)}"
 
 RDEPENDS:${PN}-perl += "perl-module-carp perl-module-constant \
                         perl-module-cwd perl-module-digest \
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch
index 2dc68e2..4d3f238 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch
+++ b/poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch
@@ -1,4 +1,4 @@
-From d6f5fed6bc56e1f3b885a796a43aa2868ace57bc Mon Sep 17 00:00:00 2001
+From cb47e9cd6735fcafd231748dab8884ae991b669c Mon Sep 17 00:00:00 2001
 From: Paul Eggleton <paul.eggleton@linux.microsoft.com>
 Date: Tue, 16 Jun 2020 03:57:25 +0000
 Subject: [PATCH] build.c: ignore return of 1 from tar -cf
@@ -29,10 +29,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
-index d13a21c1e..059f2be6d 100644
+index 76613adec..7c216d1a9 100644
 --- a/dpkg-deb/build.c
 +++ b/dpkg-deb/build.c
-@@ -480,6 +480,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+@@ -482,6 +482,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
  {
    int pipe_filenames[2], pipe_tarball[2];
    pid_t pid_tar, pid_comp;
@@ -40,7 +40,7 @@
  
    /* Fork off a tar. We will feed it a list of filenames on stdin later. */
    m_pipe(pipe_filenames);
-@@ -532,7 +533,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+@@ -534,7 +535,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
    /* All done, clean up wait for tar and <compress> to finish their job. */
    close(pipe_filenames[1]);
    subproc_reap(pid_comp, _("<compress> from tar -cf"), 0);
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch
index 50e6894..d66ab44 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch
+++ b/poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch
@@ -3,7 +3,7 @@
 Date: Sun, 10 Sep 2017 00:14:15 -0700
 Subject: [PATCH] dpkg: Support muslx32 build
 
-Upstream-Status: Pending.
+Upstream-Status: Pending
 Changes made on ostable and tupletable to enable muslx32 build.
 
 Signed-off-by: sweeaun <swee.aun.khor@intel.com>
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0013-scripts-dpkg-fsys-usrunmess.pl-correct-shebang.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0013-scripts-dpkg-fsys-usrunmess.pl-correct-shebang.patch
deleted file mode 100644
index 292b72a..0000000
--- a/poky/meta/recipes-devtools/dpkg/dpkg/0013-scripts-dpkg-fsys-usrunmess.pl-correct-shebang.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 0decc62904571582147f2273fa1b521e00485dda Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 3 Feb 2021 20:47:58 +0100
-Subject: [PATCH] scripts/dpkg-fsys-usrunmess.pl: correct shebang
-
-Otherwise automake will write the full native perl path into it.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- scripts/dpkg-fsys-usrunmess.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scripts/dpkg-fsys-usrunmess.pl b/scripts/dpkg-fsys-usrunmess.pl
-index 9220df3c0..9ce368955 100755
---- a/scripts/dpkg-fsys-usrunmess.pl
-+++ b/scripts/dpkg-fsys-usrunmess.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!/usr/bin/env perl
- #
- # dpkg-fsys-usrunmess - Undoes the merged-/usr-via-aliased-dirs mess
- #
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0014-arch-Add-support-for-ARCv2-CPU.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0014-arch-Add-support-for-ARCv2-CPU.patch
deleted file mode 100644
index ece18a3..0000000
--- a/poky/meta/recipes-devtools/dpkg/dpkg/0014-arch-Add-support-for-ARCv2-CPU.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From c6acfba64b470c7e919fd5bd29124d7228492537 Mon Sep 17 00:00:00 2001
-From: Guillem Jover <guillem@debian.org>
-Date: Fri, 28 May 2021 04:07:49 +0200
-Subject: [PATCH] arch: Add support for ARCv2 CPU
-
-This is based on the ARCv2 32-bit little-endian hard-float ISA.
-
-Closes: #980963
-
-Upstream-Status: Backport [https://salsa.debian.org/dpkg-team/dpkg/-/commit/0d134cdcb0dcc6b21fa7926964c1426a5821181d]
-
-Based-on-patch-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
-Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
----
- data/cputable                  | 1 +
- scripts/Dpkg/Shlibs/Objdump.pm | 1 +
- scripts/t/Dpkg_Arch.t          | 4 ++--
- 3 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/data/cputable b/data/cputable
-index 9f2a8e0e4..277bed88f 100644
---- a/data/cputable
-+++ b/data/cputable
-@@ -20,6 +20,7 @@ i386		i686		(i[34567]86|pentium)	32	little
- ia64		ia64		ia64			64	little
- alpha		alpha		alpha.*			64	little
- amd64		x86_64		(amd64|x86_64)		64	little
-+arc		arc		arc			32	little
- armeb		armeb		arm.*b			32	big
- arm		arm		arm.*			32	little
- arm64		aarch64		aarch64			64	little
-diff --git a/scripts/Dpkg/Shlibs/Objdump.pm b/scripts/Dpkg/Shlibs/Objdump.pm
-index 4cee866e7..93319d1eb 100644
---- a/scripts/Dpkg/Shlibs/Objdump.pm
-+++ b/scripts/Dpkg/Shlibs/Objdump.pm
-@@ -100,6 +100,7 @@ use constant {
-     ELF_MACH_OR1K           => 92,
-     ELF_MACH_XTENSA         => 94,
-     ELF_MACH_MICROBLAZE     => 189,
-+    ELF_MACH_ARCV2          => 195,
-     ELF_MACH_AVR_OLD        => 0x1057,
-     ELF_MACH_OR1K_OLD       => 0x8472,
-     ELF_MACH_ALPHA          => 0x9026,
-diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t
-index a3a9e6fee..f0bba272a 100644
---- a/scripts/t/Dpkg_Arch.t
-+++ b/scripts/t/Dpkg_Arch.t
-@@ -16,7 +16,7 @@
- use strict;
- use warnings;
- 
--use Test::More tests => 16836;
-+use Test::More tests => 18407;
- 
- use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch
-                         debarch_eq debarch_is debarch_is_wildcard
-@@ -174,7 +174,7 @@ is(gnutriplet_to_debarch(undef), undef, 'undef gnutriplet');
- is(gnutriplet_to_debarch('unknown-unknown-unknown'), undef, 'unknown gnutriplet');
- is(gnutriplet_to_debarch('x86_64-linux-gnu'), 'amd64', 'known gnutriplet');
- 
--is(scalar get_valid_arches(), 539, 'expected amount of known architectures');
-+is(scalar get_valid_arches(), 554, 'expected amount of known architectures');
- 
- {
-     local $ENV{CC} = 'false';
--- 
-2.16.2
-
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg_1.20.9.bb b/poky/meta/recipes-devtools/dpkg/dpkg_1.21.1.bb
similarity index 82%
rename from poky/meta/recipes-devtools/dpkg/dpkg_1.20.9.bb
rename to poky/meta/recipes-devtools/dpkg/dpkg_1.21.1.bb
index 34b6bfe..ccb4f06 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg_1.20.9.bb
+++ b/poky/meta/recipes-devtools/dpkg/dpkg_1.21.1.bb
@@ -1,7 +1,7 @@
 require dpkg.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=1.20.x \
+SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=main \
            file://noman.patch \
            file://remove-tar-no-timestamp.patch \
            file://arch_pm.patch \
@@ -14,12 +14,10 @@
            file://0001-dpkg-Support-muslx32-build.patch \
            file://pager.patch \
            file://0001-Add-support-for-riscv32-CPU.patch \
-           file://0013-scripts-dpkg-fsys-usrunmess.pl-correct-shebang.patch \
-           file://0014-arch-Add-support-for-ARCv2-CPU.patch \
            "
 
 SRC_URI:append:class-native = " file://0001-build.c-ignore-return-of-1-from-tar-cf.patch"
 
-SRCREV = "2177b782b16e77e97c9643961a5ae3c639bcc4a3"
+SRCREV = "9b52f8fa74571049d868cb2af0643ee7f89a6151"
 
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
index bcffa77..a030fa6 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -19,7 +19,7 @@
 SECTION = "base"
 DEPENDS = "util-linux attr autoconf-archive"
 
-SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git"
+SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git;branch=master"
 S = "${WORKDIR}/git"
 
 inherit autotools gettext texinfo pkgconfig multilib_header update-alternatives ptest
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-tests-u_direct_io-expect-correct-expected-output.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-tests-u_direct_io-expect-correct-expected-output.patch
deleted file mode 100644
index f198df8..0000000
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-tests-u_direct_io-expect-correct-expected-output.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From ea5adf259e01c790f9ba69d6fe88d691de410b6f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Sun, 22 Aug 2021 14:37:32 +0200
-Subject: [PATCH] tests/u_direct_io/expect: correct expected output
-
-This is likely the right fix, but upstream needs to confirm.
-
-Upstream-Status: Inappropriate [issue reported https://github.com/tytso/e2fsprogs/issues/80]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- tests/u_direct_io/expect | 16 +++++++++-------
- 1 file changed, 9 insertions(+), 7 deletions(-)
-
-diff --git a/tests/u_direct_io/expect b/tests/u_direct_io/expect
-index b0cdc730..830cbd75 100644
---- a/tests/u_direct_io/expect
-+++ b/tests/u_direct_io/expect
-@@ -19,8 +19,8 @@ Filesystem OS type:       Linux
- Inode count:              32768
- Block count:              32768
- Reserved block count:     1638
--Overhead clusters:        5131
--Free blocks:              27631
-+Overhead clusters:        6155
-+Free blocks:              26607
- Free inodes:              32757
- First block:              0
- Block size:               4096
-@@ -29,27 +29,29 @@ Reserved GDT blocks:      7
- Blocks per group:         32768
- Fragments per group:      32768
- Inodes per group:         32768
--Inode blocks per group:   1024
-+Inode blocks per group:   2048
- Flex block group size:    16
- Mount count:              0
- Check interval:           15552000 (6 months)
- Reserved blocks uid:      0
- Reserved blocks gid:      0
- First inode:              11
--Inode size:	          128
-+Inode size:	          256
-+Required extra isize:     32
-+Desired extra isize:      32
- Journal inode:            8
- Default directory hash:   half_md4
- Journal backup:           inode blocks
- Directories:              2
-  Group  0: block bitmap at 9, inode bitmap at 25, inode table at 41
--           27631 free blocks, 32757 free inodes, 2 used directories
-+           26607 free blocks, 32757 free inodes, 2 used directories
- e2fsck -fn -N test_filesys $LOOP
- Pass 1: Checking inodes, blocks, and sizes
- Pass 2: Checking directory structure
- Pass 3: Checking directory connectivity
- Pass 4: Checking reference counts
- Pass 5: Checking group summary information
--test_filesys: 11/32768 files (9.1% non-contiguous), 5137/32768 blocks
-+test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
- Exit status is 0
- e2fsck -fn -N test_filesys $TMPFILE
- Pass 1: Checking inodes, blocks, and sizes
-@@ -57,5 +59,5 @@ Pass 2: Checking directory structure
- Pass 3: Checking directory connectivity
- Pass 4: Checking reference counts
- Pass 5: Checking group summary information
--test_filesys: 11/32768 files (9.1% non-contiguous), 5137/32768 blocks
-+test_filesys: 11/32768 files (9.1% non-contiguous), 6161/32768 blocks
- Exit status is 0
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
index a4f9824..29078f9 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -1,4 +1,4 @@
-From f1e161a48f74b46ae3c99921971c4b5ae8d587c9 Mon Sep 17 00:00:00 2001
+From 22d7557905534d9e1b39f7d2a6d2036a40bf0c4e Mon Sep 17 00:00:00 2001
 From: Jackie Huang <jackie.huang@windriver.com>
 Date: Wed, 10 Aug 2016 11:19:44 +0800
 Subject: [PATCH] Fix missing check for permission denied.
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
index 41a4047..902a369 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
@@ -1,4 +1,4 @@
-From 550b5fbece84dde16ce9910c2cad390ea4a2f5d5 Mon Sep 17 00:00:00 2001
+From 5408b6463ee700a080a15102bccccdeb2615d734 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Mon, 23 Dec 2013 13:38:34 +0000
 Subject: [PATCH] e2fsprogs: silence debugfs
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb
similarity index 94%
rename from poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb
rename to poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb
index f42cefc..16c183e 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.4.bb
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb
@@ -4,14 +4,13 @@
            file://run-ptest \
            file://ptest.patch \
            file://mkdir_p.patch \
-           file://0001-tests-u_direct_io-expect-correct-expected-output.patch \
+           "
+SRC_URI:append:class-native = " \
+           file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
+           file://quiet-debugfs.patch \
            "
 
-SRC_URI:append:class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
-                                file://quiet-debugfs.patch \
-"
-
-SRCREV = "849005eac51ea2097bd9e5f2b0adc16b53c5486d"
+SRCREV = "02540dedd3ddc52c6ae8aaa8a95ce75c3f8be1c0"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
 
 EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.186.bb
similarity index 94%
rename from poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
rename to poky/meta/recipes-devtools/elfutils/elfutils_0.186.bb
index f4769e3..93f53c1 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.186.bb
@@ -4,7 +4,7 @@
 SECTION = "base"
 LICENSE = "GPLv2 & GPLv2+ & LGPLv3+ & GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://debuginfod/debuginfod-client.c;endline=27;md5=f8e9d171c401c493ec45a0b2992ea2ed \
+                    file://debuginfod/debuginfod-client.c;endline=27;md5=d2adfd8f5347d4c96e3c280393ce66da \
                     "
 DEPENDS = "zlib virtual/libintl"
 DEPENDS:append:libc-musl = " argp-standalone fts musl-obstack "
@@ -21,21 +21,17 @@
            file://run-ptest \
            file://ptest.patch \
            file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
-           file://0001-debuginfod-debuginfod-client.c-correct-string-format.patch \
-           file://glibc-2.34-fix.patch \
+           file://0001-debuginfod-fix-compilation-on-platforms-without-erro.patch \
+           file://0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch \
            "
 SRC_URI:append:libc-musl = " \
-           file://0002-musl-libs.patch \
            file://0003-musl-utils.patch \
-           file://0004-Fix-error-on-musl.patch \
            file://0015-config-eu.am-do-not-use-Werror.patch \
            "
-SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6"
-
-# remove at next version upgrade or when output changes
-PR = "r1"
+SRC_URI[sha256sum] = "7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177"
 
 inherit autotools gettext ptest pkgconfig
+PTEST_ENABLED:libc-musl = "0"
 
 EXTRA_OECONF = "--program-prefix=eu-"
 
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
deleted file mode 100644
index 5b225c5..0000000
--- a/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From c3055ce9eb32d0d24abc5cea5e1d231c499312a7 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 19 Apr 2021 23:29:10 +0200
-Subject: [PATCH] debuginfod/debuginfod-client.c: correct string format on
- 32bit arches with 64bit time_t
-
-Use intmax_t to print time_t
-
-time_t is platform dependent and some of architectures e.g.
-x32, riscv32, arc use 64bit time_t even while they are 32bit
-architectures, therefore directly using integer printf formats will not
-work portably, use intmax_t to typecast time_t into printf family of
-functions
-
-Upstream-Status: Pending
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- debuginfod/debuginfod-client.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
-index ee7eda2..083ec2c 100644
---- a/debuginfod/debuginfod-client.c
-+++ b/debuginfod/debuginfod-client.c
-@@ -226,7 +226,7 @@ debuginfod_config_cache(char *config_path,
-       if (fd < 0)
-         return -errno;
- 
--      if (dprintf(fd, "%ld", cache_config_default_s) < 0)
-+      if (dprintf(fd, "%jd", (intmax_t)cache_config_default_s) < 0)
-         return -errno;
-     }
- 
-@@ -234,7 +234,7 @@ debuginfod_config_cache(char *config_path,
-   FILE *config_file = fopen(config_path, "r");
-   if (config_file)
-     {
--      if (fscanf(config_file, "%ld", &cache_config) != 1)
-+      if (fscanf(config_file, "%jd", (intmax_t*)(&cache_config)) != 1)
-         cache_config = cache_config_default_s;
-       fclose(config_file);
-     }
-@@ -267,7 +267,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
-   if (fd < 0)
-     return -errno;
- 
--  if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
-+  if (dprintf(fd, "%jd", (intmax_t)cache_clean_default_interval_s) < 0)
-     return -errno;
- 
-   /* init max age config file.  */
-@@ -275,7 +275,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
-       && (fd = open(maxage_path, O_CREAT | O_RDWR, DEFFILEMODE)) < 0)
-     return -errno;
- 
--  if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
-+  if (dprintf(fd, "%jd", (intmax_t)cache_default_max_unused_age_s) < 0)
-     return -errno;
- 
-   return 0;
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch
new file mode 100644
index 0000000..089f1a2
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-use-long-for-cache-ti.patch
@@ -0,0 +1,45 @@
+From a0852044907110479d0fb212dda2c5e45af2d3aa Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Thu, 9 Dec 2021 10:43:06 +0100
+Subject: [PATCH] debuginfod/debuginfod-client.c: use long for cache time
+ configurations
+
+time_t is platform dependent and some of architectures e.g.
+x32, riscv32, arc use 64bit time_t even while they are 32bit
+architectures, therefore directly using integer printf formats will not
+work portably.
+
+Use a plain long everywhere as the intervals are small enough
+that it will not be problematic.
+
+Upstream-Status: Submitted [via email to mark@klomp.org,elfutils-devel@sourceware.org]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ debuginfod/debuginfod-client.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
+index c875ee6..11e0fd5 100644
+--- a/debuginfod/debuginfod-client.c
++++ b/debuginfod/debuginfod-client.c
+@@ -134,17 +134,17 @@ struct debuginfod_client
+    how frequently the cache should be cleaned. The file's st_mtime represents
+    the time of last cleaning.  */
+ static const char *cache_clean_interval_filename = "cache_clean_interval_s";
+-static const time_t cache_clean_default_interval_s = 86400; /* 1 day */
++static const long cache_clean_default_interval_s = 86400; /* 1 day */
+ 
+ /* The cache_miss_default_s within the debuginfod cache specifies how
+    frequently the 000-permision file should be released.*/
+-static const time_t cache_miss_default_s = 600; /* 10 min */
++static const long cache_miss_default_s = 600; /* 10 min */
+ static const char *cache_miss_filename = "cache_miss_s";
+ 
+ /* The cache_max_unused_age_s file within the debuginfod cache specifies the
+    the maximum time since last access that a file will remain in the cache.  */
+ static const char *cache_max_unused_age_filename = "max_unused_age_s";
+-static const time_t cache_default_max_unused_age_s = 604800; /* 1 week */
++static const long cache_default_max_unused_age_s = 604800; /* 1 week */
+ 
+ /* Location of the cache of files downloaded from debuginfods.
+    The default parent directory is $HOME, or '/' if $HOME doesn't exist.  */
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch
new file mode 100644
index 0000000..e80d96a
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch
@@ -0,0 +1,54 @@
+From 99617d7ab5b01c322b0f27d4aa0dd91c61793a5e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Wed, 10 Nov 2021 21:17:48 -0300
+Subject: [PATCH] debuginfod: fix compilation on platforms without <error.h>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+"system.h" only declares the error() function, so it needs to be in an
+'extern "C"' block, otherwise linking fails.
+
+Since we are here, use quotes for "system.h" header, since it's a local
+header, not a system one.
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=90b9e91b961b794a4e58ab76d9191a5e7343584e]
+Signed-off-by: Érico Nogueira <erico.erc@gmail.com>
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ debuginfod/ChangeLog      | 4 ++++
+ debuginfod/debuginfod.cxx | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
+index f06d3ee..822bd63 100644
+--- a/debuginfod/ChangeLog
++++ b/debuginfod/ChangeLog
+@@ -1,3 +1,7 @@
++2021-11-10  Érico N. Rolim  <erico.erc@gmail.com>
++
++	* debuginfod.cxx: include "system.h" under 'extern "C"' block.
++
+ 2021-11-05  Frank Ch. Eigler  <fche@redhat.com>
+ 
+ 	PR28430
+diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
+index 521cb52..764e7b9 100644
+--- a/debuginfod/debuginfod.cxx
++++ b/debuginfod/debuginfod.cxx
+@@ -33,11 +33,11 @@
+ 
+ extern "C" {
+ #include "printversion.h"
++#include "system.h"
+ }
+ 
+ #include "debuginfod.h"
+ #include <dwarf.h>
+-#include <system.h>
+ 
+ #include <argp.h>
+ #ifdef __GNUC__
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
index 114ca63..0e6bf55 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
@@ -6,7 +6,7 @@
 Skip the tests which depend on gcc when
 gcc not deployed.
 
-Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html]
+Upstream-Status: Submitted [https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html]
 
 Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
 
diff --git a/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch b/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
deleted file mode 100644
index c7360da..0000000
--- a/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-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
-
-Collection of fixes needed to compile libelf and other libraries
-provided by elfutils for musl targets
-
-error is glibc specific API, so this patch will mostly not accepted
-upstream given that elfutils has been closely tied to glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate [workaround for musl]
-
-Rebase to 0.177
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
----
- lib/error.h                    | 27 +++++++++++++++++++++++++++
- lib/fixedsizehash.h            |  1 -
- lib/libeu.h                    |  1 +
- libdwfl/linux-kernel-modules.c |  1 +
- libelf/elf.h                   |  7 +++++++
- 5 files changed, 36 insertions(+), 1 deletion(-)
- create mode 100644 lib/error.h
-
-diff --git a/lib/error.h b/lib/error.h
-new file mode 100644
-index 0000000..ef06827
---- /dev/null
-+++ b/lib/error.h
-@@ -0,0 +1,27 @@
-+#ifndef _ERROR_H_
-+#define _ERROR_H_
-+
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+
-+static unsigned int error_message_count = 0;
-+
-+static inline void error(int status, int errnum, const char* format, ...)
-+{
-+	va_list ap;
-+	fprintf(stderr, "%s: ", program_invocation_name);
-+	va_start(ap, format);
-+	vfprintf(stderr, format, ap);
-+	va_end(ap);
-+	if (errnum)
-+		fprintf(stderr, ": %s", strerror(errnum));
-+	fprintf(stderr, "\n");
-+	error_message_count++;
-+	if (status)
-+		exit(status);
-+}
-+
-+#endif	/* _ERROR_H_ */
-diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
-index dac2a5f..43016fc 100644
---- a/lib/fixedsizehash.h
-+++ b/lib/fixedsizehash.h
-@@ -30,7 +30,6 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/cdefs.h>
- 
- #include <system.h>
- 
-diff --git a/lib/libeu.h b/lib/libeu.h
-index ecb4d01..edc85e3 100644
---- a/lib/libeu.h
-+++ b/lib/libeu.h
-@@ -29,6 +29,7 @@
- #ifndef LIBEU_H
- #define LIBEU_H
- 
-+#include "system.h"
- #include <stddef.h>
- #include <stdint.h>
- 
-diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index c0f8dfa..aa78033 100644
---- a/libdwfl/linux-kernel-modules.c
-+++ b/libdwfl/linux-kernel-modules.c
-@@ -50,6 +50,7 @@
- #include <sys/utsname.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#include "system.h"
- 
- /* If fts.h is included before config.h, its indirect inclusions may not
-    give us the right LFS aliases of these functions, so map them manually.  */
-diff --git a/libelf/elf.h b/libelf/elf.h
-index 8e3e618..1353890 100644
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -19,6 +19,10 @@
- #ifndef _ELF_H
- #define	_ELF_H 1
- 
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- /* Standard ELF types.  */
- 
- #include <stdint.h>
-@@ -4102,4 +4106,7 @@ enum
- #define R_ARC_TLS_LE_S9		0x4a
- #define R_ARC_TLS_LE_32		0x4b
- 
-+#ifdef __cplusplus
-+}
-+#endif
- #endif	/* elf.h */
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 2e379cd..cbc9fce 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 2f94d488bf3daaa6a8548ee77120fc2506a9bbe3 Mon Sep 17 00:00:00 2001
+From 8b48c580bae0b0ffc773b0b829c50d33a907853c 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
@@ -57,7 +57,7 @@
  ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
  
 diff --git a/src/strip.c b/src/strip.c
-index 70fc8c0..d035d9e 100644
+index d5b753d..d6e1b64 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 e488e81..0e44456 100644
+index aacc9aa..5e71290 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
deleted file mode 100644
index 2fa60c3..0000000
--- a/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-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:
-
-| ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main':
-| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'?
-|        fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS);
-|                                                             ^~~~~~~~
-|                                                             EPERM
-| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: note: each undeclared identifier is reported only once for each function it appears in
-
-Upstream-Status: Inappropriate [workaround in musl]
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
----
- tests/elfstrmerge.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
-index 197c6a5..3683672 100644
---- a/tests/elfstrmerge.c
-+++ b/tests/elfstrmerge.c
-@@ -33,6 +33,11 @@
- #include ELFUTILS_HEADER(dwelf)
- #include "elf-knowledge.h"
- 
-+/* for musl */
-+#ifndef ALLPERMS
-+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- /* The original ELF file.  */
- static int fd = -1;
- static Elf *elf = NULL;
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 5cd6fff..9952070 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 cfced441d4a6f2eca51d29c52240275bd6f54e49 Mon Sep 17 00:00:00 2001
+From 5e39da062929a60a07ddfc8b6d435ea65ea3e31f 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,10 +16,10 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/config/eu.am b/config/eu.am
-index 2c3e457..8fb0411 100644
+index 58cd3c4..ac42390 100644
 --- a/config/eu.am
 +++ b/config/eu.am
-@@ -89,7 +89,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+@@ -91,7 +91,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) \
@@ -27,7 +27,7 @@
  	    $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
  	    $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
  	    $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
-@@ -99,7 +98,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
+@@ -101,7 +100,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
  	   $(TRAMPOLINES_WARNING) \
  	   $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
  	   $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
diff --git a/poky/meta/recipes-devtools/elfutils/files/glibc-2.34-fix.patch b/poky/meta/recipes-devtools/elfutils/files/glibc-2.34-fix.patch
deleted file mode 100644
index 9509fb4..0000000
--- a/poky/meta/recipes-devtools/elfutils/files/glibc-2.34-fix.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-glibc 2.34 calls pthread_kill from the raise function. Before raise
-directly called the (tg)kill syscall. So allow pthread_kill to be the
-first frame in a backtrace where raise is expected. Also change some
-asserts to fprintf plus abort to make it more clear why the testcase
-fails.
-
-https://sourceware.org/bugzilla/show_bug.cgi?id=28190
-
-Signed-off-by: Mark Wielaard <mark@klomp.org>
-Upstream-Status: Submitted [https://sourceware.org/pipermail/elfutils-devel/2021q3/004019.html]
----
- tests/ChangeLog   |  6 +++++
- tests/backtrace.c | 62 +++++++++++++++++++++++++++++++++++++++++------
- 2 files changed, 61 insertions(+), 7 deletions(-)
-
-Index: elfutils-0.185/tests/ChangeLog
-===================================================================
---- elfutils-0.185.orig/tests/ChangeLog
-+++ elfutils-0.185/tests/ChangeLog
-@@ -1,3 +1,9 @@
-+2021-08-04  Mark Wielaard  <mark@klomp.org>
-+
-+	PR28190
-+	* backtrace.c (callback_verify): Check for pthread_kill as first
-+	frame. Change asserts to fprintf plus abort.
-+
- 2021-05-14  Frank Ch. Eigler <fche@redhat.com>
- 
- 	PR27859
-Index: elfutils-0.185/tests/backtrace.c
-===================================================================
---- elfutils-0.185.orig/tests/backtrace.c
-+++ elfutils-0.185/tests/backtrace.c
-@@ -97,6 +97,9 @@ callback_verify (pid_t tid, unsigned fra
-   static bool reduce_frameno = false;
-   if (reduce_frameno)
-     frameno--;
-+  static bool pthread_kill_seen = false;
-+  if (pthread_kill_seen)
-+    frameno--;
-   if (! use_raise_jmp_patching && frameno >= 2)
-     frameno += 2;
-   const char *symname2 = NULL;
-@@ -107,11 +110,26 @@ callback_verify (pid_t tid, unsigned fra
- 	       && (strcmp (symname, "__kernel_vsyscall") == 0
- 		   || strcmp (symname, "__libc_do_syscall") == 0))
- 	reduce_frameno = true;
-+      else if (! pthread_kill_seen && symname
-+	       && strstr (symname, "pthread_kill") != NULL)
-+	pthread_kill_seen = true;
-       else
--	assert (symname && strcmp (symname, "raise") == 0);
-+	{
-+	  if (!symname || strcmp (symname, "raise") != 0)
-+	    {
-+	      fprintf (stderr,
-+		       "case 0: expected symname 'raise' got '%s'\n", symname);
-+	      abort ();
-+	    }
-+	}
-       break;
-     case 1:
--      assert (symname != NULL && strcmp (symname, "sigusr2") == 0);
-+      if (symname == NULL || strcmp (symname, "sigusr2") != 0)
-+	{
-+	  fprintf (stderr,
-+		   "case 1: expected symname 'sigusr2' got '%s'\n", symname);
-+	  abort ();
-+	}
-       break;
-     case 2: // x86_64 only
-       /* __restore_rt - glibc maybe does not have to have this symbol.  */
-@@ -120,11 +138,21 @@ callback_verify (pid_t tid, unsigned fra
-       if (use_raise_jmp_patching)
- 	{
- 	  /* Verify we trapped on the very first instruction of jmp.  */
--	  assert (symname != NULL && strcmp (symname, "jmp") == 0);
-+	  if (symname == NULL || strcmp (symname, "jmp") != 0)
-+	    {
-+	      fprintf (stderr,
-+		       "case 3: expected symname 'raise' got '%s'\n", symname);
-+	      abort ();
-+	    }
- 	  mod = dwfl_addrmodule (dwfl, pc - 1);
- 	  if (mod)
- 	    symname2 = dwfl_module_addrname (mod, pc - 1);
--	  assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
-+	  if (symname2 == NULL || strcmp (symname2, "jmp") != 0)
-+	    {
-+	      fprintf (stderr,
-+		       "case 3: expected symname2 'jmp' got '%s'\n", symname2);
-+	      abort ();
-+	    }
- 	  break;
- 	}
-       FALLTHROUGH;
-@@ -137,11 +165,22 @@ callback_verify (pid_t tid, unsigned fra
- 	  duplicate_sigusr2 = true;
- 	  break;
- 	}
--      assert (symname != NULL && strcmp (symname, "stdarg") == 0);
-+      if (symname == NULL || strcmp (symname, "stdarg") != 0)
-+	{
-+	  fprintf (stderr,
-+		   "case 4: expected symname 'stdarg' got '%s'\n", symname);
-+	  abort ();
-+	}
-       break;
-     case 5:
-       /* Verify we trapped on the very last instruction of child.  */
--      assert (symname != NULL && strcmp (symname, "backtracegen") == 0);
-+      if (symname == NULL || strcmp (symname, "backtracegen") != 0)
-+	{
-+	  fprintf (stderr,
-+		   "case 5: expected symname 'backtracegen' got '%s'\n",
-+		   symname);
-+	  abort ();
-+	}
-       mod = dwfl_addrmodule (dwfl, pc);
-       if (mod)
- 	symname2 = dwfl_module_addrname (mod, pc);
-@@ -151,7 +190,15 @@ callback_verify (pid_t tid, unsigned fra
-       // instructions or even inserts some padding instructions at the end
-       // (which apparently happens on ppc64).
-       if (use_raise_jmp_patching)
--        assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0);
-+	{
-+          if (symname2 != NULL && strcmp (symname2, "backtracegen") == 0)
-+	    {
-+	      fprintf (stderr,
-+		       "use_raise_jmp_patching didn't expect symname2 "
-+		       "'backtracegen'\n");
-+	      abort ();
-+	    }
-+	}
-       break;
-   }
- }
diff --git a/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0001-fsck-main.c-add-missing-include.patch b/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0001-fsck-main.c-add-missing-include.patch
new file mode 100644
index 0000000..c3b3c0b
--- /dev/null
+++ b/poky/meta/recipes-devtools/erofs-utils/erofs-utils/0001-fsck-main.c-add-missing-include.patch
@@ -0,0 +1,26 @@
+From 821778286843b8e88d0cd73a97d20b5a2fff8ea1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Mon, 6 Dec 2021 20:12:54 +0100
+Subject: [PATCH] fsck/main.c: add missing include
+
+Otherwise musl C library builds fail with missing S_IFMT/S_IFDIR
+definitions.
+
+Upstream-Status: Submitted [email to linux-erofs@lists.ozlabs.org,hsiangkao@linux.alibaba.com]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ fsck/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/fsck/main.c b/fsck/main.c
+index aefa881..ad48e35 100644
+--- a/fsck/main.c
++++ b/fsck/main.c
+@@ -6,6 +6,7 @@
+ #include <stdlib.h>
+ #include <getopt.h>
+ #include <time.h>
++#include <sys/stat.h>
+ #include "erofs/print.h"
+ #include "erofs/io.h"
+ #include "erofs/decompress.h"
diff --git a/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.4.bb
similarity index 79%
rename from poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb
rename to poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.4.bb
index d07d5c4..6ac8a37 100644
--- a/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb
+++ b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.4.bb
@@ -4,8 +4,10 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=94fa01670a2a8f2d3ab2de15004e0848"
 HOMEPAGE = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README"
 
-SRCREV = "2cd522105ea771ec30b269cd4c57e2265a4d6349"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git"
+SRCREV = "ee97fe5fb77c737df0f77d92ab0d92edd3a11be6"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git;branch=master \
+           file://0001-fsck-main.c-add-missing-include.patch \
+           "
 
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
 
diff --git a/poky/meta/recipes-devtools/expect/expect/01-example-shebang.patch b/poky/meta/recipes-devtools/expect/expect/01-example-shebang.patch
deleted file mode 100644
index 8597f31..0000000
--- a/poky/meta/recipes-devtools/expect/expect/01-example-shebang.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-Author: Mike Markley <mike@markley.org>
-Author: Sergei Golovan <sgolovan@debian.org>
-Description: Fixes shebangs in examples (Closes: #152367).
-
-Backported from Debian
-
-Upstream-Status: Pending
-Index: expect5.45/example/beer.exp
-===================================================================
---- expect5.45.orig/example/beer.exp	2006-01-25 13:51:39.000000000 -0800
-+++ expect5.45/example/beer.exp	2013-11-01 17:35:19.817318341 -0700
-@@ -1,4 +1,9 @@
--#!/depot/path/expect -f
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
- 
- # 99 bottles of beer on the wall, Expect-style
- # Author: Don Libes <libes@nist.gov>
-Index: expect5.45/example/expectd.proto
-===================================================================
---- expect5.45.orig/example/expectd.proto	2010-07-02 09:03:31.000000000 -0700
-+++ expect5.45/example/expectd.proto	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,10 @@
--#!/depot/tcl/src/expect/e --
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
-+
- # Description: Simple fragment to begin a telnet daemon
- # For more information, see Chapter 17 of "Exploring Expect"
- # Author: Don Libes, NIST
-Index: expect5.45/example/irsh
-===================================================================
---- expect5.45.orig/example/irsh	2010-07-02 09:03:31.000000000 -0700
-+++ expect5.45/example/irsh	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,9 @@
--#!/depot/path/expect --
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
- 
- # Do rsh interactively.  For example, consider the following command:
- #    rsh <remote> ls -l "|" more
-Index: expect5.45/example/passwd.cgi
-===================================================================
---- expect5.45.orig/example/passwd.cgi	2000-01-06 15:22:07.000000000 -0800
-+++ expect5.45/example/passwd.cgi	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,9 @@
--#!/depot/path/expect --
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
- 
- # This is a CGI script to process requests created by the accompanying
- # passwd.html form.  This script is pretty basic, although it is
-Index: expect5.45/example/passwdprompt
-===================================================================
---- expect5.45.orig/example/passwdprompt	2003-09-05 12:01:59.000000000 -0700
-+++ expect5.45/example/passwdprompt	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,9 @@
--#!/depot/path/expect
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
- 
- # This script prompts for a passwd from stdin while echoing *'s
- 
-Index: expect5.45/example/reprompt
-===================================================================
---- expect5.45.orig/example/reprompt	2000-01-06 15:22:07.000000000 -0800
-+++ expect5.45/example/reprompt	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,9 @@
--#!/depot/path/expect --
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
- 
- # Name: reprompt
- # Description: reprompt every so often until user enters something
-Index: expect5.45/example/term_expect
-===================================================================
---- expect5.45.orig/example/term_expect	2005-02-15 10:11:31.000000000 -0800
-+++ expect5.45/example/term_expect	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,9 @@
--#!/depot/path/expectk
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec wish "$0" ${1+"$@"}
-+
-+package require Expect
- 
- # Name: tkterm - terminal emulator using Expect and Tk text widget, v3.0
- # Author: Don Libes, July '94
-Index: expect5.45/example/vrfy
-===================================================================
---- expect5.45.orig/example/vrfy	2010-07-02 09:03:31.000000000 -0700
-+++ expect5.45/example/vrfy	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,9 @@
--#!/depot/path/expect -f
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
- 
- 
- # separate address into user and host
-Index: expect5.45/example/xrlogin
-===================================================================
---- expect5.45.orig/example/xrlogin	2000-01-06 15:22:08.000000000 -0800
-+++ expect5.45/example/xrlogin	2013-11-01 17:35:19.821318341 -0700
-@@ -1,4 +1,10 @@
--#!/depot/path/expect --
-+#!/bin/sh
-+# -*- tcl -*-
-+# The next line is executed by /bin/sh, but not tcl \
-+exec tclsh "$0" ${1+"$@"}
-+
-+package require Expect
-+
- # xrlogin - rlogin but with current DISPLAY
- #
- # You can extend this idea to save any arbitrary information across rlogin
diff --git a/poky/meta/recipes-devtools/expect/expect_5.45.4.bb b/poky/meta/recipes-devtools/expect/expect_5.45.4.bb
index e27b0d9..4214ab0 100644
--- a/poky/meta/recipes-devtools/expect/expect_5.45.4.bb
+++ b/poky/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -21,7 +21,6 @@
 SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
            file://0001-configure.in.patch \
            file://0002-tcl.m4.patch \
-           file://01-example-shebang.patch \
            file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
            file://0001-Resolve-string-formatting-issues.patch \
            file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
@@ -39,7 +38,6 @@
 	install -d ${D}${libdir}
         install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so   ${D}${libdir}/
         install -m 0755 ${S}/fixline1           ${D}${libdir}/expect${PV}/
-        install -m 0755 ${S}/example/*          ${D}${libdir}/expect${PV}/
         rm ${D}${libdir}/expect${PV}/libexpect*.so
         sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
 }
diff --git a/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch b/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch
index 9d0443e..cbd1365 100644
--- a/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch
+++ b/poky/meta/recipes-devtools/fdisk/gptfdisk/0001-gptcurses-correct-ncurses-6.3-errors.patch
@@ -3,7 +3,7 @@
 Date: Mon, 25 Oct 2021 17:27:51 +0200
 Subject: [PATCH] gptcurses: correct ncurses 6.3 errors
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [by email to rodsmith@rodsbooks.com]
 Signed-off-by: Alexander Kanavin <alex@linutronix.de>
 ---
  gptcurses.cc | 28 ++++++++++++++--------------
diff --git a/poky/meta/recipes-devtools/file/file_5.41.bb b/poky/meta/recipes-devtools/file/file_5.41.bb
index 9cc8308..653887e 100644
--- a/poky/meta/recipes-devtools/file/file_5.41.bb
+++ b/poky/meta/recipes-devtools/file/file_5.41.bb
@@ -11,7 +11,7 @@
 DEPENDS = "file-replacement-native"
 DEPENDS:class-native = "bzip2-replacement-native"
 
-SRC_URI = "git://github.com/file/file.git"
+SRC_URI = "git://github.com/file/file.git;branch=master;protocol=https"
 
 SRCREV = "504206e53a89fd6eed71aeaf878aa3512418eab1"
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-11.2.inc b/poky/meta/recipes-devtools/gcc/gcc-11.2.inc
index d39307d..f07a5be 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-11.2.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-11.2.inc
@@ -34,11 +34,8 @@
            file://0002-gcc-poison-system-directories.patch \
            file://0004-64-bit-multilib-hack.patch \
            file://0005-optional-libstdc.patch \
-           file://0006-COLLECT_GCC_OPTIONS.patch \
            file://0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
-           file://0008-fortran-cross-compile-hack.patch \
            file://0009-cpp-honor-sysroot.patch \
-           file://0010-MIPS64-Default-to-N64-ABI.patch \
            file://0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
            file://0012-gcc-Fix-argument-list-too-long-error.patch \
            file://0014-libtool.patch \
@@ -55,7 +52,6 @@
            file://0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
            file://0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
            file://0030-sync-gcc-stddef.h-with-musl.patch \
-           file://0031-fix-segmentation-fault-in-precompiled-header-generat.patch \
            file://0033-Re-introduce-spe-commandline-options.patch \
            file://0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
            file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
@@ -63,6 +59,15 @@
            file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
            file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \
            file://0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch \
+           file://0001-Fix-install-path-of-linux64.h.patch \
+           file://0001-CVE-2021-35465.patch \
+           file://0002-CVE-2021-35465.patch \
+           file://0003-CVE-2021-35465.patch \
+           file://0004-CVE-2021-35465.patch \
+           file://0001-CVE-2021-42574.patch \
+           file://0002-CVE-2021-42574.patch \
+           file://0003-CVE-2021-42574.patch \
+           file://0004-CVE-2021-42574.patch \
 "
 SRC_URI[sha256sum] = "d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b"
 
@@ -112,3 +117,6 @@
     --with-sysroot=/not/exist \
     --with-build-sysroot=${STAGING_DIR_TARGET} \
 "
+
+# Is a binutils 2.26 issue, not gcc
+CVE_CHECK_WHITELIST += "CVE-2021-37322"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-common.inc b/poky/meta/recipes-devtools/gcc/gcc-common.inc
index 7419064..0f70be7 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-common.inc
@@ -86,11 +86,7 @@
 DEBIANNAME:${MLPREFIX}libgcc = "libgcc1"
 
 MIRRORS =+ "\
-${GNU_MIRROR}/gcc    ftp://gcc.gnu.org/pub/gcc/releases/ \n \
-${GNU_MIRROR}/gcc	ftp://gd.tuwien.ac.at/gnu/gcc/ \n \
-${GNU_MIRROR}/gcc	http://mirrors.rcn.net/pub/sourceware/gcc/releases/ \n \
-${GNU_MIRROR}/gcc   http://gcc.get-software.com/releases/ \n \
-${GNU_MIRROR}/gcc	http://gcc.get-software.com/releases/ \n \
+    ${GNU_MIRROR}/gcc https://gcc.gnu.org/pub/gcc/releases/ \
 "
 #
 # Set some default values
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 495dd90..168486b 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -45,6 +45,9 @@
 export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
 
 do_configure () {
+        if [ ! -d ${RECIPE_SYSROOT}/${target_includedir} ]; then
+            mkdir -p ${RECIPE_SYSROOT}/${target_includedir}
+        fi
 	export CC_FOR_BUILD="${BUILD_CC}"
 	export CXX_FOR_BUILD="${BUILD_CXX}"
 	export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
@@ -180,9 +183,6 @@
 SYSTEMLIBS1 = "${target_libdir}/"
 
 EXTRA_OECONF += "--enable-poison-system-directories"
-EXTRA_OECONF:remove:elf = "--with-sysroot=/not/exist"
-EXTRA_OECONF:remove:eabi = "--with-sysroot=/not/exist"
-EXTRA_OECONF:append:elf = " --without-headers --with-newlib"
-EXTRA_OECONF:append:eabi = " --without-headers --with-newlib"
+
 # gcc 4.7 needs -isystem
 export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}"
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-CVE-2021-35465.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-CVE-2021-35465.patch
new file mode 100644
index 0000000..e4aee10
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-CVE-2021-35465.patch
@@ -0,0 +1,138 @@
+From 3929bca9ca95de9d35e82ae8828b188029e3eb70 Mon Sep 17 00:00:00 2001
+From: Richard Earnshaw <rearnsha@arm.com>
+Date: Fri, 11 Jun 2021 16:02:05 +0100
+Subject: [PATCH] arm: Add command-line option for enabling CVE-2021-35465
+ mitigation [PR102035]
+
+Add a new option, -mfix-cmse-cve-2021-35465 and document it.  Enable it
+automatically for cortex-m33, cortex-m35p and cortex-m55.
+
+gcc:
+	PR target/102035
+	* config/arm/arm.opt (mfix-cmse-cve-2021-35465): New option.
+	* doc/invoke.texi (Arm Options): Document it.
+	* config/arm/arm-cpus.in (quirk_vlldm): New feature bit.
+	(ALL_QUIRKS): Add quirk_vlldm.
+	(cortex-m33): Add quirk_vlldm.
+	(cortex-m35p, cortex-m55): Likewise.
+	* config/arm/arm.c (arm_option_override): Enable fix_vlldm if
+	targetting an affected CPU and not explicitly controlled on
+	the command line.
+
+CVE: CVE-2021-35465
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=3929bca9ca95de9d35e82ae8828b188029e3eb70]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ gcc/config/arm/arm-cpus.in | 9 +++++++--
+ gcc/config/arm/arm.c       | 9 +++++++++
+ gcc/config/arm/arm.opt     | 4 ++++
+ gcc/doc/invoke.texi        | 9 +++++++++
+ 4 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
+--- a/gcc/config/arm/arm.c	2021-11-15 02:13:11.100579812 -0800
++++ b/gcc/config/arm/arm.c	2021-11-15 02:17:36.988237692 -0800
+@@ -3610,6 +3610,15 @@ arm_option_override (void)
+ 	fix_cm3_ldrd = 0;
+     }
+ 
++  /* Enable fix_vlldm by default if required.  */
++  if (fix_vlldm == 2)
++    {
++      if (bitmap_bit_p (arm_active_target.isa, isa_bit_quirk_vlldm))
++	fix_vlldm = 1;
++      else
++	fix_vlldm = 0;
++    }
++
+   /* Hot/Cold partitioning is not currently supported, since we can't
+      handle literal pool placement in that case.  */
+   if (flag_reorder_blocks_and_partition)
+diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in
+--- a/gcc/config/arm/arm-cpus.in	2021-11-15 02:13:11.104579747 -0800
++++ b/gcc/config/arm/arm-cpus.in	2021-11-15 02:17:36.984237757 -0800
+@@ -186,6 +186,9 @@ define feature quirk_armv6kz
+ # Cortex-M3 LDRD quirk.
+ define feature quirk_cm3_ldrd
+ 
++# v8-m/v8.1-m VLLDM errata.
++define feature quirk_vlldm
++
+ # Don't use .cpu assembly directive
+ define feature quirk_no_asmcpu
+ 
+@@ -322,7 +325,7 @@ define implied vfp_base MVE MVE_FP ALL_F
+ # architectures.
+ # xscale isn't really a 'quirk', but it isn't an architecture either and we
+ # need to ignore it for matching purposes.
+-define fgroup ALL_QUIRKS   quirk_no_volatile_ce quirk_armv6kz quirk_cm3_ldrd xscale quirk_no_asmcpu
++define fgroup ALL_QUIRKS   quirk_no_volatile_ce quirk_armv6kz quirk_cm3_ldrd quirk_vlldm xscale quirk_no_asmcpu
+ 
+ define fgroup IGNORE_FOR_MULTILIB cdecp0 cdecp1 cdecp2 cdecp3 cdecp4 cdecp5 cdecp6 cdecp7
+ 
+@@ -1570,6 +1573,7 @@ begin cpu cortex-m33
+  architecture armv8-m.main+dsp+fp
+  option nofp remove ALL_FP
+  option nodsp remove armv7em
++ isa quirk_vlldm
+  costs v7m
+ end cpu cortex-m33
+ 
+@@ -1579,6 +1583,7 @@ begin cpu cortex-m35p
+  architecture armv8-m.main+dsp+fp
+  option nofp remove ALL_FP
+  option nodsp remove armv7em
++ isa quirk_vlldm
+  costs v7m
+ end cpu cortex-m35p
+ 
+@@ -1590,7 +1595,7 @@ begin cpu cortex-m55
+  option nomve remove mve mve_float
+  option nofp remove ALL_FP mve_float
+  option nodsp remove MVE mve_float
+- isa quirk_no_asmcpu
++ isa quirk_no_asmcpu quirk_vlldm
+  costs v7m
+  vendor 41
+ end cpu cortex-m55
+diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
+--- a/gcc/config/arm/arm.opt	2021-11-15 02:13:11.104579747 -0800
++++ b/gcc/config/arm/arm.opt	2021-11-15 02:17:36.988237692 -0800
+@@ -268,6 +268,10 @@ Target Var(fix_cm3_ldrd) Init(2)
+ Avoid overlapping destination and address registers on LDRD instructions
+ that may trigger Cortex-M3 errata.
+ 
++mfix-cmse-cve-2021-35465
++Target Var(fix_vlldm) Init(2)
++Mitigate issues with VLLDM on some M-profile devices (CVE-2021-35465).
++
+ munaligned-access
+ Target Var(unaligned_access) Init(2) Save
+ Enable unaligned word and halfword accesses to packed data.
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+--- a/gcc/doc/invoke.texi	2021-11-15 02:13:11.112579616 -0800
++++ b/gcc/doc/invoke.texi	2021-11-15 02:17:36.996237562 -0800
+@@ -804,6 +804,7 @@ Objective-C and Objective-C++ Dialects}.
+ -mverbose-cost-dump @gol
+ -mpure-code @gol
+ -mcmse @gol
++-mfix-cmse-cve-2021-35465 @gol
+ -mfdpic}
+ 
+ @emph{AVR Options}
+@@ -20487,6 +20488,14 @@ Generate secure code as per the "ARMv8-M
+ Development Tools Engineering Specification", which can be found on
+ @url{https://developer.arm.com/documentation/ecm0359818/latest/}.
+ 
++@item -mfix-cmse-cve-2021-35465
++@opindex mfix-cmse-cve-2021-35465
++Mitigate against a potential security issue with the @code{VLLDM} instruction
++in some M-profile devices when using CMSE (CVE-2021-365465).  This option is
++enabled by default when the option @option{-mcpu=} is used with
++@code{cortex-m33}, @code{cortex-m35p} or @code{cortex-m55}.  The option
++@option{-mno-fix-cmse-cve-2021-35465} can be used to disable the mitigation.
++
+ @item -mfdpic
+ @itemx -mno-fdpic
+ @opindex mfdpic
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-CVE-2021-42574.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-CVE-2021-42574.patch
new file mode 100644
index 0000000..4d680cc
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-CVE-2021-42574.patch
@@ -0,0 +1,2282 @@
+From bd5e882cf6e0def3dd1bc106075d59a303fe0d1e Mon Sep 17 00:00:00 2001
+From: David Malcolm <dmalcolm@redhat.com>
+Date: Mon, 18 Oct 2021 18:55:31 -0400
+Subject: [PATCH] diagnostics: escape non-ASCII source bytes for certain
+ diagnostics
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+This patch adds support to GCC's diagnostic subsystem for escaping certain
+bytes and Unicode characters when quoting source code.
+
+Specifically, this patch adds a new flag rich_location::m_escape_on_output
+which is a hint from a diagnostic that non-ASCII bytes in the pertinent
+lines of the user's source code should be escaped when printed.
+
+The patch sets this for the following diagnostics:
+- when complaining about stray bytes in the program (when these
+are non-printable)
+- when complaining about "null character(s) ignored");
+- for -Wnormalized= (and generate source ranges for such warnings)
+
+The escaping is controlled by a new option:
+  -fdiagnostics-escape-format=[unicode|bytes]
+
+For example, consider a diagnostic involing a source line containing the
+string "before" followed by the Unicode character U+03C0 ("GREEK SMALL
+LETTER PI", with UTF-8 encoding 0xCF 0x80) followed by the byte 0xBF
+(a stray UTF-8 trailing byte), followed by the string "after", where the
+diagnostic highlights the U+03C0 character.
+
+By default, this line will be printed verbatim to the user when
+reporting a diagnostic at it, as:
+
+ beforeÏXafter
+       ^
+
+(using X for the stray byte to avoid putting invalid UTF-8 in this
+commit message)
+
+If the diagnostic sets the "escape" flag, it will be printed as:
+
+ before<U+03C0><BF>after
+       ^~~~~~~~
+
+with -fdiagnostics-escape-format=unicode (the default), or as:
+
+  before<CF><80><BF>after
+        ^~~~~~~~
+
+if the user supplies -fdiagnostics-escape-format=bytes.
+
+This only affects how the source is printed; it does not affect
+how column numbers that are printed (as per -fdiagnostics-column-unit=
+and -fdiagnostics-column-origin=).
+
+gcc/c-family/ChangeLog:
+	* c-lex.c (c_lex_with_flags): When complaining about non-printable
+	CPP_OTHER tokens, set the "escape on output" flag.
+
+gcc/ChangeLog:
+	* common.opt (fdiagnostics-escape-format=): New.
+	(diagnostics_escape_format): New enum.
+	(DIAGNOSTICS_ESCAPE_FORMAT_UNICODE): New enum value.
+	(DIAGNOSTICS_ESCAPE_FORMAT_BYTES): Likewise.
+	* diagnostic-format-json.cc (json_end_diagnostic): Add
+	"escape-source" attribute.
+	* diagnostic-show-locus.c
+	(exploc_with_display_col::exploc_with_display_col): Replace
+	"tabstop" param with a cpp_char_column_policy and add an "aspect"
+	param.  Use these to compute m_display_col accordingly.
+	(struct char_display_policy): New struct.
+	(layout::m_policy): New field.
+	(layout::m_escape_on_output): New field.
+	(def_policy): New function.
+	(make_range): Update for changes to exploc_with_display_col ctor.
+	(default_print_decoded_ch): New.
+	(width_per_escaped_byte): New.
+	(escape_as_bytes_width): New.
+	(escape_as_bytes_print): New.
+	(escape_as_unicode_width): New.
+	(escape_as_unicode_print): New.
+	(make_policy): New.
+	(layout::layout): Initialize new fields.  Update m_exploc ctor
+	call for above change to ctor.
+	(layout::maybe_add_location_range): Update for changes to
+	exploc_with_display_col ctor.
+	(layout::calculate_x_offset_display): Update for change to
+	cpp_display_width.
+	(layout::print_source_line): Pass policy
+	to cpp_display_width_computation. Capture cpp_decoded_char when
+	calling process_next_codepoint.  Move printing of source code to
+	m_policy.m_print_cb.
+	(line_label::line_label): Pass in policy rather than context.
+	(layout::print_any_labels): Update for change to line_label ctor.
+	(get_affected_range): Pass in policy rather than context, updating
+	calls to location_compute_display_column accordingly.
+	(get_printed_columns): Likewise, also for cpp_display_width.
+	(correction::correction): Pass in policy rather than tabstop.
+	(correction::compute_display_cols): Pass m_policy rather than
+	m_tabstop to cpp_display_width.
+	(correction::m_tabstop): Replace with...
+	(correction::m_policy): ...this.
+	(line_corrections::line_corrections): Pass in policy rather than
+	context.
+	(line_corrections::m_context): Replace with...
+	(line_corrections::m_policy): ...this.
+	(line_corrections::add_hint): Update to use m_policy rather than
+	m_context.
+	(line_corrections::add_hint): Likewise.
+	(layout::print_trailing_fixits): Likewise.
+	(selftest::test_display_widths): New.
+	(selftest::test_layout_x_offset_display_utf8): Update to use
+	policy rather than tabstop.
+	(selftest::test_one_liner_labels_utf8): Add test of escaping
+	source lines.
+	(selftest::test_diagnostic_show_locus_one_liner_utf8): Update to
+	use policy rather than tabstop.
+	(selftest::test_overlapped_fixit_printing): Likewise.
+	(selftest::test_overlapped_fixit_printing_utf8): Likewise.
+	(selftest::test_overlapped_fixit_printing_2): Likewise.
+	(selftest::test_tab_expansion): Likewise.
+	(selftest::test_escaping_bytes_1): New.
+	(selftest::test_escaping_bytes_2): New.
+	(selftest::diagnostic_show_locus_c_tests): Call the new tests.
+	* diagnostic.c (diagnostic_initialize): Initialize
+	context->escape_format.
+	(convert_column_unit): Update to use default character width policy.
+	(selftest::test_diagnostic_get_location_text): Likewise.
+	* diagnostic.h (enum diagnostics_escape_format): New enum.
+	(diagnostic_context::escape_format): New field.
+	* doc/invoke.texi (-fdiagnostics-escape-format=): New option.
+	(-fdiagnostics-format=): Add "escape-source" attribute to examples
+	of JSON output, and document it.
+	* input.c (location_compute_display_column): Pass in "policy"
+	rather than "tabstop", passing to
+	cpp_byte_column_to_display_column.
+	(selftest::test_cpp_utf8): Update to use cpp_char_column_policy.
+	* input.h (class cpp_char_column_policy): New forward decl.
+	(location_compute_display_column): Pass in "policy" rather than
+	"tabstop".
+	* opts.c (common_handle_option): Handle
+	OPT_fdiagnostics_escape_format_.
+	* selftest.c (temp_source_file::temp_source_file): New ctor
+	overload taking a size_t.
+	* selftest.h (temp_source_file::temp_source_file): Likewise.
+
+gcc/testsuite/ChangeLog:
+	* c-c++-common/diagnostic-format-json-1.c: Add regexp to consume
+	"escape-source" attribute.
+	* c-c++-common/diagnostic-format-json-2.c: Likewise.
+	* c-c++-common/diagnostic-format-json-3.c: Likewise.
+	* c-c++-common/diagnostic-format-json-4.c: Likewise, twice.
+	* c-c++-common/diagnostic-format-json-5.c: Likewise.
+	* gcc.dg/cpp/warn-normalized-4-bytes.c: New test.
+	* gcc.dg/cpp/warn-normalized-4-unicode.c: New test.
+	* gcc.dg/encoding-issues-bytes.c: New test.
+	* gcc.dg/encoding-issues-unicode.c: New test.
+	* gfortran.dg/diagnostic-format-json-1.F90: Add regexp to consume
+	"escape-source" attribute.
+	* gfortran.dg/diagnostic-format-json-2.F90: Likewise.
+	* gfortran.dg/diagnostic-format-json-3.F90: Likewise.
+
+libcpp/ChangeLog:
+	* charset.c (convert_escape): Use encoding_rich_location when
+	complaining about nonprintable unknown escape sequences.
+	(cpp_display_width_computation::::cpp_display_width_computation):
+	Pass in policy rather than tabstop.
+	(cpp_display_width_computation::process_next_codepoint): Add "out"
+	param and populate *out if non-NULL.
+	(cpp_display_width_computation::advance_display_cols): Pass NULL
+	to process_next_codepoint.
+	(cpp_byte_column_to_display_column): Pass in policy rather than
+	tabstop.  Pass NULL to process_next_codepoint.
+	(cpp_display_column_to_byte_column): Pass in policy rather than
+	tabstop.
+	* errors.c (cpp_diagnostic_get_current_location): New function,
+	splitting out the logic from...
+	(cpp_diagnostic): ...here.
+	(cpp_warning_at): New function.
+	(cpp_pedwarning_at): New function.
+	* include/cpplib.h (cpp_warning_at): New decl for rich_location.
+	(cpp_pedwarning_at): Likewise.
+	(struct cpp_decoded_char): New.
+	(struct cpp_char_column_policy): New.
+	(cpp_display_width_computation::cpp_display_width_computation):
+	Replace "tabstop" param with "policy".
+	(cpp_display_width_computation::process_next_codepoint): Add "out"
+	param.
+	(cpp_display_width_computation::m_tabstop): Replace with...
+	(cpp_display_width_computation::m_policy): ...this.
+	(cpp_byte_column_to_display_column): Replace "tabstop" param with
+	"policy".
+	(cpp_display_width): Likewise.
+	(cpp_display_column_to_byte_column): Likewise.
+	* include/line-map.h (rich_location::escape_on_output_p): New.
+	(rich_location::set_escape_on_output): New.
+	(rich_location::m_escape_on_output): New.
+	* internal.h (cpp_diagnostic_get_current_location): New decl.
+	(class encoding_rich_location): New.
+	* lex.c (skip_whitespace): Use encoding_rich_location when
+	complaining about null characters.
+	(warn_about_normalization): Generate a source range when
+	complaining about improperly normalized tokens, rather than just a
+	point, and use encoding_rich_location so that the source code
+	is escaped on printing.
+	* line-map.c (rich_location::rich_location): Initialize
+	m_escape_on_output.
+
+Signed-off-by: David Malcolm <dmalcolm@redhat.com>
+
+CVE: CVE-2021-42574
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=bd5e882cf6e0def3dd1bc106075d59a303fe0d1e]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ gcc/c-family/c-lex.c                          |   6 +-
+ gcc/common.opt                                |  13 +
+ gcc/diagnostic-format-json.cc                 |   3 +
+ gcc/diagnostic-show-locus.c                   | 580 +++++++++++++++---
+ gcc/diagnostic.c                              |  10 +-
+ gcc/diagnostic.h                              |  18 +
+ gcc/doc/invoke.texi                           |  43 +-
+ gcc/input.c                                   |  62 +-
+ gcc/input.h                                   |   7 +-
+ gcc/opts.c                                    |   4 +
+ gcc/selftest.c                                |  15 +
+ gcc/selftest.h                                |   2 +
+ .../c-c++-common/diagnostic-format-json-1.c   |   1 +
+ .../c-c++-common/diagnostic-format-json-2.c   |   1 +
+ .../c-c++-common/diagnostic-format-json-3.c   |   1 +
+ .../c-c++-common/diagnostic-format-json-4.c   |   2 +
+ .../c-c++-common/diagnostic-format-json-5.c   |   1 +
+ .../gcc.dg/cpp/warn-normalized-4-bytes.c      |  21 +
+ .../gcc.dg/cpp/warn-normalized-4-unicode.c    |  19 +
+ gcc/testsuite/gcc.dg/encoding-issues-bytes.c  | Bin 0 -> 595 bytes
+ .../gcc.dg/encoding-issues-unicode.c          | Bin 0 -> 613 bytes
+ .../gfortran.dg/diagnostic-format-json-1.F90  |   1 +
+ .../gfortran.dg/diagnostic-format-json-2.F90  |   1 +
+ .../gfortran.dg/diagnostic-format-json-3.F90  |   1 +
+ libcpp/charset.c                              |  63 +-
+ libcpp/errors.c                               |  82 ++-
+ libcpp/include/cpplib.h                       |  76 ++-
+ libcpp/include/line-map.h                     |  13 +
+ libcpp/internal.h                             |  23 +
+ libcpp/lex.c                                  |  38 +-
+ libcpp/line-map.c                             |   3 +-
+ 31 files changed, 942 insertions(+), 168 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c
+ create mode 100644 gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c
+ create mode 100644 gcc/testsuite/gcc.dg/encoding-issues-bytes.c
+ create mode 100644 gcc/testsuite/gcc.dg/encoding-issues-unicode.c
+
+diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c
+--- a/gcc/c-family/c-lex.c	2021-07-27 23:55:06.980283060 -0700
++++ b/gcc/c-family/c-lex.c	2021-12-14 01:16:01.541943272 -0800
+@@ -603,7 +603,11 @@ c_lex_with_flags (tree *value, location_
+ 	else if (ISGRAPH (c))
+ 	  error_at (*loc, "stray %qc in program", (int) c);
+ 	else
+-	  error_at (*loc, "stray %<\\%o%> in program", (int) c);
++	  {
++	    rich_location rich_loc (line_table, *loc);
++	    rich_loc.set_escape_on_output (true);
++	    error_at (&rich_loc, "stray %<\\%o%> in program", (int) c);
++	  }
+       }
+       goto retry;
+ 
+diff --git a/gcc/common.opt b/gcc/common.opt
+--- a/gcc/common.opt	2021-12-13 22:08:44.939137107 -0800
++++ b/gcc/common.opt	2021-12-14 01:16:01.541943272 -0800
+@@ -1348,6 +1348,10 @@ fdiagnostics-format=
+ Common Joined RejectNegative Enum(diagnostics_output_format)
+ -fdiagnostics-format=[text|json]	Select output format.
+ 
++fdiagnostics-escape-format=
++Common Joined RejectNegative Enum(diagnostics_escape_format)
++-fdiagnostics-escape-format=[unicode|bytes]	Select how to escape non-printable-ASCII bytes in the source for diagnostics that suggest it.
++
+ ; Required for these enum values.
+ SourceInclude
+ diagnostic.h
+@@ -1362,6 +1366,15 @@ EnumValue
+ Enum(diagnostics_column_unit) String(byte) Value(DIAGNOSTICS_COLUMN_UNIT_BYTE)
+ 
+ Enum
++Name(diagnostics_escape_format) Type(int)
++
++EnumValue
++Enum(diagnostics_escape_format) String(unicode) Value(DIAGNOSTICS_ESCAPE_FORMAT_UNICODE)
++
++EnumValue
++Enum(diagnostics_escape_format) String(bytes) Value(DIAGNOSTICS_ESCAPE_FORMAT_BYTES)
++
++Enum
+ Name(diagnostics_output_format) Type(int)
+ 
+ EnumValue
+diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
+--- a/gcc/diagnostic.c	2021-07-27 23:55:07.232286576 -0700
++++ b/gcc/diagnostic.c	2021-12-14 01:16:01.545943202 -0800
+@@ -230,6 +230,7 @@ diagnostic_initialize (diagnostic_contex
+   context->column_unit = DIAGNOSTICS_COLUMN_UNIT_DISPLAY;
+   context->column_origin = 1;
+   context->tabstop = 8;
++  context->escape_format = DIAGNOSTICS_ESCAPE_FORMAT_UNICODE;
+   context->edit_context_ptr = NULL;
+   context->diagnostic_group_nesting_depth = 0;
+   context->diagnostic_group_emission_count = 0;
+@@ -382,7 +383,10 @@ convert_column_unit (enum diagnostics_co
+       gcc_unreachable ();
+ 
+     case DIAGNOSTICS_COLUMN_UNIT_DISPLAY:
+-      return location_compute_display_column (s, tabstop);
++      {
++	cpp_char_column_policy policy (tabstop, cpp_wcwidth);
++	return location_compute_display_column (s, policy);
++      }
+ 
+     case DIAGNOSTICS_COLUMN_UNIT_BYTE:
+       return s.column;
+@@ -2275,8 +2279,8 @@ test_diagnostic_get_location_text ()
+     const char *const content = "smile \xf0\x9f\x98\x82\n";
+     const int line_bytes = strlen (content) - 1;
+     const int def_tabstop = 8;
+-    const int display_width = cpp_display_width (content, line_bytes,
+-						 def_tabstop);
++    const cpp_char_column_policy policy (def_tabstop, cpp_wcwidth);
++    const int display_width = cpp_display_width (content, line_bytes, policy);
+     ASSERT_EQ (line_bytes - 2, display_width);
+     temp_source_file tmp (SELFTEST_LOCATION, ".c", content);
+     const char *const fname = tmp.get_filename ();
+diff --git a/gcc/diagnostic-format-json.cc b/gcc/diagnostic-format-json.cc
+--- a/gcc/diagnostic-format-json.cc	2021-07-27 23:55:07.232286576 -0700
++++ b/gcc/diagnostic-format-json.cc	2021-12-14 01:16:01.541943272 -0800
+@@ -264,6 +264,9 @@ json_end_diagnostic (diagnostic_context
+       json::value *path_value = context->make_json_for_path (context, path);
+       diag_obj->set ("path", path_value);
+     }
++
++  diag_obj->set ("escape-source",
++		 new json::literal (richloc->escape_on_output_p ()));
+ }
+ 
+ /* No-op implementation of "begin_group_cb" for JSON output.  */
+diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
+--- a/gcc/diagnostic.h	2021-07-27 23:55:07.236286632 -0700
++++ b/gcc/diagnostic.h	2021-12-14 01:16:01.545943202 -0800
+@@ -38,6 +38,20 @@ enum diagnostics_column_unit
+   DIAGNOSTICS_COLUMN_UNIT_BYTE
+ };
+ 
++/* An enum for controlling how to print non-ASCII characters/bytes when
++   a diagnostic suggests escaping the source code on output.  */
++
++enum diagnostics_escape_format
++{
++  /* Escape non-ASCII Unicode characters in the form <U+XXXX> and
++     non-UTF-8 bytes in the form <XX>.  */
++  DIAGNOSTICS_ESCAPE_FORMAT_UNICODE,
++
++  /* Escape non-ASCII bytes in the form <XX> (thus showing the underlying
++     encoding of non-ASCII Unicode characters).  */
++  DIAGNOSTICS_ESCAPE_FORMAT_BYTES
++};
++
+ /* Enum for overriding the standard output format.  */
+ 
+ enum diagnostics_output_format
+@@ -320,6 +334,10 @@ struct diagnostic_context
+   /* The size of the tabstop for tab expansion.  */
+   int tabstop;
+ 
++  /* How should non-ASCII/non-printable bytes be escaped when
++     a diagnostic suggests escaping the source code on output.  */
++  enum diagnostics_escape_format escape_format;
++
+   /* If non-NULL, an edit_context to which fix-it hints should be
+      applied, for generating patches.  */
+   edit_context *edit_context_ptr;
+diff --git a/gcc/diagnostic-show-locus.c b/gcc/diagnostic-show-locus.c
+--- a/gcc/diagnostic-show-locus.c	2021-07-27 23:55:07.232286576 -0700
++++ b/gcc/diagnostic-show-locus.c	2021-12-14 01:16:01.545943202 -0800
+@@ -175,10 +175,26 @@ enum column_unit {
+ class exploc_with_display_col : public expanded_location
+ {
+  public:
+-  exploc_with_display_col (const expanded_location &exploc, int tabstop)
+-    : expanded_location (exploc),
+-      m_display_col (location_compute_display_column (exploc, tabstop))
+-  {}
++  exploc_with_display_col (const expanded_location &exploc,
++			   const cpp_char_column_policy &policy,
++			   enum location_aspect aspect)
++  : expanded_location (exploc),
++    m_display_col (location_compute_display_column (exploc, policy))
++  {
++    if (exploc.column > 0)
++      {
++	/* m_display_col is now the final column of the byte.
++	   If escaping has happened, we may want the first column instead.  */
++	if (aspect != LOCATION_ASPECT_FINISH)
++	  {
++	    expanded_location prev_exploc (exploc);
++	    prev_exploc.column--;
++	    int prev_display_col
++	      = (location_compute_display_column (prev_exploc, policy));
++	    m_display_col = prev_display_col + 1;
++	  }
++      }
++  }
+ 
+   int m_display_col;
+ };
+@@ -313,6 +329,31 @@ test_line_span ()
+ 
+ #endif /* #if CHECKING_P */
+ 
++/* A bundle of information containing how to print unicode
++   characters and bytes when quoting source code.
++
++   Provides a unified place to support escaping some subset
++   of characters to some format.
++
++   Extends char_column_policy; printing is split out to avoid
++   libcpp having to know about pretty_printer.  */
++
++struct char_display_policy : public cpp_char_column_policy
++{
++ public:
++  char_display_policy (int tabstop,
++		       int (*width_cb) (cppchar_t c),
++		       void (*print_cb) (pretty_printer *pp,
++					 const cpp_decoded_char &cp))
++  : cpp_char_column_policy (tabstop, width_cb),
++    m_print_cb (print_cb)
++  {
++  }
++
++  void (*m_print_cb) (pretty_printer *pp,
++		      const cpp_decoded_char &cp);
++};
++
+ /* A class to control the overall layout when printing a diagnostic.
+ 
+    The layout is determined within the constructor.
+@@ -345,6 +386,8 @@ class layout
+ 
+   void print_line (linenum_type row);
+ 
++  void on_bad_codepoint (const char *ptr, cppchar_t ch, size_t ch_sz);
++
+  private:
+   bool will_show_line_p (linenum_type row) const;
+   void print_leading_fixits (linenum_type row);
+@@ -386,6 +429,7 @@ class layout
+  private:
+   diagnostic_context *m_context;
+   pretty_printer *m_pp;
++  char_display_policy m_policy;
+   location_t m_primary_loc;
+   exploc_with_display_col m_exploc;
+   colorizer m_colorizer;
+@@ -398,6 +442,7 @@ class layout
+   auto_vec <line_span> m_line_spans;
+   int m_linenum_width;
+   int m_x_offset_display;
++  bool m_escape_on_output;
+ };
+ 
+ /* Implementation of "class colorizer".  */
+@@ -646,6 +691,11 @@ layout_range::intersects_line_p (linenum
+ /* Default for when we don't care what the tab expansion is set to.  */
+ static const int def_tabstop = 8;
+ 
++static cpp_char_column_policy def_policy ()
++{
++  return cpp_char_column_policy (8, cpp_wcwidth);
++}
++
+ /* Create some expanded locations for testing layout_range.  The filename
+    member of the explocs is set to the empty string.  This member will only be
+    inspected by the calls to location_compute_display_column() made from the
+@@ -662,10 +712,13 @@ make_range (int start_line, int start_co
+     = {"", start_line, start_col, NULL, false};
+   const expanded_location finish_exploc
+     = {"", end_line, end_col, NULL, false};
+-  return layout_range (exploc_with_display_col (start_exploc, def_tabstop),
+-		       exploc_with_display_col (finish_exploc, def_tabstop),
++  return layout_range (exploc_with_display_col (start_exploc, def_policy (),
++						LOCATION_ASPECT_START),
++		       exploc_with_display_col (finish_exploc, def_policy (),
++						LOCATION_ASPECT_FINISH),
+ 		       SHOW_RANGE_WITHOUT_CARET,
+-		       exploc_with_display_col (start_exploc, def_tabstop),
++		       exploc_with_display_col (start_exploc, def_policy (),
++						LOCATION_ASPECT_CARET),
+ 		       0, NULL);
+ }
+ 
+@@ -959,6 +1012,164 @@ fixit_cmp (const void *p_a, const void *
+   return hint_a->get_start_loc () - hint_b->get_start_loc ();
+ }
+ 
++/* Callbacks for use when not escaping the source.  */
++
++/* The default callback for char_column_policy::m_width_cb is cpp_wcwidth.  */
++
++/* Callback for char_display_policy::m_print_cb for printing source chars
++   when not escaping the source.  */
++
++static void
++default_print_decoded_ch (pretty_printer *pp,
++			  const cpp_decoded_char &decoded_ch)
++{
++  for (const char *ptr = decoded_ch.m_start_byte;
++       ptr != decoded_ch.m_next_byte; ptr++)
++    {
++      if (*ptr == '\0' || *ptr == '\r')
++	{
++	  pp_space (pp);
++	  continue;
++	}
++
++      pp_character (pp, *ptr);
++    }
++}
++
++/* Callbacks for use with DIAGNOSTICS_ESCAPE_FORMAT_BYTES.  */
++
++static const int width_per_escaped_byte = 4;
++
++/* Callback for char_column_policy::m_width_cb for determining the
++   display width when escaping with DIAGNOSTICS_ESCAPE_FORMAT_BYTES.  */
++
++static int
++escape_as_bytes_width (cppchar_t ch)
++{
++  if (ch < 0x80 && ISPRINT (ch))
++    return cpp_wcwidth (ch);
++  else
++    {
++      if (ch <=   0x7F) return 1 * width_per_escaped_byte;
++      if (ch <=  0x7FF) return 2 * width_per_escaped_byte;
++      if (ch <= 0xFFFF) return 3 * width_per_escaped_byte;
++      return 4 * width_per_escaped_byte;
++    }
++}
++
++/* Callback for char_display_policy::m_print_cb for printing source chars
++   when escaping with DIAGNOSTICS_ESCAPE_FORMAT_BYTES.  */
++
++static void
++escape_as_bytes_print (pretty_printer *pp,
++		       const cpp_decoded_char &decoded_ch)
++{
++  if (!decoded_ch.m_valid_ch)
++    {
++      for (const char *iter = decoded_ch.m_start_byte;
++	   iter != decoded_ch.m_next_byte; ++iter)
++	{
++	  char buf[16];
++	  sprintf (buf, "<%02x>", (unsigned char)*iter);
++	  pp_string (pp, buf);
++	}
++      return;
++    }
++
++  cppchar_t ch = decoded_ch.m_ch;
++  if (ch < 0x80 && ISPRINT (ch))
++    pp_character (pp, ch);
++  else
++    {
++      for (const char *iter = decoded_ch.m_start_byte;
++	   iter < decoded_ch.m_next_byte; ++iter)
++	{
++	  char buf[16];
++	  sprintf (buf, "<%02x>", (unsigned char)*iter);
++	  pp_string (pp, buf);
++	}
++    }
++}
++
++/* Callbacks for use with DIAGNOSTICS_ESCAPE_FORMAT_UNICODE.  */
++
++/* Callback for char_column_policy::m_width_cb for determining the
++   display width when escaping with DIAGNOSTICS_ESCAPE_FORMAT_UNICODE.  */
++
++static int
++escape_as_unicode_width (cppchar_t ch)
++{
++  if (ch < 0x80 && ISPRINT (ch))
++    return cpp_wcwidth (ch);
++  else
++    {
++      // Width of "<U+%04x>"
++      if (ch > 0xfffff)
++	return 10;
++      else if (ch > 0xffff)
++	return 9;
++      else
++	return 8;
++    }
++}
++
++/* Callback for char_display_policy::m_print_cb for printing source chars
++   when escaping with DIAGNOSTICS_ESCAPE_FORMAT_UNICODE.  */
++
++static void
++escape_as_unicode_print (pretty_printer *pp,
++			 const cpp_decoded_char &decoded_ch)
++{
++  if (!decoded_ch.m_valid_ch)
++    {
++      escape_as_bytes_print (pp, decoded_ch);
++      return;
++    }
++
++  cppchar_t ch = decoded_ch.m_ch;
++  if (ch < 0x80 && ISPRINT (ch))
++    pp_character (pp, ch);
++  else
++    {
++      char buf[16];
++      sprintf (buf, "<U+%04X>", ch);
++      pp_string (pp, buf);
++    }
++}
++
++/* Populate a char_display_policy based on DC and RICHLOC.  */
++
++static char_display_policy
++make_policy (const diagnostic_context &dc,
++	     const rich_location &richloc)
++{
++  /* The default is to not escape non-ASCII bytes.  */
++  char_display_policy result
++    (dc.tabstop, cpp_wcwidth, default_print_decoded_ch);
++
++  /* If the diagnostic suggests escaping non-ASCII bytes, then
++     use policy from user-supplied options.  */
++  if (richloc.escape_on_output_p ())
++    {
++      result.m_undecoded_byte_width = width_per_escaped_byte;
++      switch (dc.escape_format)
++	{
++	default:
++	  gcc_unreachable ();
++	case DIAGNOSTICS_ESCAPE_FORMAT_UNICODE:
++	  result.m_width_cb = escape_as_unicode_width;
++	  result.m_print_cb = escape_as_unicode_print;
++	  break;
++	case DIAGNOSTICS_ESCAPE_FORMAT_BYTES:
++	  result.m_width_cb = escape_as_bytes_width;
++	  result.m_print_cb = escape_as_bytes_print;
++	  break;
++	}
++    }
++
++  return result;
++}
++
+ /* Implementation of class layout.  */
+ 
+ /* Constructor for class layout.
+@@ -975,8 +1186,10 @@ layout::layout (diagnostic_context * con
+ 		diagnostic_t diagnostic_kind)
+ : m_context (context),
+   m_pp (context->printer),
++  m_policy (make_policy (*context, *richloc)),
+   m_primary_loc (richloc->get_range (0)->m_loc),
+-  m_exploc (richloc->get_expanded_location (0), context->tabstop),
++  m_exploc (richloc->get_expanded_location (0), m_policy,
++	    LOCATION_ASPECT_CARET),
+   m_colorizer (context, diagnostic_kind),
+   m_colorize_source_p (context->colorize_source_p),
+   m_show_labels_p (context->show_labels_p),
+@@ -986,7 +1199,8 @@ layout::layout (diagnostic_context * con
+   m_fixit_hints (richloc->get_num_fixit_hints ()),
+   m_line_spans (1 + richloc->get_num_locations ()),
+   m_linenum_width (0),
+-  m_x_offset_display (0)
++  m_x_offset_display (0),
++  m_escape_on_output (richloc->escape_on_output_p ())
+ {
+   for (unsigned int idx = 0; idx < richloc->get_num_locations (); idx++)
+     {
+@@ -1072,10 +1286,13 @@ layout::maybe_add_location_range (const
+ 
+   /* Everything is now known to be in the correct source file,
+      but it may require further sanitization.  */
+-  layout_range ri (exploc_with_display_col (start, m_context->tabstop),
+-		   exploc_with_display_col (finish, m_context->tabstop),
++  layout_range ri (exploc_with_display_col (start, m_policy,
++					    LOCATION_ASPECT_START),
++		   exploc_with_display_col (finish, m_policy,
++					    LOCATION_ASPECT_FINISH),
+ 		   loc_range->m_range_display_kind,
+-		   exploc_with_display_col (caret, m_context->tabstop),
++		   exploc_with_display_col (caret, m_policy,
++					    LOCATION_ASPECT_CARET),
+ 		   original_idx, loc_range->m_label);
+ 
+   /* If we have a range that finishes before it starts (perhaps
+@@ -1409,7 +1626,7 @@ layout::calculate_x_offset_display ()
+     = get_line_bytes_without_trailing_whitespace (line.get_buffer (),
+ 						  line.length ());
+   int eol_display_column
+-    = cpp_display_width (line.get_buffer (), line_bytes, m_context->tabstop);
++    = cpp_display_width (line.get_buffer (), line_bytes, m_policy);
+   if (caret_display_column > eol_display_column
+       || !caret_display_column)
+     {
+@@ -1488,7 +1705,7 @@ layout::print_source_line (linenum_type
+   /* This object helps to keep track of which display column we are at, which is
+      necessary for computing the line bounds in display units, for doing
+      tab expansion, and for implementing m_x_offset_display.  */
+-  cpp_display_width_computation dw (line, line_bytes, m_context->tabstop);
++  cpp_display_width_computation dw (line, line_bytes, m_policy);
+ 
+   /* Skip the first m_x_offset_display display columns.  In case the leading
+      portion that will be skipped ends with a character with wcwidth > 1, then
+@@ -1536,7 +1753,8 @@ layout::print_source_line (linenum_type
+ 	 tabs and replacing some control bytes with spaces as necessary.  */
+       const char *c = dw.next_byte ();
+       const int start_disp_col = dw.display_cols_processed () + 1;
+-      const int this_display_width = dw.process_next_codepoint ();
++      cpp_decoded_char cp;
++      const int this_display_width = dw.process_next_codepoint (&cp);
+       if (*c == '\t')
+ 	{
+ 	  /* The returned display width is the number of spaces into which the
+@@ -1545,15 +1763,6 @@ layout::print_source_line (linenum_type
+ 	    pp_space (m_pp);
+ 	  continue;
+ 	}
+-      if (*c == '\0' || *c == '\r')
+-	{
+-	  /* cpp_wcwidth() promises to return 1 for all control bytes, and we
+-	     want to output these as a single space too, so this case is
+-	     actually the same as the '\t' case.  */
+-	  gcc_assert (this_display_width == 1);
+-	  pp_space (m_pp);
+-	  continue;
+-	}
+ 
+       /* We have a (possibly multibyte) character to output; update the line
+ 	 bounds if it is not whitespace.  */
+@@ -1565,7 +1774,8 @@ layout::print_source_line (linenum_type
+ 	}
+ 
+       /* Output the character.  */
+-      while (c != dw.next_byte ()) pp_character (m_pp, *c++);
++      m_policy.m_print_cb (m_pp, cp);
++      c = dw.next_byte ();
+     }
+   print_newline ();
+   return lbounds;
+@@ -1664,14 +1874,14 @@ layout::print_annotation_line (linenum_t
+ class line_label
+ {
+ public:
+-  line_label (diagnostic_context *context, int state_idx, int column,
++  line_label (const cpp_char_column_policy &policy,
++	      int state_idx, int column,
+ 	      label_text text)
+   : m_state_idx (state_idx), m_column (column),
+     m_text (text), m_label_line (0), m_has_vbar (true)
+   {
+     const int bytes = strlen (text.m_buffer);
+-    m_display_width
+-      = cpp_display_width (text.m_buffer, bytes, context->tabstop);
++    m_display_width = cpp_display_width (text.m_buffer, bytes, policy);
+   }
+ 
+   /* Sorting is primarily by column, then by state index.  */
+@@ -1731,7 +1941,7 @@ layout::print_any_labels (linenum_type r
+ 	if (text.m_buffer == NULL)
+ 	  continue;
+ 
+-	labels.safe_push (line_label (m_context, i, disp_col, text));
++	labels.safe_push (line_label (m_policy, i, disp_col, text));
+       }
+   }
+ 
+@@ -2011,7 +2221,7 @@ public:
+ 
+ /* Get the range of bytes or display columns that HINT would affect.  */
+ static column_range
+-get_affected_range (diagnostic_context *context,
++get_affected_range (const cpp_char_column_policy &policy,
+ 		    const fixit_hint *hint, enum column_unit col_unit)
+ {
+   expanded_location exploc_start = expand_location (hint->get_start_loc ());
+@@ -2022,13 +2232,11 @@ get_affected_range (diagnostic_context *
+   int finish_column;
+   if (col_unit == CU_DISPLAY_COLS)
+     {
+-      start_column
+-	= location_compute_display_column (exploc_start, context->tabstop);
++      start_column = location_compute_display_column (exploc_start, policy);
+       if (hint->insertion_p ())
+ 	finish_column = start_column - 1;
+       else
+-	finish_column
+-	  = location_compute_display_column (exploc_finish, context->tabstop);
++	finish_column = location_compute_display_column (exploc_finish, policy);
+     }
+   else
+     {
+@@ -2041,12 +2249,13 @@ get_affected_range (diagnostic_context *
+ /* Get the range of display columns that would be printed for HINT.  */
+ 
+ static column_range
+-get_printed_columns (diagnostic_context *context, const fixit_hint *hint)
++get_printed_columns (const cpp_char_column_policy &policy,
++		     const fixit_hint *hint)
+ {
+   expanded_location exploc = expand_location (hint->get_start_loc ());
+-  int start_column = location_compute_display_column (exploc, context->tabstop);
++  int start_column = location_compute_display_column (exploc, policy);
+   int hint_width = cpp_display_width (hint->get_string (), hint->get_length (),
+-				      context->tabstop);
++				      policy);
+   int final_hint_column = start_column + hint_width - 1;
+   if (hint->insertion_p ())
+     {
+@@ -2056,8 +2265,7 @@ get_printed_columns (diagnostic_context
+     {
+       exploc = expand_location (hint->get_next_loc ());
+       --exploc.column;
+-      int finish_column
+-	= location_compute_display_column (exploc, context->tabstop);
++      int finish_column = location_compute_display_column (exploc, policy);
+       return column_range (start_column,
+ 			   MAX (finish_column, final_hint_column));
+     }
+@@ -2075,13 +2283,13 @@ public:
+ 	      column_range affected_columns,
+ 	      column_range printed_columns,
+ 	      const char *new_text, size_t new_text_len,
+-	      int tabstop)
++	      const cpp_char_column_policy &policy)
+   : m_affected_bytes (affected_bytes),
+     m_affected_columns (affected_columns),
+     m_printed_columns (printed_columns),
+     m_text (xstrdup (new_text)),
+     m_byte_length (new_text_len),
+-    m_tabstop (tabstop),
++    m_policy (policy),
+     m_alloc_sz (new_text_len + 1)
+   {
+     compute_display_cols ();
+@@ -2099,7 +2307,7 @@ public:
+ 
+   void compute_display_cols ()
+   {
+-    m_display_cols = cpp_display_width (m_text, m_byte_length, m_tabstop);
++    m_display_cols = cpp_display_width (m_text, m_byte_length, m_policy);
+   }
+ 
+   void overwrite (int dst_offset, const char_span &src_span)
+@@ -2127,7 +2335,7 @@ public:
+   char *m_text;
+   size_t m_byte_length; /* Not including null-terminator.  */
+   int m_display_cols;
+-  int m_tabstop;
++  const cpp_char_column_policy &m_policy;
+   size_t m_alloc_sz;
+ };
+ 
+@@ -2163,15 +2371,16 @@ correction::ensure_terminated ()
+ class line_corrections
+ {
+ public:
+-  line_corrections (diagnostic_context *context, const char *filename,
++  line_corrections (const char_display_policy &policy,
++		    const char *filename,
+ 		    linenum_type row)
+-    : m_context (context), m_filename (filename), m_row (row)
++  : m_policy (policy), m_filename (filename), m_row (row)
+   {}
+   ~line_corrections ();
+ 
+   void add_hint (const fixit_hint *hint);
+ 
+-  diagnostic_context *m_context;
++  const char_display_policy &m_policy;
+   const char *m_filename;
+   linenum_type m_row;
+   auto_vec <correction *> m_corrections;
+@@ -2217,10 +2426,10 @@ source_line::source_line (const char *fi
+ void
+ line_corrections::add_hint (const fixit_hint *hint)
+ {
+-  column_range affected_bytes = get_affected_range (m_context, hint, CU_BYTES);
+-  column_range affected_columns = get_affected_range (m_context, hint,
++  column_range affected_bytes = get_affected_range (m_policy, hint, CU_BYTES);
++  column_range affected_columns = get_affected_range (m_policy, hint,
+ 						      CU_DISPLAY_COLS);
+-  column_range printed_columns = get_printed_columns (m_context, hint);
++  column_range printed_columns = get_printed_columns (m_policy, hint);
+ 
+   /* Potentially consolidate.  */
+   if (!m_corrections.is_empty ())
+@@ -2289,7 +2498,7 @@ line_corrections::add_hint (const fixit_
+ 					   printed_columns,
+ 					   hint->get_string (),
+ 					   hint->get_length (),
+-					   m_context->tabstop));
++					   m_policy));
+ }
+ 
+ /* If there are any fixit hints on source line ROW, print them.
+@@ -2303,7 +2512,7 @@ layout::print_trailing_fixits (linenum_t
+ {
+   /* Build a list of correction instances for the line,
+      potentially consolidating hints (for the sake of readability).  */
+-  line_corrections corrections (m_context, m_exploc.file, row);
++  line_corrections corrections (m_policy, m_exploc.file, row);
+   for (unsigned int i = 0; i < m_fixit_hints.length (); i++)
+     {
+       const fixit_hint *hint = m_fixit_hints[i];
+@@ -2646,6 +2855,59 @@ namespace selftest {
+ 
+ /* Selftests for diagnostic_show_locus.  */
+ 
++/* Verify that cpp_display_width correctly handles escaping.  */
++
++static void
++test_display_widths ()
++{
++  gcc_rich_location richloc (UNKNOWN_LOCATION);
++
++  /* U+03C0 "GREEK SMALL LETTER PI".  */
++  const char *pi = "\xCF\x80";
++  /* U+1F642 "SLIGHTLY SMILING FACE".  */
++  const char *emoji = "\xF0\x9F\x99\x82";
++  /* Stray trailing byte of a UTF-8 character.  */
++  const char *stray = "\xBF";
++  /* U+10FFFF.  */
++  const char *max_codepoint = "\xF4\x8F\xBF\xBF";
++
++  /* No escaping.  */
++  {
++    test_diagnostic_context dc;
++    char_display_policy policy (make_policy (dc, richloc));
++    ASSERT_EQ (cpp_display_width (pi, strlen (pi), policy), 1);
++    ASSERT_EQ (cpp_display_width (emoji, strlen (emoji), policy), 2);
++    ASSERT_EQ (cpp_display_width (stray, strlen (stray), policy), 1);
++    /* Don't check width of U+10FFFF; it's in a private use plane.  */
++  }
++
++  richloc.set_escape_on_output (true);
++
++  {
++    test_diagnostic_context dc;
++    dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_UNICODE;
++    char_display_policy policy (make_policy (dc, richloc));
++    ASSERT_EQ (cpp_display_width (pi, strlen (pi), policy), 8);
++    ASSERT_EQ (cpp_display_width (emoji, strlen (emoji), policy), 9);
++    ASSERT_EQ (cpp_display_width (stray, strlen (stray), policy), 4);
++    ASSERT_EQ (cpp_display_width (max_codepoint, strlen (max_codepoint),
++				  policy),
++	       strlen ("<U+10FFFF>"));
++  }
++
++  {
++    test_diagnostic_context dc;
++    dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_BYTES;
++    char_display_policy policy (make_policy (dc, richloc));
++    ASSERT_EQ (cpp_display_width (pi, strlen (pi), policy), 8);
++    ASSERT_EQ (cpp_display_width (emoji, strlen (emoji), policy), 16);
++    ASSERT_EQ (cpp_display_width (stray, strlen (stray), policy), 4);
++    ASSERT_EQ (cpp_display_width (max_codepoint, strlen (max_codepoint),
++				  policy),
++	       16);
++  }
++}
++
+ /* For precise tests of the layout, make clear where the source line will
+    start.  test_left_margin sets the total byte count from the left side of the
+    screen to the start of source lines, after the line number and the separator,
+@@ -2715,10 +2977,10 @@ test_layout_x_offset_display_utf8 (const
+   char_span lspan = location_get_source_line (tmp.get_filename (), 1);
+   ASSERT_EQ (line_display_cols,
+ 	     cpp_display_width (lspan.get_buffer (), lspan.length (),
+-				def_tabstop));
++				def_policy ()));
+   ASSERT_EQ (line_display_cols,
+ 	     location_compute_display_column (expand_location (line_end),
+-					      def_tabstop));
++					      def_policy ()));
+   ASSERT_EQ (0, memcmp (lspan.get_buffer () + (emoji_col - 1),
+ 			"\xf0\x9f\x98\x82\xf0\x9f\x98\x82", 8));
+ 
+@@ -2866,12 +3128,13 @@ test_layout_x_offset_display_tab (const
+   ASSERT_EQ ('\t', *(lspan.get_buffer () + (tab_col - 1)));
+   for (int tabstop = 1; tabstop != num_tabstops; ++tabstop)
+     {
++      cpp_char_column_policy policy (tabstop, cpp_wcwidth);
+       ASSERT_EQ (line_bytes + extra_width[tabstop],
+ 		 cpp_display_width (lspan.get_buffer (), lspan.length (),
+-				    tabstop));
++				    policy));
+       ASSERT_EQ (line_bytes + extra_width[tabstop],
+ 		 location_compute_display_column (expand_location (line_end),
+-						  tabstop));
++						  policy));
+     }
+ 
+   /* Check that the tab is expanded to the expected number of spaces.  */
+@@ -4003,6 +4266,43 @@ test_one_liner_labels_utf8 ()
+ 			   " bb\xf0\x9f\x98\x82\xf0\x9f\x98\x82\n",
+ 		  pp_formatted_text (dc.printer));
+   }
++
++  /* Example of escaping the source lines.  */
++  {
++    text_range_label label0 ("label 0\xf0\x9f\x98\x82");
++    text_range_label label1 ("label 1\xcf\x80");
++    text_range_label label2 ("label 2\xcf\x80");
++    gcc_rich_location richloc (foo, &label0);
++    richloc.add_range (bar, SHOW_RANGE_WITHOUT_CARET, &label1);
++    richloc.add_range (field, SHOW_RANGE_WITHOUT_CARET, &label2);
++    richloc.set_escape_on_output (true);
++
++    {
++      test_diagnostic_context dc;
++      dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_UNICODE;
++      diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++      ASSERT_STREQ (" <U+1F602>_foo = <U+03C0>_bar.<U+1F602>_field<U+03C0>;\n"
++		    " ^~~~~~~~~~~~~   ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~\n"
++		    " |               |            |\n"
++		    " |               |            label 2\xcf\x80\n"
++		    " |               label 1\xcf\x80\n"
++		    " label 0\xf0\x9f\x98\x82\n",
++		    pp_formatted_text (dc.printer));
++    }
++    {
++      test_diagnostic_context dc;
++      dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_BYTES;
++      diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++      ASSERT_STREQ
++	(" <f0><9f><98><82>_foo = <cf><80>_bar.<f0><9f><98><82>_field<cf><80>;\n"
++	 " ^~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
++	 " |                      |            |\n"
++	 " |                      |            label 2\xcf\x80\n"
++	 " |                      label 1\xcf\x80\n"
++	 " label 0\xf0\x9f\x98\x82\n",
++	 pp_formatted_text (dc.printer));
++    }
++  }
+ }
+ 
+ /* Make sure that colorization codes don't interrupt a multibyte
+@@ -4057,9 +4357,9 @@ test_diagnostic_show_locus_one_liner_utf
+ 
+   char_span lspan = location_get_source_line (tmp.get_filename (), 1);
+   ASSERT_EQ (25, cpp_display_width (lspan.get_buffer (), lspan.length (),
+-				    def_tabstop));
++				    def_policy ()));
+   ASSERT_EQ (25, location_compute_display_column (expand_location (line_end),
+-						  def_tabstop));
++						  def_policy ()));
+ 
+   test_one_liner_simple_caret_utf8 ();
+   test_one_liner_caret_and_range_utf8 ();
+@@ -4445,30 +4745,31 @@ test_overlapped_fixit_printing (const li
+ 		  pp_formatted_text (dc.printer));
+ 
+     /* Unit-test the line_corrections machinery.  */
++    char_display_policy policy (make_policy (dc, richloc));
+     ASSERT_EQ (3, richloc.get_num_fixit_hints ());
+     const fixit_hint *hint_0 = richloc.get_fixit_hint (0);
+     ASSERT_EQ (column_range (12, 12),
+-	       get_affected_range (&dc, hint_0, CU_BYTES));
++	       get_affected_range (policy, hint_0, CU_BYTES));
+     ASSERT_EQ (column_range (12, 12),
+-	       get_affected_range (&dc, hint_0, CU_DISPLAY_COLS));
+-    ASSERT_EQ (column_range (12, 22), get_printed_columns (&dc, hint_0));
++	       get_affected_range (policy, hint_0, CU_DISPLAY_COLS));
++    ASSERT_EQ (column_range (12, 22), get_printed_columns (policy, hint_0));
+     const fixit_hint *hint_1 = richloc.get_fixit_hint (1);
+     ASSERT_EQ (column_range (18, 18),
+-	       get_affected_range (&dc, hint_1, CU_BYTES));
++	       get_affected_range (policy, hint_1, CU_BYTES));
+     ASSERT_EQ (column_range (18, 18),
+-	       get_affected_range (&dc, hint_1, CU_DISPLAY_COLS));
+-    ASSERT_EQ (column_range (18, 20), get_printed_columns (&dc, hint_1));
++	       get_affected_range (policy, hint_1, CU_DISPLAY_COLS));
++    ASSERT_EQ (column_range (18, 20), get_printed_columns (policy, hint_1));
+     const fixit_hint *hint_2 = richloc.get_fixit_hint (2);
+     ASSERT_EQ (column_range (29, 28),
+-	       get_affected_range (&dc, hint_2, CU_BYTES));
++	       get_affected_range (policy, hint_2, CU_BYTES));
+     ASSERT_EQ (column_range (29, 28),
+-	       get_affected_range (&dc, hint_2, CU_DISPLAY_COLS));
+-    ASSERT_EQ (column_range (29, 29), get_printed_columns (&dc, hint_2));
++	       get_affected_range (policy, hint_2, CU_DISPLAY_COLS));
++    ASSERT_EQ (column_range (29, 29), get_printed_columns (policy, hint_2));
+ 
+     /* Add each hint in turn to a line_corrections instance,
+        and verify that they are consolidated into one correction instance
+        as expected.  */
+-    line_corrections lc (&dc, tmp.get_filename (), 1);
++    line_corrections lc (policy, tmp.get_filename (), 1);
+ 
+     /* The first replace hint by itself.  */
+     lc.add_hint (hint_0);
+@@ -4660,30 +4961,31 @@ test_overlapped_fixit_printing_utf8 (con
+ 		  pp_formatted_text (dc.printer));
+ 
+     /* Unit-test the line_corrections machinery.  */
++    char_display_policy policy (make_policy (dc, richloc));
+     ASSERT_EQ (3, richloc.get_num_fixit_hints ());
+     const fixit_hint *hint_0 = richloc.get_fixit_hint (0);
+     ASSERT_EQ (column_range (14, 14),
+-	       get_affected_range (&dc, hint_0, CU_BYTES));
++	       get_affected_range (policy, hint_0, CU_BYTES));
+     ASSERT_EQ (column_range (12, 12),
+-	       get_affected_range (&dc, hint_0, CU_DISPLAY_COLS));
+-    ASSERT_EQ (column_range (12, 22), get_printed_columns (&dc, hint_0));
++	       get_affected_range (policy, hint_0, CU_DISPLAY_COLS));
++    ASSERT_EQ (column_range (12, 22), get_printed_columns (policy, hint_0));
+     const fixit_hint *hint_1 = richloc.get_fixit_hint (1);
+     ASSERT_EQ (column_range (22, 22),
+-	       get_affected_range (&dc, hint_1, CU_BYTES));
++	       get_affected_range (policy, hint_1, CU_BYTES));
+     ASSERT_EQ (column_range (18, 18),
+-	       get_affected_range (&dc, hint_1, CU_DISPLAY_COLS));
+-    ASSERT_EQ (column_range (18, 20), get_printed_columns (&dc, hint_1));
++	       get_affected_range (policy, hint_1, CU_DISPLAY_COLS));
++    ASSERT_EQ (column_range (18, 20), get_printed_columns (policy, hint_1));
+     const fixit_hint *hint_2 = richloc.get_fixit_hint (2);
+     ASSERT_EQ (column_range (35, 34),
+-	       get_affected_range (&dc, hint_2, CU_BYTES));
++	       get_affected_range (policy, hint_2, CU_BYTES));
+     ASSERT_EQ (column_range (30, 29),
+-	       get_affected_range (&dc, hint_2, CU_DISPLAY_COLS));
+-    ASSERT_EQ (column_range (30, 30), get_printed_columns (&dc, hint_2));
++	       get_affected_range (policy, hint_2, CU_DISPLAY_COLS));
++    ASSERT_EQ (column_range (30, 30), get_printed_columns (policy, hint_2));
+ 
+     /* Add each hint in turn to a line_corrections instance,
+        and verify that they are consolidated into one correction instance
+        as expected.  */
+-    line_corrections lc (&dc, tmp.get_filename (), 1);
++    line_corrections lc (policy, tmp.get_filename (), 1);
+ 
+     /* The first replace hint by itself.  */
+     lc.add_hint (hint_0);
+@@ -4877,15 +5179,16 @@ test_overlapped_fixit_printing_2 (const
+     richloc.add_fixit_insert_before (col_21, "}");
+ 
+     /* These fixits should be accepted; they can't be consolidated.  */
++    char_display_policy policy (make_policy (dc, richloc));
+     ASSERT_EQ (2, richloc.get_num_fixit_hints ());
+     const fixit_hint *hint_0 = richloc.get_fixit_hint (0);
+     ASSERT_EQ (column_range (23, 22),
+-	       get_affected_range (&dc, hint_0, CU_BYTES));
+-    ASSERT_EQ (column_range (23, 23), get_printed_columns (&dc, hint_0));
++	       get_affected_range (policy, hint_0, CU_BYTES));
++    ASSERT_EQ (column_range (23, 23), get_printed_columns (policy, hint_0));
+     const fixit_hint *hint_1 = richloc.get_fixit_hint (1);
+     ASSERT_EQ (column_range (21, 20),
+-	       get_affected_range (&dc, hint_1, CU_BYTES));
+-    ASSERT_EQ (column_range (21, 21), get_printed_columns (&dc, hint_1));
++	       get_affected_range (policy, hint_1, CU_BYTES));
++    ASSERT_EQ (column_range (21, 21), get_printed_columns (policy, hint_1));
+ 
+     /* Verify that they're printed correctly.  */
+     diagnostic_show_locus (&dc, &richloc, DK_ERROR);
+@@ -5152,10 +5455,11 @@ test_tab_expansion (const line_table_cas
+      ....................123 45678901234 56789012345  columns  */
+ 
+   const int tabstop = 8;
++  cpp_char_column_policy policy (tabstop, cpp_wcwidth);
+   const int first_non_ws_byte_col = 7;
+   const int right_quote_byte_col = 15;
+   const int last_byte_col = 25;
+-  ASSERT_EQ (35, cpp_display_width (content, last_byte_col, tabstop));
++  ASSERT_EQ (35, cpp_display_width (content, last_byte_col, policy));
+ 
+   temp_source_file tmp (SELFTEST_LOCATION, ".c", content);
+   line_table_test ltt (case_);
+@@ -5198,6 +5502,114 @@ test_tab_expansion (const line_table_cas
+   }
+ }
+ 
++/* Verify that the escaping machinery can cope with a variety of different
++   invalid bytes.  */
++
++static void
++test_escaping_bytes_1 (const line_table_case &case_)
++{
++  const char content[] = "before\0\1\2\3\r\x80\xff""after\n";
++  const size_t sz = sizeof (content);
++  temp_source_file tmp (SELFTEST_LOCATION, ".c", content, sz);
++  line_table_test ltt (case_);
++  const line_map_ordinary *ord_map = linemap_check_ordinary
++    (linemap_add (line_table, LC_ENTER, false, tmp.get_filename (), 0));
++  linemap_line_start (line_table, 1, 100);
++
++  location_t finish
++    = linemap_position_for_line_and_column (line_table, ord_map, 1,
++					    strlen (content));
++
++  if (finish > LINE_MAP_MAX_LOCATION_WITH_COLS)
++    return;
++
++  /* Locations of the NUL and \r bytes.  */
++  location_t nul_loc
++    = linemap_position_for_line_and_column (line_table, ord_map, 1, 7);
++  location_t r_loc
++    = linemap_position_for_line_and_column (line_table, ord_map, 1, 11);
++  gcc_rich_location richloc (nul_loc);
++  richloc.add_range (r_loc);
++
++  {
++    test_diagnostic_context dc;
++    diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++    ASSERT_STREQ (" before \1\2\3 \x80\xff""after\n"
++		  "       ^   ~\n",
++		  pp_formatted_text (dc.printer));
++  }
++  richloc.set_escape_on_output (true);
++  {
++    test_diagnostic_context dc;
++    dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_UNICODE;
++    diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++    ASSERT_STREQ
++      (" before<U+0000><U+0001><U+0002><U+0003><U+000D><80><ff>after\n"
++       "       ^~~~~~~~                        ~~~~~~~~\n",
++       pp_formatted_text (dc.printer));
++  }
++  {
++    test_diagnostic_context dc;
++    dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_BYTES;
++    diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++    ASSERT_STREQ (" before<00><01><02><03><0d><80><ff>after\n"
++		  "       ^~~~            ~~~~\n",
++		  pp_formatted_text (dc.printer));
++  }
++}
++
++/* As above, but verify that we handle the initial byte of a line
++   correctly.  */
++
++static void
++test_escaping_bytes_2 (const line_table_case &case_)
++{
++  const char content[]  = "\0after\n";
++  const size_t sz = sizeof (content);
++  temp_source_file tmp (SELFTEST_LOCATION, ".c", content, sz);
++  line_table_test ltt (case_);
++  const line_map_ordinary *ord_map = linemap_check_ordinary
++    (linemap_add (line_table, LC_ENTER, false, tmp.get_filename (), 0));
++  linemap_line_start (line_table, 1, 100);
++
++  location_t finish
++    = linemap_position_for_line_and_column (line_table, ord_map, 1,
++					    strlen (content));
++
++  if (finish > LINE_MAP_MAX_LOCATION_WITH_COLS)
++    return;
++
++  /* Location of the NUL byte.  */
++  location_t nul_loc
++    = linemap_position_for_line_and_column (line_table, ord_map, 1, 1);
++  gcc_rich_location richloc (nul_loc);
++
++  {
++    test_diagnostic_context dc;
++    diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++    ASSERT_STREQ ("  after\n"
++		  " ^\n",
++		  pp_formatted_text (dc.printer));
++  }
++  richloc.set_escape_on_output (true);
++  {
++    test_diagnostic_context dc;
++    dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_UNICODE;
++    diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++    ASSERT_STREQ (" <U+0000>after\n"
++		  " ^~~~~~~~\n",
++		  pp_formatted_text (dc.printer));
++  }
++  {
++    test_diagnostic_context dc;
++    dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_BYTES;
++    diagnostic_show_locus (&dc, &richloc, DK_ERROR);
++    ASSERT_STREQ (" <00>after\n"
++		  " ^~~~\n",
++		  pp_formatted_text (dc.printer));
++  }
++}
++
+ /* Verify that line numbers are correctly printed for the case of
+    a multiline range in which the width of the line numbers changes
+    (e.g. from "9" to "10").  */
+@@ -5254,6 +5666,8 @@ diagnostic_show_locus_c_tests ()
+   test_layout_range_for_single_line ();
+   test_layout_range_for_multiple_lines ();
+ 
++  test_display_widths ();
++
+   for_each_line_table_case (test_layout_x_offset_display_utf8);
+   for_each_line_table_case (test_layout_x_offset_display_tab);
+ 
+@@ -5274,6 +5688,8 @@ diagnostic_show_locus_c_tests ()
+   for_each_line_table_case (test_fixit_replace_containing_newline);
+   for_each_line_table_case (test_fixit_deletion_affecting_newline);
+   for_each_line_table_case (test_tab_expansion);
++  for_each_line_table_case (test_escaping_bytes_1);
++  for_each_line_table_case (test_escaping_bytes_2);
+ 
+   test_line_numbers_multiline_range ();
+ }
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+--- a/gcc/doc/invoke.texi	2021-12-13 23:23:05.764437151 -0800
++++ b/gcc/doc/invoke.texi	2021-12-14 01:16:01.553943061 -0800
+@@ -312,7 +312,8 @@ Objective-C and Objective-C++ Dialects}.
+ -fdiagnostics-show-path-depths @gol
+ -fno-show-column @gol
+ -fdiagnostics-column-unit=@r{[}display@r{|}byte@r{]} @gol
+--fdiagnostics-column-origin=@var{origin}}
++-fdiagnostics-column-origin=@var{origin} @gol
++-fdiagnostics-escape-format=@r{[}unicode@r{|}bytes@r{]}}
+ 
+ @item Warning Options
+ @xref{Warning Options,,Options to Request or Suppress Warnings}.
+@@ -5083,6 +5084,38 @@ first column.  The default value of 1 co
+ behavior and to the GNU style guide.  Some utilities may perform better with an
+ origin of 0; any non-negative value may be specified.
+ 
++@item -fdiagnostics-escape-format=@var{FORMAT}
++@opindex fdiagnostics-escape-format
++When GCC prints pertinent source lines for a diagnostic it normally attempts
++to print the source bytes directly.  However, some diagnostics relate to encoding
++issues in the source file, such as malformed UTF-8, or issues with Unicode
++normalization.  These diagnostics are flagged so that GCC will escape bytes
++that are not printable ASCII when printing their pertinent source lines.
++
++This option controls how such bytes should be escaped.
++
++The default @var{FORMAT}, @samp{unicode} displays Unicode characters that
++are not printable ASCII in the form @samp{<U+XXXX>}, and bytes that do not
++correspond to a Unicode character validly-encoded in UTF-8-encoded will be
++displayed as hexadecimal in the form @samp{<XX>}.
++
++For example, a source line containing the string @samp{before} followed by the
++Unicode character U+03C0 (``GREEK SMALL LETTER PI'', with UTF-8 encoding
++0xCF 0x80) followed by the byte 0xBF (a stray UTF-8 trailing byte), followed by
++the string @samp{after} will be printed for such a diagnostic as:
++
++@smallexample
++ before<U+03C0><BF>after
++@end smallexample
++
++Setting @var{FORMAT} to @samp{bytes} will display all non-printable-ASCII bytes
++in the form @samp{<XX>}, thus showing the underlying encoding of non-ASCII
++Unicode characters.  For the example above, the following will be printed:
++
++@smallexample
++ before<CF><80><BF>after
++@end smallexample
++
+ @item -fdiagnostics-format=@var{FORMAT}
+ @opindex fdiagnostics-format
+ Select a different format for printing diagnostics.
+@@ -5150,9 +5183,11 @@ might be printed in JSON form (after for
+                         @}
+                     @}
+                 ],
++                "escape-source": false,
+                 "message": "...this statement, but the latter is @dots{}"
+             @}
+         ]
++	"escape-source": false,
+ 	"column-origin": 1,
+     @},
+     @dots{}
+@@ -5239,6 +5274,7 @@ of the expression, which have labels.  I
+                 "label": "T @{aka struct t@}"
+             @}
+         ],
++        "escape-source": false,
+         "message": "invalid operands to binary + @dots{}"
+     @}
+ @end smallexample
+@@ -5292,6 +5328,7 @@ might be printed in JSON form as:
+                 @}
+             @}
+         ],
++        "escape-source": false,
+         "message": "\u2018struct s\u2019 has no member named @dots{}"
+     @}
+ @end smallexample
+@@ -5349,6 +5386,10 @@ For example, the intraprocedural example
+     ]
+ @end smallexample
+ 
++Diagnostics have a boolean attribute @code{escape-source}, hinting whether
++non-ASCII bytes should be escaped when printing the pertinent lines of
++source code (@code{true} for diagnostics involving source encoding issues).
++
+ @end table
+ 
+ @node Warning Options
+diff --git a/gcc/input.c b/gcc/input.c
+--- a/gcc/input.c	2021-07-27 23:55:07.328287915 -0700
++++ b/gcc/input.c	2021-12-14 01:16:01.553943061 -0800
+@@ -913,7 +913,8 @@ make_location (location_t caret, source_
+    source line in order to calculate the display width.  If that cannot be done
+    for any reason, then returns the byte column as a fallback.  */
+ int
+-location_compute_display_column (expanded_location exploc, int tabstop)
++location_compute_display_column (expanded_location exploc,
++				 const cpp_char_column_policy &policy)
+ {
+   if (!(exploc.file && *exploc.file && exploc.line && exploc.column))
+     return exploc.column;
+@@ -921,7 +922,7 @@ location_compute_display_column (expande
+   /* If line is NULL, this function returns exploc.column which is the
+      desired fallback.  */
+   return cpp_byte_column_to_display_column (line.get_buffer (), line.length (),
+-					    exploc.column, tabstop);
++					    exploc.column, policy);
+ }
+ 
+ /* Dump statistics to stderr about the memory usage of the line_table
+@@ -3611,43 +3612,50 @@ test_line_offset_overflow ()
+ void test_cpp_utf8 ()
+ {
+   const int def_tabstop = 8;
++  cpp_char_column_policy policy (def_tabstop, cpp_wcwidth);
++
+   /* Verify that wcwidth of invalid UTF-8 or control bytes is 1.  */
+   {
+-    int w_bad = cpp_display_width ("\xf0!\x9f!\x98!\x82!", 8, def_tabstop);
++    int w_bad = cpp_display_width ("\xf0!\x9f!\x98!\x82!", 8, policy);
+     ASSERT_EQ (8, w_bad);
+-    int w_ctrl = cpp_display_width ("\r\n\v\0\1", 5, def_tabstop);
++    int w_ctrl = cpp_display_width ("\r\n\v\0\1", 5, policy);
+     ASSERT_EQ (5, w_ctrl);
+   }
+ 
+   /* Verify that wcwidth of valid UTF-8 is as expected.  */
+   {
+-    const int w_pi = cpp_display_width ("\xcf\x80", 2, def_tabstop);
++    const int w_pi = cpp_display_width ("\xcf\x80", 2, policy);
+     ASSERT_EQ (1, w_pi);
+-    const int w_emoji = cpp_display_width ("\xf0\x9f\x98\x82", 4, def_tabstop);
++    const int w_emoji = cpp_display_width ("\xf0\x9f\x98\x82", 4, policy);
+     ASSERT_EQ (2, w_emoji);
+     const int w_umlaut_precomposed = cpp_display_width ("\xc3\xbf", 2,
+-							def_tabstop);
++							policy);
+     ASSERT_EQ (1, w_umlaut_precomposed);
+     const int w_umlaut_combining = cpp_display_width ("y\xcc\x88", 3,
+-						      def_tabstop);
++						      policy);
+     ASSERT_EQ (1, w_umlaut_combining);
+-    const int w_han = cpp_display_width ("\xe4\xb8\xba", 3, def_tabstop);
++    const int w_han = cpp_display_width ("\xe4\xb8\xba", 3, policy);
+     ASSERT_EQ (2, w_han);
+-    const int w_ascii = cpp_display_width ("GCC", 3, def_tabstop);
++    const int w_ascii = cpp_display_width ("GCC", 3, policy);
+     ASSERT_EQ (3, w_ascii);
+     const int w_mixed = cpp_display_width ("\xcf\x80 = 3.14 \xf0\x9f\x98\x82"
+ 					   "\x9f! \xe4\xb8\xba y\xcc\x88",
+-					   24, def_tabstop);
++					   24, policy);
+     ASSERT_EQ (18, w_mixed);
+   }
+ 
+   /* Verify that display width properly expands tabs.  */
+   {
+     const char *tstr = "\tabc\td";
+-    ASSERT_EQ (6, cpp_display_width (tstr, 6, 1));
+-    ASSERT_EQ (10, cpp_display_width (tstr, 6, 3));
+-    ASSERT_EQ (17, cpp_display_width (tstr, 6, 8));
+-    ASSERT_EQ (1, cpp_display_column_to_byte_column (tstr, 6, 7, 8));
++    ASSERT_EQ (6, cpp_display_width (tstr, 6,
++				     cpp_char_column_policy (1, cpp_wcwidth)));
++    ASSERT_EQ (10, cpp_display_width (tstr, 6,
++				      cpp_char_column_policy (3, cpp_wcwidth)));
++    ASSERT_EQ (17, cpp_display_width (tstr, 6,
++				      cpp_char_column_policy (8, cpp_wcwidth)));
++    ASSERT_EQ (1,
++	       cpp_display_column_to_byte_column
++		 (tstr, 6, 7, cpp_char_column_policy (8, cpp_wcwidth)));
+   }
+ 
+   /* Verify that cpp_byte_column_to_display_column can go past the end,
+@@ -3660,13 +3668,13 @@ void test_cpp_utf8 ()
+       /* 111122223456
+ 	 Byte columns.  */
+ 
+-    ASSERT_EQ (5, cpp_display_width (str, 6, def_tabstop));
++    ASSERT_EQ (5, cpp_display_width (str, 6, policy));
+     ASSERT_EQ (105,
+-	       cpp_byte_column_to_display_column (str, 6, 106, def_tabstop));
++	       cpp_byte_column_to_display_column (str, 6, 106, policy));
+     ASSERT_EQ (10000,
+-	       cpp_byte_column_to_display_column (NULL, 0, 10000, def_tabstop));
++	       cpp_byte_column_to_display_column (NULL, 0, 10000, policy));
+     ASSERT_EQ (0,
+-	       cpp_byte_column_to_display_column (NULL, 10000, 0, def_tabstop));
++	       cpp_byte_column_to_display_column (NULL, 10000, 0, policy));
+   }
+ 
+   /* Verify that cpp_display_column_to_byte_column can go past the end,
+@@ -3680,25 +3688,25 @@ void test_cpp_utf8 ()
+       /* 000000000000000000000000000000000111111
+ 	 111122223333444456666777788889999012345
+ 	 Byte columns.  */
+-    ASSERT_EQ (4, cpp_display_column_to_byte_column (str, 15, 2, def_tabstop));
++    ASSERT_EQ (4, cpp_display_column_to_byte_column (str, 15, 2, policy));
+     ASSERT_EQ (15,
+-	       cpp_display_column_to_byte_column (str, 15, 11, def_tabstop));
++	       cpp_display_column_to_byte_column (str, 15, 11, policy));
+     ASSERT_EQ (115,
+-	       cpp_display_column_to_byte_column (str, 15, 111, def_tabstop));
++	       cpp_display_column_to_byte_column (str, 15, 111, policy));
+     ASSERT_EQ (10000,
+-	       cpp_display_column_to_byte_column (NULL, 0, 10000, def_tabstop));
++	       cpp_display_column_to_byte_column (NULL, 0, 10000, policy));
+     ASSERT_EQ (0,
+-	       cpp_display_column_to_byte_column (NULL, 10000, 0, def_tabstop));
++	       cpp_display_column_to_byte_column (NULL, 10000, 0, policy));
+ 
+     /* Verify that we do not interrupt a UTF-8 sequence.  */
+-    ASSERT_EQ (4, cpp_display_column_to_byte_column (str, 15, 1, def_tabstop));
++    ASSERT_EQ (4, cpp_display_column_to_byte_column (str, 15, 1, policy));
+ 
+     for (int byte_col = 1; byte_col <= 15; ++byte_col)
+       {
+ 	const int disp_col
+-	  = cpp_byte_column_to_display_column (str, 15, byte_col, def_tabstop);
++	  = cpp_byte_column_to_display_column (str, 15, byte_col, policy);
+ 	const int byte_col2
+-	  = cpp_display_column_to_byte_column (str, 15, disp_col, def_tabstop);
++	  = cpp_display_column_to_byte_column (str, 15, disp_col, policy);
+ 
+ 	/* If we ask for the display column in the middle of a UTF-8
+ 	   sequence, it will return the length of the partial sequence,
+diff --git a/gcc/input.h b/gcc/input.h
+--- a/gcc/input.h	2021-07-27 23:55:07.328287915 -0700
++++ b/gcc/input.h	2021-12-14 01:16:01.553943061 -0800
+@@ -39,8 +39,11 @@ STATIC_ASSERT (BUILTINS_LOCATION < RESER
+ extern bool is_location_from_builtin_token (location_t);
+ extern expanded_location expand_location (location_t);
+ 
+-extern int location_compute_display_column (expanded_location exploc,
+-					    int tabstop);
++class cpp_char_column_policy;
++
++extern int
++location_compute_display_column (expanded_location exploc,
++				 const cpp_char_column_policy &policy);
+ 
+ /* A class capturing the bounds of a buffer, to allow for run-time
+    bounds-checking in a checked build.  */
+diff --git a/gcc/opts.c b/gcc/opts.c
+--- a/gcc/opts.c	2021-07-27 23:55:07.364288417 -0700
++++ b/gcc/opts.c	2021-12-14 01:16:01.553943061 -0800
+@@ -2573,6 +2573,10 @@ common_handle_option (struct gcc_options
+       dc->column_origin = value;
+       break;
+ 
++    case OPT_fdiagnostics_escape_format_:
++      dc->escape_format = (enum diagnostics_escape_format)value;
++      break;
++
+     case OPT_fdiagnostics_show_cwe:
+       dc->show_cwe = value;
+       break;
+diff --git a/gcc/selftest.c b/gcc/selftest.c
+--- a/gcc/selftest.c	2021-07-27 23:55:07.500290315 -0700
++++ b/gcc/selftest.c	2021-12-14 01:16:01.557942991 -0800
+@@ -193,6 +193,21 @@ temp_source_file::temp_source_file (cons
+   fclose (out);
+ }
+ 
++/* As above, but with a size, to allow for NUL bytes in CONTENT.  */
++
++temp_source_file::temp_source_file (const location &loc,
++				    const char *suffix,
++				    const char *content,
++				    size_t sz)
++: named_temp_file (suffix)
++{
++  FILE *out = fopen (get_filename (), "w");
++  if (!out)
++    fail_formatted (loc, "unable to open tempfile: %s", get_filename ());
++  fwrite (content, sz, 1, out);
++  fclose (out);
++}
++
+ /* Avoid introducing locale-specific differences in the results
+    by hardcoding open_quote and close_quote.  */
+ 
+diff --git a/gcc/selftest.h b/gcc/selftest.h
+--- a/gcc/selftest.h	2021-07-27 23:55:07.500290315 -0700
++++ b/gcc/selftest.h	2021-12-14 01:16:01.557942991 -0800
+@@ -112,6 +112,8 @@ class temp_source_file : public named_te
+  public:
+   temp_source_file (const location &loc, const char *suffix,
+ 		    const char *content);
++  temp_source_file (const location &loc, const char *suffix,
++		    const char *content, size_t sz);
+ };
+ 
+ /* RAII-style class for avoiding introducing locale-specific differences
+diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c
+--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c	2021-07-27 23:55:07.596291654 -0700
++++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-1.c	2021-12-14 01:16:01.557942991 -0800
+@@ -9,6 +9,7 @@
+ 
+ /* { dg-regexp "\"kind\": \"error\"" } */
+ /* { dg-regexp "\"column-origin\": 1" } */
++/* { dg-regexp "\"escape-source\": false" } */
+ /* { dg-regexp "\"message\": \"#error message\"" } */
+ 
+ /* { dg-regexp "\"caret\": \{" } */
+diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c
+--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c	2021-07-27 23:55:07.596291654 -0700
++++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-2.c	2021-12-14 01:16:01.557942991 -0800
+@@ -9,6 +9,7 @@
+ 
+ /* { dg-regexp "\"kind\": \"warning\"" } */
+ /* { dg-regexp "\"column-origin\": 1" } */
++/* { dg-regexp "\"escape-source\": false" } */
+ /* { dg-regexp "\"message\": \"#warning message\"" } */
+ /* { dg-regexp "\"option\": \"-Wcpp\"" } */
+ /* { dg-regexp "\"option_url\": \"https:\[^\n\r\"\]*#index-Wcpp\"" } */
+diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c
+--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c	2021-07-27 23:55:07.596291654 -0700
++++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-3.c	2021-12-14 01:16:01.557942991 -0800
+@@ -9,6 +9,7 @@
+ 
+ /* { dg-regexp "\"kind\": \"error\"" } */
+ /* { dg-regexp "\"column-origin\": 1" } */
++/* { dg-regexp "\"escape-source\": false" } */
+ /* { dg-regexp "\"message\": \"#warning message\"" } */
+ /* { dg-regexp "\"option\": \"-Werror=cpp\"" } */
+ /* { dg-regexp "\"option_url\": \"https:\[^\n\r\"\]*#index-Wcpp\"" } */
+diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c
+--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c	2021-07-27 23:55:07.596291654 -0700
++++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-4.c	2021-12-14 01:16:01.557942991 -0800
+@@ -19,6 +19,7 @@ int test (void)
+ 
+ /* { dg-regexp "\"kind\": \"note\"" } */
+ /* { dg-regexp "\"message\": \"...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'\"" } */
++/* { dg-regexp "\"escape-source\": false" } */
+ 
+ /* { dg-regexp "\"caret\": \{" } */
+ /* { dg-regexp "\"file\": \"\[^\n\r\"\]*diagnostic-format-json-4.c\"" } */
+@@ -39,6 +40,7 @@ int test (void)
+ /* { dg-regexp "\"kind\": \"warning\"" } */
+ /* { dg-regexp "\"column-origin\": 1" } */
+ /* { dg-regexp "\"message\": \"this 'if' clause does not guard...\"" } */
++/* { dg-regexp "\"escape-source\": false" } */
+ /* { dg-regexp "\"option\": \"-Wmisleading-indentation\"" } */
+ /* { dg-regexp "\"option_url\": \"https:\[^\n\r\"\]*#index-Wmisleading-indentation\"" } */
+ 
+diff --git a/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c b/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c
+--- a/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c	2021-07-27 23:55:07.596291654 -0700
++++ b/gcc/testsuite/c-c++-common/diagnostic-format-json-5.c	2021-12-14 01:16:01.557942991 -0800
+@@ -14,6 +14,7 @@ int test (struct s *ptr)
+ 
+ /* { dg-regexp "\"kind\": \"error\"" } */
+ /* { dg-regexp "\"column-origin\": 1" } */
++/* { dg-regexp "\"escape-source\": false" } */
+ /* { dg-regexp "\"message\": \".*\"" } */
+ 
+ /* Verify fix-it hints.  */
+diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c
+--- a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-bytes.c	2021-12-14 01:16:01.557942991 -0800
+@@ -0,0 +1,21 @@
++// { dg-do preprocess }
++// { dg-options "-std=gnu99 -Werror=normalized=nfc -fdiagnostics-show-caret -fdiagnostics-escape-format=bytes" }
++/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
++
++/* འ= U+0F43 TIBETAN LETTER GHA, which has decomposition "0F42 0FB7" i.e.
++   U+0F42 TIBETAN LETTER GA: à½
++   U+0FB7 TIBETAN SUBJOINED LETTER HA: ྷ
++
++   The UTF-8 encoding of U+0F43 TIBETAN LETTER GHA is: E0 BD 83.  */
++
++foo before_\u0F43_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
++/* { dg-begin-multiline-output "" }
++ foo before_\u0F43_after bar
++     ^~~~~~~~~~~~~~~~~~~
++   { dg-end-multiline-output "" } */
++
++foo before_à½_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
++/* { dg-begin-multiline-output "" }
++ foo before_<e0><bd><83>_after bar
++     ^~~~~~~~~~~~~~~~~~~~~~~~~
++   { dg-end-multiline-output "" } */
+diff --git a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c
+--- a/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.dg/cpp/warn-normalized-4-unicode.c	2021-12-14 01:16:01.557942991 -0800
+@@ -0,0 +1,19 @@
++// { dg-do preprocess }
++// { dg-options "-std=gnu99 -Werror=normalized=nfc -fdiagnostics-show-caret -fdiagnostics-escape-format=unicode" }
++/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
++
++/* འ= U+0F43 TIBETAN LETTER GHA, which has decomposition "0F42 0FB7" i.e.
++   U+0F42 TIBETAN LETTER GA: à½
++   U+0FB7 TIBETAN SUBJOINED LETTER HA: ྷ  */
++
++foo before_\u0F43_after bar  // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
++/* { dg-begin-multiline-output "" }
++ foo before_\u0F43_after bar
++     ^~~~~~~~~~~~~~~~~~~
++   { dg-end-multiline-output "" } */
++
++foo before_à½_after bar // { dg-error "`before_.U00000f43_after' is not in NFC .-Werror=normalized=." }
++/* { dg-begin-multiline-output "" }
++ foo before_<U+0F43>_after bar
++     ^~~~~~~~~~~~~~~~~~~~~
++   { dg-end-multiline-output "" } */
+diff --git a/gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F90 b/gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F90
+--- a/gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F90	2021-07-27 23:55:08.472303878 -0700
++++ b/gcc/testsuite/gfortran.dg/diagnostic-format-json-1.F90	2021-12-14 01:16:01.557942991 -0800
+@@ -9,6 +9,7 @@
+ 
+ ! { dg-regexp "\"kind\": \"error\"" }
+ ! { dg-regexp "\"column-origin\": 1" }
++! { dg-regexp "\"escape-source\": false" }
+ ! { dg-regexp "\"message\": \"#error message\"" }
+ 
+ ! { dg-regexp "\"caret\": \{" }
+diff --git a/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90 b/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90
+--- a/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90	2021-07-27 23:55:08.472303878 -0700
++++ b/gcc/testsuite/gfortran.dg/diagnostic-format-json-2.F90	2021-12-14 01:16:01.557942991 -0800
+@@ -9,6 +9,7 @@
+ 
+ ! { dg-regexp "\"kind\": \"warning\"" }
+ ! { dg-regexp "\"column-origin\": 1" }
++! { dg-regexp "\"escape-source\": false" }
+ ! { dg-regexp "\"message\": \"#warning message\"" }
+ ! { dg-regexp "\"option\": \"-Wcpp\"" }
+ ! { dg-regexp "\"option_url\": \"\[^\n\r\"\]*#index-Wcpp\"" }
+diff --git a/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90 b/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90
+--- a/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90	2021-07-27 23:55:08.472303878 -0700
++++ b/gcc/testsuite/gfortran.dg/diagnostic-format-json-3.F90	2021-12-14 01:16:01.557942991 -0800
+@@ -9,6 +9,7 @@
+ 
+ ! { dg-regexp "\"kind\": \"error\"" }
+ ! { dg-regexp "\"column-origin\": 1" }
++! { dg-regexp "\"escape-source\": false" }
+ ! { dg-regexp "\"message\": \"#warning message\"" }
+ ! { dg-regexp "\"option\": \"-Werror=cpp\"" }
+ ! { dg-regexp "\"option_url\": \"\[^\n\r\"\]*#index-Wcpp\"" }
+diff --git a/libcpp/charset.c b/libcpp/charset.c
+--- a/libcpp/charset.c	2021-07-27 23:55:08.712307227 -0700
++++ b/libcpp/charset.c	2021-12-14 01:16:01.557942991 -0800
+@@ -1552,12 +1552,14 @@ convert_escape (cpp_reader *pfile, const
+ 		   "unknown escape sequence: '\\%c'", (int) c);
+       else
+ 	{
++	  encoding_rich_location rich_loc (pfile);
++
+ 	  /* diagnostic.c does not support "%03o".  When it does, this
+ 	     code can use %03o directly in the diagnostic again.  */
+ 	  char buf[32];
+ 	  sprintf(buf, "%03o", (int) c);
+-	  cpp_error (pfile, CPP_DL_PEDWARN,
+-		     "unknown escape sequence: '\\%s'", buf);
++	  cpp_error_at (pfile, CPP_DL_PEDWARN, &rich_loc,
++			"unknown escape sequence: '\\%s'", buf);
+ 	}
+     }
+ 
+@@ -2280,14 +2282,16 @@ cpp_string_location_reader::get_next ()
+ }
+ 
+ cpp_display_width_computation::
+-cpp_display_width_computation (const char *data, int data_length, int tabstop) :
++cpp_display_width_computation (const char *data, int data_length,
++			       const cpp_char_column_policy &policy) :
+   m_begin (data),
+   m_next (m_begin),
+   m_bytes_left (data_length),
+-  m_tabstop (tabstop),
++  m_policy (policy),
+   m_display_cols (0)
+ {
+-  gcc_assert (m_tabstop > 0);
++  gcc_assert (policy.m_tabstop > 0);
++  gcc_assert (policy.m_width_cb);
+ }
+ 
+ 
+@@ -2299,19 +2303,28 @@ cpp_display_width_computation (const cha
+    point to a valid UTF-8-encoded sequence, then it will be treated as a single
+    byte with display width 1.  m_cur_display_col is the current display column,
+    relative to which tab stops should be expanded.  Returns the display width of
+-   the codepoint just processed.  */
++   the codepoint just processed.
++   If OUT is non-NULL, it is populated.  */
+ 
+ int
+-cpp_display_width_computation::process_next_codepoint ()
++cpp_display_width_computation::process_next_codepoint (cpp_decoded_char *out)
+ {
+   cppchar_t c;
+   int next_width;
+ 
++  if (out)
++    out->m_start_byte = m_next;
++
+   if (*m_next == '\t')
+     {
+       ++m_next;
+       --m_bytes_left;
+-      next_width = m_tabstop - (m_display_cols % m_tabstop);
++      next_width = m_policy.m_tabstop - (m_display_cols % m_policy.m_tabstop);
++      if (out)
++	{
++	  out->m_ch = '\t';
++	  out->m_valid_ch = true;
++	}
+     }
+   else if (one_utf8_to_cppchar ((const uchar **) &m_next, &m_bytes_left, &c)
+ 	   != 0)
+@@ -2321,14 +2334,24 @@ cpp_display_width_computation::process_n
+ 	 of one.  */
+       ++m_next;
+       --m_bytes_left;
+-      next_width = 1;
++      next_width = m_policy.m_undecoded_byte_width;
++      if (out)
++	out->m_valid_ch = false;
+     }
+   else
+     {
+       /*  one_utf8_to_cppchar() has updated m_next and m_bytes_left for us.  */
+-      next_width = cpp_wcwidth (c);
++      next_width = m_policy.m_width_cb (c);
++      if (out)
++	{
++	  out->m_ch = c;
++	  out->m_valid_ch = true;
++	}
+     }
+ 
++  if (out)
++    out->m_next_byte = m_next;
++
+   m_display_cols += next_width;
+   return next_width;
+ }
+@@ -2344,7 +2367,7 @@ cpp_display_width_computation::advance_d
+   const int start = m_display_cols;
+   const int target = start + n;
+   while (m_display_cols < target && !done ())
+-    process_next_codepoint ();
++    process_next_codepoint (NULL);
+   return m_display_cols - start;
+ }
+ 
+@@ -2352,29 +2375,33 @@ cpp_display_width_computation::advance_d
+     how many display columns are occupied by the first COLUMN bytes.  COLUMN
+     may exceed DATA_LENGTH, in which case the phantom bytes at the end are
+     treated as if they have display width 1.  Tabs are expanded to the next tab
+-    stop, relative to the start of DATA.  */
++    stop, relative to the start of DATA, and non-printable-ASCII characters
++    will be escaped as per POLICY.  */
+ 
+ int
+ cpp_byte_column_to_display_column (const char *data, int data_length,
+-				   int column, int tabstop)
++				   int column,
++				   const cpp_char_column_policy &policy)
+ {
+   const int offset = MAX (0, column - data_length);
+-  cpp_display_width_computation dw (data, column - offset, tabstop);
++  cpp_display_width_computation dw (data, column - offset, policy);
+   while (!dw.done ())
+-    dw.process_next_codepoint ();
++    dw.process_next_codepoint (NULL);
+   return dw.display_cols_processed () + offset;
+ }
+ 
+ /*  For the string of length DATA_LENGTH bytes that begins at DATA, compute
+     the least number of bytes that will result in at least DISPLAY_COL display
+     columns.  The return value may exceed DATA_LENGTH if the entire string does
+-    not occupy enough display columns.  */
++    not occupy enough display columns.  Non-printable-ASCII characters
++    will be escaped as per POLICY.  */
+ 
+ int
+ cpp_display_column_to_byte_column (const char *data, int data_length,
+-				   int display_col, int tabstop)
++				   int display_col,
++				   const cpp_char_column_policy &policy)
+ {
+-  cpp_display_width_computation dw (data, data_length, tabstop);
++  cpp_display_width_computation dw (data, data_length, policy);
+   const int avail_display = dw.advance_display_cols (display_col);
+   return dw.bytes_processed () + MAX (0, display_col - avail_display);
+ }
+diff --git a/libcpp/errors.c b/libcpp/errors.c
+--- a/libcpp/errors.c	2021-07-27 23:55:08.712307227 -0700
++++ b/libcpp/errors.c	2021-12-14 01:16:01.557942991 -0800
+@@ -27,6 +27,31 @@ along with this program; see the file CO
+ #include "cpplib.h"
+ #include "internal.h"
+ 
++/* Get a location_t for the current location in PFILE,
++   generally that of the previously lexed token.  */
++
++location_t
++cpp_diagnostic_get_current_location (cpp_reader *pfile)
++{
++  if (CPP_OPTION (pfile, traditional))
++    {
++      if (pfile->state.in_directive)
++	return pfile->directive_line;
++      else
++	return pfile->line_table->highest_line;
++    }
++  /* We don't want to refer to a token before the beginning of the
++     current run -- that is invalid.  */
++  else if (pfile->cur_token == pfile->cur_run->base)
++    {
++      return 0;
++    }
++  else
++    {
++      return pfile->cur_token[-1].src_loc;
++    }
++}
++
+ /* Print a diagnostic at the given location.  */
+ 
+ ATTRIBUTE_FPTR_PRINTF(5,0)
+@@ -52,25 +77,7 @@ cpp_diagnostic (cpp_reader * pfile, enum
+ 		enum cpp_warning_reason reason,
+ 		const char *msgid, va_list *ap)
+ {
+-  location_t src_loc;
+-
+-  if (CPP_OPTION (pfile, traditional))
+-    {
+-      if (pfile->state.in_directive)
+-	src_loc = pfile->directive_line;
+-      else
+-	src_loc = pfile->line_table->highest_line;
+-    }
+-  /* We don't want to refer to a token before the beginning of the
+-     current run -- that is invalid.  */
+-  else if (pfile->cur_token == pfile->cur_run->base)
+-    {
+-      src_loc = 0;
+-    }
+-  else
+-    {
+-      src_loc = pfile->cur_token[-1].src_loc;
+-    }
++  location_t src_loc = cpp_diagnostic_get_current_location (pfile);
+   rich_location richloc (pfile->line_table, src_loc);
+   return cpp_diagnostic_at (pfile, level, reason, &richloc, msgid, ap);
+ }
+@@ -142,6 +149,43 @@ cpp_warning_syshdr (cpp_reader * pfile,
+ 
+   va_end (ap);
+   return ret;
++}
++
++/* As cpp_warning above, but use RICHLOC as the location of the diagnostic.  */
++
++bool cpp_warning_at (cpp_reader *pfile, enum cpp_warning_reason reason,
++		     rich_location *richloc, const char *msgid, ...)
++{
++  va_list ap;
++  bool ret;
++
++  va_start (ap, msgid);
++
++  ret = cpp_diagnostic_at (pfile, CPP_DL_WARNING, reason, richloc,
++			   msgid, &ap);
++
++  va_end (ap);
++  return ret;
++
++}
++
++/* As cpp_pedwarning above, but use RICHLOC as the location of the
++   diagnostic.  */
++
++bool
++cpp_pedwarning_at (cpp_reader * pfile, enum cpp_warning_reason reason,
++		   rich_location *richloc, const char *msgid, ...)
++{
++  va_list ap;
++  bool ret;
++
++  va_start (ap, msgid);
++
++  ret = cpp_diagnostic_at (pfile, CPP_DL_PEDWARN, reason, richloc,
++			   msgid, &ap);
++
++  va_end (ap);
++  return ret;
+ }
+ 
+ /* Print a diagnostic at a specific location.  */
+diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
+--- a/libcpp/include/cpplib.h	2021-12-13 23:23:05.768437079 -0800
++++ b/libcpp/include/cpplib.h	2021-12-14 01:20:16.189507386 -0800
+@@ -1275,6 +1275,14 @@ extern bool cpp_warning_syshdr (cpp_read
+ 				const char *msgid, ...)
+   ATTRIBUTE_PRINTF_3;
+ 
++/* As their counterparts above, but use RICHLOC.  */
++extern bool cpp_warning_at (cpp_reader *, enum cpp_warning_reason,
++			    rich_location *richloc, const char *msgid, ...)
++  ATTRIBUTE_PRINTF_4;
++extern bool cpp_pedwarning_at (cpp_reader *, enum cpp_warning_reason,
++			       rich_location *richloc, const char *msgid, ...)
++  ATTRIBUTE_PRINTF_4;
++
+ /* Output a diagnostic with "MSGID: " preceding the
+    error string of errno.  No location is printed.  */
+ extern bool cpp_errno (cpp_reader *, enum cpp_diagnostic_level,
+@@ -1435,42 +1443,95 @@ extern const char * cpp_get_userdef_suff
+ 
+ /* In charset.c */
+ 
++/* The result of attempting to decode a run of UTF-8 bytes.  */
++
++struct cpp_decoded_char
++{
++  const char *m_start_byte;
++  const char *m_next_byte;
++
++  bool m_valid_ch;
++  cppchar_t m_ch;
++};
++
++/* Information for mapping between code points and display columns.
++
++   This is a tabstop value, along with a callback for getting the
++   widths of characters.  Normally this callback is cpp_wcwidth, but we
++   support other schemes for escaping non-ASCII unicode as a series of
++   ASCII chars when printing the user's source code in diagnostic-show-locus.c
++
++   For example, consider:
++   - the Unicode character U+03C0 "GREEK SMALL LETTER PI" (UTF-8: 0xCF 0x80)
++   - the Unicode character U+1F642 "SLIGHTLY SMILING FACE"
++     (UTF-8: 0xF0 0x9F 0x99 0x82)
++   - the byte 0xBF (a stray trailing byte of a UTF-8 character)
++   Normally U+03C0 would occupy one display column, U+1F642
++   would occupy two display columns, and the stray byte would be
++   printed verbatim as one display column.
++
++   However when escaping them as unicode code points as "<U+03C0>"
++   and "<U+1F642>" they occupy 8 and 9 display columns respectively,
++   and when escaping them as bytes as "<CF><80>" and "<F0><9F><99><82>"
++   they occupy 8 and 16 display columns respectively.  In both cases
++   the stray byte is escaped to <BF> as 4 display columns.  */
++
++struct cpp_char_column_policy
++{
++  cpp_char_column_policy (int tabstop,
++			  int (*width_cb) (cppchar_t c))
++  : m_tabstop (tabstop),
++    m_undecoded_byte_width (1),
++    m_width_cb (width_cb)
++  {}
++
++  int m_tabstop;
++  /* Width in display columns of a stray byte that isn't decodable
++     as UTF-8.  */
++  int m_undecoded_byte_width;
++  int (*m_width_cb) (cppchar_t c);
++};
++
+ /* A class to manage the state while converting a UTF-8 sequence to cppchar_t
+    and computing the display width one character at a time.  */
+ class cpp_display_width_computation {
+  public:
+   cpp_display_width_computation (const char *data, int data_length,
+-				 int tabstop);
++				 const cpp_char_column_policy &policy);
+   const char *next_byte () const { return m_next; }
+   int bytes_processed () const { return m_next - m_begin; }
+   int bytes_left () const { return m_bytes_left; }
+   bool done () const { return !bytes_left (); }
+   int display_cols_processed () const { return m_display_cols; }
+ 
+-  int process_next_codepoint ();
++  int process_next_codepoint (cpp_decoded_char *out);
+   int advance_display_cols (int n);
+ 
+  private:
+   const char *const m_begin;
+   const char *m_next;
+   size_t m_bytes_left;
+-  const int m_tabstop;
++  const cpp_char_column_policy &m_policy;
+   int m_display_cols;
+ };
+ 
+ /* Convenience functions that are simple use cases for class
+    cpp_display_width_computation.  Tab characters will be expanded to spaces
+-   as determined by TABSTOP.  */
++   as determined by POLICY.m_tabstop, and non-printable-ASCII characters
++   will be escaped as per POLICY.  */
++
+ int cpp_byte_column_to_display_column (const char *data, int data_length,
+-				       int column, int tabstop);
++				       int column,
++				       const cpp_char_column_policy &policy);
+ inline int cpp_display_width (const char *data, int data_length,
+-			      int tabstop)
++			      const cpp_char_column_policy &policy)
+ {
+   return cpp_byte_column_to_display_column (data, data_length, data_length,
+-					    tabstop);
++					    policy);
+ }
+ int cpp_display_column_to_byte_column (const char *data, int data_length,
+-				       int display_col, int tabstop);
++				       int display_col,
++				       const cpp_char_column_policy &policy);
+ int cpp_wcwidth (cppchar_t c);
+ 
+ #endif /* ! LIBCPP_CPPLIB_H */
+diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
+--- a/libcpp/include/line-map.h	2021-07-27 23:55:08.716307283 -0700
++++ b/libcpp/include/line-map.h	2021-12-14 01:16:01.557942991 -0800
+@@ -1781,6 +1781,18 @@ class rich_location
+   const diagnostic_path *get_path () const { return m_path; }
+   void set_path (const diagnostic_path *path) { m_path = path; }
+ 
++  /* A flag for hinting that the diagnostic involves character encoding
++     issues, and thus that it will be helpful to the user if we show some
++     representation of how the characters in the pertinent source lines
++     are encoded.
++     The default is false (i.e. do not escape).
++     When set to true, non-ASCII bytes in the pertinent source lines will
++     be escaped in a manner controlled by the user-supplied option
++     -fdiagnostics-escape-format=, so that the user can better understand
++     what's going on with the encoding in their source file.  */
++  bool escape_on_output_p () const { return m_escape_on_output; }
++  void set_escape_on_output (bool flag) { m_escape_on_output = flag; }
++
+ private:
+   bool reject_impossible_fixit (location_t where);
+   void stop_supporting_fixits ();
+@@ -1807,6 +1819,7 @@ protected:
+   bool m_fixits_cannot_be_auto_applied;
+ 
+   const diagnostic_path *m_path;
++  bool m_escape_on_output;
+ };
+ 
+ /* A struct for the result of range_label::get_text: a NUL-terminated buffer
+diff --git a/libcpp/internal.h b/libcpp/internal.h
+--- a/libcpp/internal.h	2021-12-13 23:23:05.768437079 -0800
++++ b/libcpp/internal.h	2021-12-14 01:16:01.557942991 -0800
+@@ -776,6 +776,9 @@ extern void _cpp_do_file_change (cpp_rea
+ extern void _cpp_pop_buffer (cpp_reader *);
+ extern char *_cpp_bracket_include (cpp_reader *);
+ 
++/* In errors.c  */
++extern location_t cpp_diagnostic_get_current_location (cpp_reader *);
++
+ /* In traditional.c.  */
+ extern bool _cpp_scan_out_logical_line (cpp_reader *, cpp_macro *, bool);
+ extern bool _cpp_read_logical_line_trad (cpp_reader *);
+@@ -942,6 +945,26 @@ int linemap_get_expansion_line (class li
+ const char* linemap_get_expansion_filename (class line_maps *,
+ 					    location_t);
+ 
++/* A subclass of rich_location for emitting a diagnostic
++   at the current location of the reader, but flagging
++   it with set_escape_on_output (true).  */
++class encoding_rich_location : public rich_location
++{
++ public:
++  encoding_rich_location (cpp_reader *pfile)
++  : rich_location (pfile->line_table,
++		   cpp_diagnostic_get_current_location (pfile))
++  {
++    set_escape_on_output (true);
++  }
++
++  encoding_rich_location (cpp_reader *pfile, location_t loc)
++  : rich_location (pfile->line_table, loc)
++  {
++    set_escape_on_output (true);
++  }
++};
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+--- a/libcpp/lex.c	2021-12-14 01:14:48.435225968 -0800
++++ b/libcpp/lex.c	2021-12-14 01:24:37.220995816 -0800
+@@ -1774,7 +1774,11 @@ skip_whitespace (cpp_reader *pfile, cppc
+   while (is_nvspace (c));
+ 
+   if (saw_NUL)
+-    cpp_error (pfile, CPP_DL_WARNING, "null character(s) ignored");
++    {
++      encoding_rich_location rich_loc (pfile);
++      cpp_error_at (pfile, CPP_DL_WARNING, &rich_loc,
++		    "null character(s) ignored");
++    }
+ 
+   buffer->cur--;
+ }
+@@ -1803,6 +1807,28 @@ warn_about_normalization (cpp_reader *pf
+   if (CPP_OPTION (pfile, warn_normalize) < NORMALIZE_STATE_RESULT (s)
+       && !pfile->state.skipping)
+     {
++      location_t loc = token->src_loc;
++
++      /* If possible, create a location range for the token.  */
++      if (loc >= RESERVED_LOCATION_COUNT
++	  && token->type != CPP_EOF
++	  /* There must be no line notes to process.  */
++	  && (!(pfile->buffer->cur
++		>= pfile->buffer->notes[pfile->buffer->cur_note].pos
++		&& !pfile->overlaid_buffer)))
++	{
++	  source_range tok_range;
++	  tok_range.m_start = loc;
++	  tok_range.m_finish
++	    = linemap_position_for_column (pfile->line_table,
++					   CPP_BUF_COLUMN (pfile->buffer,
++							   pfile->buffer->cur));
++	  loc = COMBINE_LOCATION_DATA (pfile->line_table,
++				       loc, tok_range, NULL);
++	}
++
++      encoding_rich_location rich_loc (pfile, loc);
++
+       /* Make sure that the token is printed using UCNs, even
+ 	 if we'd otherwise happily print UTF-8.  */
+       unsigned char *buf = XNEWVEC (unsigned char, cpp_token_len (token));
+@@ -1810,11 +1836,11 @@ warn_about_normalization (cpp_reader *pf
+ 
+       sz = cpp_spell_token (pfile, token, buf, false) - buf;
+       if (NORMALIZE_STATE_RESULT (s) == normalized_C)
+-	cpp_warning_with_line (pfile, CPP_W_NORMALIZE, token->src_loc, 0,
+-			       "`%.*s' is not in NFKC", (int) sz, buf);
++	cpp_warning_at (pfile, CPP_W_NORMALIZE, &rich_loc,
++			"`%.*s' is not in NFKC", (int) sz, buf);
+       else
+-	cpp_warning_with_line (pfile, CPP_W_NORMALIZE, token->src_loc, 0,
+-			       "`%.*s' is not in NFC", (int) sz, buf);
++	cpp_warning_at (pfile, CPP_W_NORMALIZE, &rich_loc,
++			"`%.*s' is not in NFC", (int) sz, buf);
+       free (buf);
+     }
+ }
+diff --git a/libcpp/line-map.c b/libcpp/line-map.c
+--- a/libcpp/line-map.c	2021-07-27 23:55:08.716307283 -0700
++++ b/libcpp/line-map.c	2021-12-14 01:16:01.561942921 -0800
+@@ -2086,7 +2086,8 @@ rich_location::rich_location (line_maps
+   m_fixit_hints (),
+   m_seen_impossible_fixit (false),
+   m_fixits_cannot_be_auto_applied (false),
+-  m_path (NULL)
++  m_path (NULL),
++  m_escape_on_output (false)
+ {
+   add_range (loc, SHOW_RANGE_WITH_CARET, label);
+ }
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
new file mode 100644
index 0000000..5bf895d
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-Fix-install-path-of-linux64.h.patch
@@ -0,0 +1,33 @@
+From 58211c7ceb0510b2a11a7f1da3c7fa968c658749 Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei.gherzan@huawei.com>
+Date: Wed, 22 Dec 2021 12:49:25 +0100
+Subject: [PATCH] Fix install path of linux64.h
+
+We add linux64.h to tm includes[1] as a relative path to B. This patch
+adapts the install path of linux64.h to match the include in tm.h.
+
+[1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+
+Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/Makefile.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 9b17d120a..d175ec4e3 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3693,6 +3693,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+ 	  "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
+ 	  | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
+ 	    base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
++	  */linux64.h ) \
++	    base=`dirname $$path`;;\
+ 	  *) base=`basename $$path` ;; \
+ 	  esac; \
+ 	  dest=$(plugin_includedir)/$$base; \
+-- 
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0002-CVE-2021-35465.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-CVE-2021-35465.patch
new file mode 100644
index 0000000..e09818f
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0002-CVE-2021-35465.patch
@@ -0,0 +1,39 @@
+From 574e7950bd6b34e9e2cacce18c802b45505d1d0a Mon Sep 17 00:00:00 2001
+From: Richard Earnshaw <rearnsha@arm.com>
+Date: Fri, 18 Jun 2021 17:16:25 +0100
+Subject: [PATCH] arm: add erratum mitigation to __gnu_cmse_nonsecure_call
+ [PR102035]
+
+Add the recommended erratum mitigation sequence to
+__gnu_cmse_nonsecure_call for use on Armv8-m.main devices. Since this
+is in the library code we cannot know in advance whether the core we
+are running on will be affected by this, so always enable it.
+
+libgcc:
+	PR target/102035
+	* config/arm/cmse_nonsecure_call.S (__gnu_cmse_nonsecure_call):
+	Add vlldm erratum work-around.
+
+CVE: CVE-2021-35465
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=574e7950bd6b34e9e2cacce18c802b45505d1d0a]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ libgcc/config/arm/cmse_nonsecure_call.S | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libgcc/config/arm/cmse_nonsecure_call.S b/libgcc/config/arm/cmse_nonsecure_call.S
+--- a/libgcc/config/arm/cmse_nonsecure_call.S
++++ b/libgcc/config/arm/cmse_nonsecure_call.S
+@@ -102,6 +102,11 @@ blxns	    r4
+ #ifdef __ARM_PCS_VFP
+ vpop.f64    {d8-d15}
+ #else
++/* VLLDM erratum mitigation sequence. */
++mrs	    r5, control
++tst	    r5, #8	  /* CONTROL_S.SFPA */
++it	    ne
++.inst.w	    0xeeb00a40	  /* vmovne s0, s0 */
+ vlldm	    sp		  /* Lazy restore of d0-d16 and FPSCR.  */
+ add	    sp, sp, #0x88 /* Free space used to save floating point registers.  */
+ #endif /* __ARM_PCS_VFP */
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0002-CVE-2021-42574.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-CVE-2021-42574.patch
new file mode 100644
index 0000000..9bad81d
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0002-CVE-2021-42574.patch
@@ -0,0 +1,1765 @@
+From 51c500269bf53749b107807d84271385fad35628 Mon Sep 17 00:00:00 2001
+From: Marek Polacek <polacek@redhat.com>
+Date: Wed, 6 Oct 2021 14:33:59 -0400
+Subject: [PATCH] libcpp: Implement -Wbidi-chars for CVE-2021-42574 [PR103026]
+
+From a link below:
+"An issue was discovered in the Bidirectional Algorithm in the Unicode
+Specification through 14.0. It permits the visual reordering of
+characters via control sequences, which can be used to craft source code
+that renders different logic than the logical ordering of tokens
+ingested by compilers and interpreters. Adversaries can leverage this to
+encode source code for compilers accepting Unicode such that targeted
+vulnerabilities are introduced invisibly to human reviewers."
+
+More info:
+https://nvd.nist.gov/vuln/detail/CVE-2021-42574
+https://trojansource.codes/
+
+This is not a compiler bug.  However, to mitigate the problem, this patch
+implements -Wbidi-chars=[none|unpaired|any] to warn about possibly
+misleading Unicode bidirectional control characters the preprocessor may
+encounter.
+
+The default is =unpaired, which warns about improperly terminated
+bidirectional control characters; e.g. a LRE without its corresponding PDF.
+The level =any warns about any use of bidirectional control characters.
+
+This patch handles both UCNs and UTF-8 characters.  UCNs designating
+bidi characters in identifiers are accepted since r204886.  Then r217144
+enabled -fextended-identifiers by default.  Extended characters in C/C++
+identifiers have been accepted since r275979.  However, this patch still
+warns about mixing UTF-8 and UCN bidi characters; there seems to be no
+good reason to allow mixing them.
+
+We warn in different contexts: comments (both C and C++-style), string
+literals, character constants, and identifiers.  Expectedly, UCNs are ignored
+in comments and raw string literals.  The bidirectional control characters
+can nest so this patch handles that as well.
+
+I have not included nor tested this at all with Fortran (which also has
+string literals and line comments).
+
+Dave M. posted patches improving diagnostic involving Unicode characters.
+This patch does not make use of this new infrastructure yet.
+
+	PR preprocessor/103026
+
+gcc/c-family/ChangeLog:
+
+	* c.opt (Wbidi-chars, Wbidi-chars=): New option.
+
+gcc/ChangeLog:
+
+	* doc/invoke.texi: Document -Wbidi-chars.
+
+libcpp/ChangeLog:
+
+	* include/cpplib.h (enum cpp_bidirectional_level): New.
+	(struct cpp_options): Add cpp_warn_bidirectional.
+	(enum cpp_warning_reason): Add CPP_W_BIDIRECTIONAL.
+	* internal.h (struct cpp_reader): Add warn_bidi_p member
+	function.
+	* init.c (cpp_create_reader): Set cpp_warn_bidirectional.
+	* lex.c (bidi): New namespace.
+	(get_bidi_utf8): New function.
+	(get_bidi_ucn): Likewise.
+	(maybe_warn_bidi_on_close): Likewise.
+	(maybe_warn_bidi_on_char): Likewise.
+	(_cpp_skip_block_comment): Implement warning about bidirectional
+	control characters.
+	(skip_line_comment): Likewise.
+	(forms_identifier_p): Likewise.
+	(lex_identifier): Likewise.
+	(lex_string): Likewise.
+	(lex_raw_string): Likewise.
+
+gcc/testsuite/ChangeLog:
+
+	* c-c++-common/Wbidi-chars-1.c: New test.
+	* c-c++-common/Wbidi-chars-2.c: New test.
+	* c-c++-common/Wbidi-chars-3.c: New test.
+	* c-c++-common/Wbidi-chars-4.c: New test.
+	* c-c++-common/Wbidi-chars-5.c: New test.
+	* c-c++-common/Wbidi-chars-6.c: New test.
+	* c-c++-common/Wbidi-chars-7.c: New test.
+	* c-c++-common/Wbidi-chars-8.c: New test.
+	* c-c++-common/Wbidi-chars-9.c: New test.
+	* c-c++-common/Wbidi-chars-10.c: New test.
+	* c-c++-common/Wbidi-chars-11.c: New test.
+	* c-c++-common/Wbidi-chars-12.c: New test.
+	* c-c++-common/Wbidi-chars-13.c: New test.
+	* c-c++-common/Wbidi-chars-14.c: New test.
+	* c-c++-common/Wbidi-chars-15.c: New test.
+	* c-c++-common/Wbidi-chars-16.c: New test.
+	* c-c++-common/Wbidi-chars-17.c: New test.
+
+CVE: CVE-2021-42574
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=51c500269bf53749b107807d84271385fad35628]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ gcc/c-family/c.opt                          |  24 ++
+ gcc/doc/invoke.texi                         |  21 +-
+ gcc/testsuite/c-c++-common/Wbidi-chars-1.c  |  12 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-10.c |  27 ++
+ gcc/testsuite/c-c++-common/Wbidi-chars-11.c |  13 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-12.c |  19 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-13.c |  17 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-14.c |  38 ++
+ gcc/testsuite/c-c++-common/Wbidi-chars-15.c |  59 +++
+ gcc/testsuite/c-c++-common/Wbidi-chars-16.c |  26 ++
+ gcc/testsuite/c-c++-common/Wbidi-chars-17.c |  30 ++
+ gcc/testsuite/c-c++-common/Wbidi-chars-2.c  |   9 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-3.c  |  11 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-4.c  | 188 +++++++++
+ gcc/testsuite/c-c++-common/Wbidi-chars-5.c  | 188 +++++++++
+ gcc/testsuite/c-c++-common/Wbidi-chars-6.c  | 155 ++++++++
+ gcc/testsuite/c-c++-common/Wbidi-chars-7.c  |   9 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-8.c  |  13 +
+ gcc/testsuite/c-c++-common/Wbidi-chars-9.c  |  29 ++
+ libcpp/include/cpplib.h                     |  18 +-
+ libcpp/init.c                               |   1 +
+ libcpp/internal.h                           |   7 +
+ libcpp/lex.c                                | 408 +++++++++++++++++++-
+ 23 files changed, 1315 insertions(+), 7 deletions(-)
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-1.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-10.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-11.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-12.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-13.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-14.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-15.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-16.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-17.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-2.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-3.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-4.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-5.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-6.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-7.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-8.c
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-9.c
+
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 8a4cd634f77..3976fc368db 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -370,6 +370,30 @@ Wbad-function-cast
+ C ObjC Var(warn_bad_function_cast) Warning
+ Warn about casting functions to incompatible types.
+ 
++Wbidi-chars
++C ObjC C++ ObjC++ Warning Alias(Wbidi-chars=,any,none)
++;
++
++Wbidi-chars=
++C ObjC C++ ObjC++ RejectNegative Joined Warning CPP(cpp_warn_bidirectional) CppReason(CPP_W_BIDIRECTIONAL) Var(warn_bidirectional) Init(bidirectional_unpaired) Enum(cpp_bidirectional_level)
++-Wbidi-chars=[none|unpaired|any] Warn about UTF-8 bidirectional control characters.
++
++; Required for these enum values.
++SourceInclude
++cpplib.h
++
++Enum
++Name(cpp_bidirectional_level) Type(int) UnknownError(argument %qs to %<-Wbidi-chars%> not recognized)
++
++EnumValue
++Enum(cpp_bidirectional_level) String(none) Value(bidirectional_none)
++
++EnumValue
++Enum(cpp_bidirectional_level) String(unpaired) Value(bidirectional_unpaired)
++
++EnumValue
++Enum(cpp_bidirectional_level) String(any) Value(bidirectional_any)
++
+ Wbool-compare
+ C ObjC C++ ObjC++ Var(warn_bool_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
+ Warn about boolean expression compared with an integer value different from true/false.
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 6070288856c..a22758d18ee 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -326,7 +326,9 @@ Objective-C and Objective-C++ Dialects}.
+ -Warith-conversion @gol
+ -Warray-bounds  -Warray-bounds=@var{n} @gol
+ -Wno-attributes  -Wattribute-alias=@var{n} -Wno-attribute-alias @gol
+--Wno-attribute-warning  -Wbool-compare  -Wbool-operation @gol
++-Wno-attribute-warning  @gol
++-Wbidi-chars=@r{[}none@r{|}unpaired@r{|}any@r{]} @gol
++-Wbool-compare  -Wbool-operation @gol
+ -Wno-builtin-declaration-mismatch @gol
+ -Wno-builtin-macro-redefined  -Wc90-c99-compat  -Wc99-c11-compat @gol
+ -Wc11-c2x-compat @gol
+@@ -7559,6 +7561,23 @@ Attributes considered include @code{allo
+ This is the default.  You can disable these warnings with either
+ @option{-Wno-attribute-alias} or @option{-Wattribute-alias=0}.
+ 
++@item -Wbidi-chars=@r{[}none@r{|}unpaired@r{|}any@r{]}
++@opindex Wbidi-chars=
++@opindex Wbidi-chars
++@opindex Wno-bidi-chars
++Warn about possibly misleading UTF-8 bidirectional control characters in
++comments, string literals, character constants, and identifiers.  Such
++characters can change left-to-right writing direction into right-to-left
++(and vice versa), which can cause confusion between the logical order and
++visual order.  This may be dangerous; for instance, it may seem that a piece
++of code is not commented out, whereas it in fact is.
++
++There are three levels of warning supported by GCC@.  The default is
++@option{-Wbidi-chars=unpaired}, which warns about improperly terminated
++bidi contexts.  @option{-Wbidi-chars=none} turns the warning off.
++@option{-Wbidi-chars=any} warns about any use of bidirectional control
++characters.
++
+ @item -Wbool-compare
+ @opindex Wno-bool-compare
+ @opindex Wbool-compare
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-10.c b/gcc/testsuite/c-c++-common/Wbidi-chars-10.c
+new file mode 100644
+index 00000000000..34f5ac19271
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-10.c
+@@ -0,0 +1,27 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* More nesting testing.  */
++
++/* RLEâ« LRI⦠PDF⬠PDIâ©*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int LRE_\u202a_PDF_\u202c;
++int LRE_\u202a_PDF_\u202c_LRE_\u202a_PDF_\u202c;
++int LRE_\u202a_LRI_\u2066_PDF_\u202c_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int RLE_\u202b_RLI_\u2067_PDF_\u202c_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int RLE_\u202b_RLI_\u2067_PDI_\u2069_PDF_\u202c;
++int FSI_\u2068_LRO_\u202d_PDI_\u2069_PDF_\u202c;
++int FSI_\u2068;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int FSI_\u2068_PDI_\u2069;
++int FSI_\u2068_FSI_\u2068_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069;
++int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDF_\u202c;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int RLI_\u2067_RLI_\u2067_RLI_\u2067_RLI_\u2067_FSI_\u2068_PDI_\u2069_PDI_\u2069_PDI_\u2069_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-11.c b/gcc/testsuite/c-c++-common/Wbidi-chars-11.c
+new file mode 100644
+index 00000000000..270ce2368a9
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-11.c
+@@ -0,0 +1,13 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* Test that we warn when mixing UCN and UTF-8.  */
++
++int LRE_âª_PDF_\u202c;
++/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
++int LRE_\u202a_PDF_â¬_;
++/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
++const char *s1 = "LRE_âª_PDF_\u202c";
++/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
++const char *s2 = "LRE_\u202a_PDF_â¬";
++/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-12.c b/gcc/testsuite/c-c++-common/Wbidi-chars-12.c
+new file mode 100644
+index 00000000000..b07eec1da91
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-12.c
+@@ -0,0 +1,19 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile { target { c || c++11 } } } */
++/* { dg-options "-Wbidi-chars=any" } */
++/* Test raw strings.  */
++
++const char *s1 = R"(a b c LRE⪠1 2 3 PDF⬠x y z)";
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++const char *s2 = R"(a b c RLE⫠1 2 3 PDF⬠x y z)";
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++const char *s3 = R"(a b c LRO⭠1 2 3 PDF⬠x y z)";
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++const char *s4 = R"(a b c RLO⮠1 2 3 PDF⬠x y z)";
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++const char *s7 = R"(a b c FSI⨠1 2 3 PDI⩠x y) z";
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++const char *s8 = R"(a b c PDIâ© x y )z";
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
++const char *s9 = R"(a b c PDF⬠x y z)";
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
+diff -uprN '-x*.orig' '-x*.rej' del/gcc-11.2.0/gcc/testsuite/c-c++-common/Wbidi-chars-13.c gcc-11.2.0/gcc/testsuite/c-c++-common/Wbidi-chars-13.c
+--- del/gcc-11.2.0/gcc/testsuite/c-c++-common/Wbidi-chars-13.c	1969-12-31 16:00:00.000000000 -0800
++++ gcc-11.2.0/gcc/testsuite/c-c++-common/Wbidi-chars-13.c	2021-12-13 23:11:22.328439287 -0800
+@@ -0,0 +1,17 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile { target { c || c++11 } } } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* Test raw strings.  */
++
++const char *s1 = R"(a b c LRE⪠1 2 3)";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++const char *s2 = R"(a b c RLEâ« 1 2 3)";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++const char *s3 = R"(a b c LROâ­ 1 2 3)";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++const char *s4 = R"(a b c FSI⨠1 2 3)";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++const char *s5 = R"(a b c LRI⦠1 2 3)";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++const char *s6 = R"(a b c RLI⧠1 2 3)";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-14.c b/gcc/testsuite/c-c++-common/Wbidi-chars-14.c
+new file mode 100644
+index 00000000000..ba5f75d9553
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-14.c
+@@ -0,0 +1,38 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* Test PDI handling, which also pops any subsequent LREs, RLEs, LROs,
++   or RLOs.  */
++
++/* LRI_â¦_LRI_â¦_RLE_â«_RLE_â«_RLE_â«_PDI_â©*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// LRI_â¦_RLE_â«_RLE_â«_RLE_â«_PDI_â©
++// LRI_â¦_RLO_â®_RLE_â«_RLE_â«_PDI_â©
++// LRI_â¦_RLO_â®_RLE_â«_PDI_â©
++// FSI_â¨_RLO_â®_PDI_â©
++// FSI_â¨_FSI_â¨_RLO_â®_PDI_â©
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++
++int LRI_\u2066_LRI_\u2066_LRE_\u202a_LRE_\u202a_LRE_\u202a_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int LRI_\u2066_LRI_\u2066_LRE_\u202a_LRE_\u202a_LRE_\u202a_PDI_\u2069_PDI_\u2069;
++int LRI_\u2066_LRI_\u2066_LRI_\u2066_LRE_\u202a_LRE_\u202a_LRE_\u202a_PDI_\u2069_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int PDI_\u2069;
++int LRI_\u2066_PDI_\u2069;
++int RLI_\u2067_PDI_\u2069;
++int LRE_\u202a_LRI_\u2066_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int LRI_\u2066_LRE_\u202a_PDF_\u202c_PDI_\u2069;
++int LRI_\u2066_LRE_\u202a_LRE_\u202a_PDF_\u202c_PDI_\u2069;
++int RLI_\u2067_LRI_\u2066_LRE_\u202a_LRE_\u202a_PDF_\u202c_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int FSI_\u2068_LRI_\u2066_LRE_\u202a_LRE_\u202a_PDF_\u202c_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int RLO_\u202e_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int RLI_\u2067_PDI_\u2069_RLI_\u2067;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int FSI_\u2068_PDF_\u202c_PDI_\u2069;
++int FSI_\u2068_FSI_\u2068_PDF_\u202c_PDI_\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-15.c b/gcc/testsuite/c-c++-common/Wbidi-chars-15.c
+new file mode 100644
+index 00000000000..a0ce8ff5e2c
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-15.c
+@@ -0,0 +1,59 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* Test unpaired bidi control chars in multiline comments.  */
++
++/*
++ * LRE⪠end
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/*
++ * RLEâ« end
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/*
++ * LROâ­ end
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/*
++ * RLOâ® end
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/*
++ * LRI⦠end
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/*
++ * RLI⧠end
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/*
++ * FSI⨠end
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/* LREâª
++   PDF⬠*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++/* FSIâ¨
++   PDIâ© */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++
++/* LRE<âª>
++ *
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-3 } */
++
++/*
++ * LRE<âª>
++ */
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++
++/*
++ *
++ * LRE<âª> */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++
++/* RLI<â§> */ /* PDI<â©> */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* LRE<âª> */ /* PDF<â¬> */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-16.c b/gcc/testsuite/c-c++-common/Wbidi-chars-16.c
+new file mode 100644
+index 00000000000..baa0159861c
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-16.c
+@@ -0,0 +1,26 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=any" } */
++/* Test LTR/RTL chars.  */
++
++/* LTR<â> */
++/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
++// LTR<â>
++/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
++/* RTL<â> */
++/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
++// RTL<â>
++/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
++
++const char *s1 = "LTR<â>";
++/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
++const char *s2 = "LTR\u200e";
++/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
++const char *s3 = "LTR\u200E";
++/* { dg-warning "U\\+200E" "" { target *-*-* } .-1 } */
++const char *s4 = "RTL<â>";
++/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
++const char *s5 = "RTL\u200f";
++/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
++const char *s6 = "RTL\u200F";
++/* { dg-warning "U\\+200F" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-17.c b/gcc/testsuite/c-c++-common/Wbidi-chars-17.c
+new file mode 100644
+index 00000000000..07cb4321f96
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-17.c
+@@ -0,0 +1,30 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* Test LTR/RTL chars.  */
++
++/* LTR<â> */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// LTR<â>
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* RTL<â> */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// RTL<â>
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int ltr_\u200e;
++/* { dg-error "universal character " "" { target *-*-* } .-1 } */
++int rtl_\u200f;
++/* { dg-error "universal character " "" { target *-*-* } .-1 } */
++
++const char *s1 = "LTR<â>";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++const char *s2 = "LTR\u200e";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++const char *s3 = "LTR\u200E";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++const char *s4 = "RTL<â>";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++const char *s5 = "RTL\u200f";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++const char *s6 = "RTL\u200F";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-1.c b/gcc/testsuite/c-c++-common/Wbidi-chars-1.c
+new file mode 100644
+index 00000000000..2340374f276
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-1.c
+@@ -0,0 +1,12 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++
++int main() {
++    int isAdmin = 0;
++    /*â® } â¦if (isAdmin)⩠⦠begin admins only */
++/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
++        __builtin_printf("You are an admin.\n");
++    /* end admins only â® { â¦*/
++/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
++    return 0;
++}
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-2.c b/gcc/testsuite/c-c++-common/Wbidi-chars-2.c
+new file mode 100644
+index 00000000000..2340374f276
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-2.c
+@@ -0,0 +1,9 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++
++int main() {
++    /* Say hello; newlineâ§/*/ return 0 ;
++/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
++    __builtin_printf("Hello world.\n");
++    return 0;
++}
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-3.c b/gcc/testsuite/c-c++-common/Wbidi-chars-3.c
+new file mode 100644
+index 00000000000..9dc7edb6e64
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-3.c
+@@ -0,0 +1,11 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++
++int main() {
++    const char* access_level = "user";
++    if (__builtin_strcmp(access_level, "userâ® â¦// Check if adminâ© â¦")) {
++/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
++        __builtin_printf("You are an admin.\n");
++    }
++    return 0;
++}
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-4.c b/gcc/testsuite/c-c++-common/Wbidi-chars-4.c
+new file mode 100644
+index 00000000000..639e5c62e88
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-4.c
+@@ -0,0 +1,188 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=any -Wno-multichar -Wno-overflow" } */
++/* Test all bidi chars in various contexts (identifiers, comments,
++   string literals, character constants), both UCN and UTF-8.  The bidi
++   chars here are properly terminated, except for the character constants.  */
++
++/* a b c LRE⪠1 2 3 PDF⬠x y z */
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++/* a b c RLE⫠1 2 3 PDF⬠x y z */
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++/* a b c LRO⭠1 2 3 PDF⬠x y z */
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++/* a b c RLO⮠1 2 3 PDF⬠x y z */
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++/* a b c LRI⦠1 2 3 PDI⩠x y z */
++/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
++/* a b c RLI⧠1 2 3 PDI⩠x y */
++/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
++/* a b c FSI⨠1 2 3 PDI⩠x y z */
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++
++/* Same but C++ comments instead.  */
++// a b c LRE⪠1 2 3 PDF⬠x y z
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++// a b c RLE⫠1 2 3 PDF⬠x y z
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++// a b c LRO⭠1 2 3 PDF⬠x y z
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++// a b c RLO⮠1 2 3 PDF⬠x y z
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++// a b c LRI⦠1 2 3 PDI⩠x y z
++/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
++// a b c RLI⧠1 2 3 PDI⩠x y
++/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
++// a b c FSI⨠1 2 3 PDI⩠x y z
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++
++/* Here we're closing an unopened context, warn when =any.  */
++/* a b c PDIâ© x y z */
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
++/* a b c PDF⬠x y z */
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
++// a b c PDIâ© x y z
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
++// a b c PDF⬠x y z
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
++
++/* Multiline comments.  */
++/* a b c PDIâ© x y z
++   */
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-2 } */
++/* a b c PDF⬠x y z
++   */
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-2 } */
++/* first
++   a b c PDIâ© x y z
++   */
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-2 } */
++/* first
++   a b c PDF⬠x y z
++   */
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-2 } */
++/* first
++   a b c PDIâ© x y z */
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
++/* first
++   a b c PDF⬠x y z */
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
++
++void
++g1 ()
++{
++  const char *s1 = "a b c LRE⪠1 2 3 PDF⬠x y z";
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++  const char *s2 = "a b c RLE⫠1 2 3 PDF⬠x y z";
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++  const char *s3 = "a b c LRO⭠1 2 3 PDF⬠x y z";
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++  const char *s4 = "a b c RLO⮠1 2 3 PDF⬠x y z";
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++  const char *s5 = "a b c LRI⦠1 2 3 PDI⩠x y z";
++/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
++  const char *s6 = "a b c RLI⧠1 2 3 PDI⩠x y z";
++/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
++  const char *s7 = "a b c FSI⨠1 2 3 PDI⩠x y z";
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++  const char *s8 = "a b c PDIâ© x y z";
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
++  const char *s9 = "a b c PDF⬠x y z";
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
++
++  const char *s10 = "a b c LRE\u202a 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++  const char *s11 = "a b c LRE\u202A 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++  const char *s12 = "a b c RLE\u202b 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++  const char *s13 = "a b c RLE\u202B 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++  const char *s14 = "a b c LRO\u202d 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++  const char *s15 = "a b c LRO\u202D 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++  const char *s16 = "a b c RLO\u202e 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++  const char *s17 = "a b c RLO\u202E 1 2 3 PDF\u202c x y z";
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++  const char *s18 = "a b c LRI\u2066 1 2 3 PDI\u2069 x y z";
++/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
++  const char *s19 = "a b c RLI\u2067 1 2 3 PDI\u2069 x y z";
++/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
++  const char *s20 = "a b c FSI\u2068 1 2 3 PDI\u2069 x y z";
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++}
++
++void
++g2 ()
++{
++  const char c1 = '\u202a';
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++  const char c2 = '\u202A';
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++  const char c3 = '\u202b';
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++  const char c4 = '\u202B';
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++  const char c5 = '\u202d';
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++  const char c6 = '\u202D';
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++  const char c7 = '\u202e';
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++  const char c8 = '\u202E';
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++  const char c9 = '\u2066';
++/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
++  const char c10 = '\u2067';
++/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
++  const char c11 = '\u2068';
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++}
++
++int aâªbâ¬c;
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++int aâ«bâ¬c;
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++int aâ­bâ¬c;
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++int aâ®bâ¬c;
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++int aâ¦bâ©c;
++/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
++int aâ§bâ©c;
++/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
++int aâ¨bâ©c;
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++int Aâ¬X;
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
++int A\u202cY;
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
++int A\u202CY2;
++/* { dg-warning "U\\+202C" "" { target *-*-* } .-1 } */
++
++int d\u202ae\u202cf;
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++int d\u202Ae\u202cf2;
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++int d\u202be\u202cf;
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++int d\u202Be\u202cf2;
++/* { dg-warning "U\\+202B" "" { target *-*-* } .-1 } */
++int d\u202de\u202cf;
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++int d\u202De\u202cf2;
++/* { dg-warning "U\\+202D" "" { target *-*-* } .-1 } */
++int d\u202ee\u202cf;
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++int d\u202Ee\u202cf2;
++/* { dg-warning "U\\+202E" "" { target *-*-* } .-1 } */
++int d\u2066e\u2069f;
++/* { dg-warning "U\\+2066" "" { target *-*-* } .-1 } */
++int d\u2067e\u2069f;
++/* { dg-warning "U\\+2067" "" { target *-*-* } .-1 } */
++int d\u2068e\u2069f;
++/* { dg-warning "U\\+2068" "" { target *-*-* } .-1 } */
++int X\u2069;
++/* { dg-warning "U\\+2069" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-5.c b/gcc/testsuite/c-c++-common/Wbidi-chars-5.c
+new file mode 100644
+index 00000000000..68cb053144b
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-5.c
+@@ -0,0 +1,188 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired -Wno-multichar -Wno-overflow" } */
++/* Test all bidi chars in various contexts (identifiers, comments,
++   string literals, character constants), both UCN and UTF-8.  The bidi
++   chars here are properly terminated, except for the character constants.  */
++
++/* a b c LRE⪠1 2 3 PDF⬠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* a b c RLE⫠1 2 3 PDF⬠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* a b c LRO⭠1 2 3 PDF⬠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* a b c RLO⮠1 2 3 PDF⬠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* a b c LRI⦠1 2 3 PDI⩠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* a b c RLI⧠1 2 3 PDI⩠x y */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* a b c FSI⨠1 2 3 PDI⩠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++
++/* Same but C++ comments instead.  */
++// a b c LRE⪠1 2 3 PDF⬠x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c RLE⫠1 2 3 PDF⬠x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c LRO⭠1 2 3 PDF⬠x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c RLO⮠1 2 3 PDF⬠x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c LRI⦠1 2 3 PDI⩠x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c RLI⧠1 2 3 PDI⩠x y
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c FSI⨠1 2 3 PDI⩠x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++
++/* Here we're closing an unopened context, warn when =any.  */
++/* a b c PDIâ© x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* a b c PDF⬠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c PDIâ© x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++// a b c PDF⬠x y z
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++
++/* Multiline comments.  */
++/* a b c PDIâ© x y z
++   */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
++/* a b c PDF⬠x y z
++   */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
++/* first
++   a b c PDIâ© x y z
++   */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
++/* first
++   a b c PDF⬠x y z
++   */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-2 } */
++/* first
++   a b c PDIâ© x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++/* first
++   a b c PDF⬠x y z */
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++
++void
++g1 ()
++{
++  const char *s1 = "a b c LRE⪠1 2 3 PDF⬠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s2 = "a b c RLE⫠1 2 3 PDF⬠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s3 = "a b c LRO⭠1 2 3 PDF⬠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s4 = "a b c RLO⮠1 2 3 PDF⬠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s5 = "a b c LRI⦠1 2 3 PDI⩠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s6 = "a b c RLI⧠1 2 3 PDI⩠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s7 = "a b c FSI⨠1 2 3 PDI⩠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s8 = "a b c PDIâ© x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s9 = "a b c PDF⬠x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++
++  const char *s10 = "a b c LRE\u202a 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s11 = "a b c LRE\u202A 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s12 = "a b c RLE\u202b 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s13 = "a b c RLE\u202B 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s14 = "a b c LRO\u202d 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s15 = "a b c LRO\u202D 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s16 = "a b c RLO\u202e 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s17 = "a b c RLO\u202E 1 2 3 PDF\u202c x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s18 = "a b c LRI\u2066 1 2 3 PDI\u2069 x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s19 = "a b c RLI\u2067 1 2 3 PDI\u2069 x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++  const char *s20 = "a b c FSI\u2068 1 2 3 PDI\u2069 x y z";
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++}
++
++void
++g2 ()
++{
++  const char c1 = '\u202a';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c2 = '\u202A';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c3 = '\u202b';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c4 = '\u202B';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c5 = '\u202d';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c6 = '\u202D';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c7 = '\u202e';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c8 = '\u202E';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c9 = '\u2066';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c10 = '\u2067';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char c11 = '\u2068';
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++}
++
++int aâªbâ¬c;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int aâ«bâ¬c;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int aâ­bâ¬c;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int aâ®bâ¬c;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int aâ¦bâ©c;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int aâ§bâ©c;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int aâ¨bâ©c;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int Aâ¬X;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int A\u202cY;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int A\u202CY2;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++
++int d\u202ae\u202cf;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u202Ae\u202cf2;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u202be\u202cf;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u202Be\u202cf2;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u202de\u202cf;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u202De\u202cf2;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u202ee\u202cf;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u202Ee\u202cf2;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u2066e\u2069f;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u2067e\u2069f;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int d\u2068e\u2069f;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
++int X\u2069;
++/* { dg-bogus "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-6.c b/gcc/testsuite/c-c++-common/Wbidi-chars-6.c
+new file mode 100644
+index 00000000000..0ce6fff2dee
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-6.c
+@@ -0,0 +1,155 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* Test nesting of bidi chars in various contexts.  */
++
++/* Terminated by the wrong char:  */
++/* a b c LRE⪠1 2 3 PDI⩠x y z */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* a b c RLEâ« 1 2 3 PDIâ© x y  z*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* a b c LROâ­ 1 2 3 PDIâ© x y z */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* a b c RLOâ® 1 2 3 PDIâ© x y z */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* a b c LRI⦠1 2 3 PDF⬠x y z */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* a b c RLI⧠1 2 3 PDF⬠x y z */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* a b c FSI⨠1 2 3 PDF⬠x y  z*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++
++/* LRE⪠PDF⬠*/
++/* LRE⪠LRE⪠PDF⬠PDF⬠*/
++/* PDF⬠LRE⪠PDF⬠*/
++/* LRE⪠PDF⬠LRE⪠PDF⬠*/
++/* LRE⪠LRE⪠PDF⬠*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* PDF⬠LRE⪠*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++
++// a b c LRE⪠1 2 3 PDI⩠x y z
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// a b c RLEâ« 1 2 3 PDIâ© x y  z*/
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// a b c LROâ­ 1 2 3 PDIâ© x y z 
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// a b c RLOâ® 1 2 3 PDIâ© x y z 
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// a b c LRI⦠1 2 3 PDF⬠x y z 
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// a b c RLI⧠1 2 3 PDF⬠x y z 
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// a b c FSI⨠1 2 3 PDF⬠x y  z
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++
++// LRE⪠PDF⬠
++// LRE⪠LRE⪠PDF⬠PDFâ¬
++// PDF⬠LRE⪠PDFâ¬
++// LRE⪠PDF⬠LRE⪠PDFâ¬
++// LRE⪠LRE⪠PDFâ¬
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++// PDF⬠LREâª
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++
++void
++g1 ()
++{
++  const char *s1 = "a b c LRE⪠1 2 3 PDI⩠x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s2 = "a b c LRE\u202a 1 2 3 PDI\u2069 x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s3 = "a b c RLEâ« 1 2 3 PDIâ© x y ";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s4 = "a b c RLE\u202b 1 2 3 PDI\u2069 x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s5 = "a b c LROâ­ 1 2 3 PDIâ© x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s6 = "a b c LRO\u202d 1 2 3 PDI\u2069 x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s7 = "a b c RLOâ® 1 2 3 PDIâ© x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s8 = "a b c RLO\u202e 1 2 3 PDI\u2069 x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s9 = "a b c LRI⦠1 2 3 PDF⬠x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s10 = "a b c LRI\u2066 1 2 3 PDF\u202c x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s11 = "a b c RLI⧠1 2 3 PDF⬠x y z\
++    ";
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++  const char *s12 = "a b c RLI\u2067 1 2 3 PDF\u202c x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s13 = "a b c FSI⨠1 2 3 PDF⬠x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s14 = "a b c FSI\u2068 1 2 3 PDF\u202c x y z";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s15 = "PDF⬠LREâª";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s16 = "PDF\u202c LRE\u202a";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s17 = "LRE⪠PDFâ¬";
++  const char *s18 = "LRE\u202a PDF\u202c";
++  const char *s19 = "LRE⪠LRE⪠PDF⬠PDFâ¬";
++  const char *s20 = "LRE\u202a LRE\u202a PDF\u202c PDF\u202c";
++  const char *s21 = "PDF⬠LRE⪠PDFâ¬";
++  const char *s22 = "PDF\u202c LRE\u202a PDF\u202c";
++  const char *s23 = "LRE⪠LRE⪠PDFâ¬";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s24 = "LRE\u202a LRE\u202a PDF\u202c";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s25 = "PDF⬠LREâª";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s26 = "PDF\u202c LRE\u202a";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s27 = "PDF⬠LRE\u202a";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++  const char *s28 = "PDF\u202c LREâª";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++}
++
++int aLREâªbPDIâ©;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int A\u202aB\u2069C;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aRLEâ«bPDIâ©;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int a\u202bB\u2069c;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aLROâ­bPDIâ©;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int a\u202db\u2069c2;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aRLOâ®bPDIâ©;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int a\u202eb\u2069;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aLRIâ¦bPDFâ¬;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int a\u2066b\u202c;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aRLIâ§bPDFâ¬c
++;
++/* { dg-warning "unpaired" "" { target *-*-* } .-2 } */
++int a\u2067b\u202c;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aFSIâ¨bPDFâ¬;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int a\u2068b\u202c;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aFSIâ¨bPD\u202C;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aFSI\u2068bPDFâ¬_;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int aLREâªbPDFâ¬b; 
++int A\u202aB\u202c;
++int a_LREâª_LREâª_b_PDFâ¬_PDFâ¬;
++int A\u202aA\u202aB\u202cB\u202c;
++int aPDFâ¬bLREadPDFâ¬;
++int a_\u202C_\u202a_\u202c;
++int a_LREâª_b_PDFâ¬_c_LREâª_PDFâ¬;
++int a_\u202a_\u202c_\u202a_\u202c_;
++int a_LREâª_b_PDFâ¬_c_LREâª;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int a_\u202a_\u202c_\u202a_;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-7.c b/gcc/testsuite/c-c++-common/Wbidi-chars-7.c
+new file mode 100644
+index 00000000000..d012d420ec0
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-7.c
+@@ -0,0 +1,9 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=any" } */
++/* Test we ignore UCNs in comments.  */
++
++// a b c \u202a 1 2 3
++// a b c \u202A 1 2 3
++/* a b c \u202a 1 2 3 */
++/* a b c \u202A 1 2 3 */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-8.c b/gcc/testsuite/c-c++-common/Wbidi-chars-8.c
+new file mode 100644
+index 00000000000..4f54c5092ec
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-8.c
+@@ -0,0 +1,13 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=any" } */
++/* Test \u vs \U.  */
++
++int a_\u202A;
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++int a_\u202a_2;
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++int a_\U0000202A_3;
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
++int a_\U0000202a_4;
++/* { dg-warning "U\\+202A" "" { target *-*-* } .-1 } */
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-9.c b/gcc/testsuite/c-c++-common/Wbidi-chars-9.c
+new file mode 100644
+index 00000000000..e2af1b1ca97
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-9.c
+@@ -0,0 +1,29 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired" } */
++/* Test that we properly separate bidi contexts (comment/identifier/character
++   constant/string literal).  */
++
++/* LRE ->âª<- */ int pdf_\u202c_1;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* RLE ->â«<- */ int pdf_\u202c_2;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* LRO ->â­<- */ int pdf_\u202c_3;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* RLO ->â®<- */ int pdf_\u202c_4;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* LRI ->â¦<-*/ int pdi_\u2069_1;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* RLI ->â§<- */ int pdi_\u2069_12;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* FSI ->â¨<- */ int pdi_\u2069_3;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++
++const char *s1 = "LRE\u202a"; /* PDF ->â¬<- */
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++/* LRE ->âª<- */ const char *s2 = "PDF\u202c";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++const char *s3 = "LRE\u202a"; int pdf_\u202c_5;
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
++int lre_\u202a; const char *s4 = "PDF\u202c";
++/* { dg-warning "unpaired" "" { target *-*-* } .-1 } */
+diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
+index 176f8c5bbce..112b9c24751 100644
+--- a/libcpp/include/cpplib.h
++++ b/libcpp/include/cpplib.h
+@@ -318,6 +318,17 @@ enum cpp_main_search
+   CMS_system,  /* Search the system INCLUDE path.  */
+ };
+ 
++/* The possible bidirectional control characters checking levels, from least
++   restrictive to most.  */
++enum cpp_bidirectional_level {
++  /* No checking.  */
++  bidirectional_none,
++  /* Only detect unpaired uses of bidirectional control characters.  */
++  bidirectional_unpaired,
++  /* Detect any use of bidirectional control characters.  */
++  bidirectional_any
++};
++
+ /* This structure is nested inside struct cpp_reader, and
+    carries all the options visible to the command line.  */
+ struct cpp_options
+@@ -531,6 +542,10 @@ struct cpp_options
+   /* True if warn about differences between C++98 and C++11.  */
+   bool cpp_warn_cxx11_compat;
+ 
++  /* Nonzero if bidirectional control characters checking is on.  See enum
++     cpp_bidirectional_level.  */
++  unsigned char cpp_warn_bidirectional;
++
+   /* Dependency generation.  */
+   struct
+   {
+@@ -635,7 +650,8 @@ enum cpp_warning_reason {
+   CPP_W_C90_C99_COMPAT,
+   CPP_W_C11_C2X_COMPAT,
+   CPP_W_CXX11_COMPAT,
+-  CPP_W_EXPANSION_TO_DEFINED
++  CPP_W_EXPANSION_TO_DEFINED,
++  CPP_W_BIDIRECTIONAL
+ };
+ 
+ /* Callback for header lookup for HEADER, which is the name of a
+diff --git a/libcpp/init.c b/libcpp/init.c
+index 5a424e23553..f9a8f5f088f 100644
+--- a/libcpp/init.c
++++ b/libcpp/init.c
+@@ -219,6 +219,7 @@ cpp_create_reader (enum c_lang lang, cpp
+       = ENABLE_CANONICAL_SYSTEM_HEADERS;
+   CPP_OPTION (pfile, ext_numeric_literals) = 1;
+   CPP_OPTION (pfile, warn_date_time) = 0;
++  CPP_OPTION (pfile, cpp_warn_bidirectional) = bidirectional_unpaired;
+ 
+   /* Default CPP arithmetic to something sensible for the host for the
+      benefit of dumb users like fix-header.  */
+diff --git a/libcpp/internal.h b/libcpp/internal.h
+index 8577cab6c83..0ce0246c5a2 100644
+--- a/libcpp/internal.h
++++ b/libcpp/internal.h
+@@ -597,6 +597,13 @@ struct cpp_reader
+   /* Location identifying the main source file -- intended to be line
+      zero of said file.  */
+   location_t main_loc;
++
++  /* Returns true iff we should warn about UTF-8 bidirectional control
++     characters.  */
++  bool warn_bidi_p () const
++  {
++    return CPP_OPTION (this, cpp_warn_bidirectional) != bidirectional_none;
++  }
+ };
+ 
+ /* Character classes.  Based on the more primitive macros in safe-ctype.h.
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+index fa2253d41c3..6a4fbce6030 100644
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -1164,6 +1164,324 @@ _cpp_process_line_notes (cpp_reader *pfi
+     }
+ }
+ 
++namespace bidi {
++  enum class kind {
++    NONE, LRE, RLE, LRO, RLO, LRI, RLI, FSI, PDF, PDI, LTR, RTL
++  };
++
++  /* All the UTF-8 encodings of bidi characters start with E2.  */
++  constexpr uchar utf8_start = 0xe2;
++
++  /* A vector holding currently open bidi contexts.  We use a char for
++     each context, its LSB is 1 if it represents a PDF context, 0 if it
++     represents a PDI context.  The next bit is 1 if this context was open
++     by a bidi character written as a UCN, and 0 when it was UTF-8.  */
++  semi_embedded_vec <unsigned char, 16> vec;
++
++  /* Close the whole comment/identifier/string literal/character constant
++     context.  */
++  void on_close ()
++  {
++    vec.truncate (0);
++  }
++
++  /* Pop the last element in the vector.  */
++  void pop ()
++  {
++    unsigned int len = vec.count ();
++    gcc_checking_assert (len > 0);
++    vec.truncate (len - 1);
++  }
++
++  /* Return the context of the Ith element.  */
++  kind ctx_at (unsigned int i)
++  {
++    return (vec[i] & 1) ? kind::PDF : kind::PDI;
++  }
++
++  /* Return which context is currently opened.  */
++  kind current_ctx ()
++  {
++    unsigned int len = vec.count ();
++    if (len == 0)
++      return kind::NONE;
++    return ctx_at (len - 1);
++  }
++
++  /* Return true if the current context comes from a UCN origin, that is,
++     the bidi char which started this bidi context was written as a UCN.  */
++  bool current_ctx_ucn_p ()
++  {
++    unsigned int len = vec.count ();
++    gcc_checking_assert (len > 0);
++    return (vec[len - 1] >> 1) & 1;
++  }
++
++  /* We've read a bidi char, update the current vector as necessary.  */
++  void on_char (kind k, bool ucn_p)
++  {
++    switch (k)
++      {
++      case kind::LRE:
++      case kind::RLE:
++      case kind::LRO:
++      case kind::RLO:
++	vec.push (ucn_p ? 3u : 1u);
++	break;
++      case kind::LRI:
++      case kind::RLI:
++      case kind::FSI:
++	vec.push (ucn_p ? 2u : 0u);
++	break;
++      /* PDF terminates the scope of the last LRE, RLE, LRO, or RLO
++	 whose scope has not yet been terminated.  */
++      case kind::PDF:
++	if (current_ctx () == kind::PDF)
++	  pop ();
++	break;
++      /* PDI terminates the scope of the last LRI, RLI, or FSI whose
++	 scope has not yet been terminated, as well as the scopes of
++	 any subsequent LREs, RLEs, LROs, or RLOs whose scopes have not
++	 yet been terminated.  */
++      case kind::PDI:
++	for (int i = vec.count () - 1; i >= 0; --i)
++	  if (ctx_at (i) == kind::PDI)
++	    {
++	      vec.truncate (i);
++	      break;
++	    }
++	break;
++      case kind::LTR:
++      case kind::RTL:
++	/* These aren't popped by a PDF/PDI.  */
++	break;
++      [[likely]] case kind::NONE:
++	break;
++      default:
++	abort ();
++      }
++  }
++
++  /* Return a descriptive string for K.  */
++  const char *to_str (kind k)
++  {
++    switch (k)
++      {
++      case kind::LRE:
++	return "U+202A (LEFT-TO-RIGHT EMBEDDING)";
++      case kind::RLE:
++	return "U+202B (RIGHT-TO-LEFT EMBEDDING)";
++      case kind::LRO:
++	return "U+202D (LEFT-TO-RIGHT OVERRIDE)";
++      case kind::RLO:
++	return "U+202E (RIGHT-TO-LEFT OVERRIDE)";
++      case kind::LRI:
++	return "U+2066 (LEFT-TO-RIGHT ISOLATE)";
++      case kind::RLI:
++	return "U+2067 (RIGHT-TO-LEFT ISOLATE)";
++      case kind::FSI:
++	return "U+2068 (FIRST STRONG ISOLATE)";
++      case kind::PDF:
++	return "U+202C (POP DIRECTIONAL FORMATTING)";
++      case kind::PDI:
++	return "U+2069 (POP DIRECTIONAL ISOLATE)";
++      case kind::LTR:
++	return "U+200E (LEFT-TO-RIGHT MARK)";
++      case kind::RTL:
++	return "U+200F (RIGHT-TO-LEFT MARK)";
++      default:
++	abort ();
++      }
++  }
++}
++
++/* Parse a sequence of 3 bytes starting with P and return its bidi code.  */
++
++static bidi::kind
++get_bidi_utf8 (const unsigned char *const p)
++{
++  gcc_checking_assert (p[0] == bidi::utf8_start);
++
++  if (p[1] == 0x80)
++    switch (p[2])
++      {
++      case 0xaa:
++	return bidi::kind::LRE;
++      case 0xab:
++	return bidi::kind::RLE;
++      case 0xac:
++	return bidi::kind::PDF;
++      case 0xad:
++	return bidi::kind::LRO;
++      case 0xae:
++	return bidi::kind::RLO;
++      case 0x8e:
++	return bidi::kind::LTR;
++      case 0x8f:
++	return bidi::kind::RTL;
++      default:
++	break;
++      }
++  else if (p[1] == 0x81)
++    switch (p[2])
++      {
++      case 0xa6:
++	return bidi::kind::LRI;
++      case 0xa7:
++	return bidi::kind::RLI;
++      case 0xa8:
++	return bidi::kind::FSI;
++      case 0xa9:
++	return bidi::kind::PDI;
++      default:
++	break;
++      }
++
++  return bidi::kind::NONE;
++}
++
++/* Parse a UCN where P points just past \u or \U and return its bidi code.  */
++
++static bidi::kind
++get_bidi_ucn (const unsigned char *p, bool is_U)
++{
++  /* 6.4.3 Universal Character Names
++      \u hex-quad
++      \U hex-quad hex-quad
++     where \unnnn means \U0000nnnn.  */
++
++  if (is_U)
++    {
++      if (p[0] != '0' || p[1] != '0' || p[2] != '0' || p[3] != '0')
++	return bidi::kind::NONE;
++      /* Skip 4B so we can treat \u and \U the same below.  */
++      p += 4;
++    }
++
++  /* All code points we are looking for start with 20xx.  */
++  if (p[0] != '2' || p[1] != '0')
++    return bidi::kind::NONE;
++  else if (p[2] == '2')
++    switch (p[3])
++      {
++      case 'a':
++      case 'A':
++	return bidi::kind::LRE;
++      case 'b':
++      case 'B':
++	return bidi::kind::RLE;
++      case 'c':
++      case 'C':
++	return bidi::kind::PDF;
++      case 'd':
++      case 'D':
++	return bidi::kind::LRO;
++      case 'e':
++      case 'E':
++	return bidi::kind::RLO;
++      default:
++	break;
++      }
++  else if (p[2] == '6')
++    switch (p[3])
++      {
++      case '6':
++	return bidi::kind::LRI;
++      case '7':
++	return bidi::kind::RLI;
++      case '8':
++	return bidi::kind::FSI;
++      case '9':
++	return bidi::kind::PDI;
++      default:
++	break;
++      }
++  else if (p[2] == '0')
++    switch (p[3])
++      {
++      case 'e':
++      case 'E':
++	return bidi::kind::LTR;
++      case 'f':
++      case 'F':
++	return bidi::kind::RTL;
++      default:
++	break;
++      }
++
++  return bidi::kind::NONE;
++}
++
++/* We're closing a bidi context, that is, we've encountered a newline,
++   are closing a C-style comment, or are at the end of a string literal,
++   character constant, or identifier.  Warn if this context was not
++   properly terminated by a PDI or PDF.  P points to the last character
++   in this context.  */
++
++static void
++maybe_warn_bidi_on_close (cpp_reader *pfile, const uchar *p)
++{
++  if (CPP_OPTION (pfile, cpp_warn_bidirectional) == bidirectional_unpaired
++      && bidi::vec.count () > 0)
++    {
++      const location_t loc
++	= linemap_position_for_column (pfile->line_table,
++				       CPP_BUF_COLUMN (pfile->buffer, p));
++      cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
++			     "unpaired UTF-8 bidirectional control character "
++			     "detected");
++    }
++  /* We're done with this context.  */
++  bidi::on_close ();
++}
++
++/* We're at the beginning or in the middle of an identifier/comment/string
++   literal/character constant.  Warn if we've encountered a bidi character.
++   KIND says which bidi character it was; P points to it in the character
++   stream.  UCN_P is true iff this bidi character was written as a UCN.  */
++
++static void
++maybe_warn_bidi_on_char (cpp_reader *pfile, const uchar *p, bidi::kind kind,
++			 bool ucn_p)
++{
++  if (__builtin_expect (kind == bidi::kind::NONE, 1))
++    return;
++
++  const auto warn_bidi = CPP_OPTION (pfile, cpp_warn_bidirectional);
++
++  if (warn_bidi != bidirectional_none)
++    {
++      const location_t loc
++	= linemap_position_for_column (pfile->line_table,
++				       CPP_BUF_COLUMN (pfile->buffer, p));
++      /* It seems excessive to warn about a PDI/PDF that is closing
++	 an opened context because we've already warned about the
++	 opening character.  Except warn when we have a UCN x UTF-8
++	 mismatch.  */
++      if (kind == bidi::current_ctx ())
++	{
++	  if (warn_bidi == bidirectional_unpaired
++	      && bidi::current_ctx_ucn_p () != ucn_p)
++	    cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
++				   "UTF-8 vs UCN mismatch when closing "
++				   "a context by \"%s\"", bidi::to_str (kind));
++	}
++      else if (warn_bidi == bidirectional_any)
++	{
++	  if (kind == bidi::kind::PDF || kind == bidi::kind::PDI)
++	    cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
++				   "\"%s\" is closing an unopened context",
++				   bidi::to_str (kind));
++	  else
++	    cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
++				   "found problematic Unicode character \"%s\"",
++				   bidi::to_str (kind));
++	}
++    }
++  /* We're done with this context.  */
++  bidi::on_char (kind, ucn_p);
++}
++
+ /* Skip a C-style block comment.  We find the end of the comment by
+    seeing if an asterisk is before every '/' we encounter.  Returns
+    nonzero if comment terminated by EOF, zero otherwise.
+@@ -1175,6 +1493,7 @@ _cpp_skip_block_comment (cpp_reader *pfi
+   cpp_buffer *buffer = pfile->buffer;
+   const uchar *cur = buffer->cur;
+   uchar c;
++  const bool warn_bidi_p = pfile->warn_bidi_p ();
+ 
+   cur++;
+   if (*cur == '/')
+@@ -1189,7 +1508,11 @@ _cpp_skip_block_comment (cpp_reader *pfi
+       if (c == '/')
+ 	{
+ 	  if (cur[-2] == '*')
+-	    break;
++	    {
++	      if (warn_bidi_p)
++		maybe_warn_bidi_on_close (pfile, cur);
++	      break;
++	    }
+ 
+ 	  /* Warn about potential nested comments, but not if the '/'
+ 	     comes immediately before the true comment delimiter.
+@@ -1208,6 +1531,8 @@ _cpp_skip_block_comment (cpp_reader *pfi
+ 	{
+ 	  unsigned int cols;
+ 	  buffer->cur = cur - 1;
++	  if (warn_bidi_p)
++	    maybe_warn_bidi_on_close (pfile, cur);
+ 	  _cpp_process_line_notes (pfile, true);
+ 	  if (buffer->next_line >= buffer->rlimit)
+ 	    return true;
+@@ -1218,6 +1543,13 @@ _cpp_skip_block_comment (cpp_reader *pfi
+ 
+ 	  cur = buffer->cur;
+ 	}
++      /* If this is a beginning of a UTF-8 encoding, it might be
++	 a bidirectional control character.  */
++      else if (__builtin_expect (c == bidi::utf8_start, 0) && warn_bidi_p)
++	{
++	  bidi::kind kind = get_bidi_utf8 (cur - 1);
++	  maybe_warn_bidi_on_char (pfile, cur, kind, /*ucn_p=*/false);
++	}
+     }
+ 
+   buffer->cur = cur;
+@@ -1233,9 +1565,31 @@ skip_line_comment (cpp_reader *pfile)
+ {
+   cpp_buffer *buffer = pfile->buffer;
+   location_t orig_line = pfile->line_table->highest_line;
++  const bool warn_bidi_p = pfile->warn_bidi_p ();
+ 
+-  while (*buffer->cur != '\n')
+-    buffer->cur++;
++  if (!warn_bidi_p)
++    while (*buffer->cur != '\n')
++      buffer->cur++;
++  else
++    {
++      while (*buffer->cur != '\n'
++	     && *buffer->cur != bidi::utf8_start)
++	buffer->cur++;
++      if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0))
++	{
++	  while (*buffer->cur != '\n')
++	    {
++	      if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0))
++		{
++		  bidi::kind kind = get_bidi_utf8 (buffer->cur);
++		  maybe_warn_bidi_on_char (pfile, buffer->cur, kind,
++					   /*ucn_p=*/false);
++		}
++	      buffer->cur++;
++	    }
++	  maybe_warn_bidi_on_close (pfile, buffer->cur);
++	}
++    }
+ 
+   _cpp_process_line_notes (pfile, true);
+   return orig_line != pfile->line_table->highest_line;
+@@ -1317,11 +1671,13 @@ static const cppchar_t utf8_signifier =
+ 
+ /* Returns TRUE if the sequence starting at buffer->cur is valid in
+    an identifier.  FIRST is TRUE if this starts an identifier.  */
++
+ static bool
+ forms_identifier_p (cpp_reader *pfile, int first,
+ 		    struct normalize_state *state)
+ {
+   cpp_buffer *buffer = pfile->buffer;
++  const bool warn_bidi_p = pfile->warn_bidi_p ();
+ 
+   if (*buffer->cur == '$')
+     {
+@@ -1344,6 +1700,13 @@ forms_identifier_p (cpp_reader *pfile, i
+       cppchar_t s;
+       if (*buffer->cur >= utf8_signifier)
+ 	{
++	  if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0)
++	      && warn_bidi_p)
++	    {
++	      bidi::kind kind = get_bidi_utf8 (buffer->cur);
++	      maybe_warn_bidi_on_char (pfile, buffer->cur, kind,
++				       /*ucn_p=*/false);
++	    }
+ 	  if (_cpp_valid_utf8 (pfile, &buffer->cur, buffer->rlimit, 1 + !first,
+ 			       state, &s))
+ 	    return true;
+@@ -1352,6 +1715,13 @@ forms_identifier_p (cpp_reader *pfile, i
+ 	       && (buffer->cur[1] == 'u' || buffer->cur[1] == 'U'))
+ 	{
+ 	  buffer->cur += 2;
++	  if (warn_bidi_p)
++	    {
++	      bidi::kind kind = get_bidi_ucn (buffer->cur,
++					      buffer->cur[-1] == 'U');
++	      maybe_warn_bidi_on_char (pfile, buffer->cur, kind,
++				       /*ucn_p=*/true);
++	    }
+ 	  if (_cpp_valid_ucn (pfile, &buffer->cur, buffer->rlimit, 1 + !first,
+ 			      state, &s, NULL, NULL))
+ 	    return true;
+@@ -1460,6 +1830,7 @@ lex_identifier (cpp_reader *pfile, const
+   const uchar *cur;
+   unsigned int len;
+   unsigned int hash = HT_HASHSTEP (0, *base);
++  const bool warn_bidi_p = pfile->warn_bidi_p ();
+ 
+   cur = pfile->buffer->cur;
+   if (! starts_ucn)
+@@ -1483,6 +1854,8 @@ lex_identifier (cpp_reader *pfile, const
+ 	    pfile->buffer->cur++;
+ 	  }
+       } while (forms_identifier_p (pfile, false, nst));
++      if (warn_bidi_p)
++	maybe_warn_bidi_on_close (pfile, pfile->buffer->cur);
+       result = _cpp_interpret_identifier (pfile, base,
+ 					  pfile->buffer->cur - base);
+       *spelling = cpp_lookup (pfile, base, pfile->buffer->cur - base);
+@@ -1719,6 +2092,7 @@ static void
+ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base)
+ {
+   const uchar *pos = base;
++  const bool warn_bidi_p = pfile->warn_bidi_p ();
+ 
+   /* 'tis a pity this information isn't passed down from the lexer's
+      initial categorization of the token.  */
+@@ -1955,8 +2329,15 @@ lex_raw_string (cpp_reader *pfile, cpp_t
+ 	  pos = base = pfile->buffer->cur;
+ 	  note = &pfile->buffer->notes[pfile->buffer->cur_note];
+ 	}
++      else if (__builtin_expect ((unsigned char) c == bidi::utf8_start, 0)
++	       && warn_bidi_p)
++	maybe_warn_bidi_on_char (pfile, pos - 1, get_bidi_utf8 (pos - 1),
++				 /*ucn_p=*/false);
+     }
+ 
++  if (warn_bidi_p)
++    maybe_warn_bidi_on_close (pfile, pos);
++
+   if (CPP_OPTION (pfile, user_literals))
+     {
+       /* If a string format macro, say from inttypes.h, is placed touching
+@@ -2051,15 +2432,27 @@ lex_string (cpp_reader *pfile, cpp_token
+   else
+     terminator = '>', type = CPP_HEADER_NAME;
+ 
++  const bool warn_bidi_p = pfile->warn_bidi_p ();
+   for (;;)
+     {
+       cppchar_t c = *cur++;
+ 
+       /* In #include-style directives, terminators are not escapable.  */
+       if (c == '\\' && !pfile->state.angled_headers && *cur != '\n')
+-	cur++;
++	{
++	  if ((cur[0] == 'u' || cur[0] == 'U') && warn_bidi_p)
++	    {
++	      bidi::kind kind = get_bidi_ucn (cur + 1, cur[0] == 'U');
++	      maybe_warn_bidi_on_char (pfile, cur, kind, /*ucn_p=*/true);
++	    }
++	  cur++;
++	}
+       else if (c == terminator)
+-	break;
++	{
++	  if (warn_bidi_p)
++	    maybe_warn_bidi_on_close (pfile, cur - 1);
++	  break;
++	}
+       else if (c == '\n')
+ 	{
+ 	  cur--;
+@@ -2076,6 +2469,11 @@ lex_string (cpp_reader *pfile, cpp_token
+ 	}
+       else if (c == '\0')
+ 	saw_NUL = true;
++      else if (__builtin_expect (c == bidi::utf8_start, 0) && warn_bidi_p)
++	{
++	  bidi::kind kind = get_bidi_utf8 (cur - 1);
++	  maybe_warn_bidi_on_char (pfile, cur - 1, kind, /*ucn_p=*/false);
++	}
+     }
+ 
+   if (saw_NUL && !pfile->state.skipping)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0003-CVE-2021-35465.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-CVE-2021-35465.patch
new file mode 100644
index 0000000..c7a7c76
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0003-CVE-2021-35465.patch
@@ -0,0 +1,103 @@
+From 30461cf8dba3d3adb15a125e4da48800eb2b9b8f Mon Sep 17 00:00:00 2001
+From: Richard Earnshaw <rearnsha@arm.com>
+Date: Fri, 18 Jun 2021 17:18:37 +0100
+Subject: [PATCH] arm: fix vlldm erratum for Armv8.1-m [PR102035]
+
+For Armv8.1-m we generate code that emits VLLDM directly and do not
+rely on support code in the library, so emit the mitigation directly
+as well, when required.  In this case, we can use the compiler options
+to determine when to apply the fix and when it is safe to omit it.
+
+gcc:
+	PR target/102035
+	* config/arm/arm.md (attribute arch): Add fix_vlldm.
+	(arch_enabled): Use it.
+	* config/arm/vfp.md (lazy_store_multiple_insn): Add alternative to
+	use when erratum mitigation is needed.
+
+CVE: CVE-2021-35465
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=30461cf8dba3d3adb15a125e4da48800eb2b9b8f]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ gcc/config/arm/arm.md | 11 +++++++++--
+ gcc/config/arm/vfp.md | 10 +++++++---
+ 2 files changed, 16 insertions(+), 5 deletions(-)
+
+diff -upr a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
+--- a/gcc/config/arm/arm.md	2020-07-22 23:35:17.344384552 -0700
++++ b/gcc/config/arm/arm.md	2021-11-11 20:33:58.431543947 -0800
+@@ -132,9 +132,12 @@
+ ; TARGET_32BIT, "t1" or "t2" to specify a specific Thumb mode.  "v6"
+ ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
+ ; arm_arch6.  "v6t2" for Thumb-2 with arm_arch6 and "v8mb" for ARMv8-M
+-; Baseline.  This attribute is used to compute attribute "enabled",
++; Baseline.  "fix_vlldm" is for fixing the v8-m/v8.1-m VLLDM erratum.
++; This attribute is used to compute attribute "enabled",
+ ; use type "any" to enable an alternative in all cases.
+-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,v6t2,v8mb,iwmmxt,iwmmxt2,armv6_or_vfpv3,neon,mve"
++(define_attr "arch" "any, a, t, 32, t1, t2, v6,nov6, v6t2, \
++		     v8mb, fix_vlldm, iwmmxt, iwmmxt2, armv6_or_vfpv3, \
++		     neon, mve"
+   (const_string "any"))
+ 
+ (define_attr "arch_enabled" "no,yes"
+@@ -177,6 +180,10 @@
+ 	      (match_test "TARGET_THUMB1 && arm_arch8"))
+ 	 (const_string "yes")
+ 
++	 (and (eq_attr "arch" "fix_vlldm")
++	      (match_test "fix_vlldm"))
++	 (const_string "yes")
++
+ 	 (and (eq_attr "arch" "iwmmxt2")
+ 	      (match_test "TARGET_REALLY_IWMMXT2"))
+ 	 (const_string "yes")
+diff -upr a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md
+--- a/gcc/config/arm/vfp.md	2020-07-22 23:35:17.356384684 -0700
++++ b/gcc/config/arm/vfp.md	2021-11-11 20:33:58.431543947 -0800
+@@ -1703,12 +1703,15 @@
+    (set_attr "type" "mov_reg")]
+ )
+ 
++;; Both this and the next instruction are treated by GCC in the same
++;; way as a blockage pattern.  That's perhaps stronger than it needs
++;; to be, but we do not want accesses to the VFP register bank to be
++;; moved across either instruction.
++
+ (define_insn "lazy_store_multiple_insn"
+-  [(set (match_operand:SI 0 "s_register_operand" "+&rk")
+-	(post_dec:SI (match_dup 0)))
+-   (unspec_volatile [(const_int 0)
+-		     (mem:SI (post_dec:SI (match_dup 0)))]
+-		    VUNSPEC_VLSTM)]
++  [(unspec_volatile
++    [(mem:BLK (match_operand:SI 0 "s_register_operand" "rk"))]
++    VUNSPEC_VLSTM)]
+   "use_cmse && reload_completed"
+   "vlstm%?\\t%0"
+   [(set_attr "predicable" "yes")
+@@ -1716,14 +1719,16 @@
+ )
+ 
+ (define_insn "lazy_load_multiple_insn"
+-  [(set (match_operand:SI 0 "s_register_operand" "+&rk")
+-	(post_inc:SI (match_dup 0)))
+-   (unspec_volatile:SI [(const_int 0)
+-			(mem:SI (match_dup 0))]
+-		       VUNSPEC_VLLDM)]
++  [(unspec_volatile
++    [(mem:BLK (match_operand:SI 0 "s_register_operand" "rk,rk"))]
++    VUNSPEC_VLLDM)]
+   "use_cmse && reload_completed"
+-  "vlldm%?\\t%0"
+-  [(set_attr "predicable" "yes")
++  "@
++   vscclrm\\t{vpr}\;vlldm\\t%0
++   vlldm\\t%0"
++  [(set_attr "arch" "fix_vlldm,*")
++   (set_attr "predicable" "no")
++   (set_attr "length" "8,4")
+    (set_attr "type" "load_4")]
+ )
+ 
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0003-CVE-2021-42574.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-CVE-2021-42574.patch
new file mode 100644
index 0000000..2995a6f
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0003-CVE-2021-42574.patch
@@ -0,0 +1,142 @@
+From 1a7f2c0774129750fdf73e9f1b78f0ce983c9ab3 Mon Sep 17 00:00:00 2001
+From: David Malcolm <dmalcolm@redhat.com>
+Date: Tue, 2 Nov 2021 09:54:32 -0400
+Subject: [PATCH] libcpp: escape non-ASCII source bytes in -Wbidi-chars=
+ [PR103026]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+This flags rich_locations associated with -Wbidi-chars= so that
+non-ASCII bytes will be escaped when printing the source lines
+(using the diagnostics support I added in
+r12-4825-gbd5e882cf6e0def3dd1bc106075d59a303fe0d1e).
+
+In particular, this ensures that the printed source lines will
+be pure ASCII, and thus the visual ordering of the characters
+will be the same as the logical ordering.
+
+Before:
+
+  Wbidi-chars-1.c: In function âmainâ:
+  Wbidi-chars-1.c:6:43: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
+      6 |     /*â® } â¦if (isAdmin)⩠⦠begin admins only */
+        |                                           ^
+  Wbidi-chars-1.c:9:28: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
+      9 |     /* end admins only â® { â¦*/
+        |                            ^
+
+  Wbidi-chars-11.c:6:15: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+      6 | int LRE_âª_PDF_\u202c;
+        |               ^
+  Wbidi-chars-11.c:8:19: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+      8 | int LRE_\u202a_PDF_â¬_;
+        |                   ^
+  Wbidi-chars-11.c:10:28: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+     10 | const char *s1 = "LRE_âª_PDF_\u202c";
+        |                            ^
+  Wbidi-chars-11.c:12:33: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+     12 | const char *s2 = "LRE_\u202a_PDF_â¬";
+        |                                 ^
+
+After:
+
+  Wbidi-chars-1.c: In function âmainâ:
+  Wbidi-chars-1.c:6:43: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
+      6 |     /*<U+202E> } <U+2066>if (isAdmin)<U+2069> <U+2066> begin admins only */
+        |                                                                           ^
+  Wbidi-chars-1.c:9:28: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
+      9 |     /* end admins only <U+202E> { <U+2066>*/
+        |                                            ^
+
+  Wbidi-chars-11.c:6:15: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+      6 | int LRE_<U+202A>_PDF_\u202c;
+        |                       ^
+  Wbidi-chars-11.c:8:19: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+      8 | int LRE_\u202a_PDF_<U+202C>_;
+        |                   ^
+  Wbidi-chars-11.c:10:28: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+     10 | const char *s1 = "LRE_<U+202A>_PDF_\u202c";
+        |                                    ^
+  Wbidi-chars-11.c:12:33: warning: UTF-8 vs UCN mismatch when closing a context by "U+202C (POP DIRECTIONAL FORMATTING)" [-Wbidi-chars=]
+     12 | const char *s2 = "LRE_\u202a_PDF_<U+202C>";
+        |                                 ^
+
+libcpp/ChangeLog:
+	PR preprocessor/103026
+	* lex.c (maybe_warn_bidi_on_close): Use a rich_location
+	and call set_escape_on_output (true) on it.
+	(maybe_warn_bidi_on_char): Likewise.
+
+Signed-off-by: David Malcolm <dmalcolm@redhat.com>
+
+CVE: CVE-2021-42574
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=1a7f2c0774129750fdf73e9f1b78f0ce983c9ab3]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ libcpp/lex.c | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+index 8188e33b07d..2421d6c0f40 100644
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -1427,9 +1427,11 @@ maybe_warn_bidi_on_close (cpp_reader *pfile, const uchar *p)
+       const location_t loc
+ 	= linemap_position_for_column (pfile->line_table,
+ 				       CPP_BUF_COLUMN (pfile->buffer, p));
+-      cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
+-			     "unpaired UTF-8 bidirectional control character "
+-			     "detected");
++      rich_location rich_loc (pfile->line_table, loc);
++      rich_loc.set_escape_on_output (true);
++      cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
++		      "unpaired UTF-8 bidirectional control character "
++		      "detected");
+     }
+   /* We're done with this context.  */
+   bidi::on_close ();
+@@ -1454,6 +1456,9 @@ maybe_warn_bidi_on_char (cpp_reader *pfile, const uchar *p, bidi::kind kind,
+       const location_t loc
+ 	= linemap_position_for_column (pfile->line_table,
+ 				       CPP_BUF_COLUMN (pfile->buffer, p));
++      rich_location rich_loc (pfile->line_table, loc);
++      rich_loc.set_escape_on_output (true);
++
+       /* It seems excessive to warn about a PDI/PDF that is closing
+ 	 an opened context because we've already warned about the
+ 	 opening character.  Except warn when we have a UCN x UTF-8
+@@ -1462,20 +1467,20 @@ maybe_warn_bidi_on_char (cpp_reader *pfile, const uchar *p, bidi::kind kind,
+ 	{
+ 	  if (warn_bidi == bidirectional_unpaired
+ 	      && bidi::current_ctx_ucn_p () != ucn_p)
+-	    cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
+-				   "UTF-8 vs UCN mismatch when closing "
+-				   "a context by \"%s\"", bidi::to_str (kind));
++	    cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
++			    "UTF-8 vs UCN mismatch when closing "
++			    "a context by \"%s\"", bidi::to_str (kind));
+ 	}
+       else if (warn_bidi == bidirectional_any)
+ 	{
+ 	  if (kind == bidi::kind::PDF || kind == bidi::kind::PDI)
+-	    cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
+-				   "\"%s\" is closing an unopened context",
+-				   bidi::to_str (kind));
++	    cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
++			    "\"%s\" is closing an unopened context",
++			    bidi::to_str (kind));
+ 	  else
+-	    cpp_warning_with_line (pfile, CPP_W_BIDIRECTIONAL, loc, 0,
+-				   "found problematic Unicode character \"%s\"",
+-				   bidi::to_str (kind));
++	    cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
++			    "found problematic Unicode character \"%s\"",
++			    bidi::to_str (kind));
+ 	}
+     }
+   /* We're done with this context.  */
+-- 
+2.27.0
+
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 8184e68..5f14dd2 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
@@ -23,7 +23,7 @@
 
 RP 15/8/11
 
-Upstream-Status: Inappropriate[OE-Specific]
+Upstream-Status: Inappropriate [OE-Specific]
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0004-CVE-2021-35465.patch b/poky/meta/recipes-devtools/gcc/gcc/0004-CVE-2021-35465.patch
new file mode 100644
index 0000000..9dd6a31
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0004-CVE-2021-35465.patch
@@ -0,0 +1,304 @@
+From 809330ab8450261e05919b472783bf15e4b000f7 Mon Sep 17 00:00:00 2001
+From: Richard Earnshaw <rearnsha@arm.com>
+Date: Tue, 6 Jul 2021 15:10:18 +0100
+Subject: [PATCH] arm: Add tests for VLLDM mitigation [PR102035]
+
+New tests for the erratum mitigation.
+
+gcc/testsuite:
+	PR target/102035
+	* gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c: New test.
+	* gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c: Likewise.
+	* gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c: Likewise.
+	* gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c: Likewise.
+	* gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c: Likewise.
+	* gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c: Likewise.
+	* gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c: Likewise.
+	* gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c: Likewise.
+
+CVE: CVE-2021-35465
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=809330ab8450261e05919b472783bf15e4b000f7]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ .../arm/cmse/mainline/8_1m/soft/cmse-13a.c    | 31 +++++++++++++++++++
+ .../arm/cmse/mainline/8_1m/soft/cmse-7a.c     | 28 +++++++++++++++++
+ .../arm/cmse/mainline/8_1m/soft/cmse-8a.c     | 30 ++++++++++++++++++
+ .../cmse/mainline/8_1m/softfp-sp/cmse-7a.c    | 27 ++++++++++++++++
+ .../cmse/mainline/8_1m/softfp-sp/cmse-8a.c    | 29 +++++++++++++++++
+ .../arm/cmse/mainline/8_1m/softfp/cmse-13a.c  | 30 ++++++++++++++++++
+ .../arm/cmse/mainline/8_1m/softfp/cmse-7a.c   | 27 ++++++++++++++++
+ .../arm/cmse/mainline/8_1m/softfp/cmse-8a.c   | 29 +++++++++++++++++
+ 8 files changed, 231 insertions(+)
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c
+ create mode 100644 gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c
+
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-13a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,31 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=soft -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
++
++#include "../../../cmse-13.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[1,4-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[1,4-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler-not "mov\tr0, r4" } } */
++/* { dg-final { scan-assembler-not "mov\tr2, r4" } } */
++/* { dg-final { scan-assembler-not "mov\tr3, r4" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r1, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[1,4-9\]|r10|fp|ip), ){9}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[1,4-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler-not "vmov" } } */
++/* { dg-final { scan-assembler-not "vmsr" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-7a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,28 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=soft -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
++
++#include "../../../cmse-7.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[0-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[0-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r0, )?(r1, )?(r2, )?(r3, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[0-9\]|r10|fp|ip), ){12}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[0-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler-not "vmov" } } */
++/* { dg-final { scan-assembler-not "vmsr" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/soft/cmse-8a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,30 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=soft -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
++
++#include "../../../cmse-8.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[2-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[2-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler-not "mov\tr0, r4" } } */
++/* { dg-final { scan-assembler-not "mov\tr1, r4" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r2, )?(r3, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[2-9\]|r10|fp|ip), ){10}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[2-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler-not "vmov" } } */
++/* { dg-final { scan-assembler-not "vmsr" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-13a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,30 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16 -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
++/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
++
++#include "../../../cmse-13.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[1,4-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[1,4-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler-not "mov\tr0, r4" } } */
++/* { dg-final { scan-assembler-not "mov\tr2, r4" } } */
++/* { dg-final { scan-assembler-not "mov\tr3, r4" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r1, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[1,4-9\]|r10|fp|ip), ){9}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[1,4-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-7a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,27 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16 -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
++/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
++
++#include "../../../cmse-7.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[0-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[0-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r0, )?(r1, )?(r2, )?(r3, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[0-9\]|r10|fp|ip), ){12}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[0-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp/cmse-8a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,29 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16 -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
++/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
++
++#include "../../../cmse-8.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[2-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[2-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler-not "mov\tr0, r4" } } */
++/* { dg-final { scan-assembler-not "mov\tr1, r4" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r2, )?(r3, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[2-9\]|r10|fp|ip), ){10}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[2-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-7a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,27 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-sp-d16 -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
++/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
++
++#include "../../../cmse-7.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[0-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[0-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r0, )?(r1, )?(r2, )?(r3, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[0-9\]|r10|fp|ip), ){12}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[0-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
+diff --git a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c
+--- a/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c	1969-12-31 16:00:00.000000000 -0800
++++ b/gcc/testsuite/gcc.target/arm/cmse/mainline/8_1m/softfp-sp/cmse-8a.c	2021-11-15 02:30:37.210637445 -0800
+@@ -0,0 +1,29 @@
++/* { dg-do compile } */
++/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-sp-d16 -mfix-cmse-cve-2021-35465" }  */
++/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
++/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
++
++#include "../../../cmse-8.x"
++
++/* Checks for saving and clearing prior to function call.  */
++/* Shift on the same register as blxns.  */
++/* { dg-final { scan-assembler "lsrs\t(r\[2-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler "lsls\t(r\[2-9\]|r10|fp|ip), \\1, #1.*blxns\t\\1" } } */
++/* { dg-final { scan-assembler-not "mov\tr0, r4" } } */
++/* { dg-final { scan-assembler-not "mov\tr1, r4" } } */
++/* { dg-final { scan-assembler "push\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++/* { dg-final { scan-assembler "vlstm\tsp" } } */
++/* Check the right registers are cleared and none appears twice.  */
++/* { dg-final { scan-assembler "clrm\t\{(r2, )?(r3, )?(r4, )?(r5, )?(r6, )?(r7, )?(r8, )?(r9, )?(r10, )?(fp, )?(ip, )?APSR\}" } } */
++/* Check that the right number of registers is cleared and thus only one
++   register is missing.  */
++/* { dg-final { scan-assembler "clrm\t\{((r\[2-9\]|r10|fp|ip), ){10}APSR\}" } } */
++/* Check that no cleared register is used for blxns.  */
++/* { dg-final { scan-assembler-not "clrm\t\{\[^\}\]\+(r\[2-9\]|r10|fp|ip),\[^\}\]\+\}.*blxns\t\\1" } } */
++/* Check for v8.1-m variant of erratum work-around.  */
++/* { dg-final { scan-assembler "vscclrm\t\{vpr\}" } } */
++/* { dg-final { scan-assembler "vlldm\tsp" } } */
++/* { dg-final { scan-assembler "pop\t\{r4, r5, r6, r7, r8, r9, r10, fp\}" } } */
++
++/* Now we check that we use the correct intrinsic to call.  */
++/* { dg-final { scan-assembler "blxns" } } */
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0004-CVE-2021-42574.patch b/poky/meta/recipes-devtools/gcc/gcc/0004-CVE-2021-42574.patch
new file mode 100644
index 0000000..4999c71
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0004-CVE-2021-42574.patch
@@ -0,0 +1,573 @@
+From bef32d4a28595e933f24fef378cf052a30b674a7 Mon Sep 17 00:00:00 2001
+From: David Malcolm <dmalcolm@redhat.com>
+Date: Tue, 2 Nov 2021 15:45:22 -0400
+Subject: [PATCH] libcpp: capture and underline ranges in -Wbidi-chars=
+ [PR103026]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+This patch converts the bidi::vec to use a struct so that we can
+capture location_t values for the bidirectional control characters.
+
+Before:
+
+  Wbidi-chars-1.c: In function âmainâ:
+  Wbidi-chars-1.c:6:43: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
+      6 |     /*<U+202E> } <U+2066>if (isAdmin)<U+2069> <U+2066> begin admins only */
+        |                                                                           ^
+  Wbidi-chars-1.c:9:28: warning: unpaired UTF-8 bidirectional control character detected [-Wbidi-chars=]
+      9 |     /* end admins only <U+202E> { <U+2066>*/
+        |                                            ^
+
+After:
+
+  Wbidi-chars-1.c: In function âmainâ:
+  Wbidi-chars-1.c:6:43: warning: unpaired UTF-8 bidirectional control characters detected [-Wbidi-chars=]
+      6 |     /*<U+202E> } <U+2066>if (isAdmin)<U+2069> <U+2066> begin admins only */
+        |       ~~~~~~~~                                ~~~~~~~~                    ^
+        |       |                                       |                           |
+        |       |                                       |                           end of bidirectional context
+        |       U+202E (RIGHT-TO-LEFT OVERRIDE)         U+2066 (LEFT-TO-RIGHT ISOLATE)
+  Wbidi-chars-1.c:9:28: warning: unpaired UTF-8 bidirectional control characters detected [-Wbidi-chars=]
+      9 |     /* end admins only <U+202E> { <U+2066>*/
+        |                        ~~~~~~~~   ~~~~~~~~ ^
+        |                        |          |        |
+        |                        |          |        end of bidirectional context
+        |                        |          U+2066 (LEFT-TO-RIGHT ISOLATE)
+        |                        U+202E (RIGHT-TO-LEFT OVERRIDE)
+
+Signed-off-by: David Malcolm <dmalcolm@redhat.com>
+
+gcc/testsuite/ChangeLog:
+	PR preprocessor/103026
+	* c-c++-common/Wbidi-chars-ranges.c: New test.
+
+libcpp/ChangeLog:
+	PR preprocessor/103026
+	* lex.c (struct bidi::context): New.
+	(bidi::vec): Convert to a vec of context rather than unsigned
+	char.
+	(bidi::ctx_at): Rename to...
+	(bidi::pop_kind_at): ...this and reimplement for above change.
+	(bidi::current_ctx): Update for change to vec.
+	(bidi::current_ctx_ucn_p): Likewise.
+	(bidi::current_ctx_loc): New.
+	(bidi::on_char): Update for usage of context struct.  Add "loc"
+	param and pass it when pushing contexts.
+	(get_location_for_byte_range_in_cur_line): New.
+	(get_bidi_utf8): Rename to...
+	(get_bidi_utf8_1): ...this, reintroducing...
+	(get_bidi_utf8): ...as a wrapper, setting *OUT when the result is
+	not NONE.
+	(get_bidi_ucn): Rename to...
+	(get_bidi_ucn_1): ...this, reintroducing...
+	(get_bidi_ucn): ...as a wrapper, setting *OUT when the result is
+	not NONE.
+	(class unpaired_bidi_rich_location): New.
+	(maybe_warn_bidi_on_close): Use unpaired_bidi_rich_location when
+	reporting on unpaired bidi chars.  Split into singular vs plural
+	spellings.
+	(maybe_warn_bidi_on_char): Pass in a location_t rather than a
+	const uchar * and use it when emitting warnings, and when calling
+	bidi::on_char.
+	(_cpp_skip_block_comment): Capture location when kind is not NONE
+	and pass it to maybe_warn_bidi_on_char.
+	(skip_line_comment): Likewise.
+	(forms_identifier_p): Likewise.
+	(lex_raw_string): Likewise.
+	(lex_string): Likewise.
+
+Signed-off-by: David Malcolm <dmalcolm@redhat.com>
+
+CVE: CVE-2021-42574
+Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=bef32d4a28595e933f24fef378cf052a30b674a7]
+Signed-off-by: Pgowda <pgowda.cve@gmail.com>
+
+---
+ .../c-c++-common/Wbidi-chars-ranges.c         |  54 ++++
+ libcpp/lex.c                                  | 251 ++++++++++++++----
+ 2 files changed, 257 insertions(+), 48 deletions(-)
+ create mode 100644 gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c
+
+diff --git a/gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c b/gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c
+new file mode 100644
+index 00000000000..298750a2a64
+--- /dev/null
++++ b/gcc/testsuite/c-c++-common/Wbidi-chars-ranges.c
+@@ -0,0 +1,54 @@
++/* PR preprocessor/103026 */
++/* { dg-do compile } */
++/* { dg-options "-Wbidi-chars=unpaired -fdiagnostics-show-caret" } */
++/* Verify that we escape and underline pertinent bidirectional
++   control characters when quoting the source.  */
++
++int test_unpaired_bidi () {
++    int isAdmin = 0;
++    /*â® } â¦if (isAdmin)⩠⦠begin admins only */
++/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
++#if 0
++   { dg-begin-multiline-output "" }
++     /*<U+202E> } <U+2066>if (isAdmin)<U+2069> <U+2066> begin admins only */
++       ~~~~~~~~                                ~~~~~~~~                    ^
++       |                                       |                           |
++       |                                       |                           end of bidirectional context
++       U+202E (RIGHT-TO-LEFT OVERRIDE)         U+2066 (LEFT-TO-RIGHT ISOLATE)
++   { dg-end-multiline-output "" }
++#endif
++
++        __builtin_printf("You are an admin.\n");
++    /* end admins only â® { â¦*/
++/* { dg-warning "bidirectional" "" { target *-*-* } .-1 } */
++#if 0
++   { dg-begin-multiline-output "" }
++     /* end admins only <U+202E> { <U+2066>*/
++                        ~~~~~~~~   ~~~~~~~~ ^
++                        |          |        |
++                        |          |        end of bidirectional context
++                        |          U+2066 (LEFT-TO-RIGHT ISOLATE)
++                        U+202E (RIGHT-TO-LEFT OVERRIDE)
++   { dg-end-multiline-output "" }
++#endif
++
++    return 0;
++}
++
++int LRE_âª_PDF_\u202c;
++/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
++#if 0
++   { dg-begin-multiline-output "" }
++ int LRE_<U+202A>_PDF_\u202c;
++         ~~~~~~~~     ^~~~~~
++   { dg-end-multiline-output "" }
++#endif
++
++const char *s1 = "LRE_âª_PDF_\u202c";
++/* { dg-warning "mismatch" "" { target *-*-* } .-1 } */
++#if 0
++   { dg-begin-multiline-output "" }
++ const char *s1 = "LRE_<U+202A>_PDF_\u202c";
++                       ~~~~~~~~     ^~~~~~
++   { dg-end-multiline-output "" }
++#endif
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+index 2421d6c0f40..94c36f0d014 100644
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -1172,11 +1172,34 @@ namespace bidi {
+   /* All the UTF-8 encodings of bidi characters start with E2.  */
+   constexpr uchar utf8_start = 0xe2;
+ 
++  struct context
++  {
++    context () {}
++    context (location_t loc, kind k, bool pdf, bool ucn)
++    : m_loc (loc), m_kind (k), m_pdf (pdf), m_ucn (ucn)
++    {
++    }
++
++    kind get_pop_kind () const
++    {
++      return m_pdf ? kind::PDF : kind::PDI;
++    }
++    bool ucn_p () const
++    {
++      return m_ucn;
++    }
++
++    location_t m_loc;
++    kind m_kind;
++    unsigned m_pdf : 1;
++    unsigned m_ucn : 1;
++  };
++
+   /* A vector holding currently open bidi contexts.  We use a char for
+      each context, its LSB is 1 if it represents a PDF context, 0 if it
+      represents a PDI context.  The next bit is 1 if this context was open
+      by a bidi character written as a UCN, and 0 when it was UTF-8.  */
+-  semi_embedded_vec <unsigned char, 16> vec;
++  semi_embedded_vec <context, 16> vec;
+ 
+   /* Close the whole comment/identifier/string literal/character constant
+      context.  */
+@@ -1193,19 +1216,19 @@ namespace bidi {
+     vec.truncate (len - 1);
+   }
+ 
+-  /* Return the context of the Ith element.  */
+-  kind ctx_at (unsigned int i)
++  /* Return the pop kind of the context of the Ith element.  */
++  kind pop_kind_at (unsigned int i)
+   {
+-    return (vec[i] & 1) ? kind::PDF : kind::PDI;
++    return vec[i].get_pop_kind ();
+   }
+ 
+-  /* Return which context is currently opened.  */
++  /* Return the pop kind of the context that is currently opened.  */
+   kind current_ctx ()
+   {
+     unsigned int len = vec.count ();
+     if (len == 0)
+       return kind::NONE;
+-    return ctx_at (len - 1);
++    return vec[len - 1].get_pop_kind ();
+   }
+ 
+   /* Return true if the current context comes from a UCN origin, that is,
+@@ -1214,11 +1237,19 @@ namespace bidi {
+   {
+     unsigned int len = vec.count ();
+     gcc_checking_assert (len > 0);
+-    return (vec[len - 1] >> 1) & 1;
++    return vec[len - 1].m_ucn;
+   }
+ 
+-  /* We've read a bidi char, update the current vector as necessary.  */
+-  void on_char (kind k, bool ucn_p)
++  location_t current_ctx_loc ()
++  {
++    unsigned int len = vec.count ();
++    gcc_checking_assert (len > 0);
++    return vec[len - 1].m_loc;
++  }
++
++  /* We've read a bidi char, update the current vector as necessary.
++     LOC is only valid when K is not kind::NONE.  */
++  void on_char (kind k, bool ucn_p, location_t loc)
+   {
+     switch (k)
+       {
+@@ -1226,12 +1257,12 @@ namespace bidi {
+       case kind::RLE:
+       case kind::LRO:
+       case kind::RLO:
+-	vec.push (ucn_p ? 3u : 1u);
++	vec.push (context (loc, k, true, ucn_p));
+ 	break;
+       case kind::LRI:
+       case kind::RLI:
+       case kind::FSI:
+-	vec.push (ucn_p ? 2u : 0u);
++	vec.push (context (loc, k, false, ucn_p));
+ 	break;
+       /* PDF terminates the scope of the last LRE, RLE, LRO, or RLO
+ 	 whose scope has not yet been terminated.  */
+@@ -1245,7 +1276,7 @@ namespace bidi {
+ 	 yet been terminated.  */
+       case kind::PDI:
+ 	for (int i = vec.count () - 1; i >= 0; --i)
+-	  if (ctx_at (i) == kind::PDI)
++	  if (pop_kind_at (i) == kind::PDI)
+ 	    {
+ 	      vec.truncate (i);
+ 	      break;
+@@ -1295,10 +1326,47 @@ namespace bidi {
+   }
+ }
+ 
++/* Get location_t for the range of bytes [START, START + NUM_BYTES)
++   within the current line in FILE, with the caret at START.  */
++
++static location_t
++get_location_for_byte_range_in_cur_line (cpp_reader *pfile,
++					 const unsigned char *const start,
++					 size_t num_bytes)
++{
++  gcc_checking_assert (num_bytes > 0);
++
++  /* CPP_BUF_COLUMN and linemap_position_for_column both refer
++     to offsets in bytes, but CPP_BUF_COLUMN is 0-based,
++     whereas linemap_position_for_column is 1-based.  */
++
++  /* Get 0-based offsets within the line.  */
++  size_t start_offset = CPP_BUF_COLUMN (pfile->buffer, start);
++  size_t end_offset = start_offset + num_bytes - 1;
++
++  /* Now convert to location_t, where "columns" are 1-based byte offsets.  */
++  location_t start_loc = linemap_position_for_column (pfile->line_table,
++						      start_offset + 1);
++  location_t end_loc = linemap_position_for_column (pfile->line_table,
++						     end_offset + 1);
++
++  if (start_loc == end_loc)
++    return start_loc;
++
++  source_range src_range;
++  src_range.m_start = start_loc;
++  src_range.m_finish = end_loc;
++  location_t combined_loc = COMBINE_LOCATION_DATA (pfile->line_table,
++						   start_loc,
++						   src_range,
++						   NULL);
++  return combined_loc;
++}
++
+ /* Parse a sequence of 3 bytes starting with P and return its bidi code.  */
+ 
+ static bidi::kind
+-get_bidi_utf8 (const unsigned char *const p)
++get_bidi_utf8_1 (const unsigned char *const p)
+ {
+   gcc_checking_assert (p[0] == bidi::utf8_start);
+ 
+@@ -1340,10 +1408,25 @@ get_bidi_utf8 (const unsigned char *cons
+   return bidi::kind::NONE;
+ }
+ 
++/* Parse a sequence of 3 bytes starting with P and return its bidi code.
++   If the kind is not NONE, write the location to *OUT.*/
++
++static bidi::kind
++get_bidi_utf8 (cpp_reader *pfile, const unsigned char *const p, location_t *out)
++{
++  bidi::kind result = get_bidi_utf8_1 (p);
++  if (result != bidi::kind::NONE)
++    {
++      /* We have a sequence of 3 bytes starting at P.  */
++      *out = get_location_for_byte_range_in_cur_line (pfile, p, 3);
++    }
++  return result;
++}
++
+ /* Parse a UCN where P points just past \u or \U and return its bidi code.  */
+ 
+ static bidi::kind
+-get_bidi_ucn (const unsigned char *p, bool is_U)
++get_bidi_ucn_1 (const unsigned char *p, bool is_U)
+ {
+   /* 6.4.3 Universal Character Names
+       \u hex-quad
+@@ -1412,6 +1495,62 @@ get_bidi_ucn (const unsigned char *p, bo
+   return bidi::kind::NONE;
+ }
+ 
++/* Parse a UCN where P points just past \u or \U and return its bidi code.
++   If the kind is not NONE, write the location to *OUT.*/
++
++static bidi::kind
++get_bidi_ucn (cpp_reader *pfile,  const unsigned char *p, bool is_U,
++	      location_t *out)
++{
++  bidi::kind result = get_bidi_ucn_1 (p, is_U);
++  if (result != bidi::kind::NONE)
++    {
++      const unsigned char *start = p - 2;
++      size_t num_bytes = 2 + (is_U ? 8 : 4);
++      *out = get_location_for_byte_range_in_cur_line (pfile, start, num_bytes);
++    }
++  return result;
++}
++
++/* Subclass of rich_location for reporting on unpaired UTF-8
++   bidirectional control character(s).
++   Escape the source lines on output, and show all unclosed
++   bidi context, labelling everything.  */
++
++class unpaired_bidi_rich_location : public rich_location
++{
++ public:
++  class custom_range_label : public range_label
++  {
++   public:
++     label_text get_text (unsigned range_idx) const FINAL OVERRIDE
++     {
++       /* range 0 is the primary location; each subsequent range i + 1
++	  is for bidi::vec[i].  */
++       if (range_idx > 0)
++	 {
++	   const bidi::context &ctxt (bidi::vec[range_idx - 1]);
++	   return label_text::borrow (bidi::to_str (ctxt.m_kind));
++	 }
++       else
++	 return label_text::borrow (_("end of bidirectional context"));
++     }
++  };
++
++  unpaired_bidi_rich_location (cpp_reader *pfile, location_t loc)
++  : rich_location (pfile->line_table, loc, &m_custom_label)
++  {
++    set_escape_on_output (true);
++    for (unsigned i = 0; i < bidi::vec.count (); i++)
++      add_range (bidi::vec[i].m_loc,
++		 SHOW_RANGE_WITHOUT_CARET,
++		 &m_custom_label);
++  }
++
++ private:
++   custom_range_label m_custom_label;
++};
++
+ /* We're closing a bidi context, that is, we've encountered a newline,
+    are closing a C-style comment, or are at the end of a string literal,
+    character constant, or identifier.  Warn if this context was not
+@@ -1427,11 +1566,17 @@ maybe_warn_bidi_on_close (cpp_reader *pf
+       const location_t loc
+ 	= linemap_position_for_column (pfile->line_table,
+ 				       CPP_BUF_COLUMN (pfile->buffer, p));
+-      rich_location rich_loc (pfile->line_table, loc);
+-      rich_loc.set_escape_on_output (true);
+-      cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
+-		      "unpaired UTF-8 bidirectional control character "
+-		      "detected");
++      unpaired_bidi_rich_location rich_loc (pfile, loc);
++      /* cpp_callbacks doesn't yet have a way to handle singular vs plural
++	 forms of a diagnostic, so fake it for now.  */
++      if (bidi::vec.count () > 1)
++	cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
++			"unpaired UTF-8 bidirectional control characters "
++			"detected");
++      else
++	cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
++			"unpaired UTF-8 bidirectional control character "
++			"detected");
+     }
+   /* We're done with this context.  */
+   bidi::on_close ();
+@@ -1439,12 +1584,13 @@ maybe_warn_bidi_on_close (cpp_reader *pf
+ 
+ /* We're at the beginning or in the middle of an identifier/comment/string
+    literal/character constant.  Warn if we've encountered a bidi character.
+-   KIND says which bidi character it was; P points to it in the character
+-   stream.  UCN_P is true iff this bidi character was written as a UCN.  */
++   KIND says which bidi control character it was; UCN_P is true iff this bidi
++   control character was written as a UCN.  LOC is the location of the
++   character, but is only valid if KIND != bidi::kind::NONE.  */
+ 
+ static void
+-maybe_warn_bidi_on_char (cpp_reader *pfile, const uchar *p, bidi::kind kind,
+-			 bool ucn_p)
++maybe_warn_bidi_on_char (cpp_reader *pfile, bidi::kind kind,
++			 bool ucn_p, location_t loc)
+ {
+   if (__builtin_expect (kind == bidi::kind::NONE, 1))
+     return;
+@@ -1453,9 +1599,6 @@ maybe_warn_bidi_on_char (cpp_reader *pfi
+ 
+   if (warn_bidi != bidirectional_none)
+     {
+-      const location_t loc
+-	= linemap_position_for_column (pfile->line_table,
+-				       CPP_BUF_COLUMN (pfile->buffer, p));
+       rich_location rich_loc (pfile->line_table, loc);
+       rich_loc.set_escape_on_output (true);
+ 
+@@ -1467,9 +1610,12 @@ maybe_warn_bidi_on_char (cpp_reader *pfi
+ 	{
+ 	  if (warn_bidi == bidirectional_unpaired
+ 	      && bidi::current_ctx_ucn_p () != ucn_p)
+-	    cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
+-			    "UTF-8 vs UCN mismatch when closing "
+-			    "a context by \"%s\"", bidi::to_str (kind));
++	    {
++	      rich_loc.add_range (bidi::current_ctx_loc ());
++	      cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc,
++			      "UTF-8 vs UCN mismatch when closing "
++			      "a context by \"%s\"", bidi::to_str (kind));
++	    }
+ 	}
+       else if (warn_bidi == bidirectional_any)
+ 	{
+@@ -1484,7 +1630,7 @@ maybe_warn_bidi_on_char (cpp_reader *pfi
+ 	}
+     }
+   /* We're done with this context.  */
+-  bidi::on_char (kind, ucn_p);
++  bidi::on_char (kind, ucn_p, loc);
+ }
+ 
+ /* Skip a C-style block comment.  We find the end of the comment by
+@@ -1552,8 +1698,9 @@ _cpp_skip_block_comment (cpp_reader *pfi
+ 	 a bidirectional control character.  */
+       else if (__builtin_expect (c == bidi::utf8_start, 0) && warn_bidi_p)
+ 	{
+-	  bidi::kind kind = get_bidi_utf8 (cur - 1);
+-	  maybe_warn_bidi_on_char (pfile, cur, kind, /*ucn_p=*/false);
++	  location_t loc;
++	  bidi::kind kind = get_bidi_utf8 (pfile, cur - 1, &loc);
++	  maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc);
+ 	}
+     }
+ 
+@@ -1586,9 +1733,9 @@ skip_line_comment (cpp_reader *pfile)
+ 	    {
+ 	      if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0))
+ 		{
+-		  bidi::kind kind = get_bidi_utf8 (buffer->cur);
+-		  maybe_warn_bidi_on_char (pfile, buffer->cur, kind,
+-					   /*ucn_p=*/false);
++		  location_t loc;
++		  bidi::kind kind = get_bidi_utf8 (pfile, buffer->cur, &loc);
++		  maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc);
+ 		}
+ 	      buffer->cur++;
+ 	    }
+@@ -1708,9 +1855,9 @@ forms_identifier_p (cpp_reader *pfile, i
+ 	  if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0)
+ 	      && warn_bidi_p)
+ 	    {
+-	      bidi::kind kind = get_bidi_utf8 (buffer->cur);
+-	      maybe_warn_bidi_on_char (pfile, buffer->cur, kind,
+-				       /*ucn_p=*/false);
++	      location_t loc;
++	      bidi::kind kind = get_bidi_utf8 (pfile, buffer->cur, &loc);
++	      maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc);
+ 	    }
+ 	  if (_cpp_valid_utf8 (pfile, &buffer->cur, buffer->rlimit, 1 + !first,
+ 			       state, &s))
+@@ -1722,10 +1869,12 @@ forms_identifier_p (cpp_reader *pfile, i
+ 	  buffer->cur += 2;
+ 	  if (warn_bidi_p)
+ 	    {
+-	      bidi::kind kind = get_bidi_ucn (buffer->cur,
+-					      buffer->cur[-1] == 'U');
+-	      maybe_warn_bidi_on_char (pfile, buffer->cur, kind,
+-				       /*ucn_p=*/true);
++	      location_t loc;
++	      bidi::kind kind = get_bidi_ucn (pfile,
++					      buffer->cur,
++					      buffer->cur[-1] == 'U',
++					      &loc);
++	      maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/true, loc);
+ 	    }
+ 	  if (_cpp_valid_ucn (pfile, &buffer->cur, buffer->rlimit, 1 + !first,
+ 			      state, &s, NULL, NULL))
+@@ -2336,8 +2485,11 @@ lex_raw_string (cpp_reader *pfile, cpp_t
+ 	}
+       else if (__builtin_expect ((unsigned char) c == bidi::utf8_start, 0)
+ 	       && warn_bidi_p)
+-	maybe_warn_bidi_on_char (pfile, pos - 1, get_bidi_utf8 (pos - 1),
+-				 /*ucn_p=*/false);
++	{
++	  location_t loc;
++	  bidi::kind kind = get_bidi_utf8 (pfile, pos - 1, &loc);
++	  maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc);
++	}
+     }
+ 
+   if (warn_bidi_p)
+@@ -2447,8 +2599,10 @@ lex_string (cpp_reader *pfile, cpp_token
+ 	{
+ 	  if ((cur[0] == 'u' || cur[0] == 'U') && warn_bidi_p)
+ 	    {
+-	      bidi::kind kind = get_bidi_ucn (cur + 1, cur[0] == 'U');
+-	      maybe_warn_bidi_on_char (pfile, cur, kind, /*ucn_p=*/true);
++	      location_t loc;
++	      bidi::kind kind = get_bidi_ucn (pfile, cur + 1, cur[0] == 'U',
++					      &loc);
++	      maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/true, loc);
+ 	    }
+ 	  cur++;
+ 	}
+@@ -2476,8 +2630,9 @@ lex_string (cpp_reader *pfile, cpp_token
+ 	saw_NUL = true;
+       else if (__builtin_expect (c == bidi::utf8_start, 0) && warn_bidi_p)
+ 	{
+-	  bidi::kind kind = get_bidi_utf8 (cur - 1);
+-	  maybe_warn_bidi_on_char (pfile, cur - 1, kind, /*ucn_p=*/false);
++	  location_t loc;
++	  bidi::kind kind = get_bidi_utf8 (pfile, cur - 1, &loc);
++	  maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc);
+ 	}
+     }
+ 
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch b/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index 265ca0e..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 127716a32a11ca2a6b3aac068054bfc69c4dcfd8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index be7630ffd8c..1bc45285384 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -5383,6 +5383,15 @@ set_collect_gcc_options (void)
- 		sizeof ("COLLECT_GCC_OPTIONS=") - 1);
- 
-   first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+  if (target_system_root_changed && target_system_root)
-+    {
-+      obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+      obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+      obstack_grow (&collect_obstack, "'", 1);
-+      first_time = FALSE;
-+    }
-+#endif
-   for (i = 0; (int) i < n_switches; i++)
-     {
-       const char *const *args;
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch
deleted file mode 100644
index 47f611e..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 904d102e3ccb93296b16ceb2e283a6ccf3c1d718 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure    | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index f3634389cf8..f974e874b8e 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -13102,7 +13102,7 @@ esac
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 8961e314d82..49c8221cb6b 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -271,7 +271,7 @@ AC_SUBST(enable_static)
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
- 
- # extra LD Flags which are required for targets
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch b/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index f385f8c..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From a2dc2fa4cc7e5d54544d4a7b6601eef79bc26cad Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 3ec7582f5dd..a046fa6945c 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2543,29 +2543,29 @@ mips*-*-linux*)				# Linux MIPS, either endian.
- 			default_mips_arch=mips32
- 			;;
- 		mips64el-st-linux-gnu)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			tm_file="${tm_file} mips/st.h"
- 			tmake_file="${tmake_file} mips/t-st"
- 			enable_mips_multilibs="yes"
- 			;;
- 		mips64octeon*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
- 			target_cpu_default=MASK_SOFT_FLOAT_ABI
- 			enable_mips_multilibs="yes"
- 			;;
- 		mipsisa64r6*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			default_mips_arch=mips64r6
- 			enable_mips_multilibs="yes"
- 			;;
- 		mipsisa64r2*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			default_mips_arch=mips64r2
- 			enable_mips_multilibs="yes"
- 			;;
- 		mips64*-*-linux* | mipsisa64*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			enable_mips_multilibs="yes"
- 			;;
- 	esac
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch b/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
index 6b69257..ebee30b 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
@@ -17,7 +17,8 @@
 
 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
 
-Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582722.html]
+Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582722.html]
+Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=66e157188bd2f789809e17e85f917534c9381599]
 ---
  gcc/Makefile.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch b/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
index 86f75d0..fd7d604 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
@@ -6,7 +6,7 @@
 musl defines ptrdiff_t size_t and wchar_t
 so dont define them here if musl is definining them
 
-Upstream-Status: Pending
+Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=85a438fc78dd12249ca854a3e5c577fefeb1a5cd]
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch b/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
deleted file mode 100644
index 70afa4f..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 3d59f763b824ac11f8360931092baf0bc1719562 Mon Sep 17 00:00:00 2001
-From: Juro Bystricky <juro.bystricky@intel.com>
-Date: Mon, 19 Mar 2018 22:31:20 -0700
-Subject: [PATCH] fix segmentation fault in precompiled header generation
-
-Prevent a segmentation fault which occurs when using incorrect
-structure trying to access name of some named operators, such as
-CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in
-those cases, as is may not be initialized at all.
-
-[YOCTO #11738]
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libcpp/lex.c | 26 +++++++++++++++++++++-----
- 1 file changed, 21 insertions(+), 5 deletions(-)
-
-diff --git a/libcpp/lex.c b/libcpp/lex.c
-index 06bcc31c87e..24bed9a35fa 100644
---- a/libcpp/lex.c
-+++ b/libcpp/lex.c
-@@ -3531,11 +3531,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
-     spell_ident:
-     case SPELL_IDENT:
-       if (forstring)
--	{
--	  memcpy (buffer, NODE_NAME (token->val.node.spelling),
--		  NODE_LEN (token->val.node.spelling));
--	  buffer += NODE_LEN (token->val.node.spelling);
--	}
-+        {
-+          if (token->type == CPP_NAME)
-+            {
-+              memcpy (buffer, NODE_NAME (token->val.node.spelling),
-+                    NODE_LEN (token->val.node.spelling));
-+              buffer += NODE_LEN (token->val.node.spelling);
-+              break;
-+            }
-+          /* NAMED_OP, cannot use node.spelling */
-+          if (token->flags & NAMED_OP)
-+            {
-+              const char *str = cpp_named_operator2name (token->type);
-+              if (str)
-+                {
-+                  size_t len = strlen(str);
-+                  memcpy(buffer, str, len);
-+                  buffer += len;
-+                }
-+              break;
-+            }
-+        }
-       else
- 	buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node);
-       break;
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran.inc b/poky/meta/recipes-devtools/gcc/libgfortran.inc
index 344ec5e..e810146 100644
--- a/poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -5,6 +5,11 @@
     --with-build-sysroot=${STAGING_DIR_TARGET} \
 "
 
+# An arm hard float target like raspberrypi4 won't build
+# as CFLAGS don't make it to the fortran compiler otherwise
+# (the configure script sets FC to $GFORTRAN unconditionally)
+export GFORTRAN = "${FC}"
+
 do_configure () {
 	for target in libbacktrace libgfortran
 	do
diff --git a/poky/meta/recipes-devtools/gdb/gdb-10.2.inc b/poky/meta/recipes-devtools/gdb/gdb-10.2.inc
deleted file mode 100644
index 0d27507..0000000
--- a/poky/meta/recipes-devtools/gdb/gdb-10.2.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-		    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
-		    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
-		    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-
-SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \
-           file://0001-make-man-install-relative-to-DESTDIR.patch \
-           file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
-           file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
-           file://0004-Add-support-for-Renesas-SH-sh4-architecture.patch \
-           file://0005-Dont-disable-libreadline.a-when-using-disable-static.patch \
-           file://0006-use-asm-sgidefs.h.patch \
-           file://0008-Change-order-of-CFLAGS.patch \
-           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-11.1.inc b/poky/meta/recipes-devtools/gdb/gdb-11.1.inc
new file mode 100644
index 0000000..5364a88
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb-11.1.inc
@@ -0,0 +1,19 @@
+LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+		    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+		    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+		    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
+
+SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \
+           file://0001-make-man-install-relative-to-DESTDIR.patch \
+           file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
+           file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
+           file://0005-Dont-disable-libreadline.a-when-using-disable-static.patch \
+           file://0006-use-asm-sgidefs.h.patch \
+           file://0007-Change-order-of-CFLAGS.patch \
+           file://0008-resolve-restrict-keyword-conflict.patch \
+           file://0009-Fix-invalid-sigprocmask-call.patch \
+           file://0010-gdbserver-ctrl-c-handling.patch \
+           file://0011-AArch64-Make-gdbserver-register-set-selection-dynamic.patch \
+           "
+SRC_URI[sha256sum] = "cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-common.inc b/poky/meta/recipes-devtools/gdb/gdb-common.inc
index 0fe7b4e..925b0c2 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -2,7 +2,7 @@
 HOMEPAGE = "http://www.gnu.org/software/gdb/"
 DESCRIPTION = "GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed."
 SECTION = "devel"
-DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST} bison-native"
+DEPENDS = "expat gmp zlib ncurses virtual/libiconv ${LTTNGUST} bison-native"
 
 LTTNGUST = "lttng-ust"
 LTTNGUST:arc = ""
@@ -27,6 +27,7 @@
                 --disable-gas --disable-binutils \
                 --disable-ld --disable-gold \
                 --disable-gprof \
+                --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
 "
 
 PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
@@ -36,7 +37,7 @@
 PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
 # ncurses is already a hard DEPENDS, but would be added here if it weren't
 PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
-PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
+PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz"
 PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
 
 GDBPROPREFIX = "--program-prefix=''"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index dfacba2..836c51a 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -6,7 +6,7 @@
 PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 BPN = "gdb"
 
-DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext \
+DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp \
            virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc"
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.2.bb b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_11.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.2.bb
rename to poky/meta/recipes-devtools/gdb/gdb-cross-canadian_11.1.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross.inc b/poky/meta/recipes-devtools/gdb/gdb-cross.inc
index 4e50cd5..9f9675c 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -1,6 +1,6 @@
 require gdb-common.inc
 
-DEPENDS = "expat-native ncurses-native flex-native bison-native"
+DEPENDS = "expat-native gmp-native ncurses-native flex-native bison-native"
 
 inherit python3native pkgconfig
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross_10.2.bb b/poky/meta/recipes-devtools/gdb/gdb-cross_11.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gdb/gdb-cross_10.2.bb
rename to poky/meta/recipes-devtools/gdb/gdb-cross_11.1.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
index 84d1783..824b96f 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
@@ -1,22 +1,22 @@
-From e5126c7167e26f865990dc5f86344602603aa8c6 Mon Sep 17 00:00:00 2001
+From a6d3df9d84463ec500d9d01558ab8a17e824e9e5 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 02:27:55 +0000
-Subject: [PATCH 01/11] make man install relative to DESTDIR
+Subject: [PATCH 01/10] make man install relative to DESTDIR
 
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- sim/common/Makefile.in | 2 +-
+ sim/common/Make-common.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
-index f713fcaa35b..7c553709d3f 100644
---- a/sim/common/Makefile.in
-+++ b/sim/common/Makefile.in
-@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias)
- datarootdir = @datarootdir@
+diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
+index 8c2cacea1e5..4a52eef2203 100644
+--- a/sim/common/Make-common.in
++++ b/sim/common/Make-common.in
+@@ -63,7 +63,7 @@ tooldir = $(libdir)/$(target_alias)
  datadir = @datadir@
+ datarootdir = @datarootdir@
  mandir = @mandir@
 -man1dir = $(mandir)/man1
 +man1dir = $(DESTDIR)$(mandir)/man1
@@ -24,5 +24,5 @@
  includedir = @includedir@
  
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/poky/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
index f830993..591c9bf 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
@@ -1,7 +1,7 @@
-From 0680242c9a3a0149a23e63034ecb4404de2293dd Mon Sep 17 00:00:00 2001
+From 7f1f25eaaace289bc33c5aaa1c5fe9e04e719651 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 23 Mar 2016 06:30:09 +0000
-Subject: [PATCH 02/11] mips-linux-nat: Define _ABIO32 if not defined
+Subject: [PATCH 02/10] mips-linux-nat: Define _ABIO32 if not defined
 
 This helps building gdb on mips64 on musl, since
 musl does not provide sgidefs.h this define is
@@ -16,7 +16,7 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index 38ff461a35b..4337795bac8 100644
+index b21c7cb2ea6..6614b4de31e 100644
 --- a/gdb/mips-linux-nat.c
 +++ b/gdb/mips-linux-nat.c
 @@ -41,6 +41,10 @@
@@ -31,5 +31,5 @@
  class mips_linux_nat_target final : public linux_nat_trad_target
  {
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/poky/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
index cbe1779..09ea533 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -1,7 +1,7 @@
-From afbb66c244b1ae0aaaa90d88d3cd484f741c614f Mon Sep 17 00:00:00 2001
+From 0cb233ec3951582fa1a051a16bfd644ef4969df5 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 30 Apr 2016 18:32:14 -0700
-Subject: [PATCH 03/11] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
+Subject: [PATCH 03/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
  systems
 
 Upstream-Status: Pending
@@ -13,7 +13,7 @@
  2 files changed, 12 insertions(+)
 
 diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
-index d937a65b69c..1fd54b4a0e0 100644
+index e712a9a5713..76bbcca0928 100644
 --- a/gdb/nat/ppc-linux.h
 +++ b/gdb/nat/ppc-linux.h
 @@ -18,7 +18,13 @@
@@ -31,7 +31,7 @@
  
  /* This sometimes isn't defined.  */
 diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
-index 337d555aee7..5d518f37268 100644
+index db9a88219ea..151e4183bb1 100644
 --- a/gdbserver/linux-ppc-low.cc
 +++ b/gdbserver/linux-ppc-low.cc
 @@ -23,7 +23,13 @@
@@ -49,5 +49,5 @@
  #include "arch/ppc-linux-common.h"
  #include "arch/ppc-linux-tdesc.h"
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0004-Add-support-for-Renesas-SH-sh4-architecture.patch b/poky/meta/recipes-devtools/gdb/gdb/0004-Add-support-for-Renesas-SH-sh4-architecture.patch
deleted file mode 100644
index 561cfff..0000000
--- a/poky/meta/recipes-devtools/gdb/gdb/0004-Add-support-for-Renesas-SH-sh4-architecture.patch
+++ /dev/null
@@ -1,913 +0,0 @@
-From 26e406962cf7298837b350b979afff0ac34ecb0b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 02:31:12 +0000
-Subject: [PATCH 04/11] Add support for Renesas SH (sh4) architecture.
-
-gdb (7.4-1~cvs20111117.2) experimental; urgency=low
- .
-   * Add Renesas SH (sh4) support (Closes: #576242)
-     - Thanks Nobuhiro Iwamatsu, Takashi Yoshii.
-Author: Hector Oron <zumbi@debian.org>
-Bug-Debian: http://bugs.debian.org/576242
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gdb/Makefile.in                      |   2 +
- gdb/configure.host                   |   1 +
- gdb/sh-linux-tdep.c                  | 519 +++++++++++++++++++++++++++
- gdb/sh-tdep.c                        |  52 +--
- gdb/sh-tdep.h                        |  49 +++
- gdb/testsuite/gdb.asm/asm-source.exp |   5 +
- gdb/testsuite/gdb.asm/sh.inc         |   3 +-
- gdb/testsuite/gdb.base/annota1.c     |   3 +
- gdb/testsuite/gdb.base/annota3.c     |   4 +
- gdb/testsuite/gdb.base/sigall.c      |   3 +
- gdb/testsuite/gdb.base/signals.c     |   4 +
- 11 files changed, 617 insertions(+), 28 deletions(-)
-
-diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index 4808357e651..a009004ab05 100644
---- a/gdb/Makefile.in
-+++ b/gdb/Makefile.in
-@@ -2273,6 +2273,8 @@ ALLDEPFILES = \
- 	sh-nbsd-nat.c \
- 	sh-nbsd-tdep.c \
- 	sh-tdep.c \
-+	sh-linux-tdep.c \
-+	sh-linux-nat.c \
- 	sol2-tdep.c \
- 	solib-aix.c \
- 	solib-svr4.c \
-diff --git a/gdb/configure.host b/gdb/configure.host
-index ce528237291..5b5173a71aa 100644
---- a/gdb/configure.host
-+++ b/gdb/configure.host
-@@ -148,6 +148,7 @@ riscv*-*-linux*)	gdb_host=linux ;;
- 
- s390*-*-linux*)		gdb_host=linux ;;
- 
-+sh*-*-linux*)		gdb_host=linux ;;
- sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
- 			gdb_host=nbsd ;;
- sh*-*-openbsd*)		gdb_host=nbsd ;;
-diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
-index 5d2f38f5801..06a45b74827 100644
---- a/gdb/sh-linux-tdep.c
-+++ b/gdb/sh-linux-tdep.c
-@@ -18,14 +18,37 @@
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
- 
- #include "defs.h"
-+#include "gdbcore.h"
-+#include "frame.h"
-+#include "frame-base.h"
-+#include "frame-unwind.h"
-+#include "dwarf2-frame.h"
-+#include "value.h"
-+#include "regcache.h"
-+#include "inferior.h"
- #include "osabi.h"
- 
-+#include "reggroups.h"
-+#include "arch-utils.h"
-+#include "floatformat.h"
- #include "solib-svr4.h"
- #include "symtab.h"
-+#include "gdb_string.h"
-+#include "command.h"
-+#include "gdb_assert.h"
- 
- #include "trad-frame.h"
- #include "tramp-frame.h"
- 
-+#include <sys/ptrace.h>
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <sys/user.h>
-+#include <sys/syscall.h>
-+
-+#include <asm/ptrace.h>
-+
-+#include "regset.h"
- #include "glibc-tdep.h"
- #include "sh-tdep.h"
- #include "linux-tdep.h"
-@@ -181,9 +204,505 @@ static struct tramp_frame sh_linux_rt_sigreturn_tramp_frame = {
-   sh_linux_rt_sigreturn_init
- };
- 
-+/* Recognizing signal handler frames.  */
-+
-+/* GNU/Linux has two flavors of signals.  Normal signal handlers, and
-+   "realtime" (RT) signals.  The RT signals can provide additional
-+   information to the signal handler if the SA_SIGINFO flag is set
-+   when establishing a signal handler using `sigaction'.  It is not
-+   unlikely that future versions of GNU/Linux will support SA_SIGINFO
-+   for normal signals too.  */
-+
-+/* When the SH Linux kernel calls a signal handler and the
-+   SA_RESTORER flag isn't set, the return address points to a bit of
-+   code on the stack.  This function returns whether the PC appears to
-+   be within this bit of code.
-+
-+   The instruction sequence for normal signals is
-+       mov.w  1f,r3
-+       trapa  #16
-+       or     r0, r0
-+       or     r0, r0
-+       or     r0, r0
-+       or     r0, r0
-+       or     r0, r0
-+    1: .word  __NR_sigreturn
-+   or 0x9305 0xc310 0x200b 0x200b 0x200b 0x200b 0x200b 0x0077.
-+
-+   Checking for the code sequence should be somewhat reliable, because
-+   the effect is to call the system call sigreturn.  This is unlikely
-+   to occur anywhere other than a signal trampoline.
-+
-+   It kind of sucks that we have to read memory from the process in
-+   order to identify a signal trampoline, but there doesn't seem to be
-+   any other way.  The PC_IN_SIGTRAMP macro in tm-linux.h arranges to
-+   only call us if no function name could be identified, which should
-+   be the case since the code is on the stack.
-+
-+   Detection of signal trampolines for handlers that set the
-+   SA_RESTORER flag is in general not possible.  Unfortunately this is
-+   what the GNU C Library has been doing for quite some time now.
-+   However, as of version 2.1.2, the GNU C Library uses signal
-+   trampolines (named __restore and __restore_rt) that are identical
-+   to the ones used by the kernel.  Therefore, these trampolines are
-+   supported too.  */
-+
-+#define MOVW(n)	 (0x9300|((n)-2))	/* Move mem word at PC+n to R3 */
-+#define TRAP16	 0xc310			/* Syscall w/no args (NR in R3) */
-+#define OR_R0_R0 0x200b			/* or r0,r0 (insert to avoid hardware bug) */
-+
-+#define LINUX_SIGTRAMP_INSN0	MOVW(7)		/* Move mem word at PC+7 to R3 */
-+#define LINUX_SIGTRAMP_INSN1	TRAP16		/* Syscall w/no args (NR in R3) */
-+#define LINUX_SIGTRAMP_INSN2	OR_R0_R0	/* or r0,r0 (insert to avoid hardware bug) */
-+
-+static const unsigned short linux_sigtramp_code[] =
-+{
-+  LINUX_SIGTRAMP_INSN0,
-+  LINUX_SIGTRAMP_INSN1,
-+  LINUX_SIGTRAMP_INSN2,
-+  LINUX_SIGTRAMP_INSN2,
-+  LINUX_SIGTRAMP_INSN2,
-+  LINUX_SIGTRAMP_INSN2,
-+  LINUX_SIGTRAMP_INSN2,
-+  __NR_sigreturn
-+};
-+
-+#define LINUX_SIGTRAMP_LEN (sizeof linux_sigtramp_code)
-+
-+/* If PC is in a sigtramp routine, return the address of the start of
-+   the routine.  Otherwise, return 0.  */
-+
-+static CORE_ADDR
-+sh_linux_sigtramp_start (struct frame_info *next_frame)
-+{
-+  CORE_ADDR pc = get_frame_pc (next_frame);
-+  gdb_byte buf[LINUX_SIGTRAMP_LEN];
-+
-+  /* We only recognize a signal trampoline if PC is at the start of
-+     one of the three instructions.  We optimize for finding the PC at
-+     the start, as will be the case when the trampoline is not the
-+     first frame on the stack.  We assume that in the case where the
-+     PC is not at the start of the instruction sequence, there will be
-+     a few trailing readable bytes on the stack.  */
-+
-+  if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
-+    return 0;
-+
-+  if (buf[0] != LINUX_SIGTRAMP_INSN0)
-+    {
-+      if (buf[0] != LINUX_SIGTRAMP_INSN1)
-+        return 0;
-+
-+      pc -= 2;
-+
-+      if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
-+	return 0;
-+    }
-+
-+  if (memcmp (buf, linux_sigtramp_code, LINUX_SIGTRAMP_LEN) != 0)
-+    return 0;
-+
-+  return pc;
-+}
-+
-+/* This function does the same for RT signals.  Here the instruction
-+   sequence is
-+       mov.w  1f,r3
-+       trapa  #16
-+       or     r0, r0
-+       or     r0, r0
-+       or     r0, r0
-+       or     r0, r0
-+       or     r0, r0
-+    1: .word  __NR_rt_sigreturn
-+   or 0x9305 0xc310 0x200b 0x200b 0x200b 0x200b 0x200b 0x00ad.
-+
-+   The effect is to call the system call rt_sigreturn.  */
-+
-+#define LINUX_RT_SIGTRAMP_INSN0		MOVW(7)		/* Move mem word at PC+7 to R3 */
-+#define LINUX_RT_SIGTRAMP_INSN1		TRAP16		/* Syscall w/no args (NR in R3) */
-+#define LINUX_RT_SIGTRAMP_INSN2		OR_R0_R0	/* or r0,r0 (insert to avoid hardware bug) */
-+
-+static const unsigned short linux_rt_sigtramp_code[] =
-+{
-+  LINUX_RT_SIGTRAMP_INSN0,
-+  LINUX_RT_SIGTRAMP_INSN1,
-+  LINUX_RT_SIGTRAMP_INSN2,
-+  LINUX_RT_SIGTRAMP_INSN2,
-+  LINUX_RT_SIGTRAMP_INSN2,
-+  LINUX_RT_SIGTRAMP_INSN2,
-+  LINUX_RT_SIGTRAMP_INSN2,
-+  __NR_rt_sigreturn
-+};
-+
-+#define LINUX_RT_SIGTRAMP_LEN (sizeof linux_rt_sigtramp_code)
-+
-+/* If PC is in a RT sigtramp routine, return the address of the start
-+   of the routine.  Otherwise, return 0.  */
-+
-+static CORE_ADDR
-+sh_linux_rt_sigtramp_start (struct frame_info *next_frame)
-+{
-+  CORE_ADDR pc = get_frame_pc (next_frame);
-+  gdb_byte buf[LINUX_RT_SIGTRAMP_LEN];
-+
-+  /* We only recognize a signal trampoline if PC is at the start of
-+     one of the two instructions.  We optimize for finding the PC at
-+     the start, as will be the case when the trampoline is not the
-+     first frame on the stack.  We assume that in the case where the
-+     PC is not at the start of the instruction sequence, there will be
-+     a few trailing readable bytes on the stack.  */
-+
-+  if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_RT_SIGTRAMP_LEN))
-+    return 0;
-+
-+  if (buf[0] != LINUX_RT_SIGTRAMP_INSN0)
-+    {
-+      if (buf[0] != LINUX_RT_SIGTRAMP_INSN1)
-+	return 0;
-+
-+      pc -= 2;
-+
-+      if (!safe_frame_unwind_memory (next_frame, pc, buf,
-+				     LINUX_RT_SIGTRAMP_LEN))
-+	return 0;
-+    }
-+
-+  if (memcmp (buf, linux_rt_sigtramp_code, LINUX_RT_SIGTRAMP_LEN) != 0)
-+    return 0;
-+
-+  return pc;
-+}
-+
-+/* Return whether PC is in a GNU/Linux sigtramp routine.  */
-+
-+static int
-+sh_linux_sigtramp_p (struct frame_info *this_frame)
-+{
-+  CORE_ADDR pc = get_frame_pc (this_frame);
-+  char *name;
-+
-+  find_pc_partial_function (pc, &name, NULL, NULL);
-+
-+  /* If we have NAME, we can optimize the search.  The trampolines are
-+     named __restore and __restore_rt.  However, they aren't dynamically
-+     exported from the shared C library, so the trampoline may appear to
-+     be part of the preceding function.  This should always be sigaction,
-+     __sigaction, or __libc_sigaction (all aliases to the same function).  */
-+  if (name == NULL || strstr (name, "sigaction") != NULL)
-+    return (sh_linux_sigtramp_start (this_frame) != 0
-+	    || sh_linux_rt_sigtramp_start (this_frame) != 0);
-+
-+  return (strcmp ("__restore", name) == 0
-+	  || strcmp ("__restore_rt", name) == 0);
-+}
-+
-+/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>.  */
-+#define SH_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 12
-+
-+
-+/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
-+   routine, return the address of the associated sigcontext structure.  */
-+
-+static CORE_ADDR
-+sh_linux_sigcontext_addr (struct frame_info *this_frame)
-+{
-+  CORE_ADDR pc;
-+  CORE_ADDR sp;
-+
-+  sp = get_frame_register_unsigned (this_frame, SP_REGNUM);
-+
-+  pc = sh_linux_sigtramp_start (this_frame);
-+  if (pc)
-+    {
-+      return sp;
-+    }
-+
-+  pc = sh_linux_rt_sigtramp_start (this_frame);
-+  if (pc)
-+    {
-+      CORE_ADDR ucontext_addr;
-+
-+      /* The sigcontext structure is part of the user context.  A
-+	 pointer to the user context is passed as the third argument
-+	 to the signal handler.  */
-+      ucontext_addr = get_frame_register_unsigned (this_frame, ARG0_REGNUM+2);
-+      return ucontext_addr + SH_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-+    }
-+
-+  error ("Couldn't recognize signal trampoline.");
-+  return 0;
-+}
-+
-+/* Signal trampolines.  */
-+extern struct sh_frame_cache *sh_alloc_frame_cache (void);
-+
-+static struct sh_frame_cache *
-+sh_linux_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
-+{
-+  struct sh_frame_cache *cache;
-+  struct gdbarch_tdep *tdep = gdbarch_tdep (get_current_arch ());
-+  CORE_ADDR sigcontext_addr;
-+
-+  if (*this_cache)
-+    return *this_cache;
-+
-+  cache = sh_alloc_frame_cache ();
-+
-+  cache->base = get_frame_register_unsigned (this_frame, SP_REGNUM);
-+  sigcontext_addr = tdep->sigcontext_addr (this_frame);
-+  if (tdep->sc_reg_offset)
-+    {
-+      int i;
-+
-+      gdb_assert (tdep->sc_num_regs <= SH_NUM_REGS);
-+
-+      for (i = 0; i < tdep->sc_num_regs; i++)
-+	if (tdep->sc_reg_offset[i] != -1)
-+	  cache->saved_regs[i] = sigcontext_addr + tdep->sc_reg_offset[i];
-+    }
-+
-+  *this_cache = cache;
-+  return cache;
-+}
-+
-+static void
-+sh_linux_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache,
-+			     struct frame_id *this_id)
-+{
-+  struct sh_frame_cache *cache =
-+    sh_linux_sigtramp_frame_cache (this_frame, this_cache);
-+
-+  (*this_id) = frame_id_build (cache->base + 64, cache->pc);
-+}
-+
-+extern struct value * sh_frame_prev_register ();
-+static struct value *
-+sh_linux_sigtramp_frame_prev_register (struct frame_info *this_frame,
-+                   void **this_cache, int regnum)
-+{
-+  sh_linux_sigtramp_frame_cache (this_frame, this_cache);
-+
-+  return sh_frame_prev_register (this_frame, this_cache, regnum);
-+}
-+
-+static int
-+sh_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
-+                 struct frame_info *this_frame,
-+                 void **this_prologue_cache)
-+{
-+  struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
-+
-+  /* We shouldn't even bother if we don't have a sigcontext_addr
-+     handler.  */
-+  if (tdep->sigcontext_addr == NULL)
-+    return 0;
-+
-+  if (tdep->sigtramp_p != NULL)
-+    {
-+      if (tdep->sigtramp_p (this_frame))
-+    return 1;
-+    }
-+
-+  return 0;
-+}
-+
-+static const struct frame_unwind sh_linux_sigtramp_frame_unwind =
-+{
-+  SIGTRAMP_FRAME,
-+  sh_linux_sigtramp_frame_this_id,
-+  sh_linux_sigtramp_frame_prev_register,
-+  NULL,
-+  sh_linux_sigtramp_frame_sniffer
-+};
-+
-+/* Supply register REGNUM from the buffer specified by GREGS and LEN
-+   in the general-purpose register set REGSET to register cache
-+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-+
-+void
-+sh_supply_gregset (const struct regset *regset, struct regcache *regcache,
-+             int regnum, const void *gregs, size_t len)
-+{
-+  const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+  const char *regs = gregs;
-+  int i;
-+
-+  gdb_assert (len == tdep->sizeof_gregset);
-+
-+  for (i = 0; i < tdep->gregset_num_regs; i++)
-+    {
-+      if ((regnum == i || regnum == -1)
-+      && tdep->gregset_reg_offset[i] != -1)
-+    regcache_raw_supply (regcache, i, regs + tdep->gregset_reg_offset[i]);
-+    }
-+}
-+
-+/* Collect register REGNUM from the register cache REGCACHE and store
-+   it in the buffer specified by GREGS and LEN as described by the
-+   general-purpose register set REGSET.  If REGNUM is -1, do this for
-+   all registers in REGSET.  */
-+
-+void
-+sh_collect_gregset (const struct regset *regset,
-+              const struct regcache *regcache,
-+              int regnum, void *gregs, size_t len)
-+{
-+  const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+  char *regs = gregs;
-+  int i;
-+
-+  gdb_assert (len == tdep->sizeof_gregset);
-+
-+  for (i = 0; i < tdep->gregset_num_regs; i++)
-+    {
-+      if ((regnum == i || regnum == -1)
-+      && tdep->gregset_reg_offset[i] != -1)
-+    regcache_raw_collect (regcache, i, regs + tdep->gregset_reg_offset[i]);
-+    }
-+}
-+
-+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
-+   in the floating-point register set REGSET to register cache
-+   REGCACHE.  If REGNUM is -1, do this for all registers in REGSET.  */
-+
-+static void
-+sh_supply_fpregset (const struct regset *regset, struct regcache *regcache,
-+              int regnum, const void *fpregs, size_t len)
-+{
-+  const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+  const char *regs = fpregs;
-+  int i;
-+
-+  gdb_assert (len == tdep->sizeof_fpregset);
-+  for (i = 0; i < 16; i++)
-+    {
-+      if (regnum == i+25 || regnum == -1)
-+    regcache_raw_supply (regcache, i+25, regs + i*4);
-+    }
-+  if (regnum == FPSCR_REGNUM || regnum == -1)
-+    regcache_raw_supply (regcache, FPSCR_REGNUM, regs + 32*4);
-+  if (regnum == FPUL_REGNUM || regnum == -1)
-+    regcache_raw_supply (regcache, FPUL_REGNUM, regs + 33*4);
-+}
-+
-+/* Collect register REGNUM from the register cache REGCACHE and store
-+   it in the buffer specified by FPREGS and LEN as described by the
-+   floating-point register set REGSET.  If REGNUM is -1, do this for
-+   all registers in REGSET.  */
-+
-+static void
-+sh_collect_fpregset (const struct regset *regset,
-+               const struct regcache *regcache,
-+               int regnum, void *fpregs, size_t len)
-+{
-+  const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+  char *regs = fpregs;
-+  int i;
-+
-+  gdb_assert (len == tdep->sizeof_fpregset);
-+  for (i = 0; i < 16; i++)
-+    {
-+      if (regnum == i+25 || regnum == -1)
-+    regcache_raw_collect (regcache, i+25, regs + i*4);
-+    }
-+  if (regnum == FPSCR_REGNUM || regnum == -1)
-+    regcache_raw_collect (regcache, FPSCR_REGNUM, regs + 32*4);
-+  if (regnum == FPUL_REGNUM || regnum == -1)
-+    regcache_raw_collect (regcache, FPUL_REGNUM, regs + 33*4);
-+}
-+
-+/* Return the appropriate register set for the core section identified
-+   by SECT_NAME and SECT_SIZE.  */
-+
-+const struct regset *
-+sh_linux_regset_from_core_section (struct gdbarch *gdbarch,
-+                   const char *sect_name, size_t sect_size)
-+{
-+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-+
-+  if (strcmp (sect_name, ".reg") == 0 && sect_size == tdep->sizeof_gregset)
-+    {
-+      if (tdep->gregset == NULL)
-+    tdep->gregset = regset_alloc (gdbarch, sh_supply_gregset,
-+                      sh_collect_gregset);
-+      return tdep->gregset;
-+    }
-+
-+  if ((strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset))
-+    {
-+      if (tdep->fpregset == NULL)
-+    tdep->fpregset = regset_alloc (gdbarch, sh_supply_fpregset,
-+                       sh_collect_fpregset);
-+      return tdep->fpregset;
-+    }
-+
-+  return NULL;
-+}
-+
-+/* The register sets used in GNU/Linux ELF core-dumps are identical to
-+   the register sets in `struct user' that are used for a.out
-+   core-dumps.  These are also used by ptrace(2).  The corresponding
-+   types are `elf_gregset_t' for the general-purpose registers (with
-+   `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
-+   for the floating-point registers.
-+
-+   Those types used to be available under the names `gregset_t' and
-+   `fpregset_t' too, and GDB used those names in the past.  But those
-+   names are now used for the register sets used in the `mcontext_t'
-+   type, which have a different size and layout.  */
-+
-+/* Mapping between the general-purpose registers in `struct user'
-+   format and GDB's register cache layout.  */
-+
-+/* From <sys/reg.h>.  */
-+static int sh_linux_gregset_reg_offset[] =
-+{
-+ 0,	4,	8,	12,	16,	20,	24,	28,
-+ 32,	36,	40,	44,	48,	52,	56,	60,
-+
-+ REG_PC*4,   REG_PR*4,   REG_GBR*4,  -1,
-+ REG_MACH*4, REG_MACL*4, REG_SR*4,
-+};
-+
-+/* Mapping between the general-purpose registers in `struct
-+   sigcontext' format and GDB's register cache layout.  */
-+
-+/* From <asm/sigcontext.h>.  */
-+static int sh_linux_sc_reg_offset[] =
-+{
-+ 4,	8,	12,	16,	20,	24,	28,	32,
-+ 36,	40,	44,	48,	52,	56,	60,	64,
-+ 68,	72,	80,	-1,
-+ 84,	88,	76
-+};
-+
- static void
- sh_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
- {
-+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-+  bfd abfd;
-+
-+  tdep->gregset_reg_offset = sh_linux_gregset_reg_offset;
-+  tdep->gregset_num_regs = ARRAY_SIZE (sh_linux_gregset_reg_offset);
-+  tdep->sizeof_gregset = 23 * 4;
-+
-+  tdep->jb_pc_offset = 32;     /* From <bits/setjmp.h>.  */
-+
-+  tdep->sigtramp_p = sh_linux_sigtramp_p;
-+  tdep->sigcontext_addr = sh_linux_sigcontext_addr;
-+  tdep->sc_reg_offset = sh_linux_sc_reg_offset;
-+  tdep->sc_num_regs = ARRAY_SIZE (sh_linux_sc_reg_offset);
-+
-+  frame_unwind_append_unwinder(gdbarch, &sh_linux_sigtramp_frame_unwind);
-+
-+  /* If we have a register mapping, enable the generic core file
-+     support, unless it has already been enabled.  */
-+  if (tdep->gregset_reg_offset
-+      && !gdbarch_regset_from_core_section_p (gdbarch))
-+    set_gdbarch_regset_from_core_section (gdbarch,
-+                                         sh_linux_regset_from_core_section);
-+
-   linux_init_abi (info, gdbarch);
- 
-   /* GNU/Linux uses SVR4-style shared libraries.  */
-diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
-index 7aadf9165ca..e173e215a2d 100644
---- a/gdb/sh-tdep.c
-+++ b/gdb/sh-tdep.c
-@@ -21,6 +21,9 @@
-    sac@cygnus.com.  */
- 
- #include "defs.h"
-+#include "arch-utils.h"
-+#include "command.h"
-+#include "dummy-frame.h"
- #include "frame.h"
- #include "frame-base.h"
- #include "frame-unwind.h"
-@@ -66,23 +69,6 @@ static const char *const sh_cc_enum[] = {
- 
- static const char *sh_active_calling_convention = sh_cc_gcc;
- 
--#define SH_NUM_REGS 67
--
--struct sh_frame_cache
--{
--  /* Base address.  */
--  CORE_ADDR base;
--  LONGEST sp_offset;
--  CORE_ADDR pc;
--
--  /* Flag showing that a frame has been created in the prologue code.  */
--  int uses_fp;
--
--  /* Saved registers.  */
--  CORE_ADDR saved_regs[SH_NUM_REGS];
--  CORE_ADDR saved_sp;
--};
--
- static int
- sh_is_renesas_calling_convention (struct type *func_type)
- {
-@@ -1050,6 +1036,7 @@ sh_treat_as_flt_p (struct type *type)
-     return 0;
-   /* Otherwise if the type of that member is float, the whole type is
-      treated as float.  */
-+  type = check_typedef (type);
-   if (type->field (0).type ()->code () == TYPE_CODE_FLT)
-     return 1;
-   /* Otherwise it's not treated as float.  */
-@@ -1100,7 +1087,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
-      in four registers available.  Loop thru args from first to last.  */
-   for (argnum = 0; argnum < nargs; argnum++)
-     {
--      type = value_type (args[argnum]);
-+      type = check_typedef (value_type (args[argnum]));
-       len = TYPE_LENGTH (type);
-       val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
- 
-@@ -1835,7 +1822,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
-     reg->how = DWARF2_FRAME_REG_UNDEFINED;
- }
- 
--static struct sh_frame_cache *
-+struct sh_frame_cache *
- sh_alloc_frame_cache (void)
- {
-   struct sh_frame_cache *cache;
-@@ -1862,7 +1849,7 @@ sh_alloc_frame_cache (void)
-   return cache;
- }
- 
--static struct sh_frame_cache *
-+struct sh_frame_cache *
- sh_frame_cache (struct frame_info *this_frame, void **this_cache)
- {
-   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-@@ -1929,9 +1916,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
-   return cache;
- }
- 
--static struct value *
--sh_frame_prev_register (struct frame_info *this_frame,
--			void **this_cache, int regnum)
-+struct value *
-+sh_frame_prev_register (struct frame_info *this_frame, void **this_cache,
-+			int regnum)
- {
-   struct gdbarch *gdbarch = get_frame_arch (this_frame);
-   struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
-@@ -1945,7 +1932,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
-      the current frame.  Frob regnum so that we pull the value from
-      the correct place.  */
-   if (regnum == gdbarch_pc_regnum (gdbarch))
--    regnum = PR_REGNUM;
-+    regnum = PR_REGNUM; /* XXX: really? */
- 
-   if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
-     return frame_unwind_got_memory (this_frame, regnum,
-@@ -2234,8 +2221,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
- static struct gdbarch *
- sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
- {
--  struct gdbarch *gdbarch;
-   struct gdbarch_tdep *tdep;
-+  struct gdbarch *gdbarch;
- 
-   /* If there is already a candidate, use it.  */
-   arches = gdbarch_list_lookup_by_info (arches, &info);
-@@ -2247,6 +2234,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
-   tdep = XCNEW (struct gdbarch_tdep);
-   gdbarch = gdbarch_alloc (&info, tdep);
- 
-+  /* General-purpose registers.  */
-+  tdep->gregset = NULL;
-+  tdep->gregset_reg_offset = NULL;
-+  tdep->gregset_num_regs = 23;
-+  tdep->sizeof_gregset = 0;
-+
-+  /* Floating-point registers.  */
-+  tdep->fpregset = NULL;
-+  tdep->sizeof_fpregset = 34*4;
-+
-+  tdep->jb_pc_offset = -1;
-+
-   set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
-   set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-   set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-@@ -2398,10 +2397,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
-       break;
-     }
- 
-+  dwarf2_append_unwinders (gdbarch);
-+
-   /* Hook in ABI-specific overrides, if they have been registered.  */
-   gdbarch_init_osabi (info, gdbarch);
- 
--  dwarf2_append_unwinders (gdbarch);
-   frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind);
-   frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
- 
-diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
-index 76e2e76e39b..2710f63010c 100644
---- a/gdb/sh-tdep.h
-+++ b/gdb/sh-tdep.h
-@@ -21,6 +21,12 @@
- 
- /* Contributed by Steve Chamberlain sac@cygnus.com.  */
- 
-+struct frame_info;
-+struct gdbarch;
-+struct reggroup;
-+struct regset;
-+struct regcache;
-+
- /* Registers for all SH variants.  Used also by sh3-rom.c.  */
- enum
-   {
-@@ -29,6 +35,7 @@ enum
-     ARG0_REGNUM = 4,
-     ARGLAST_REGNUM = 7,
-     FP_REGNUM = 14,
-+    SP_REGNUM = 15,
-     PC_REGNUM = 16,
-     PR_REGNUM = 17,
-     GBR_REGNUM = 18,
-@@ -81,6 +88,24 @@ enum
-     FV0_REGNUM = 76,
-     FV_LAST_REGNUM = 79
-   };
-+#define SH_NUM_REGS 67
-+
-+struct sh_frame_cache
-+{
-+  /* Base address.  */
-+  CORE_ADDR base;
-+  LONGEST sp_offset;
-+  CORE_ADDR pc;
-+
-+  /* Flag showing that a frame has been created in the prologue code. */
-+  int uses_fp;
-+
-+  /* Saved registers.  */
-+  CORE_ADDR saved_regs[SH_NUM_REGS];
-+  CORE_ADDR saved_sp;
-+};
-+
-+extern struct sh_frame_cache *sh_frame_cache (struct frame_info *next_frame, void **this_cache);
- 
- /* This structure describes a register in a core-file.  */
- struct sh_corefile_regmap
-@@ -89,8 +114,32 @@ struct sh_corefile_regmap
-   unsigned int offset;
- };
- 
-+/* sh architecture specific information.  */
- struct gdbarch_tdep
- {
-+  /* General-purpose registers.  */
-+  struct regset *gregset;
-+  int *gregset_reg_offset;
-+  int gregset_num_regs;
-+  size_t sizeof_gregset;
-+
-+  /* Floating-point registers.  */
-+  struct regset *fpregset;
-+  size_t sizeof_fpregset;
-+
-+  /* Offset of saved PC in jmp_buf.  */
-+  int jb_pc_offset;
-+
-+  /* Detect sigtramp.  */
-+  int (*sigtramp_p) (struct frame_info *);
-+
-+  /* Get address of sigcontext for sigtramp.  */
-+  CORE_ADDR (*sigcontext_addr) (struct frame_info *);
-+
-+  /* Offset of registers in `struct sigcontext'.  */
-+  int *sc_reg_offset;
-+  int sc_num_regs;
-+
-   /* Non-NULL when debugging from a core file.  Provides the offset
-      where each general-purpose register is stored inside the associated
-      core file section.  */
-diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
-index 4914498f98c..6e25cbed185 100644
---- a/gdb/testsuite/gdb.asm/asm-source.exp
-+++ b/gdb/testsuite/gdb.asm/asm-source.exp
-@@ -116,6 +116,11 @@ switch -glob -- [istarget] {
-             append link-flags " -m elf32ppc"
-         }
-     }
-+    "sh*-linux*" {
-+        set asm-arch sh-linux
-+        set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
-+	set debug-flags "-gdwarf-2"
-+    }
-     "sh*-*-*" {
-         set asm-arch sh
- 	set debug-flags "-gdwarf-2"
-diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
-index a4a5fc545e4..89efed7795c 100644
---- a/gdb/testsuite/gdb.asm/sh.inc
-+++ b/gdb/testsuite/gdb.asm/sh.inc
-@@ -40,9 +40,8 @@
- 	mov.l   .Lconst\@,r1
- 	bra	.Lafterconst\@
- 	nop
--	nop
--.Lconst\@:
- 	.align	2
-+.Lconst\@:
- 	.long	\subr
- 	.align	1
- .Lafterconst\@:
-diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
-index 424e1b83278..0de2e7b633a 100644
---- a/gdb/testsuite/gdb.base/annota1.c
-+++ b/gdb/testsuite/gdb.base/annota1.c
-@@ -1,6 +1,9 @@
- #include <stdio.h>
- #include <signal.h>
- 
-+#ifdef __sh__
-+#define signal(a,b)    /* Signals not supported on this target - make them go away */
-+#endif
- 
- void
- handle_USR1 (int sig)
-diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
-index 424e1b83278..952aaf218ab 100644
---- a/gdb/testsuite/gdb.base/annota3.c
-+++ b/gdb/testsuite/gdb.base/annota3.c
-@@ -1,6 +1,10 @@
- #include <stdio.h>
- #include <signal.h>
- 
-+#ifdef __sh__
-+#define signal(a,b)    /* Signals not supported on this target - make them go away */
-+#endif
-+
- 
- void
- handle_USR1 (int sig)
-diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
-index 81f3b08d6bc..1574b2d6cb8 100644
---- a/gdb/testsuite/gdb.base/sigall.c
-+++ b/gdb/testsuite/gdb.base/sigall.c
-@@ -1,6 +1,9 @@
- #include <signal.h>
- #include <unistd.h>
- 
-+#ifdef __sh__
-+#define signal(a,b)    /* Signals not supported on this target - make them go away */
-+#endif
- 
- /* Signal handlers, we set breakpoints in them to make sure that the
-    signals really get delivered.  */
-diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c
-index 756606880fa..1205a9bc9c5 100644
---- a/gdb/testsuite/gdb.base/signals.c
-+++ b/gdb/testsuite/gdb.base/signals.c
-@@ -3,6 +3,10 @@
- #include <signal.h>
- #include <unistd.h>
- 
-+#ifdef __sh__
-+#define signal(a,b)    /* Signals not supported on this target - make them go away */
-+#define alarm(a)       /* Ditto for alarm() */
-+#endif
- 
- static int count = 0;
- 
--- 
-2.29.2
-
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch b/poky/meta/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch
index 71eab1c..02ea30f 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch
@@ -1,7 +1,7 @@
-From ec566877c50bdae0013a38dd457004e1db725d86 Mon Sep 17 00:00:00 2001
+From e2efd044c479895767f1b929f5a54fa0c689f318 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 30 Apr 2016 15:25:03 -0700
-Subject: [PATCH 05/11] Dont disable libreadline.a when using --disable-static
+Subject: [PATCH 05/10] Dont disable libreadline.a when using --disable-static
 
 If gdb is configured with --disable-static then this is dutifully passed to
 readline which then disables libreadline.a, which causes a problem when gdb
@@ -19,7 +19,7 @@
  2 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile.def b/Makefile.def
-index 76d062bb671..e0a1e2b14b1 100644
+index 5a460f1dbbc..77a702ac6d6 100644
 --- a/Makefile.def
 +++ b/Makefile.def
 @@ -105,7 +105,8 @@ host_modules= { module= libiconv;
@@ -33,10 +33,10 @@
  host_modules= { module= sim; };
  host_modules= { module= texinfo; no_install= true; };
 diff --git a/Makefile.in b/Makefile.in
-index 9dfd39fae13..eaf1dd0f229 100644
+index 9b3a5d75735..98cbe844fca 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -25548,7 +25548,7 @@ configure-readline:
+@@ -25607,7 +25607,7 @@ configure-readline:
  	  $$s/$$module_srcdir/configure \
  	  --srcdir=$${topdir}/$$module_srcdir \
  	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
@@ -46,5 +46,5 @@
  @endif readline
  
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch b/poky/meta/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch
index a2932be..ef271c4 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch
@@ -1,7 +1,7 @@
-From 4b02e54b87d435e1715ce871bcce720561a7afb1 Mon Sep 17 00:00:00 2001
+From 5077518c11e8d75e9bf65cdf9ca21c59564e1037 Mon Sep 17 00:00:00 2001
 From: Andre McCurdy <amccurdy@gmail.com>
 Date: Sat, 30 Apr 2016 15:29:06 -0700
-Subject: [PATCH 06/11] use <asm/sgidefs.h>
+Subject: [PATCH 06/10] use <asm/sgidefs.h>
 
 Build fix for MIPS with musl libc
 
@@ -19,7 +19,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index 4337795bac8..7c8e54cabe0 100644
+index 6614b4de31e..237eb6eb975 100644
 --- a/gdb/mips-linux-nat.c
 +++ b/gdb/mips-linux-nat.c
 @@ -31,7 +31,7 @@
@@ -32,5 +32,5 @@
  #include <asm/ptrace.h>
  #include "inf-ptrace.h"
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0008-Change-order-of-CFLAGS.patch b/poky/meta/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch
similarity index 75%
rename from poky/meta/recipes-devtools/gdb/gdb/0008-Change-order-of-CFLAGS.patch
rename to poky/meta/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch
index 4622752..40d1257 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0008-Change-order-of-CFLAGS.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch
@@ -1,7 +1,7 @@
-From 07175ae348c9d07581e1db94762d5a2d577a75ad Mon Sep 17 00:00:00 2001
+From 80080e6c8425ac51498f49c2063b960a08f9a27d Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 30 Apr 2016 15:35:39 -0700
-Subject: [PATCH 08/11] Change order of CFLAGS
+Subject: [PATCH 07/10] Change order of CFLAGS
 
 Lets us override Werror if need be
 
@@ -13,11 +13,11 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
-index 2b1a77f2de7..cb5ddb12fd5 100644
+index 12e9b2777ae..ad44fbc3309 100644
 --- a/gdbserver/Makefile.in
 +++ b/gdbserver/Makefile.in
-@@ -161,7 +161,7 @@ WIN32APILIBS = @WIN32APILIBS@
- INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
+@@ -172,7 +172,7 @@ WIN32APILIBS = @WIN32APILIBS@
+ INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
  	${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
  INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
 -INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
@@ -26,5 +26,5 @@
  # LDFLAGS is specifically reserved for setting from the command line
  # when running make.
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0009-resolve-restrict-keyword-conflict.patch b/poky/meta/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch
similarity index 91%
rename from poky/meta/recipes-devtools/gdb/gdb/0009-resolve-restrict-keyword-conflict.patch
rename to poky/meta/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch
index 698fdb0..9095f90 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0009-resolve-restrict-keyword-conflict.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch
@@ -1,7 +1,7 @@
-From 73a3babe48c7948f71683d0862eddc1609fdaa3d Mon Sep 17 00:00:00 2001
+From 4ee7e8afb9ff259e889ac938c673fda9ddc5e15a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 10 May 2016 08:47:05 -0700
-Subject: [PATCH 09/11] resolve restrict keyword conflict
+Subject: [PATCH 08/10] resolve restrict keyword conflict
 
 GCC detects that we call 'restrict' as param name in function
 signatures and complains since both params are called 'restrict'
@@ -15,7 +15,7 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/gnulib/import/sys_time.in.h b/gnulib/import/sys_time.in.h
-index d30b26719b2..fd76af5e6d9 100644
+index 90a67d18426..664641a1fe8 100644
 --- a/gnulib/import/sys_time.in.h
 +++ b/gnulib/import/sys_time.in.h
 @@ -93,20 +93,20 @@ struct timeval
@@ -44,5 +44,5 @@
  _GL_CXXALIASWARN (gettimeofday);
  # if defined __cplusplus && defined GNULIB_NAMESPACE
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0010-Fix-invalid-sigprocmask-call.patch b/poky/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
similarity index 90%
rename from poky/meta/recipes-devtools/gdb/gdb/0010-Fix-invalid-sigprocmask-call.patch
rename to poky/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
index 7cf3eae..5b9d1cf 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0010-Fix-invalid-sigprocmask-call.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch
@@ -1,7 +1,7 @@
-From c5c5372c6a319cac8b3f9f86304fcebcbb5ea06f Mon Sep 17 00:00:00 2001
+From 5740876d92ddb67b039d5fbcd1b71e6c58823c08 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Fri, 24 Mar 2017 10:36:03 +0800
-Subject: [PATCH 10/11] Fix invalid sigprocmask call
+Subject: [PATCH 09/10] Fix invalid sigprocmask call
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -32,7 +32,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc
-index c292d498daf..af9dcaeb08e 100644
+index 95c156e5036..f4aa512d105 100644
 --- a/gdbsupport/signals-state-save-restore.cc
 +++ b/gdbsupport/signals-state-save-restore.cc
 @@ -38,7 +38,7 @@ save_original_signals_state (bool quiet)
@@ -45,5 +45,5 @@
      perror_with_name (("sigprocmask"));
  
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0011-gdbserver-ctrl-c-handling.patch b/poky/meta/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch
similarity index 82%
rename from poky/meta/recipes-devtools/gdb/gdb/0011-gdbserver-ctrl-c-handling.patch
rename to poky/meta/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch
index 0a596b5..cb4744e 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0011-gdbserver-ctrl-c-handling.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch
@@ -1,7 +1,7 @@
-From 63df98fa78c8a6e12b40ebdc5c155838d2bf8b5f Mon Sep 17 00:00:00 2001
+From d611a68f05c0c86af27bf6beae189a90a946e2e3 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 29 Nov 2018 18:00:23 -0800
-Subject: [PATCH 11/11] gdbserver ctrl-c handling
+Subject: [PATCH 10/10] gdbserver ctrl-c handling
 
 This problem was created by the upstream commit 78708b7c8c
 After applying the commit, it will send SIGINT to the process
@@ -23,10 +23,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
-index e45493339d2..aabc099b456 100644
+index 5c6191d941c..7f7acf6700d 100644
 --- a/gdbserver/linux-low.cc
 +++ b/gdbserver/linux-low.cc
-@@ -5714,7 +5714,7 @@ linux_process_target::request_interrupt ()
+@@ -5733,7 +5733,7 @@ linux_process_target::request_interrupt ()
  {
    /* Send a SIGINT to the process group.  This acts just like the user
       typed a ^C on the controlling terminal.  */
@@ -36,5 +36,5 @@
  
  bool
 -- 
-2.29.2
+2.33.1
 
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0011-AArch64-Make-gdbserver-register-set-selection-dynamic.patch b/poky/meta/recipes-devtools/gdb/gdb/0011-AArch64-Make-gdbserver-register-set-selection-dynamic.patch
new file mode 100644
index 0000000..6fc1859
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/0011-AArch64-Make-gdbserver-register-set-selection-dynamic.patch
@@ -0,0 +1,317 @@
+From eb79b2318066cafb75ffdce310e3bbd44f7c79e3 Mon Sep 17 00:00:00 2001
+From: Luis Machado <luis.machado@linaro.org>
+Date: Fri, 29 Oct 2021 14:54:36 -0300
+Subject: [PATCH] [AArch64] Make gdbserver register set selection dynamic
+
+The current register set selection mechanism for AArch64 is static, based
+on a pre-populated array of register sets.
+
+This means that we might potentially probe register sets that are not
+available. This is OK if the kernel errors out during ptrace, but probing the
+tag_ctl register, for example, does not result in a ptrace error if the kernel
+supports the tagged address ABI but not MTE (PR 28355).
+
+Making the register set selection dynamic, based on feature checks, solves
+this and simplifies the code a bit. It allows us to list all of the register
+sets only once, and pick and choose based on HWCAP/HWCAP2 or other properties.
+
+gdb/ChangeLog:
+
+2021-11-03  Luis Machado  <luis.machado@linaro.org>
+
+	PR gdb/28355
+
+	* arch/aarch64.h (struct aarch64_features): New struct.
+
+gdbserver/ChangeLog:
+
+2021-11-03  Luis Machado  <luis.machado@linaro.org>
+
+	PR gdb/28355
+
+	* linux-aarch64-low.cc (is_sve_tdesc): Remove.
+	(aarch64_target::low_arch_setup): Rework to adjust the register sets.
+	(aarch64_regsets): Update to list all register sets.
+	(aarch64_regsets_info, regs_info_aarch64): Replace NULL with nullptr.
+	(aarch64_sve_regsets, aarch64_sve_regsets_info)
+	(regs_info_aarch64_sve): Remove.
+	(aarch64_adjust_register_sets): New.
+	(aarch64_target::get_regs_info): Remove references to removed structs.
+	(initialize_low_arch): Likewise.
+
+[ChangeLog entry stripped so that patch applies cleanly]
+Upstream-Status: Accepted
+---
+
+diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h
+index 0eb702c5b5e..95edb664b55 100644
+--- a/gdb/arch/aarch64.h
++++ b/gdb/arch/aarch64.h
+@@ -22,6 +22,15 @@
+ 
+ #include "gdbsupport/tdesc.h"
+ 
++/* Holds information on what architectural features are available.  This is
++   used to select register sets.  */
++struct aarch64_features
++{
++  bool sve = false;
++  bool pauth = false;
++  bool mte = false;
++};
++
+ /* Create the aarch64 target description.  A non zero VQ value indicates both
+    the presence of SVE and the Vector Quotient - the number of 128bit chunks in
+    an SVE Z register.  HAS_PAUTH_P indicates the presence of the PAUTH
+diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc
+index daccfef746e..9a8cb4169a7 100644
+--- a/gdbserver/linux-aarch64-low.cc
++++ b/gdbserver/linux-aarch64-low.cc
+@@ -196,16 +196,6 @@ is_64bit_tdesc (void)
+   return register_size (regcache->tdesc, 0) == 8;
+ }
+ 
+-/* Return true if the regcache contains the number of SVE registers.  */
+-
+-static bool
+-is_sve_tdesc (void)
+-{
+-  struct regcache *regcache = get_thread_regcache (current_thread, 0);
+-
+-  return tdesc_contains_feature (regcache->tdesc, "org.gnu.gdb.aarch64.sve");
+-}
+-
+ static void
+ aarch64_fill_gregset (struct regcache *regcache, void *buf)
+ {
+@@ -680,40 +670,6 @@ aarch64_target::low_new_fork (process_info *parent,
+   *child->priv->arch_private = *parent->priv->arch_private;
+ }
+ 
+-/* Matches HWCAP_PACA in kernel header arch/arm64/include/uapi/asm/hwcap.h.  */
+-#define AARCH64_HWCAP_PACA (1 << 30)
+-
+-/* Implementation of linux target ops method "low_arch_setup".  */
+-
+-void
+-aarch64_target::low_arch_setup ()
+-{
+-  unsigned int machine;
+-  int is_elf64;
+-  int tid;
+-
+-  tid = lwpid_of (current_thread);
+-
+-  is_elf64 = linux_pid_exe_is_elf_64_file (tid, &machine);
+-
+-  if (is_elf64)
+-    {
+-      uint64_t vq = aarch64_sve_get_vq (tid);
+-      unsigned long hwcap = linux_get_hwcap (8);
+-      unsigned long hwcap2 = linux_get_hwcap2 (8);
+-      bool pauth_p = hwcap & AARCH64_HWCAP_PACA;
+-      /* MTE is AArch64-only.  */
+-      bool mte_p = hwcap2 & HWCAP2_MTE;
+-
+-      current_process ()->tdesc
+-	= aarch64_linux_read_description (vq, pauth_p, mte_p);
+-    }
+-  else
+-    current_process ()->tdesc = aarch32_linux_read_description ();
+-
+-  aarch64_linux_get_debug_reg_capacity (lwpid_of (current_thread));
+-}
+-
+ /* Wrapper for aarch64_sve_regs_copy_to_reg_buf.  */
+ 
+ static void
+@@ -730,21 +686,36 @@ aarch64_sve_regs_copy_from_regcache (struct regcache *regcache, void *buf)
+   return aarch64_sve_regs_copy_from_reg_buf (regcache, buf);
+ }
+ 
++/* Array containing all the possible register sets for AArch64/Linux.  During
++   architecture setup, these will be checked against the HWCAP/HWCAP2 bits for
++   validity and enabled/disabled accordingly.
++
++   Their sizes are set to 0 here, but they will be adjusted later depending
++   on whether each register set is available or not.  */
+ static struct regset_info aarch64_regsets[] =
+ {
++  /* GPR registers.  */
+   { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS,
+-    sizeof (struct user_pt_regs), GENERAL_REGS,
++    0, GENERAL_REGS,
+     aarch64_fill_gregset, aarch64_store_gregset },
++  /* Floating Point (FPU) registers.  */
+   { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_FPREGSET,
+-    sizeof (struct user_fpsimd_state), FP_REGS,
++    0, FP_REGS,
+     aarch64_fill_fpregset, aarch64_store_fpregset
+   },
++  /* Scalable Vector Extension (SVE) registers.  */
++  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_SVE,
++    0, EXTENDED_REGS,
++    aarch64_sve_regs_copy_from_regcache, aarch64_sve_regs_copy_to_regcache
++  },
++  /* PAC registers.  */
+   { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_PAC_MASK,
+-    AARCH64_PAUTH_REGS_SIZE, OPTIONAL_REGS,
+-    NULL, aarch64_store_pauthregset },
++    0, OPTIONAL_REGS,
++    nullptr, aarch64_store_pauthregset },
++  /* Tagged address control / MTE registers.  */
+   { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_TAGGED_ADDR_CTRL,
+-    AARCH64_LINUX_SIZEOF_MTE, OPTIONAL_REGS, aarch64_fill_mteregset,
+-    aarch64_store_mteregset },
++    0, OPTIONAL_REGS,
++    aarch64_fill_mteregset, aarch64_store_mteregset },
+   NULL_REGSET
+ };
+ 
+@@ -752,47 +723,95 @@ static struct regsets_info aarch64_regsets_info =
+   {
+     aarch64_regsets, /* regsets */
+     0, /* num_regsets */
+-    NULL, /* disabled_regsets */
++    nullptr, /* disabled_regsets */
+   };
+ 
+ static struct regs_info regs_info_aarch64 =
+   {
+-    NULL, /* regset_bitmap */
+-    NULL, /* usrregs */
++    nullptr, /* regset_bitmap */
++    nullptr, /* usrregs */
+     &aarch64_regsets_info,
+   };
+ 
+-static struct regset_info aarch64_sve_regsets[] =
++/* Given FEATURES, adjust the available register sets by setting their
++   sizes.  A size of 0 means the register set is disabled and won't be
++   used.  */
++
++static void
++aarch64_adjust_register_sets (const struct aarch64_features &features)
+ {
+-  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS,
+-    sizeof (struct user_pt_regs), GENERAL_REGS,
+-    aarch64_fill_gregset, aarch64_store_gregset },
+-  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_SVE,
+-    SVE_PT_SIZE (AARCH64_MAX_SVE_VQ, SVE_PT_REGS_SVE), EXTENDED_REGS,
+-    aarch64_sve_regs_copy_from_regcache, aarch64_sve_regs_copy_to_regcache
+-  },
+-  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_PAC_MASK,
+-    AARCH64_PAUTH_REGS_SIZE, OPTIONAL_REGS,
+-    NULL, aarch64_store_pauthregset },
+-  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_TAGGED_ADDR_CTRL,
+-    AARCH64_LINUX_SIZEOF_MTE, OPTIONAL_REGS, aarch64_fill_mteregset,
+-    aarch64_store_mteregset },
+-  NULL_REGSET
+-};
++  struct regset_info *regset;
+ 
+-static struct regsets_info aarch64_sve_regsets_info =
+-  {
+-    aarch64_sve_regsets, /* regsets.  */
+-    0, /* num_regsets.  */
+-    NULL, /* disabled_regsets.  */
+-  };
++  for (regset = aarch64_regsets; regset->size >= 0; regset++)
++    {
++      switch (regset->nt_type)
++	{
++	case NT_PRSTATUS:
++	  /* General purpose registers are always present.  */
++	  regset->size = sizeof (struct user_pt_regs);
++	  break;
++	case NT_FPREGSET:
++	  /* This is unavailable when SVE is present.  */
++	  if (!features.sve)
++	    regset->size = sizeof (struct user_fpsimd_state);
++	  break;
++	case NT_ARM_SVE:
++	  if (features.sve)
++	    regset->size = SVE_PT_SIZE (AARCH64_MAX_SVE_VQ, SVE_PT_REGS_SVE);
++	  break;
++	case NT_ARM_PAC_MASK:
++	  if (features.pauth)
++	    regset->size = AARCH64_PAUTH_REGS_SIZE;
++	  break;
++	case NT_ARM_TAGGED_ADDR_CTRL:
++	  if (features.mte)
++	    regset->size = AARCH64_LINUX_SIZEOF_MTE;
++	  break;
++	default:
++	  gdb_assert_not_reached ("Unknown register set found.");
++	}
++    }
++}
+ 
+-static struct regs_info regs_info_aarch64_sve =
+-  {
+-    NULL, /* regset_bitmap.  */
+-    NULL, /* usrregs.  */
+-    &aarch64_sve_regsets_info,
+-  };
++/* Matches HWCAP_PACA in kernel header arch/arm64/include/uapi/asm/hwcap.h.  */
++#define AARCH64_HWCAP_PACA (1 << 30)
++
++/* Implementation of linux target ops method "low_arch_setup".  */
++
++void
++aarch64_target::low_arch_setup ()
++{
++  unsigned int machine;
++  int is_elf64;
++  int tid;
++
++  tid = lwpid_of (current_thread);
++
++  is_elf64 = linux_pid_exe_is_elf_64_file (tid, &machine);
++
++  if (is_elf64)
++    {
++      struct aarch64_features features;
++
++      uint64_t vq = aarch64_sve_get_vq (tid);
++      features.sve = (vq > 0);
++      /* A-profile PAC is 64-bit only.  */
++      features.pauth = linux_get_hwcap (8) & AARCH64_HWCAP_PACA;
++      /* A-profile MTE is 64-bit only.  */
++      features.mte = linux_get_hwcap2 (8) & HWCAP2_MTE;
++
++      current_process ()->tdesc
++	= aarch64_linux_read_description (vq, features.pauth, features.mte);
++
++      /* Adjust the register sets we should use for this particular set of
++	 features.  */
++      aarch64_adjust_register_sets (features);
++    }
++  else
++    current_process ()->tdesc = aarch32_linux_read_description ();
++
++  aarch64_linux_get_debug_reg_capacity (lwpid_of (current_thread));
++}
+ 
+ /* Implementation of linux target ops method "get_regs_info".  */
+ 
+@@ -802,9 +821,7 @@ aarch64_target::get_regs_info ()
+   if (!is_64bit_tdesc ())
+     return &regs_info_aarch32;
+ 
+-  if (is_sve_tdesc ())
+-    return &regs_info_aarch64_sve;
+-
++  /* AArch64 64-bit registers.  */
+   return &regs_info_aarch64;
+ }
+ 
+@@ -3294,5 +3311,4 @@ initialize_low_arch (void)
+   initialize_low_arch_aarch32 ();
+ 
+   initialize_regsets_info (&aarch64_regsets_info);
+-  initialize_regsets_info (&aarch64_sve_regsets_info);
+ }
+-- 
+2.27.0
+
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
deleted file mode 100644
index 6a98b65..0000000
--- a/poky/meta/recipes-devtools/gdb/gdb/0012-arc-Add-support-for-signal-handlers.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-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
deleted file mode 100644
index f699a58..0000000
--- a/poky/meta/recipes-devtools/gdb/gdb/0013-arc-Add-support-for-signal-frames-for-Linux-targets.patch
+++ /dev/null
@@ -1,232 +0,0 @@
-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
deleted file mode 100644
index a725606..0000000
--- a/poky/meta/recipes-devtools/gdb/gdb/0014-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-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
deleted file mode 100644
index 31cf0b0..0000000
--- a/poky/meta/recipes-devtools/gdb/gdb/0015-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-From 32b366249fd42d74cbc4a91039431554ebadcfd0 Mon Sep 17 00:00:00 2001
-From: Anton Kolesov <anton.kolesov@synopsys.com>
-Date: Fri, 14 Feb 2014 11:56:23 +0400
-Subject: [PATCH 4/4] gdb: Add native support for ARC in GNU/Linux
-
-With this patch in place it is possible to build a GDB that
-can run on ARC (GNU/Linux) hosts for debugging ARC targets.
-
-The "arc-linux-nat.c" is a rather small one that mostly deals
-with registers and a few thread related hooks.
-
-v2 [1]:
-- Remove "void" from the input of "_initialize_arc_linux_nat ()"
-
-[1] Tom's remark after the first patch
-https://sourceware.org/pipermail/gdb-patches/2020-November/173223.html
-
-gdb/ChangeLog:
-
-	* Makefile.in (ALLDEPFILES): Add arc-linux-nat.c.
-	* configure.host (host to gdb names): Add arc*-*-linux*.
-	* configure.nat (gdb_host_cpu): Add arc.
-	* arc-linux-nat.c: New.
-
-Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=04c9f85efcd8df5fc482ce97c0104cc7dd5d19e6]
-
-Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
-Signed-off-by: Shahab Vahedi <shahab@synopsys.com>
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
----
- gdb/Makefile.in     |   1 +
- gdb/arc-linux-nat.c | 320 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- gdb/configure.host  |   3 +
- gdb/configure.nat   |   4 +
- 4 files changed, 328 insertions(+)
- create mode 100644 gdb/arc-linux-nat.c
-
-diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index ec371fc7e52..c76136907ae 100644
---- a/gdb/Makefile.in
-+++ b/gdb/Makefile.in
-@@ -2136,6 +2136,7 @@ ALLDEPFILES = \
- 	amd64-obsd-tdep.c \
- 	amd64-sol2-tdep.c \
- 	amd64-tdep.c \
-+	arc-linux-nat.c \
- 	arc-tdep.c \
- 	arm.c \
- 	arm-bsd-tdep.c \
-diff --git a/gdb/arc-linux-nat.c b/gdb/arc-linux-nat.c
-new file mode 100644
-index 00000000000..41301fd4fed
---- /dev/null
-+++ b/gdb/arc-linux-nat.c
-@@ -0,0 +1,320 @@
-+/* Native-dependent code for GNU/Linux ARC.
-+
-+   Copyright 2020 Free Software Foundation, Inc.
-+
-+   This file is part of GDB.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-+
-+#include "defs.h"
-+#include "frame.h"
-+#include "inferior.h"
-+#include "gdbcore.h"
-+#include "regcache.h"
-+#include "gdbsupport/gdb_assert.h"
-+#include "target.h"
-+#include "linux-nat.h"
-+#include "nat/gdb_ptrace.h"
-+
-+#include <stdint.h>
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <signal.h>
-+#include <sys/user.h>
-+#include <sys/ioctl.h>
-+#include "gdbsupport/gdb_wait.h"
-+#include <fcntl.h>
-+#include <sys/procfs.h>
-+#include <linux/elf.h>
-+
-+#include "gregset.h"
-+#include "arc-tdep.h"
-+#include "arc-linux-tdep.h"
-+#include "arch/arc.h"
-+
-+/* Defines ps_err_e, struct ps_prochandle.  */
-+#include "gdb_proc_service.h"
-+
-+/* Linux starting with 4.12 supports NT_ARC_V2 note type, which adds R30,
-+   R58 and R59 registers, which are specific to ARC HS and aren't
-+   available in ARC 700.  */
-+#if defined (NT_ARC_V2) && defined (__ARCHS__)
-+#define ARC_HAS_V2_REGSET
-+#endif
-+
-+class arc_linux_nat_target final : public linux_nat_target
-+{
-+public:
-+  /* Add ARC register access methods.  */
-+  void fetch_registers (struct regcache *, int) override;
-+  void store_registers (struct regcache *, int) override;
-+
-+  const struct target_desc *read_description () override;
-+
-+  /* Handle threads  */
-+  void low_prepare_to_resume (struct lwp_info *lp) override;
-+};
-+
-+static arc_linux_nat_target the_arc_linux_nat_target;
-+
-+/* Read general registers from target process/thread (via ptrace)
-+   into REGCACHE.  */
-+
-+static void
-+fetch_gregs (struct regcache *regcache, int regnum)
-+{
-+  const int tid = get_ptrace_pid (regcache->ptid ());
-+  struct iovec iov;
-+  gdb_gregset_t regs;
-+
-+  iov.iov_base = &regs;
-+  iov.iov_len = sizeof (gdb_gregset_t);
-+
-+  if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0)
-+    perror_with_name (_("Couldn't get general registers"));
-+  else
-+    arc_linux_supply_gregset (NULL, regcache, regnum, &regs, 0);
-+}
-+
-+#ifdef ARC_HAS_V2_REGSET
-+/* Read ARC v2 registers from target process/thread (via ptrace)
-+   into REGCACHE.  */
-+
-+static void
-+fetch_v2_regs (struct regcache *regcache, int regnum)
-+{
-+  const int tid = get_ptrace_pid (regcache->ptid ());
-+  struct iovec iov;
-+  bfd_byte v2_buffer[ARC_LINUX_SIZEOF_V2_REGSET];
-+
-+  iov.iov_base = &v2_buffer;
-+  iov.iov_len = ARC_LINUX_SIZEOF_V2_REGSET;
-+
-+  if (ptrace (PTRACE_GETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0)
-+    perror_with_name (_("Couldn't get ARC HS registers"));
-+  else
-+    arc_linux_supply_v2_regset (NULL, regcache, regnum, v2_buffer, 0);
-+}
-+#endif
-+
-+/* Store general registers from REGCACHE into the target process/thread.  */
-+
-+static void
-+store_gregs (const struct regcache *regcache, int regnum)
-+{
-+  const int tid = get_ptrace_pid (regcache->ptid ());
-+  struct iovec iov;
-+  gdb_gregset_t regs;
-+
-+  iov.iov_base = &regs;
-+  iov.iov_len = sizeof (gdb_gregset_t);
-+
-+  if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0)
-+    perror_with_name (_("Couldn't get general registers"));
-+  else
-+    {
-+      arc_linux_collect_gregset (NULL, regcache, regnum, regs, 0);
-+
-+      if (ptrace (PTRACE_SETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0)
-+	perror_with_name (_("Couldn't write general registers"));
-+    }
-+}
-+
-+#ifdef ARC_HAS_V2_REGSET
-+/* Store ARC v2 registers from REGCACHE into the target process/thread.  */
-+
-+static void
-+store_v2_regs (const struct regcache *regcache, int regnum)
-+{
-+  const int tid = get_ptrace_pid (regcache->ptid ());
-+  struct iovec iov;
-+  bfd_byte v2_buffer[ARC_LINUX_SIZEOF_V2_REGSET];
-+
-+  iov.iov_base = &v2_buffer;
-+  iov.iov_len = ARC_LINUX_SIZEOF_V2_REGSET;
-+
-+  if (ptrace (PTRACE_GETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0)
-+    perror_with_name (_("Couldn't get ARC HS registers"));
-+  else
-+    {
-+      arc_linux_collect_v2_regset (NULL, regcache, regnum, v2_buffer, 0);
-+
-+      if (ptrace (PTRACE_SETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0)
-+	perror_with_name (_("Couldn't write ARC HS registers"));
-+    }
-+}
-+#endif
-+
-+/* Target operation: Read REGNUM register (all registers if REGNUM == -1)
-+   from target process into REGCACHE.  */
-+
-+void
-+arc_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum)
-+{
-+
-+  if (regnum == -1 || regnum <= ARC_LAST_REGNUM)
-+    fetch_gregs (regcache, regnum);
-+
-+#ifdef ARC_HAS_V2_REGSET
-+  if (regnum == -1
-+      || regnum == ARC_R30_REGNUM
-+      || regnum == ARC_R58_REGNUM
-+      || regnum == ARC_R59_REGNUM)
-+      fetch_v2_regs (regcache, regnum);
-+#endif
-+}
-+
-+/* Target operation: Store REGNUM register (all registers if REGNUM == -1)
-+   to the target process from REGCACHE.  */
-+
-+void
-+arc_linux_nat_target::store_registers (struct regcache *regcache, int regnum)
-+{
-+  if (regnum == -1 || regnum <= ARC_LAST_REGNUM)
-+    store_gregs (regcache, regnum);
-+
-+#ifdef ARC_HAS_V2_REGSET
-+  if (regnum == -1
-+      || regnum == ARC_R30_REGNUM
-+      || regnum == ARC_R58_REGNUM
-+      || regnum == ARC_R59_REGNUM)
-+    store_v2_regs (regcache, regnum);
-+#endif
-+}
-+
-+/* Copy general purpose register(s) from REGCACHE into regset GREGS.
-+   This function is exported to proc-service.c  */
-+
-+void
-+fill_gregset (const struct regcache *regcache,
-+	      gdb_gregset_t *gregs, int regnum)
-+{
-+  arc_linux_collect_gregset (NULL, regcache, regnum, gregs, 0);
-+}
-+
-+/* Copy all the general purpose registers from regset GREGS into REGCACHE.
-+   This function is exported to proc-service.c.  */
-+
-+void
-+supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregs)
-+{
-+  arc_linux_supply_gregset (NULL, regcache, -1, gregs, 0);
-+}
-+
-+/* ARC doesn't have separate FP registers.  This function is exported
-+   to proc-service.c.  */
-+
-+void
-+fill_fpregset (const struct regcache *regcache,
-+	       gdb_fpregset_t *fpregsetp, int regnum)
-+{
-+  if (arc_debug)
-+    debug_printf ("arc-linux-nat: fill_fpregset called.");
-+  return;
-+}
-+
-+/* ARC doesn't have separate FP registers.  This function is exported
-+   to proc-service.c.  */
-+
-+void
-+supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
-+{
-+  if (arc_debug)
-+    debug_printf ("arc-linux-nat: supply_fpregset called.");
-+  return;
-+}
-+
-+/* Implement the "read_description" method of linux_nat_target.  */
-+
-+const struct target_desc *
-+arc_linux_nat_target::read_description ()
-+{
-+  /* This is a native target, hence description is hardcoded.  */
-+#ifdef __ARCHS__
-+  arc_arch_features features (4, ARC_ISA_ARCV2);
-+#else
-+  arc_arch_features features (4, ARC_ISA_ARCV1);
-+#endif
-+  return arc_lookup_target_description (features);
-+}
-+
-+/* As described in arc_linux_collect_gregset(), we need to write resume-PC
-+   to ERET.  However by default GDB for native targets doesn't write
-+   registers if they haven't been changed.  This is a callback called by
-+   generic GDB, and in this callback we have to rewrite PC value so it
-+   would force rewrite of register on target.  It seems that the only
-+   other arch that utilizes this hook is x86/x86-64 for HW breakpoint
-+   support.  But then, AFAIK no other arch has this stop_pc/eret
-+   complexity.
-+
-+   No better way was found, other than this fake write of register value,
-+   to force GDB into writing register to target.  Is there any?  */
-+
-+void
-+arc_linux_nat_target::low_prepare_to_resume (struct lwp_info *lwp)
-+{
-+  /* When new processes and threads are created we do not have the address
-+     space for them and calling get_thread_regcache will cause an internal
-+     error in GDB.  It looks like that checking for last_resume_kind is the
-+     sensible way to determine processes for which we cannot get regcache.
-+     Ultimately, a better way would be removing the need for
-+     low_prepare_to_resume in the first place.  */
-+  if (lwp->last_resume_kind == resume_stop)
-+    return;
-+
-+  struct regcache *regcache = get_thread_regcache (this, lwp->ptid);
-+  struct gdbarch *gdbarch = regcache->arch ();
-+
-+  /* Read current PC value, then write it back.  It is required to call
-+     invalidate(), otherwise GDB will note that new value is equal to old
-+     value and will skip write.  */
-+  ULONGEST new_pc;
-+  regcache_cooked_read_unsigned (regcache, gdbarch_pc_regnum (gdbarch),
-+				 &new_pc);
-+  regcache->invalidate (gdbarch_pc_regnum (gdbarch));
-+  regcache_cooked_write_unsigned (regcache, gdbarch_pc_regnum (gdbarch),
-+				  new_pc);
-+}
-+
-+/* Fetch the thread-local storage pointer for libthread_db.  Note that
-+   this function is not called from GDB, but is called from libthread_db.
-+   This is required to debug multithreaded applications with NPTL.  */
-+
-+ps_err_e
-+ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx,
-+		    void **base)
-+{
-+  if (arc_debug >= 2)
-+    debug_printf ("arc-linux-nat: ps_get_thread_area called");
-+
-+  if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
-+    return PS_ERR;
-+
-+  /* IDX is the bias from the thread pointer to the beginning of the
-+     thread descriptor.  It has to be subtracted due to implementation
-+     quirks in libthread_db.  */
-+  *base = (void *) ((char *) *base - idx);
-+
-+  return PS_OK;
-+}
-+
-+/* Suppress warning from -Wmissing-prototypes.  */
-+void _initialize_arc_linux_nat ();
-+void
-+_initialize_arc_linux_nat ()
-+{
-+  /* Register the target.  */
-+  linux_target = &the_arc_linux_nat_target;
-+  add_inf_child_target (&the_arc_linux_nat_target);
-+}
-diff --git a/gdb/configure.host b/gdb/configure.host
-index ce528237291..e94a19b0332 100644
---- a/gdb/configure.host
-+++ b/gdb/configure.host
-@@ -60,6 +60,7 @@ case "${host_cpu}" in
- 
- aarch64*)		gdb_host_cpu=aarch64 ;;
- alpha*)			gdb_host_cpu=alpha ;;
-+arc*)			gdb_host_cpu=arc ;;
- arm*)			gdb_host_cpu=arm ;;
- hppa*)			gdb_host_cpu=pa ;;
- i[34567]86*)		gdb_host_cpu=i386 ;;
-@@ -91,6 +92,8 @@ alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
- 			gdb_host=nbsd ;;
- alpha*-*-openbsd*)	gdb_host=nbsd ;;
- 
-+arc*-*-linux*)		gdb_host=linux ;;
-+
- arm*-*-freebsd*)	gdb_host=fbsd ;;
- arm*-*-linux*)		gdb_host=linux ;;
- arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu)
-diff --git a/gdb/configure.nat b/gdb/configure.nat
-index bb70e303384..cd11bc86dca 100644
---- a/gdb/configure.nat
-+++ b/gdb/configure.nat
-@@ -238,6 +238,10 @@ case ${gdb_host} in
- 		nat/aarch64-linux.o \
- 		nat/aarch64-sve-linux-ptrace.o"
- 		;;
-+	    arc)
-+		# Host: ARC based machine running GNU/Linux
-+		NATDEPFILES="${NATDEPFILES} arc-linux-nat.o"
-+		;;
- 	    arm)
- 		# Host: ARM based machine running GNU/Linux
- 		NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
--- 
-2.16.2
-
diff --git a/poky/meta/recipes-devtools/gdb/gdb_10.2.bb b/poky/meta/recipes-devtools/gdb/gdb_11.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gdb/gdb_10.2.bb
rename to poky/meta/recipes-devtools/gdb/gdb_11.1.bb
diff --git a/poky/meta/recipes-devtools/git/git.inc b/poky/meta/recipes-devtools/git/git.inc
index 9dd2cf4..1d74270 100644
--- a/poky/meta/recipes-devtools/git/git.inc
+++ b/poky/meta/recipes-devtools/git/git.inc
@@ -33,6 +33,7 @@
 
 EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
 EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'"
+EXTRA_OEMAKE += "COMPUTE_HEADER_DEPENDENCIES=no"
 EXTRA_OEMAKE:append:class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1"
 
 do_compile:prepend () {
diff --git a/poky/meta/recipes-devtools/git/git_2.33.1.bb b/poky/meta/recipes-devtools/git/git_2.33.1.bb
deleted file mode 100644
index 0dbde7f..0000000
--- a/poky/meta/recipes-devtools/git/git_2.33.1.bb
+++ /dev/null
@@ -1,10 +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] = "02047f8dc8934d57ff5e02aadd8a2fe8e0bcf94a7158da375e48086cc46fce1d"
-SRC_URI[manpages.sha256sum] = "292b08ca1b79422ff478a6221980099c5e3c0a38aba39d952063eedb68e27d93"
-
diff --git a/poky/meta/recipes-devtools/git/git_2.34.1.bb b/poky/meta/recipes-devtools/git/git_2.34.1.bb
new file mode 100644
index 0000000..2408176
--- /dev/null
+++ b/poky/meta/recipes-devtools/git/git_2.34.1.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] = "fc4eb5ecb9299db91cdd156c06cdeb41833f53adc5631ddf8c0cb13eaa2911c1"
+SRC_URI[manpages.sha256sum] = "220f1ed68582caeddf79c4db15e4eaa4808ec01fd11889e19232f0a74d7f31b0"
diff --git a/poky/meta/recipes-devtools/glide/glide_0.13.3.bb b/poky/meta/recipes-devtools/glide/glide_0.13.3.bb
index e943dc1..db703c2 100644
--- a/poky/meta/recipes-devtools/glide/glide_0.13.3.bb
+++ b/poky/meta/recipes-devtools/glide/glide_0.13.3.bb
@@ -5,7 +5,7 @@
 LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=54905cf894f8cc416a92f4fc350c35b2"
 
 GO_IMPORT = "github.com/Masterminds/glide"
-SRC_URI = "git://${GO_IMPORT}"
+SRC_URI = "git://${GO_IMPORT};branch=master;protocol=https"
 SRCREV = "8ed5b9292379d86c39592a7e6a58eb9c903877cf"
 
 inherit go
diff --git a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 34b4250..6b025fc 100644
--- a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -9,10 +9,10 @@
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-SRCREV = "805517123cbfe33d17c989a18e78c5789fab0437"
-PV = "20210722+git${SRCPV}"
+SRCREV = "191bcb948f7191c36eefe634336f5fc5c0c4c2be"
+PV = "20211108+git${SRCPV}"
 
-SRC_URI = "git://git.savannah.gnu.org/config.git \
+SRC_URI = "git://git.savannah.gnu.org/config.git;branch=master \
            file://gnu-configize.in"
 S = "${WORKDIR}/git"
 UPSTREAM_CHECK_COMMITS = "1"
diff --git a/poky/meta/recipes-devtools/go/go-1.16.8.inc b/poky/meta/recipes-devtools/go/go-1.17.6.inc
similarity index 76%
rename from poky/meta/recipes-devtools/go/go-1.16.8.inc
rename to poky/meta/recipes-devtools/go/go-1.17.6.inc
index 925bf46..3ea23e0 100644
--- a/poky/meta/recipes-devtools/go/go-1.16.8.inc
+++ b/poky/meta/recipes-devtools/go/go-1.17.6.inc
@@ -1,8 +1,6 @@
 require go-common.inc
 
-GO_BASEVERSION = "1.16"
-PV = "1.16.8"
-FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
+FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-1.17:"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
 
@@ -16,8 +14,10 @@
     file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
     file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
     file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \
+    file://0001-exec.go-do-not-write-linker-flags-into-buildids.patch \
+    file://0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
 "
-SRC_URI[main.sha256sum] = "8f2a8c24b793375b3243df82fdb0c8387486dcc8a892ca1c991aa99ace086b98"
+SRC_URI[main.sha256sum] = "4dc1bbf3ff61f0c1ff2b19355e6d88151a70126268a47c761477686ef94748c8"
 
 # Upstream don't believe it is a signifiant real world issue and will only
 # fix in 1.17 onwards where we can drop this.
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/poky/meta/recipes-devtools/go/go-1.17/0001-allow-CC-and-CXX-to-have-multiple-words.patch
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-1.16/0001-allow-CC-and-CXX-to-have-multiple-words.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0001-allow-CC-and-CXX-to-have-multiple-words.patch
diff --git a/poky/meta/recipes-devtools/go/go-1.17/0001-exec.go-do-not-write-linker-flags-into-buildids.patch b/poky/meta/recipes-devtools/go/go-1.17/0001-exec.go-do-not-write-linker-flags-into-buildids.patch
new file mode 100644
index 0000000..20b6636
--- /dev/null
+++ b/poky/meta/recipes-devtools/go/go-1.17/0001-exec.go-do-not-write-linker-flags-into-buildids.patch
@@ -0,0 +1,41 @@
+From bdd69b55387f80c8df18d0af5008bf5e1a66be6a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 23 Nov 2020 19:22:04 +0000
+Subject: [PATCH] exec.go: do not write linker flags into buildids
+
+The flags can contain build-specific paths, breaking reproducibility.
+
+To make this acceptable to upstream, we probably need to trim the flags,
+removing those known to be buildhost-specific.
+
+Upstream-Status: Inappropriate [needs upstream discussion]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/cmd/go/internal/work/exec.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index 696db23..727d40b 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -1136,7 +1136,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID {
+ 	}
+ 
+ 	// Toolchain-dependent configuration, shared with b.linkSharedActionID.
+-	b.printLinkerConfig(h, p)
++	//b.printLinkerConfig(h, p)
+ 
+ 	// Input files.
+ 	for _, a1 := range a.Deps {
+@@ -1418,7 +1418,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID {
+ 	fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
+ 
+ 	// Toolchain-dependent configuration, shared with b.linkActionID.
+-	b.printLinkerConfig(h, nil)
++	//b.printLinkerConfig(h, nil)
+ 
+ 	// Input files.
+ 	for _, a1 := range a.Deps {
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/go/go-1.17/0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch b/poky/meta/recipes-devtools/go/go-1.17/0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
new file mode 100644
index 0000000..257454a
--- /dev/null
+++ b/poky/meta/recipes-devtools/go/go-1.17/0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
@@ -0,0 +1,41 @@
+From 2055a46b396e272616c0b2273903e02c3b49a2ff Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 10 Nov 2020 16:33:27 +0000
+Subject: [PATCH] src/cmd/dist/buildgo.go: do not hardcode host compilers into
+ target binaries
+
+These come from $CC/$CXX on the build host and are not useful on targets;
+additionally as they contain host specific paths, this helps reproducibility.
+
+Upstream-Status: Inappropriate [needs upstream discussion]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/cmd/dist/buildgo.go | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go
+index caafc13..4eb1c96 100644
+--- a/src/cmd/dist/buildgo.go
++++ b/src/cmd/dist/buildgo.go
+@@ -34,8 +34,8 @@ func mkzdefaultcc(dir, file string) {
+ 		fmt.Fprintf(&buf, "package cfg\n")
+ 		fmt.Fprintln(&buf)
+ 		fmt.Fprintf(&buf, "const DefaultPkgConfig = `%s`\n", defaultpkgconfig)
+-		buf.WriteString(defaultCCFunc("DefaultCC", defaultcc))
+-		buf.WriteString(defaultCCFunc("DefaultCXX", defaultcxx))
++		buf.WriteString(defaultCCFunc("DefaultCC", map[string]string{"":"gcc"}))
++		buf.WriteString(defaultCCFunc("DefaultCXX", map[string]string{"":"g++"}))
+ 		writefile(buf.String(), file, writeSkipSame)
+ 		return
+ 	}
+@@ -46,8 +46,8 @@ func mkzdefaultcc(dir, file string) {
+ 	fmt.Fprintf(&buf, "package main\n")
+ 	fmt.Fprintln(&buf)
+ 	fmt.Fprintf(&buf, "const defaultPkgConfig = `%s`\n", defaultpkgconfig)
+-	buf.WriteString(defaultCCFunc("defaultCC", defaultcc))
+-	buf.WriteString(defaultCCFunc("defaultCXX", defaultcxx))
++	buf.WriteString(defaultCCFunc("defaultCC", map[string]string{"":"gcc"}))
++	buf.WriteString(defaultCCFunc("defaultCXX", map[string]string{"":"g++"}))
+ 	writefile(buf.String(), file, writeSkipSame)
+ }
+ 
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/poky/meta/recipes-devtools/go/go-1.17/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
similarity index 80%
rename from poky/meta/recipes-devtools/go/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
index 04d0e49..42cd568 100644
--- a/poky/meta/recipes-devtools/go/go-1.16/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
+++ b/poky/meta/recipes-devtools/go/go-1.17/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -1,7 +1,7 @@
-From a13ae484e41139094505d2834437e9262a5315f7 Mon Sep 17 00:00:00 2001
+From c403b45995c5daa6747ac4d95b39bc9a6feb2cda Mon Sep 17 00:00:00 2001
 From: Alex Kube <alexander.j.kube@gmail.com>
 Date: Wed, 23 Oct 2019 21:14:22 +0430
-Subject: [PATCH 2/9] cmd/go: make content-based hash generation less pedantic
+Subject: [PATCH] cmd/go: make content-based hash generation less pedantic
 
 Upstream-Status: Inappropriate [OE specific]
 
@@ -50,9 +50,11 @@
  src/cmd/go/internal/work/exec.go  | 66 ++++++++++++++++++++++---------
  2 files changed, 49 insertions(+), 19 deletions(-)
 
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index 20d0587..ff6f0d8 100644
 --- a/src/cmd/go/internal/envcmd/env.go
 +++ b/src/cmd/go/internal/envcmd/env.go
-@@ -157,7 +157,7 @@ func ExtraEnvVars() []cfg.EnvVar {
+@@ -160,7 +160,7 @@ func ExtraEnvVars() []cfg.EnvVar {
  func ExtraEnvVarsCostly() []cfg.EnvVar {
  	var b work.Builder
  	b.Init()
@@ -61,9 +63,11 @@
  	if err != nil {
  		// Should not happen - b.CFlags was given an empty package.
  		fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index 5a225fb..a37872e 100644
 --- a/src/cmd/go/internal/work/exec.go
 +++ b/src/cmd/go/internal/work/exec.go
-@@ -37,6 +37,8 @@ import (
+@@ -38,6 +38,8 @@ import (
  	"cmd/go/internal/trace"
  )
  
@@ -72,7 +76,7 @@
  // actionList returns the list of actions in the dag rooted at root
  // as visited in a depth-first post-order traversal.
  func actionList(root *Action) []*Action {
-@@ -228,7 +230,7 @@ func (b *Builder) buildActionID(a *Actio
+@@ -229,7 +231,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
  	// Assume b.WorkDir is being trimmed properly.
  	// When -trimpath is used with a package built from the module cache,
  	// use the module path and version instead of the directory.
@@ -81,25 +85,36 @@
  		fmt.Fprintf(h, "dir %s\n", p.Dir)
  	} else if cfg.BuildTrimpath && p.Module != nil {
  		fmt.Fprintf(h, "module %s@%s\n", p.Module.Path, p.Module.Version)
-@@ -247,13 +249,13 @@ func (b *Builder) buildActionID(a *Actio
+@@ -248,9 +250,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
  	}
- 	if len(p.CgoFiles)+len(p.SwigFiles) > 0 {
+ 	if len(p.CgoFiles)+len(p.SwigFiles)+len(p.SwigCXXFiles) > 0 {
  		fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
 -		cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p)
--		fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(), cppflags, cflags, ldflags)
 +		cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p, true)
-+		fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(true), cppflags, cflags, ldflags)
- 		if len(p.CXXFiles)+len(p.SwigFiles) > 0 {
--			fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(), cxxflags)
-+			fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(true), cxxflags)
+ 
+-		ccExe := b.ccExe()
++		ccExe := b.ccExe(true)
+ 		fmt.Fprintf(h, "CC=%q %q %q %q\n", ccExe, cppflags, cflags, ldflags)
+ 		// Include the C compiler tool ID so that if the C
+ 		// compiler changes we rebuild the package.
+@@ -263,14 +265,14 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ 			}
+ 		}
+ 		if len(p.CXXFiles)+len(p.SwigCXXFiles) > 0 {
+-			cxxExe := b.cxxExe()
++			cxxExe := b.cxxExe(true)
+ 			fmt.Fprintf(h, "CXX=%q %q\n", cxxExe, cxxflags)
+ 			if cxxID, err := b.gccToolID(cxxExe[0], "c++"); err == nil {
+ 				fmt.Fprintf(h, "CXX ID=%q\n", cxxID)
+ 			}
  		}
  		if len(p.FFiles) > 0 {
--			fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(), fflags)
-+			fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(true), fflags)
- 		}
- 		// TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions?
- 	}
-@@ -2401,33 +2403,48 @@ var (
+-			fcExe := b.fcExe()
++			fcExe := b.fcExe(true)
+ 			fmt.Fprintf(h, "FC=%q %q\n", fcExe, fflags)
+ 			if fcID, err := b.gccToolID(fcExe[0], "f95"); err == nil {
+ 				fmt.Fprintf(h, "FC ID=%q\n", fcID)
+@@ -2438,33 +2440,48 @@ var (
  // gccCmd returns a gcc command line prefix
  // defaultCC is defined in zdefaultcc.go, written by cmd/dist.
  func (b *Builder) GccCmd(incdir, workdir string) []string {
@@ -157,7 +172,7 @@
  }
  
  // compilerExe returns the compiler to use given an
-@@ -2436,11 +2453,16 @@ func (b *Builder) fcExe() []string {
+@@ -2473,11 +2490,16 @@ func (b *Builder) fcExe() []string {
  // of the compiler but can have additional arguments if they
  // were present in the environment value.
  // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"].
@@ -175,7 +190,7 @@
  	return compiler
  }
  
-@@ -2620,7 +2642,7 @@ func envList(key, def string) []string {
+@@ -2667,7 +2689,7 @@ func envList(key, def string) []string {
  }
  
  // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo.
@@ -184,7 +199,7 @@
  	defaults := "-g -O2"
  
  	if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
-@@ -2639,6 +2661,14 @@ func (b *Builder) CFlags(p *load.Package
+@@ -2686,6 +2708,14 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
  		return
  	}
  
@@ -199,7 +214,7 @@
  	return
  }
  
-@@ -2653,7 +2683,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`)
+@@ -2700,7 +2730,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`)
  
  func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) {
  	p := a.Package
@@ -208,7 +223,7 @@
  	if err != nil {
  		return nil, nil, err
  	}
-@@ -3104,7 +3134,7 @@ func (b *Builder) swigIntSize(objdir str
+@@ -3151,7 +3181,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) {
  
  // Run SWIG on one SWIG input file.
  func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) {
@@ -217,3 +232,6 @@
  	if err != nil {
  		return "", "", err
  	}
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/poky/meta/recipes-devtools/go/go-1.17/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
similarity index 76%
rename from poky/meta/recipes-devtools/go/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
index 662c705..2a86bdc 100644
--- a/poky/meta/recipes-devtools/go/go-1.16/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
+++ b/poky/meta/recipes-devtools/go/go-1.17/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
@@ -1,7 +1,7 @@
-From 28ada8896b76d620240bafc22aa395071d601482 Mon Sep 17 00:00:00 2001
+From 8512964c0bfdfc3c9c3805743ea7de551a1d476a Mon Sep 17 00:00:00 2001
 From: Alex Kube <alexander.j.kube@gmail.com>
 Date: Wed, 23 Oct 2019 21:15:37 +0430
-Subject: [PATCH 3/9] cmd/go: Allow GOTOOLDIR to be overridden in the environment
+Subject: [PATCH] cmd/go: Allow GOTOOLDIR to be overridden in the environment
 
 to allow for split host/target build roots
 
@@ -12,15 +12,18 @@
 Upstream-Status: Inappropriate [OE specific]
 
 Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+
 ---
  src/cmd/dist/build.go          | 4 +++-
  src/cmd/go/internal/cfg/cfg.go | 6 +++++-
  2 files changed, 8 insertions(+), 2 deletions(-)
 
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index bec1769..d82f612 100644
 --- a/src/cmd/dist/build.go
 +++ b/src/cmd/dist/build.go
-@@ -246,7 +246,9 @@ func xinit() {
- 	workdir = xworkdir()
+@@ -248,7 +248,9 @@ func xinit() {
+ 	}
  	xatexit(rmworkdir)
  
 -	tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
@@ -30,9 +33,11 @@
  }
  
  // compilerEnv returns a map from "goos/goarch" to the
+diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
+index 57a3c1f..825d8c7 100644
 --- a/src/cmd/go/internal/cfg/cfg.go
 +++ b/src/cmd/go/internal/cfg/cfg.go
-@@ -64,7 +64,11 @@ func defaultContext() build.Context {
+@@ -67,7 +67,11 @@ func defaultContext() build.Context {
  		// variables. This matches the initialization of ToolDir in
  		// go/build, except for using ctxt.GOROOT rather than
  		// runtime.GOROOT.
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0004-ld-add-soname-to-shareable-objects.patch b/poky/meta/recipes-devtools/go/go-1.17/0004-ld-add-soname-to-shareable-objects.patch
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-1.16/0004-ld-add-soname-to-shareable-objects.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0004-ld-add-soname-to-shareable-objects.patch
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/poky/meta/recipes-devtools/go/go-1.17/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
similarity index 72%
rename from poky/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
index 59c12d9..2845d21 100644
--- a/poky/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
+++ b/poky/meta/recipes-devtools/go/go-1.17/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -1,8 +1,7 @@
-From f05ef3ded52b98537c10efd0b15cd9612471524d Mon Sep 17 00:00:00 2001
+From 153e2dda6103fd9dd871be4bb495a8da5328301e Mon Sep 17 00:00:00 2001
 From: Alex Kube <alexander.j.kube@gmail.com>
 Date: Wed, 23 Oct 2019 21:17:16 +0430
-Subject: [PATCH 5/9] make.bash: override CC when building dist and
- go_bootstrap
+Subject: [PATCH] make.bash: override CC when building dist and go_bootstrap
 
 for handling OE cross-canadian builds.
 
@@ -13,13 +12,16 @@
 Upstream-Status: Inappropriate [OE specific]
 
 Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+
 ---
  src/make.bash | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/src/make.bash b/src/make.bash
+index 7986125..dd67029 100755
 --- a/src/make.bash
 +++ b/src/make.bash
-@@ -178,7 +178,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ];
+@@ -181,7 +181,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
  	exit 1
  fi
  rm -f cmd/dist/dist
@@ -28,12 +30,12 @@
  
  # -e doesn't propagate out of eval, so check success by hand.
  eval $(./cmd/dist/dist env -p || echo FAIL=true)
-@@ -209,7 +209,7 @@ fi
+@@ -206,7 +206,7 @@ fi
  # Run dist bootstrap to complete make.bash.
  # Bootstrap installs a proper cmd/dist, built with the new toolchain.
  # Throw ours, built with Go 1.4, away after bootstrap.
--./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
-+CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
+-./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
  rm -f ./cmd/dist/dist
  
  # DO NOT ADD ANY NEW CODE HERE.
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch b/poky/meta/recipes-devtools/go/go-1.17/0006-cmd-dist-separate-host-and-target-builds.patch
similarity index 89%
rename from poky/meta/recipes-devtools/go/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0006-cmd-dist-separate-host-and-target-builds.patch
index 7aee0ba..68e8efc 100644
--- a/poky/meta/recipes-devtools/go/go-1.16/0006-cmd-dist-separate-host-and-target-builds.patch
+++ b/poky/meta/recipes-devtools/go/go-1.17/0006-cmd-dist-separate-host-and-target-builds.patch
@@ -1,7 +1,7 @@
-From 10735bb84df17ba657f76835f483cd8543a879c1 Mon Sep 17 00:00:00 2001
+From 7bc891e00be4263311d75aa2b2ee6a3b7b75355f Mon Sep 17 00:00:00 2001
 From: Alex Kube <alexander.j.kube@gmail.com>
 Date: Wed, 23 Oct 2019 21:18:12 +0430
-Subject: [PATCH 6/9] cmd/dist: separate host and target builds
+Subject: [PATCH] cmd/dist: separate host and target builds
 
 Upstream-Status: Inappropriate [OE specific]
 
@@ -34,21 +34,24 @@
 Matt Madison <matt@madison.systems>.
 
 Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
----
- src/cmd/dist/build.go | 155 ++++++++++++++++++++++++++++++------------
- 1 file changed, 112 insertions(+), 43 deletions(-)
 
+---
+ src/cmd/dist/build.go | 156 ++++++++++++++++++++++++++++++------------
+ 1 file changed, 113 insertions(+), 43 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index d82f612..5c8459c 100644
 --- a/src/cmd/dist/build.go
 +++ b/src/cmd/dist/build.go
-@@ -41,6 +41,7 @@ var (
- 	goldflags        string
+@@ -43,6 +43,7 @@ var (
+ 	goexperiment     string
  	workdir          string
  	tooldir          string
 +	build_tooldir    string
  	oldgoos          string
  	oldgoarch        string
  	exe              string
-@@ -53,6 +54,7 @@ var (
+@@ -55,6 +56,7 @@ var (
  
  	rebuildall   bool
  	defaultclang bool
@@ -56,7 +59,7 @@
  
  	vflag int // verbosity
  )
-@@ -249,6 +251,8 @@ func xinit() {
+@@ -251,6 +253,8 @@ func xinit() {
  	if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
  		tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
  	}
@@ -65,7 +68,7 @@
  }
  
  // compilerEnv returns a map from "goos/goarch" to the
-@@ -480,8 +484,10 @@ func setup() {
+@@ -496,8 +500,10 @@ func setup() {
  	p := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch)
  	if rebuildall {
  		xremoveall(p)
@@ -76,9 +79,9 @@
  
  	if goos != gohostos || goarch != gohostarch {
  		p := pathf("%s/pkg/%s_%s", goroot, goos, goarch)
-@@ -1244,12 +1250,29 @@ func cmdbootstrap() {
+@@ -1267,17 +1273,35 @@ func cmdbootstrap() {
  
- 	var noBanner bool
+ 	var noBanner, noClean bool
  	var debug bool
 +	var hostOnly bool
 +	var targetOnly bool
@@ -87,12 +90,17 @@
  	flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
  	flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
  	flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
+ 	flag.BoolVar(&noClean, "no-clean", noClean, "print deprecation warning")
 +	flag.BoolVar(&hostOnly, "host-only", hostOnly, "build only host binaries, not target")
 +	flag.BoolVar(&targetOnly, "target-only", targetOnly, "build only target binaries, not host")
  
 -	xflagparse(0)
 +	xflagparse(-1)
  
+ 	if noClean {
+ 		xprintf("warning: --no-clean is deprecated and has no effect; use 'go install std cmd' instead\n")
+ 	}
+ 
 +	if hostOnly && targetOnly {
 +		fatalf("specify only one of --host-only or --target-only\n")
 +	}
@@ -104,10 +112,11 @@
 +			fatalf("package names not permitted without --host-only or --target-only\n")
 +		}
 +	}
++
  	// Set GOPATH to an internal directory. We shouldn't actually
  	// need to store files here, since the toolchain won't
  	// depend on modules outside of vendor directories, but if
-@@ -1303,8 +1326,13 @@ func cmdbootstrap() {
+@@ -1345,8 +1369,13 @@ func cmdbootstrap() {
  		xprintf("\n")
  	}
  
@@ -123,7 +132,7 @@
  	goBootstrap := pathf("%s/go_bootstrap", tooldir)
  	cmdGo := pathf("%s/go", gobin)
  	if debug {
-@@ -1333,7 +1361,11 @@ func cmdbootstrap() {
+@@ -1375,7 +1404,11 @@ func cmdbootstrap() {
  		xprintf("\n")
  	}
  	xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
@@ -133,10 +142,10 @@
 +	} else {
 +		os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
 +	}
+ 	// Now that cmd/go is in charge of the build process, enable GOEXPERIMENT.
+ 	os.Setenv("GOEXPERIMENT", goexperiment)
  	goInstall(goBootstrap, append([]string{"-i"}, toolchain...)...)
- 	if debug {
- 		run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
-@@ -1370,50 +1402,84 @@ func cmdbootstrap() {
+@@ -1414,50 +1447,84 @@ func cmdbootstrap() {
  	}
  	checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
  
@@ -188,6 +197,8 @@
 -		timelog("build", "host toolchain")
 -		if vflag > 0 {
 -			xprintf("\n")
+-		}
+-		xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
 +
 +		if goos == oldgoos && goarch == oldgoarch {
 +			// Common case - not setting up for cross-compilation.
@@ -219,8 +230,7 @@
 +			os.Setenv("GOARCH", goarch)
 +			os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
 +			xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
- 		}
--		xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
++		}
  		goInstall(goBootstrap, "std", "cmd")
  		checkNotStale(goBootstrap, "std", "cmd")
  		checkNotStale(cmdGo, "std", "cmd")
@@ -228,7 +238,12 @@
 -		timelog("build", "target toolchain")
 -		if vflag > 0 {
 -			xprintf("\n")
--		}
++		if debug {
++			run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
++			run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
++			checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
++			copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ 		}
 -		goos = oldgoos
 -		goarch = oldgoarch
 -		os.Setenv("GOOS", goos)
@@ -249,16 +264,10 @@
 -		run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
 -		checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
 -		copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
-+		if debug {
-+			run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
-+			run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
-+			checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
-+			copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
-+		}
  	}
  
  	// Check that there are no new files in $GOROOT/bin other than
-@@ -1430,8 +1496,11 @@ func cmdbootstrap() {
+@@ -1474,8 +1541,11 @@ func cmdbootstrap() {
  		}
  	}
  
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0007-cmd-go-make-GOROOT-precious-by-default.patch b/poky/meta/recipes-devtools/go/go-1.17/0007-cmd-go-make-GOROOT-precious-by-default.patch
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-1.16/0007-cmd-go-make-GOROOT-precious-by-default.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0007-cmd-go-make-GOROOT-precious-by-default.patch
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0008-use-GOBUILDMODE-to-set-buildmode.patch b/poky/meta/recipes-devtools/go/go-1.17/0008-use-GOBUILDMODE-to-set-buildmode.patch
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-1.16/0008-use-GOBUILDMODE-to-set-buildmode.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0008-use-GOBUILDMODE-to-set-buildmode.patch
diff --git a/poky/meta/recipes-devtools/go/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch b/poky/meta/recipes-devtools/go/go-1.17/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch
similarity index 83%
rename from poky/meta/recipes-devtools/go/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch
rename to poky/meta/recipes-devtools/go/go-1.17/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch
index dcbdf58..f857b72 100644
--- a/poky/meta/recipes-devtools/go/go-1.16/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch
+++ b/poky/meta/recipes-devtools/go/go-1.17/0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch
@@ -1,4 +1,4 @@
-From a983bc6cd48fb0da939e3329cac18d7a3b29ecf8 Mon Sep 17 00:00:00 2001
+From 66a45dae3af140662e17ef85c2e6fe40270a2553 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 22 Feb 2021 17:54:01 -0800
 Subject: [PATCH] Revert "cmd/go: make sure CC and CXX are absolute"
@@ -17,20 +17,20 @@
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  src/cmd/go/internal/envcmd/env.go        |  5 -----
- src/cmd/go/internal/work/init.go         |  7 -------
+ src/cmd/go/internal/work/init.go         |  6 ------
  src/cmd/go/testdata/script/env_write.txt | 24 ------------------------
- 3 files changed, 36 deletions(-)
+ 3 files changed, 35 deletions(-)
 
 diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
-index 6937187522..29f9057c3f 100644
+index ff6f0d8..43b94e7 100644
 --- a/src/cmd/go/internal/envcmd/env.go
 +++ b/src/cmd/go/internal/envcmd/env.go
-@@ -427,11 +427,6 @@ func checkEnvWrite(key, val string) error {
+@@ -457,11 +457,6 @@ func checkEnvWrite(key, val string) error {
  		if !filepath.IsAbs(val) && val != "" {
  			return fmt.Errorf("GOPATH entry is relative; must be absolute path: %q", val)
  		}
 -	// Make sure CC and CXX are absolute paths
--	case "CC", "CXX":
+-	case "CC", "CXX", "GOMODCACHE":
 -		if !filepath.IsAbs(val) && val != "" && val != filepath.Base(val) {
 -			return fmt.Errorf("%s entry is relative; must be absolute path: %q", key, val)
 -		}
@@ -38,10 +38,10 @@
  
  	if !utf8.ValidString(val) {
 diff --git a/src/cmd/go/internal/work/init.go b/src/cmd/go/internal/work/init.go
-index ba7c7c2fbb..3a6df5f758 100644
+index 37a3e2d..316b0cf 100644
 --- a/src/cmd/go/internal/work/init.go
 +++ b/src/cmd/go/internal/work/init.go
-@@ -41,13 +41,6 @@ func BuildInit() {
+@@ -39,12 +39,6 @@ func BuildInit() {
  		cfg.BuildPkgdir = p
  	}
  
@@ -51,12 +51,11 @@
 -			base.Fatalf("go %s: %s environment variable is relative; must be absolute path: %s\n", flag.Args()[0], key, path)
 -		}
 -	}
--
- 	// For each experiment that has been enabled in the toolchain, define a
- 	// build tag with the same name but prefixed by "goexperiment." which can be
- 	// used for compiling alternative files for the experiment. This allows
+ }
+ 
+ func instrumentInit() {
 diff --git a/src/cmd/go/testdata/script/env_write.txt b/src/cmd/go/testdata/script/env_write.txt
-index bda1e57826..c99aadb7f2 100644
+index b5e9739..566c876 100644
 --- a/src/cmd/go/testdata/script/env_write.txt
 +++ b/src/cmd/go/testdata/script/env_write.txt
 @@ -129,30 +129,6 @@ go env -w GOTMPDIR=
@@ -91,5 +90,5 @@
  env GOOS=
  env GOARCH=
 -- 
-2.30.1
+2.20.1
 
diff --git a/poky/meta/recipes-devtools/go/go-binary-native_1.16.8.bb b/poky/meta/recipes-devtools/go/go-binary-native_1.17.6.bb
similarity index 83%
rename from poky/meta/recipes-devtools/go/go-binary-native_1.16.8.bb
rename to poky/meta/recipes-devtools/go/go-binary-native_1.17.6.bb
index 9262220..674f917 100644
--- a/poky/meta/recipes-devtools/go/go-binary-native_1.16.8.bb
+++ b/poky/meta/recipes-devtools/go/go-binary-native_1.17.6.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] = "f32501aeb8b7b723bc7215f6c373abb6981bbc7e1c7b44e9f07317e1a300dce2"
-SRC_URI[go_linux_arm64.sha256sum] = "430dbe185417204f6788913197ab3b189b6deae9c9b524f262858e53dab239c2"
+SRC_URI[go_linux_amd64.sha256sum] = "231654bbf2dab3d86c1619ce799e77b03d96f9b50770297c8f4dff8836fc8ca2"
+SRC_URI[go_linux_arm64.sha256sum] = "82c1a033cce9bc1b47073fd6285233133040f0378439f3c4659fe77cc534622a"
 
 UPSTREAM_CHECK_URI = "https://golang.org/dl/"
 UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/poky/meta/recipes-devtools/go/go-common.inc b/poky/meta/recipes-devtools/go/go-common.inc
index dfccebd..83f8db7 100644
--- a/poky/meta/recipes-devtools/go/go-common.inc
+++ b/poky/meta/recipes-devtools/go/go-common.inc
@@ -23,7 +23,7 @@
 SSTATE_SCAN_CMD = "true"
 
 export GOROOT_OVERRIDE = "1"
-export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+export GOTMPDIR ?= "${WORKDIR}/build-tmp"
 GOTMPDIR[vardepvalue] = ""
 export CGO_ENABLED = "1"
 
@@ -37,6 +37,8 @@
 export GOMIPS ?= "${TARGET_GOMIPS}"
 export GOROOT_FINAL ?= "${libdir}/go"
 
+export GODEBUG = "gocachehash=1"
+
 do_compile:prepend() {
 	BUILD_CC=${BUILD_CC}
 }
diff --git a/poky/meta/recipes-devtools/go/go-cross-canadian_1.16.8.bb b/poky/meta/recipes-devtools/go/go-cross-canadian_1.17.6.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross-canadian_1.16.8.bb
rename to poky/meta/recipes-devtools/go/go-cross-canadian_1.17.6.bb
diff --git a/poky/meta/recipes-devtools/go/go-cross_1.16.8.bb b/poky/meta/recipes-devtools/go/go-cross_1.17.6.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross_1.16.8.bb
rename to poky/meta/recipes-devtools/go/go-cross_1.17.6.bb
diff --git a/poky/meta/recipes-devtools/go/go-crosssdk_1.16.8.bb b/poky/meta/recipes-devtools/go/go-crosssdk_1.17.6.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-crosssdk_1.16.8.bb
rename to poky/meta/recipes-devtools/go/go-crosssdk_1.17.6.bb
diff --git a/poky/meta/recipes-devtools/go/go-native_1.16.8.bb b/poky/meta/recipes-devtools/go/go-native_1.17.6.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-native_1.16.8.bb
rename to poky/meta/recipes-devtools/go/go-native_1.17.6.bb
diff --git a/poky/meta/recipes-devtools/go/go-runtime.inc b/poky/meta/recipes-devtools/go/go-runtime.inc
index 617e6b5..ccb86d4 100644
--- a/poky/meta/recipes-devtools/go/go-runtime.inc
+++ b/poky/meta/recipes-devtools/go/go-runtime.inc
@@ -2,10 +2,16 @@
 DEPENDS:class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk"
 PROVIDES = "virtual/${TARGET_PREFIX}go-runtime"
 
+DEBUG_PREFIX_MAP = "\
+                     -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+                     -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+"
+
 export CGO_CFLAGS = "${CFLAGS}"
 export CGO_CPPFLAGS = "${CPPFLAGS}"
 export CGO_CXXFLAGS = "${CXXFLAGS}"
-export CGO_LDFLAGS = "${LDFLAGS}"
+# Filter out -fdebug-prefix-map options as they clash with the GO's build system
+export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-prefix-map'), d.getVar('LDFLAGS').split())) }"
 export GOCACHE = "${B}/.cache"
 
 GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
diff --git a/poky/meta/recipes-devtools/go/go-runtime_1.16.8.bb b/poky/meta/recipes-devtools/go/go-runtime_1.17.6.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-runtime_1.16.8.bb
rename to poky/meta/recipes-devtools/go/go-runtime_1.17.6.bb
diff --git a/poky/meta/recipes-devtools/go/go-target.inc b/poky/meta/recipes-devtools/go/go-target.inc
index 47b4411..b0d487a 100644
--- a/poky/meta/recipes-devtools/go/go-target.inc
+++ b/poky/meta/recipes-devtools/go/go-target.inc
@@ -1,6 +1,17 @@
 DEPENDS = "virtual/${TUNE_PKGARCH}-go go-native"
 DEPENDS:class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
 
+DEBUG_PREFIX_MAP = "\
+                     -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+                     -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+"
+
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_CPPFLAGS = "${CPPFLAGS}"
+export CGO_CXXFLAGS = "${CXXFLAGS}"
+# Filter out -fdebug-prefix-map options as they clash with the GO's build system
+export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-prefix-map'), d.getVar('LDFLAGS').split())) }"
+
 export GOCACHE = "${B}/.cache"
 GO_LDFLAGS = ""
 GO_LDFLAGS:class-nativesdk = "-linkmode external"
diff --git a/poky/meta/recipes-devtools/go/go_1.16.8.bb b/poky/meta/recipes-devtools/go/go_1.17.6.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go_1.16.8.bb
rename to poky/meta/recipes-devtools/go/go_1.17.6.bb
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch b/poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch
deleted file mode 100644
index 76fce19..0000000
--- a/poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 72065bb2b5881dc224299f302379391aebdfca3d Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 21 Nov 2018 13:09:05 +0100
-Subject: [PATCH 1/2] Add crc32.c to sources list
-
-Otherwise, there is a missing symbol runtime error under musl C library.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- libcomps/src/python/src/CMakeLists.txt | 4 ++--
- libcomps/src/python/src/crc32.c        | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt
-index 89b9c91..08cd6b5 100644
---- a/libcomps/src/python/src/CMakeLists.txt
-+++ b/libcomps/src/python/src/CMakeLists.txt
-@@ -9,13 +9,13 @@ set (pycomps_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR})
- set (pycomps_SRC pycomps.c pycomps_sequence.c
-      pycomps_envs.c pycomps_categories.c pycomps_groups.c
-      pycomps_gids.c pycomps_utils.c pycomps_dict.c pycomps_mdict.c
--     pycomps_hash.c pycomps_exc.c pycomps_lbw.c)
-+     pycomps_hash.c pycomps_exc.c pycomps_lbw.c crc32.c)
- 
- set (pycomps_HEADERS pycomps_macros.h pycomps_sequence.h
-      pycomps_envs.h pycomps_categories.h pycomps_groups.h
-      pycomps_gids.h pycomps_utils.h pycomps_dict.h pycomps_mdict.h
-      pycomps_hash.h pycomps_exc.h pycomps_lbw.h
--     pycomps_types.h)
-+     pycomps_types.h crc32.h)
- 
- #set(TEST_FILES ../__init__.py __test.py test_merge_comps.py test_libcomps.py
- #               utest.py)
-diff --git a/libcomps/src/python/src/crc32.c b/libcomps/src/python/src/crc32.c
-index d8f5e34..f266067 100644
---- a/libcomps/src/python/src/crc32.c
-+++ b/libcomps/src/python/src/crc32.c
-@@ -41,7 +41,7 @@
-  */
- 
- #include <sys/param.h>
--#include <sys/systm.h>
-+#include <stdint.h>
- 
- static uint32_t crc32_tab[] = {
- 	0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
--- 
-2.25.1
-
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps_0.1.18.bb b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.18.bb
index 8fe43ed..6603275 100644
--- a/poky/meta/recipes-devtools/libcomps/libcomps_0.1.18.bb
+++ b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.18.bb
@@ -4,8 +4,7 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "git://github.com/rpm-software-management/libcomps.git \
-           file://0001-Add-crc32.c-to-sources-list.patch \
+SRC_URI = "git://github.com/rpm-software-management/libcomps.git;branch=master;protocol=https \
            file://0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
            "
 
@@ -13,7 +12,7 @@
 
 S = "${WORKDIR}/git"
 
-inherit cmake distutils3-base
+inherit cmake setuptools3-base
 
 DEPENDS += "libxml2 expat libcheck"
 
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
index 384add5..607995a 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
+++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
@@ -5,7 +5,7 @@
 
 This makes a dependency on cppunit optional.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/1382]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch
index 6dd7c71..2d8213c 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch
+++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch
@@ -3,7 +3,7 @@
 Date: Tue, 19 Nov 2019 13:46:09 +0100
 Subject: [PATCH] Look fo sphinx only if documentation is actually enabled
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/1383]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
  docs/hawkey/CMakeLists.txt | 20 +++++++++++---------
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf_0.65.0.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.65.0.bb
index 78f2002..81da04c 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf_0.65.0.bb
+++ b/poky/meta/recipes-devtools/libdnf/libdnf_0.65.0.bb
@@ -4,7 +4,7 @@
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \
+SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;protocol=https \
            file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
            file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
            file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
@@ -22,7 +22,7 @@
 
 DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc libmodulemd json-c swig-native"
 
-inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
+inherit gtk-doc gobject-introspection cmake pkgconfig setuptools3-base
 
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
                   ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.14.2.bb b/poky/meta/recipes-devtools/librepo/librepo_1.14.2.bb
index e7f8c08..6cd8090 100644
--- a/poky/meta/recipes-devtools/librepo/librepo_1.14.2.bb
+++ b/poky/meta/recipes-devtools/librepo/librepo_1.14.2.bb
@@ -5,7 +5,7 @@
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-SRC_URI = "git://github.com/rpm-software-management/librepo.git \
+SRC_URI = "git://github.com/rpm-software-management/librepo.git;branch=master;protocol=https \
            file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
            file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
            "
@@ -16,7 +16,7 @@
 
 DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2"
 
-inherit cmake distutils3-base pkgconfig
+inherit cmake setuptools3-base pkgconfig
 
 EXTRA_OECMAKE = " \
     -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} \
diff --git a/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc b/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
index 2df46aa..a636926 100644
--- a/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
+++ b/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
@@ -24,6 +24,8 @@
            file://0010-Makefile.am-make-sure-autoheader-run-before-automake.patch \
            file://0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch \
            file://0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch \
+           file://libool.m4-add-ARFLAGS-variable.patch \
+           file://ARFLAGS-use-cr-instead-of-cru-by-default.patch \
           "
 
 SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e"
diff --git a/poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index 4a43867..93f1dd7 100644
--- a/poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
+++ b/poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -1,7 +1,6 @@
 require libtool-${PV}.inc
 
 PACKAGES = ""
-SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 datadir = "${STAGING_DIR_TARGET}${target_datadir}"
@@ -22,15 +21,16 @@
 # Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
 #
 do_install () {
+	ln -s false ${D}
 	install -d ${D}${bindir_crossscripts}/
-	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+	install -m 0755 libtool ${D}${bindir_crossscripts}/libtool
 	sed -e 's@^\(predep_objects="\).*@\1"@' \
 	    -e 's@^\(postdep_objects="\).*@\1"@' \
 	    -e 's@^CC="ccache.@CC="@' \
 	    -e 's@^LTCC="ccache.@LTCC="@' \
-	    -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-	sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-	sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+	    -i ${D}${bindir_crossscripts}/libtool
+	sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
+	sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
 	GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
 	chmod 0755 ${D}${bindir_crossscripts}/libtoolize
 	install -d ${D}${target_datadir}/libtool/build-aux/
diff --git a/poky/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb b/poky/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
index 3b20ce3..19024f7 100644
--- a/poky/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
+++ b/poky/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
@@ -2,8 +2,6 @@
 
 DEPENDS = ""
 
-SRC_URI += "file://prefix.patch"
-
 inherit native
 
 EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}"
@@ -18,5 +16,5 @@
 do_install () {
 	autotools_do_install
 	install -d ${D}${bindir}/
-	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
+	install -m 0755 libtool ${D}${bindir}/libtool
 }
diff --git a/poky/meta/recipes-devtools/libtool/libtool/ARFLAGS-use-cr-instead-of-cru-by-default.patch b/poky/meta/recipes-devtools/libtool/libtool/ARFLAGS-use-cr-instead-of-cru-by-default.patch
new file mode 100644
index 0000000..447640c
--- /dev/null
+++ b/poky/meta/recipes-devtools/libtool/libtool/ARFLAGS-use-cr-instead-of-cru-by-default.patch
@@ -0,0 +1,133 @@
+From 418129bc63afc312701e84cb8afa5ca413df1ab5 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Fri, 17 Apr 2015 16:54:58 +0200
+Subject: ARFLAGS: use 'cr' instead of 'cru' by default
+
+In some GNU/Linux distributions people started to compile 'ar'
+binary with --enable-deterministic-archives (binutils project).
+That, however, in combination with our previous long time working
+default AR_FLAGS=cru causes warnings on such installations:
+ar: `u' modifier ignored since `D' is the default (see `U')
+
+The 'u' option (at least with GNU binutils) did small optimization
+during repeated builds because it instructed 'ar' to not
+open/close unchanged *.o files and to rather read their contents
+from old archive file.  However, its removal should not cause a
+big performance hit for usual workflows.
+
+Distributions started using --enable-deterministic-archives
+knowing that it would disable the 'u', just to rather have a bit
+more deterministic builds.
+
+Also, to justify this change a bit more, keeping 'u' in ARFLAGS
+could only result in many per-project changes to override
+Libtool's ARFLAGS default, just to silent such warnings.
+
+Fixes bug#19967.  Reported by Eric Blake.
+
+* m4/libtool.m4 (_LT_PROG_AR): Default AR_FLAGS to 'cr'.
+(_LT_REQUIRED_DARWIN_CHECKS): Use $AR_FLAGS instead 'cru' string.
+* doc/libtool.texi: Do 's/ar cru/ar cr/' in whole documentation.
+* NEWS: Document.
+
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=418129bc63afc312701e84cb8afa5ca413df1ab5]
+
+Signed-off-by: Li Wang <li.wang@windriver.com>
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ NEWS             |  4 ++++
+ doc/libtool.texi | 10 +++++-----
+ m4/libtool.m4    |  6 +++---
+ 3 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index 71a932d..1518f09 100644
+--- a/NEWS
++++ b/NEWS
+@@ -13,6 +13,10 @@ NEWS - list of user-visible changes between releases of GNU Libtool
+     variable, which obsoletes AR_FLAGS.  This is due to naming conventions
+     among other *FLAGS and to be consistent with Automake's ARFLAGS.
+ 
++** Important incompatible changes:
++
++  - Libtool changed ARFLAGS/AR_FLAGS default from 'cru' to 'cr'.
++
+ ** Bug fixes:
+ 
+   - Fix a race condition in ltdl dryrun test that would cause spurious
+diff --git a/doc/libtool.texi b/doc/libtool.texi
+index 0298627..4c664bb 100644
+--- a/doc/libtool.texi
++++ b/doc/libtool.texi
+@@ -602,7 +602,7 @@ Without libtool, the programmer would invoke the @command{ar} command to
+ create a static library:
+ 
+ @example
+-burger$ @kbd{ar cru libhello.a hello.o foo.o}
++burger$ @kbd{ar cr libhello.a hello.o foo.o}
+ burger$
+ @end example
+ 
+@@ -632,7 +632,7 @@ libtool are the same ones you would use to produce an executable named
+ a23$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.o hello.o}
+ *** Warning: Linking the shared library libhello.la against the
+ *** non-libtool objects foo.o hello.o is not portable!
+-ar cru .libs/libhello.a
++ar cr .libs/libhello.a
+ ranlib .libs/libhello.a
+ creating libhello.la
+ (cd .libs && rm -f libhello.la && ln -s ../libhello.la libhello.la)
+@@ -662,7 +662,7 @@ archive, not a shared library (@pxref{Static libraries}).}:
+ @example
+ a23$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.lo hello.lo \
+                 -rpath /usr/local/lib -lm}
+-ar cru @value{objdir}/libhello.a foo.o hello.o
++ar cr @value{objdir}/libhello.a foo.o hello.o
+ ranlib @value{objdir}/libhello.a
+ creating libhello.la
+ (cd @value{objdir} && rm -f libhello.la && ln -s ../libhello.la libhello.la)
+@@ -676,7 +676,7 @@ burger$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.lo hello.lo \
+                 -rpath /usr/local/lib -lm}
+ rm -fr  @value{objdir}/libhello.a @value{objdir}/libhello.la
+ ld -Bshareable -o @value{objdir}/libhello.so.0.0 @value{objdir}/foo.o @value{objdir}/hello.o -lm
+-ar cru @value{objdir}/libhello.a foo.o hello.o
++ar cr @value{objdir}/libhello.a foo.o hello.o
+ ranlib @value{objdir}/libhello.a
+ creating libhello.la
+ (cd @value{objdir} && rm -f libhello.la && ln -s ../libhello.la libhello.la)
+@@ -6001,7 +6001,7 @@ in cases where it is necessary.
+ @subsection Archivers
+ 
+ On all known systems, building a static library can be accomplished by
+-running @kbd{ar cru lib@var{name}.a @var{obj1}.o @var{obj2}.o @dots{}},
++running @kbd{ar cr lib@var{name}.a @var{obj1}.o @var{obj2}.o @dots{}},
+ where the @file{.a} file is the output library, and each @file{.o} file is an
+ object file.
+ 
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index 6514196..add06ee 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;}
+ _LT_EOF
+       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+-      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+-      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
++      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
++      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+       cat > conftest.c << _LT_EOF
+@@ -1505,7 +1505,7 @@ _LT_DECL([], [AR], [1], [The archiver])
+ # ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
+ # variable obsoleted/removed.
+ 
+-test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cru}
++test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
+ lt_ar_flags=$AR_FLAGS
+ _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
+ 
+-- 
+2.23.0
+
diff --git a/poky/meta/recipes-devtools/libtool/libtool/libool.m4-add-ARFLAGS-variable.patch b/poky/meta/recipes-devtools/libtool/libtool/libool.m4-add-ARFLAGS-variable.patch
new file mode 100644
index 0000000..bb11887
--- /dev/null
+++ b/poky/meta/recipes-devtools/libtool/libtool/libool.m4-add-ARFLAGS-variable.patch
@@ -0,0 +1,77 @@
+From 4335de1dfb7d2ec728427e07a54136b94a2d40f6 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Fri, 17 Apr 2015 15:05:42 +0200
+Subject: libool.m4: add ARFLAGS variable
+
+Libtool has used $AR_FLAGS since 2000-05-29 commit
+8300de4c54e6f04f0d, Automake ARFLAGS since 2003-04-06 commit
+a71b3490639831ca.  Even though ARFLAGS is younger, it sounds like
+better name according GNU Coding Standards.
+
+Related to bug#20082.
+
+* m4/libtool.m4 (_LT_PROG_AR): Copy ARFLAGS value into AR_FLAGS
+variable if AR_FLAGS is not set.  Add new _LT_DECL'ed variable
+'lt_ar_flags' to keep the configure-time value of AR_FLAGS.  The
+new 'lt_ar_flags' is to be used as the default value for AR_FLAGS
+at libtool-runtime.
+* NEWS: Document.
+
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=4335de1dfb7d2ec728427e07a54136b94a2d40f6]
+
+Signed-off-by: Li Wang <li.wang@windriver.com>
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ NEWS          |  6 ++++++
+ m4/libtool.m4 | 17 +++++++++++++++--
+ 2 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index d7ca434..71a932d 100644
+--- a/NEWS
++++ b/NEWS
+@@ -7,6 +7,12 @@ NEWS - list of user-visible changes between releases of GNU Libtool
+   - LT_SYS_LIBRARY_PATH can be set in config.site, or at configure time
+     and persists correctly in the generated libtool script.
+ 
++** New features:
++
++  - Libtool script now supports (configure-time and runtime) ARFLAGS
++    variable, which obsoletes AR_FLAGS.  This is due to naming conventions
++    among other *FLAGS and to be consistent with Automake's ARFLAGS.
++
+ ** Bug fixes:
+ 
+   - Fix a race condition in ltdl dryrun test that would cause spurious
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index 63acd09..6514196 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1497,9 +1497,22 @@ need_locks=$enable_libtool_lock
+ m4_defun([_LT_PROG_AR],
+ [AC_CHECK_TOOLS(AR, [ar], false)
+ : ${AR=ar}
+-: ${AR_FLAGS=cru}
+ _LT_DECL([], [AR], [1], [The archiver])
+-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
++
++# Use ARFLAGS variable as AR's operation code to sync the variable naming with
++# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
++# higher priority because thats what people were doing historically (setting
++# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
++# variable obsoleted/removed.
++
++test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cru}
++lt_ar_flags=$AR_FLAGS
++_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
++
++# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
++# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
++_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
++         [Flags to create an archive])
+ 
+ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+   [lt_cv_ar_at_file=no
+-- 
+2.23.0
+
diff --git a/poky/meta/recipes-devtools/libtool/libtool/prefix.patch b/poky/meta/recipes-devtools/libtool/libtool/prefix.patch
deleted file mode 100644
index a73df2e..0000000
--- a/poky/meta/recipes-devtools/libtool/libtool/prefix.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
-it can't be confused with the host libtool.
-
-Originally by: RP
-
-Updated: Date: 2010/06/28
-Nitin A Kamble <nitin.a.kamble@intel.com>
-
-It also adjusts libtool so that the header at the script is used for 
-script execution and not thevalue of $SHELL. This is because many 
-Makefiles change $SHELL so dash can get used to execute what is 
-otherwise configured as a bash shell script. Since we don't need to 
-execute scipts this way on any system I'm aware of us building upon, 
-the simplest fix is just to remove $SHELL.
-
-Updated: Date: 2011/11/09
-RP
-
-Updated by: Robert Yang <liezhi.yang@windriver.com>
-
-diff --git a/Makefile.am b/Makefile.am
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -31,7 +31,7 @@ SUBDIRS			= .
- DIST_SUBDIRS		= $(SUBDIRS)
- EXTRA_DIST		=
- 
--BUILT_SOURCES		= libtool libtoolize
-+BUILT_SOURCES		= $(host_alias)-libtool libtoolize
- 
- CLEANFILES		=
- MOSTLYCLEANFILES	=
-@@ -67,7 +67,7 @@ build_scripts	= $(srcdir)/$(aux_dir)/announce-gen \
- 
- EXTRA_DIST     += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
- 		  GNUmakefile
--CLEANFILES     += libtool libtoolize
-+CLEANFILES     += $(host_alias)-libtool libtoolize
- 
- ## If a file is named several times below, and especially if it
- ## is a distributed file created during Libtool bootstrap, we
-@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \
- 	-e 's|@srcdir\@|$(srcdir)|g'
- 
- # The libtool distributor and the standalone libtool script.
--bin_SCRIPTS = libtool
-+bin_SCRIPTS = $(host_alias)-libtool
- 
- libtoolize: $(libtoolize_in) $(config_status)
- 	$(AM_V_at)rm -f '$@'
-@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status)
- # We used to do this with a 'stamp-vcl' file, but non-gmake builds
- # would rerun configure on every invocation, so now we manually
- # check the version numbers from the build rule when necessary.
--libtool: $(ltmain_sh) $(config_status) $(dotversion)
-+$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion)
- 	@$(rebuild); \
- 	if test -f '$@'; then \
- 	  eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
-@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
- 
- BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
- 	LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
--	LIBTOOL="$(abs_top_builddir)/libtool" \
-+	LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
- 	tst_aclocaldir="$(abs_top_srcdir)/m4"
- 
- INSTALLCHECK_ENVIRONMENT = \
- 	LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
--	LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
-+	LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \
- 	LTDLINCL="-I$(includedir)" \
- 	LIBLTDL="$(libdir)/libltdl.la" \
- 	tst_aclocaldir="$(aclocaldir)"
-diff --git a/m4/libtool.m4 b/m4/libtool.m4
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS=$ltmain
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
- 
- _LT_SETUP
-@@ -199,7 +200,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a '.a' archive for static linking (except MSVC,
diff --git a/poky/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb b/poky/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
index e3ad672..86c55de 100644
--- a/poky/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
+++ b/poky/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
@@ -2,7 +2,6 @@
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
 
-SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 inherit nativesdk
@@ -20,12 +19,12 @@
 do_install () {
 	autotools_do_install
 	install -d ${D}${bindir}/
-	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
+	install -m 0755 libtool ${D}${bindir}/
 }
 
 SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
 
 libtoolnativesdk_sysroot_preprocess () {
 	install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-	install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
+	install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/libtool
 }
diff --git a/poky/meta/recipes-devtools/llvm/llvm_git.bb b/poky/meta/recipes-devtools/llvm/llvm_git.bb
index 4167080..d9efa53 100644
--- a/poky/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -28,7 +28,7 @@
 
 BRANCH = "release/${MAJOR_VERSION}.x"
 SRCREV = "fed41342a82f5a3a9201819a82bf7a48313e296b"
-SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH} \
+SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=https \
            file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \
            file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
            file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
diff --git a/poky/meta/recipes-devtools/lua/lua/74d99057a5146755e737c479850f87fd0e3b6868.patch b/poky/meta/recipes-devtools/lua/lua/74d99057a5146755e737c479850f87fd0e3b6868.patch
new file mode 100644
index 0000000..dcdc048
--- /dev/null
+++ b/poky/meta/recipes-devtools/lua/lua/74d99057a5146755e737c479850f87fd0e3b6868.patch
@@ -0,0 +1,43 @@
+From 74d99057a5146755e737c479850f87fd0e3b6868 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
+Date: Wed, 3 Nov 2021 15:04:18 -0300
+Subject: [PATCH] Bug: C stack overflow with coroutines
+
+'coroutine.resume' did not increment counter of C calls when
+continuing execution after a protected error (that is,
+while running 'precover').
+---
+ ldo.c             |  6 ++++--
+ testes/cstack.lua | 14 ++++++++++++++
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+
+Upstream-Status: Backport [https://github.com/lua/lua/commit/74d99057a5146755e737c479850f87fd0e3b6868.patch]
+CVE: CVE-2021-43519
+
+diff --git a/src/ldo.c b/src/ldo.c
+index d0edc8b4f..66f890364 100644
+--- a/src/ldo.c
++++ b/src/ldo.c
+@@ -759,11 +759,10 @@ static void resume (lua_State *L, void *ud) {
+   StkId firstArg = L->top - n;  /* first argument */
+   CallInfo *ci = L->ci;
+   if (L->status == LUA_OK)  /* starting a coroutine? */
+-    ccall(L, firstArg - 1, LUA_MULTRET, 1);  /* just call its body */
++    ccall(L, firstArg - 1, LUA_MULTRET, 0);  /* just call its body */
+   else {  /* resuming from previous yield */
+     lua_assert(L->status == LUA_YIELD);
+     L->status = LUA_OK;  /* mark that it is running (again) */
+-    luaE_incCstack(L);  /* control the C stack */
+     if (isLua(ci)) {  /* yielded inside a hook? */
+       L->top = firstArg;  /* discard arguments */
+       luaV_execute(L, ci);  /* just continue running Lua code */
+@@ -814,6 +813,9 @@ LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs,
+   else if (L->status != LUA_YIELD)  /* ended with errors? */
+     return resume_error(L, "cannot resume dead coroutine", nargs);
+   L->nCcalls = (from) ? getCcalls(from) : 0;
++  if (getCcalls(L) >= LUAI_MAXCCALLS)
++    return resume_error(L, "C stack overflow", nargs);
++  L->nCcalls++;
+   luai_userstateresume(L, nargs);
+   api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs);
+   status = luaD_rawrunprotected(L, resume, &nargs);
diff --git a/poky/meta/recipes-devtools/lua/lua_5.4.3.bb b/poky/meta/recipes-devtools/lua/lua_5.4.3.bb
index 0224744..a204242 100644
--- a/poky/meta/recipes-devtools/lua/lua_5.4.3.bb
+++ b/poky/meta/recipes-devtools/lua/lua_5.4.3.bb
@@ -7,6 +7,7 @@
 SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
            file://lua.pc.in \
            ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest file://run-ptest ', '', d)} \
+           file://74d99057a5146755e737c479850f87fd0e3b6868.patch \
            "
 
 # if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
diff --git a/poky/meta/recipes-devtools/meson/meson.inc b/poky/meta/recipes-devtools/meson/meson.inc
deleted file mode 100644
index 174ebd9..0000000
--- a/poky/meta/recipes-devtools/meson/meson.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-HOMEPAGE = "http://mesonbuild.com"
-SUMMARY = "A high performance build system"
-DESCRIPTION = "Meson is a build system designed to increase programmer \
-productivity. It does this by providing a fast, simple and easy to use \
-interface for modern software development tools and practices."
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
-
-SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz \
-           file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
-           file://0001-python-module-do-not-manipulate-the-environment-when.patch \
-           file://disable-rpath-handling.patch \
-           file://0001-Make-CPU-family-warnings-fatal.patch \
-           file://0002-Support-building-allarch-recipes-again.patch \
-           file://0001-is_debianlike-always-return-False.patch \
-           "
-SRC_URI[sha256sum] = "13dee549a7ba758b7e33ce7719f28d1d337a98d10d378a4779ccc996f5a2fc49"
-
-UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
-UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit setuptools3
-
-RDEPENDS:${PN} = "ninja python3-modules python3-pkg-resources"
-
-FILES:${PN} += "${datadir}/polkit-1"
-
-do_install:append () {
-	# As per the same issue in the python recipe itself:
-	# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
-	# being written without strict ordering, even with PYTHONHASHSEED = 0
-	# Upstream is discussing ways to solve the issue properly, until then let's
-	# just not install the problematic files.
-	# More info: http://benno.id.au/blog/2013/01/15/python-determinism
-	rm ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython*
-}
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
index c5be526..848dccf 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -11,30 +11,34 @@
  mesonbuild/environment.py | 4 +---
  2 files changed, 2 insertions(+), 4 deletions(-)
 
-diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 307aac3..66fb7ec 100644
---- a/mesonbuild/envconfig.py
-+++ b/mesonbuild/envconfig.py
-@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
+Index: meson-0.60.2/mesonbuild/envconfig.py
+===================================================================
+--- meson-0.60.2.orig/mesonbuild/envconfig.py
++++ meson-0.60.2/mesonbuild/envconfig.py
+@@ -266,8 +266,8 @@ class MachineInfo(HoldableObject):
+                 'but is missing {}.'.format(minimum_literal - set(literal)))
  
          cpu_family = literal['cpu_family']
-         if cpu_family not in known_cpu_families:
+-        if cpu_family not in known_cpu_families:
 -            mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
++        if cpu_family not in known_cpu_families and cpu_family != "riscv":
 +            raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
  
          endian = literal['endian']
          if endian not in ('little', 'big'):
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 71286a5..179917e 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+Index: meson-0.60.2/mesonbuild/environment.py
+===================================================================
+--- meson-0.60.2.orig/mesonbuild/environment.py
++++ meson-0.60.2/mesonbuild/environment.py
+@@ -354,10 +354,8 @@ def detect_cpu_family(compilers: Compile
+         if any_compiler_has_define(compilers, '__64BIT__'):
              trial = 'ppc64'
  
-     if trial not in known_cpu_families:
+-    if trial not in known_cpu_families:
 -        mlog.warning(f'Unknown CPU family {trial!r}, please report this at '
 -                     'https://github.com/mesonbuild/meson/issues/new with the '
 -                     'output of `uname -a` and `cat /proc/cpuinfo`')
++    if trial not in known_cpu_families and trail != "riscv":
 +        raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
  
      return trial
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
deleted file mode 100644
index ce90e51..0000000
--- a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 4 Aug 2017 16:16:41 +0300
-Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
-
-Specifically:
-1) Make it possible to specify a wrapper for executing binaries
-(usually, some kind of target hardware emulator, such as qemu)
-2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will
-try to guess them, incorrectly.
-3) If things break down, print the full command with arguments,
-not just the binary name.
-4) Correctly determine the compiler/linker executables and cross-options when cross-compiling
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- mesonbuild/modules/gnome.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index dc2979e..c9ff9bd 100644
---- a/mesonbuild/modules/gnome.py
-+++ b/mesonbuild/modules/gnome.py
-@@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule):
-             args.append(f'--{program_name}={path}')
-         if namespace:
-             args.append('--namespace=' + namespace)
-+        gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None)
-+        if gtkdoc_exe_wrapper is not None:
-+            args.append('--run=' + gtkdoc_exe_wrapper)
-+
-         args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
-         args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
-         args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
index fdadc68..86abfa9 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -1,4 +1,4 @@
-From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001
+From dd5b4a200cd2fdf7fef627c4b6752f90c00b863a Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 19 Nov 2018 14:24:26 +0100
 Subject: [PATCH] python module: do not manipulate the environment when calling
@@ -8,36 +8,31 @@
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
- mesonbuild/modules/python.py | 12 ------------
- 1 file changed, 12 deletions(-)
+ mesonbuild/modules/python.py | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
 
 diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
-index 422155b..aaf5844 100644
+index f479ab9..b934bc6 100644
 --- a/mesonbuild/modules/python.py
 +++ b/mesonbuild/modules/python.py
-@@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency):
-                 old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
-                 old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
+@@ -239,10 +239,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
+         # If python-X.Y.pc exists in LIBPC, we will try to use it
+         def wrap_in_pythons_pc_dir(name: str, env: 'Environment', kwargs: T.Dict[str, T.Any],
+                                    installation: 'PythonInstallation') -> 'ExternalDependency':
+-            old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None)
+-            old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None)
+-            if pkg_libdir:
+-                os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
+             try:
+                 return PythonPkgConfigDependency(name, env, kwargs, installation)
+             finally:
+@@ -251,8 +247,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
+                         os.environ[name] = value
+                     elif name in os.environ:
+                         del os.environ[name]
+-                set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir)
+-                set_env('PKG_CONFIG_PATH', old_pkg_path)
++                pass
  
--                os.environ.pop('PKG_CONFIG_PATH', None)
--
--                if pkg_libdir:
--                    os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
--
-                 try:
-                     self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs)
-                     mlog.debug(f'Found "{pkg_name}" via pkgconfig lookup in LIBPC ({pkg_libdir})')
-@@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency):
-                     mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir})')
-                     mlog.debug(e)
- 
--                if old_pkg_path is not None:
--                    os.environ['PKG_CONFIG_PATH'] = old_pkg_path
--
--                if old_pkg_libdir is not None:
--                    os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir
--                else:
--                    os.environ.pop('PKG_CONFIG_LIBDIR', None)
-             else:
-                 mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir}), this is likely due to a relocated python installation')
- 
+         candidates.extend([
+             functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation),
diff --git a/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch b/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
index 7c766c6..7aaed8b 100644
--- a/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
+++ b/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
@@ -1,4 +1,4 @@
-From 27bbd3c9d8d86de545fcf6608564a14571c98a61 Mon Sep 17 00:00:00 2001
+From 18600f7a1cddf23aeabd188f86e66983f27ccfe3 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Fri, 23 Nov 2018 15:28:28 +0000
 Subject: [PATCH] meson: Disable rpath stripping at install time
@@ -10,26 +10,28 @@
 RP 2018/11/23
 
 Upstream-Status: Submitted [https://github.com/mesonbuild/meson/issues/2567]
-
 ---
  mesonbuild/minstall.py | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
-index 212568a..06366d4 100644
+index 7d0da13..17d50db 100644
 --- a/mesonbuild/minstall.py
 +++ b/mesonbuild/minstall.py
-@@ -653,8 +653,11 @@ class Installer:
+@@ -718,8 +718,11 @@ class Installer:
              if file_copied:
                  self.did_install_something = True
                  try:
 -                    self.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path,
--                                         install_name_mappings, verbose=False)
+-                                   install_name_mappings, verbose=False)
 +                    if install_rpath:
 +                        self.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path,
-+                                           install_name_mappings, verbose=False)
++                                       install_name_mappings, verbose=False)
 +                    else:
 +                        print("RPATH changes at install time disabled")
                  except SystemExit as e:
                      if isinstance(e.code, int) and e.code == 0:
                          pass
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/meson/meson/meson-wrapper b/poky/meta/recipes-devtools/meson/meson/meson-wrapper
index d4b5187..8fafaad 100755
--- a/poky/meta/recipes-devtools/meson/meson/meson-wrapper
+++ b/poky/meta/recipes-devtools/meson/meson/meson-wrapper
@@ -4,6 +4,10 @@
     echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2
 fi
 
+if [ -z "$SSL_CERT_DIR" ]; then
+    export SSL_CERT_DIR="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/"
+fi
+
 # If these are set to a cross-compile path, meson will get confused and try to
 # use them as native tools. Unset them to prevent this, as all the cross-compile
 # config is already in meson.cross.
diff --git a/poky/meta/recipes-devtools/meson/meson_0.59.2.bb b/poky/meta/recipes-devtools/meson/meson_0.59.2.bb
deleted file mode 100644
index de9b905..0000000
--- a/poky/meta/recipes-devtools/meson/meson_0.59.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include meson.inc
-
-BBCLASSEXTEND = "native"
-
diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.59.2.bb b/poky/meta/recipes-devtools/meson/meson_0.61.1.bb
similarity index 61%
rename from poky/meta/recipes-devtools/meson/nativesdk-meson_0.59.2.bb
rename to poky/meta/recipes-devtools/meson/meson_0.61.1.bb
index 7b77041..32b1240 100644
--- a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.59.2.bb
+++ b/poky/meta/recipes-devtools/meson/meson_0.61.1.bb
@@ -1,10 +1,45 @@
-include meson.inc
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+DESCRIPTION = "Meson is a build system designed to increase programmer \
+productivity. It does this by providing a fast, simple and easy to use \
+interface for modern software development tools and practices."
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz \
+           file://meson-setup.py \
+           file://meson-wrapper \
+           file://0001-python-module-do-not-manipulate-the-environment-when.patch \
+           file://disable-rpath-handling.patch \
+           file://0001-Make-CPU-family-warnings-fatal.patch \
+           file://0002-Support-building-allarch-recipes-again.patch \
+           file://0001-is_debianlike-always-return-False.patch \
+           "
+SRC_URI[sha256sum] = "feb2cefb325b437dbf36146df7c6b87688ddff0b0205caa31dc64055c6da410c"
+
+UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
+UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit setuptools3
+
+RDEPENDS:${PN} = "ninja python3-modules python3-pkg-resources"
+
+FILES:${PN} += "${datadir}/polkit-1"
+
+do_install:append () {
+	# As per the same issue in the python recipe itself:
+	# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
+	# being written without strict ordering, even with PYTHONHASHSEED = 0
+	# Upstream is discussing ways to solve the issue properly, until then let's
+	# just not install the problematic files.
+	# More info: http://benno.id.au/blog/2013/01/15/python-determinism
+	rm ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython*
+}
+
+BBCLASSEXTEND = "native nativesdk"
 
 inherit meson-routines
-inherit nativesdk
-
-SRC_URI += "file://meson-setup.py \
-            file://meson-wrapper"
 
 # The cross file logic is similar but not identical to that in meson.bbclass,
 # since it's generating for an SDK rather than a cross-compile. Important
@@ -39,7 +74,7 @@
 
     return repr(val)
 
-do_install:append() {
+do_install:append:class-nativesdk() {
     install -d ${D}${datadir}/meson
 
     cat >${D}${datadir}/meson/meson.native.template <<EOF
@@ -95,10 +130,4 @@
     install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson
 }
 
-RDEPENDS:${PN} += "\
-    nativesdk-ninja \
-    nativesdk-python3 \
-    nativesdk-python3-setuptools \
-    "
-
-FILES:${PN} += "${datadir}/meson ${SDKPATHNATIVE}"
+FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}"
diff --git a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 661db46..5ccdace 100644
--- a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -5,7 +5,7 @@
 LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
 
 SRCBRANCH ?= "master"
-SRCREV = "43282e80e174cc73b09b81a4d17cb3a7b4dc5cfc"
+SRCREV = "3969aa4804edb8aed7bcb3c958e49d0c7388b067"
 
 PV = "0.1+git${SRCPV}"
 
diff --git a/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 057ae80..c05d3b7 100644
--- a/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -11,10 +11,10 @@
 DEPENDS = "zlib e2fsprogs util-linux"
 RDEPENDS:mtd-utils-tests += "bash"
 
-PV = "2.1.3"
+PV = "2.1.4"
 
-SRCREV = "42ea7cd48d2b3c306d59bb6c530d79f8c25bf9f5"
-SRC_URI = "git://git.infradead.org/mtd-utils.git \
+SRCREV = "c7f1bfa44a84d02061787e2f6093df5cc40b9f5c"
+SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
            file://add-exclusion-to-mkfs-jffs2-git-2.patch \
            "
 
diff --git a/poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch b/poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
index 8041b13..6185f4d 100644
--- a/poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
+++ b/poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
@@ -1,4 +1,4 @@
-From dc11f3e7bdfa524a3e395a0f9d5e035dbc40c047 Mon Sep 17 00:00:00 2001
+From a5076415ed2c226ca7115d27e0ce51a8a0302090 Mon Sep 17 00:00:00 2001
 From: Ed Bartosh <ed.bartosh@linux.intel.com>
 Date: Tue, 13 Jun 2017 14:55:52 +0300
 Subject: [PATCH] Disabled reading host configs.
diff --git a/poky/meta/recipes-devtools/mtools/mtools_4.0.35.bb b/poky/meta/recipes-devtools/mtools/mtools_4.0.37.bb
similarity index 93%
rename from poky/meta/recipes-devtools/mtools/mtools_4.0.35.bb
rename to poky/meta/recipes-devtools/mtools/mtools_4.0.37.bb
index 61e98bb..20748a0 100644
--- a/poky/meta/recipes-devtools/mtools/mtools_4.0.35.bb
+++ b/poky/meta/recipes-devtools/mtools/mtools_4.0.37.bb
@@ -24,7 +24,7 @@
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[sha256sum] = "34769e173751d2f0d891a08c76c80427e929b8ee43438019b8666cc3d7a44749"
+SRC_URI[sha256sum] = "799b197e23e47b61259628810b27790efb7a1fe36037ef1da8a27b0ae4fa8342"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
diff --git a/poky/meta/recipes-devtools/ninja/ninja_1.10.2.bb b/poky/meta/recipes-devtools/ninja/ninja_1.10.2.bb
index c908bcb..7270321 100644
--- a/poky/meta/recipes-devtools/ninja/ninja_1.10.2.bb
+++ b/poky/meta/recipes-devtools/ninja/ninja_1.10.2.bb
@@ -8,7 +8,7 @@
 
 SRCREV = "e72d1d581c945c158ed68d9bc48911063022a2c6"
 
-SRC_URI = "git://github.com/ninja-build/ninja.git;branch=release"
+SRC_URI = "git://github.com/ninja-build/ninja.git;branch=release;protocol=https"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
 
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.5.bb b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
similarity index 94%
rename from poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.5.bb
rename to poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
index a2bcc7f..21678a2 100644
--- a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.5.bb
+++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb
@@ -12,8 +12,7 @@
            "
 UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
 
-SRC_URI[md5sum] = "025b19744e5c7fc1c8380e17df1fcc64"
-SRC_URI[sha256sum] = "528635e674addea5c2b3a3268404ad04a952c4f410d17c3d754f5dd5529770c9"
+SRC_URI[sha256sum] = "55733c0f8ffde2bb4f9593cfd66a1f68e6a2f814e8e62f6fd78472911c818c32"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
diff --git a/poky/meta/recipes-devtools/opkg/opkg_0.4.5.bb b/poky/meta/recipes-devtools/opkg/opkg_0.5.0.bb
similarity index 76%
rename from poky/meta/recipes-devtools/opkg/opkg_0.4.5.bb
rename to poky/meta/recipes-devtools/opkg/opkg_0.5.0.bb
index ef18ccf..f7d8abb 100644
--- a/poky/meta/recipes-devtools/opkg/opkg_0.4.5.bb
+++ b/poky/meta/recipes-devtools/opkg/opkg_0.5.0.bb
@@ -18,8 +18,7 @@
            file://run-ptest \
 "
 
-SRC_URI[md5sum] = "5dc41ad37d88803b5e0f456a9c5a0811"
-SRC_URI[sha256sum] = "a1214a75fa34fb9228db8da47308e0e711b1c93fd8938cf164c10fd28eb50f1e"
+SRC_URI[sha256sum] = "559c3e1b893abaa1dd473ce3a9a5f7dd3f60ceb6cd14caaef76ddf0f7721ad1c"
 
 # This needs to be before ptest inherit, otherwise all ptest files end packaged
 # in libopkg package if OPKGLIBDIR == libdir, because default
@@ -39,11 +38,9 @@
     "
 PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
 PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
 PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
 PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
 
-EXTRA_OECONF += " --disable-pathfinder"
 EXTRA_OECONF:class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
 
 do_install:append () {
@@ -60,19 +57,6 @@
 	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/patch/patch/CVE-2019-13636.patch b/poky/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch
index 9f8b6db..8059d9f 100644
--- a/poky/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch
+++ b/poky/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch
@@ -11,7 +11,7 @@
 with O_CREAT | O_EXCL to avoid following symlinks in that case as well.
 
 CVE: CVE-2019-13636
-Upstream-Status: Backport[https://git.savannah.gnu.org/cgit/patch.git/patch/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a]
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a]
 Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
 
 ---
diff --git a/poky/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch b/poky/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch
index 03988a1..9b2c07c 100644
--- a/poky/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch
+++ b/poky/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch
@@ -7,7 +7,7 @@
 diffs.
 
 CVE: CVE-2019-20633
-Upstream-Status: Backport[https://git.savannah.gnu.org/cgit/patch.git/patch/?id=15b158db3ae11cb835f2eb8d2eb48e09d1a4af48]
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=15b158db3ae11cb835f2eb8d2eb48e09d1a4af48]
 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
 
 ---
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch b/poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
index 63080a4..8d9a50a 100644
--- a/poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
+++ b/poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
@@ -15,10 +15,10 @@
  1 file changed, 15 insertions(+), 1 deletion(-)
 
 diff --git a/src/patchelf.cc b/src/patchelf.cc
-index fd1e7b7..a941da1 100644
+index 1aeae88..6b77afe 100644
 --- a/src/patchelf.cc
 +++ b/src/patchelf.cc
-@@ -527,9 +527,19 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
+@@ -534,9 +534,19 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
  
  static void writeFile(const std::string & fileName, const FileContents & contents)
  {
@@ -39,10 +39,10 @@
      if (fd == -1)
          error("open");
  
-@@ -543,6 +553,10 @@ static void writeFile(const std::string & fileName, const FileContents & content
- 
-     if (close(fd) != 0)
-         error("close");
+@@ -564,6 +574,10 @@ static void writeFile(const std::string & fileName, const FileContents & content
+     if (errno == EINTR)
+         return;
+     error("close");
 +
 +    if (chmod(fileName.c_str(), st.st_mode) != 0)
 +        error("chmod");
@@ -50,3 +50,6 @@
  }
  
  
+-- 
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf_0.13.bb b/poky/meta/recipes-devtools/patchelf/patchelf_0.14.3.bb
similarity index 78%
rename from poky/meta/recipes-devtools/patchelf/patchelf_0.13.bb
rename to poky/meta/recipes-devtools/patchelf/patchelf_0.14.3.bb
index 1b0561b..5d41c5e 100644
--- a/poky/meta/recipes-devtools/patchelf/patchelf_0.13.bb
+++ b/poky/meta/recipes-devtools/patchelf/patchelf_0.14.3.bb
@@ -4,10 +4,10 @@
 
 LICENSE = "GPLv3"
 
-SRC_URI = "git://github.com/NixOS/patchelf;protocol=https \
+SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master \
            file://handle-read-only-files.patch \
            "
-SRCREV = "a949ff23315bbb5863627c4655fe216ecbf341a2"
+SRCREV = "bf3f37ec29edcdb3e2a163edaf84aeece39f8c9d"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
index 3b0fc45..386ea3f 100644
--- a/poky/meta/recipes-devtools/perl-cross/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
@@ -4,7 +4,7 @@
 Subject: [PATCH] configure_path.sh: do not hardcode $prefix/lib as library
  path
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/123]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
index 0aaeaa2..1d90b0f 100644
--- a/poky/meta/recipes-devtools/perl-cross/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
@@ -5,7 +5,7 @@
 
 As it seems to break things if the argument has spaces and arguments in it.
 
-Upstream-Status: Pending
+Upstream-Status: Backport [443f7bd08b19e71a2e838dcb6cde176998cd350f]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
  cnf/configure_tool.sh | 2 +-
diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
index e798503..6c3f08c 100644
--- a/poky/meta/recipes-devtools/perl-cross/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
@@ -3,7 +3,7 @@
 Date: Tue, 27 Nov 2018 15:37:40 +0100
 Subject: [PATCH] perl-cross: add LDFLAGS when linking libperl
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/122]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
  Makefile | 2 +-
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
index 2759ef8..b8e1f84 100644
--- a/poky/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
+++ b/poky/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
@@ -34,6 +34,7 @@
 do_install:class-native() {
     mkdir -p ${D}/${datadir}/perl-cross/
     cp -rf ${S}/* ${D}/${datadir}/perl-cross/
+    rm -rf ${D}/${datadir}/perl-cross/patches/
 }
 
 BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch b/poky/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
deleted file mode 100644
index 7d5c079..0000000
--- a/poky/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 2f74a899474f428a4a5368a94accf801c5f97ae4 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 4 Jun 2018 18:33:50 +0300
-Subject: [PATCH] ExtUtils-MakeMaker: add $(LDFLAGS) when linking binary
- modules
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-index fe53be1..249c048 100644
---- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
-@@ -1050,7 +1050,7 @@ sub xs_make_dynamic_lib {
-     }
- 
-     push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $dlsyms_arg, $ldfrom, $self->xs_obj_opt('$@'), $libs, $exportlist;
--	%s$(LD) %s $(LDDLFLAGS) %s %s $(OTHERLDFLAGS) %s $(MYEXTLIB) \
-+	%s$(LD) %s $(LDDLFLAGS) %s %s $(LDFLAGS) $(OTHERLDFLAGS) %s $(MYEXTLIB) \
- 	  $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) %s \
- 	  $(INST_DYNAMIC_FIX)
- 	$(CHMOD) $(PERM_RWX) $@
diff --git a/poky/meta/recipes-devtools/perl/files/5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch b/poky/meta/recipes-devtools/perl/files/5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch
new file mode 100644
index 0000000..1cb65d9
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/files/5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch
@@ -0,0 +1,31 @@
+From 5bc1e5fdd87aa205011512cd1e6cc655bcf677fd Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Wed, 23 Jun 2021 15:31:42 +0300
+Subject: [PATCH] Fix definition of ITEM_NOT_FOUND for pre-1.13 versions.
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ ext/GDBM_File/GDBM_File.xs | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
+index 494c2889ca89..0125b5dcac4d 100644
+--- a/ext/GDBM_File/GDBM_File.xs
++++ b/ext/GDBM_File/GDBM_File.xs
+@@ -145,10 +145,11 @@ output_datum(pTHX_ SV *arg, char *str, int size)
+ #define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
+ #endif
+ 
+-#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13        
+-/* Prior to 1.13, gdbm_fetch family functions set gdbm_errno to GDBM_NO_ERROR
+-   if the requested key did not exist */
+-# define ITEM_NOT_FOUND()  (gdbm_errno == GDBM_NO_ERROR)
++#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13
++/* Prior to 1.13, only gdbm_fetch set GDBM_ITEM_NOT_FOUND if the requested
++   key did not exist.  Other similar function wouls set GDBM_NO_ERROR instead.
++   The GDBM_ITEM_NOT_FOUND existeds as early as in 1.7.3 */
++# define ITEM_NOT_FOUND()  (gdbm_errno == GDBM_NO_ERROR || gdbm_errno == GDBM_ITEM_NOT_FOUND)
+ #else
+ # define ITEM_NOT_FOUND()  (gdbm_errno == GDBM_ITEM_NOT_FOUND)
+ #endif
diff --git a/poky/meta/recipes-devtools/perl/files/aacd2398e766500cb5d83c4d76b642fcf31d997a.patch b/poky/meta/recipes-devtools/perl/files/aacd2398e766500cb5d83c4d76b642fcf31d997a.patch
new file mode 100644
index 0000000..628903f
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/files/aacd2398e766500cb5d83c4d76b642fcf31d997a.patch
@@ -0,0 +1,40 @@
+From aacd2398e766500cb5d83c4d76b642fcf31d997a Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Wed, 23 Jun 2021 10:26:50 +0300
+Subject: [PATCH] Fix GDBM_File to compile with version 1.20 and earlier
+
+* ext/GDBM_File/GDBM_File.xs (ITEM_NOT_FOUND): Define conditionally,
+depending on the GDBM_VERSION_MAJOR and GDBM_VERSION_MINOR.
+Don't assume GDBM_ITEM_NOT_FOUND is a define (it isn't since
+gdbm commit d3e27957).
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ ext/GDBM_File/GDBM_File.xs | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
+index cd0bb6f26ffa..494c2889ca89 100644
+--- a/ext/GDBM_File/GDBM_File.xs
++++ b/ext/GDBM_File/GDBM_File.xs
+@@ -145,14 +145,13 @@ output_datum(pTHX_ SV *arg, char *str, int size)
+ #define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
+ #endif
+ 
+-#ifndef GDBM_ITEM_NOT_FOUND
+-# define GDBM_ITEM_NOT_FOUND GDBM_NO_ERROR
+-#endif
+-
++#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13        
+ /* Prior to 1.13, gdbm_fetch family functions set gdbm_errno to GDBM_NO_ERROR
+    if the requested key did not exist */
+-#define ITEM_NOT_FOUND()                                                \
+-    (gdbm_errno == GDBM_ITEM_NOT_FOUND || gdbm_errno == GDBM_NO_ERROR)
++# define ITEM_NOT_FOUND()  (gdbm_errno == GDBM_NO_ERROR)
++#else
++# define ITEM_NOT_FOUND()  (gdbm_errno == GDBM_ITEM_NOT_FOUND)
++#endif
+ 
+ #define CHECKDB(db) do {                        \
+     if (!db->dbp) {                             \
diff --git a/poky/meta/recipes-devtools/perl/files/ea57297a58b8f10ab885c19eec48ea076116cc1f.patch b/poky/meta/recipes-devtools/perl/files/ea57297a58b8f10ab885c19eec48ea076116cc1f.patch
new file mode 100644
index 0000000..3864f1a
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/files/ea57297a58b8f10ab885c19eec48ea076116cc1f.patch
@@ -0,0 +1,25 @@
+From ea57297a58b8f10ab885c19eec48ea076116cc1f Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Wed, 23 Jun 2021 14:24:47 +0300
+Subject: [PATCH] Raise version number in ext/GDBM_File/GDBM_File.pm
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ ext/GDBM_File/GDBM_File.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
+index d837536f804c..cb08d091b829 100644
+--- a/ext/GDBM_File/GDBM_File.pm
++++ b/ext/GDBM_File/GDBM_File.pm
+@@ -363,7 +363,7 @@ require XSLoader;
+ );
+ 
+ # This module isn't dual life, so no need for dev version numbers.
+-$VERSION = '1.19';
++$VERSION = '1.20';
+ 
+ XSLoader::load();
+ 
diff --git a/poky/meta/recipes-devtools/perl/files/native-perlinc.patch b/poky/meta/recipes-devtools/perl/files/native-perlinc.patch
index a2e1aef..20d7fe6 100644
--- a/poky/meta/recipes-devtools/perl/files/native-perlinc.patch
+++ b/poky/meta/recipes-devtools/perl/files/native-perlinc.patch
@@ -1,4 +1,4 @@
-Upstream-Status:Inappropriate [embedded specific]
+Upstream-Status: Inappropriate [embedded specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
diff --git a/poky/meta/recipes-devtools/perl/files/perl-dynloader.patch b/poky/meta/recipes-devtools/perl/files/perl-dynloader.patch
index 6bb832a..b49e6e4 100644
--- a/poky/meta/recipes-devtools/perl/files/perl-dynloader.patch
+++ b/poky/meta/recipes-devtools/perl/files/perl-dynloader.patch
@@ -1,4 +1,4 @@
-Upstream-Status:Inappropriate [embedded specific]
+Upstream-Status: Inappropriate [embedded specific]
 
 Allow the location that .so files are searched for for dynamic
 loading to be changed via an environment variable. This is to allow
diff --git a/poky/meta/recipes-devtools/perl/perl_5.34.0.bb b/poky/meta/recipes-devtools/perl/perl_5.34.0.bb
index 89de558..e4bcfe3 100644
--- a/poky/meta/recipes-devtools/perl/perl_5.34.0.bb
+++ b/poky/meta/recipes-devtools/perl/perl_5.34.0.bb
@@ -10,7 +10,6 @@
 
 SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
            file://perl-rdepends.txt \
-           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 \
@@ -18,6 +17,9 @@
            file://0002-Constant-Fix-up-shebang.patch \
            file://determinism.patch \
            file://CVE-2021-36770.patch \
+           file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
+           file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
+           file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
            "
 SRC_URI:append:class-native = " \
            file://perl-configpm-switch.patch \
@@ -51,11 +53,13 @@
     ./configure --prefix=${prefix} --libdir=${libdir} \
     --target=${TARGET_SYS} \
     -Duseshrplib \
+    -Dusethreads \
     -Dsoname=libperl.so.5 \
     -Dvendorprefix=${prefix} \
     -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
     -Dlibpth='${libdir} ${base_libdir}' \
     -Dglibpth='${libdir} ${base_libdir}' \
+    -Alddlflags=' ${LDFLAGS}' \
     ${PACKAGECONFIG_CONFARGS}
 
     #perl.c uses an ARCHLIB_EXP define to generate compile-time code that
@@ -77,9 +81,11 @@
     ./configure --prefix=${prefix} \
     --target=${TARGET_SYS} \
     -Duseshrplib \
+    -Dusethreads \
     -Dsoname=libperl.so.5 \
     -Dvendorprefix=${prefix} \
     -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
+    -Alddlflags=' ${LDFLAGS}' \
     ${PACKAGECONFIG_CONFARGS}
 
     # See the comment above
@@ -90,9 +96,11 @@
     ./configure --prefix=${prefix} \
     -Dbin=${bindir}/perl-native \
     -Duseshrplib \
+    -Dusethreads \
     -Dsoname=libperl.so.5 \
     -Dvendorprefix=${prefix} \
     -Ui_xlocale \
+    -Alddlflags=' ${LDFLAGS}' \
     ${PACKAGECONFIG_CONFARGS}
 }
 
diff --git a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.8.0.bb b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.8.0.bb
index 29cf4a6..887e15e 100644
--- a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.8.0.bb
+++ b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.8.0.bb
@@ -59,7 +59,7 @@
    if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
        pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
        mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
-       lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+       ln -rs $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
        sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
    fi
 }
diff --git a/poky/meta/recipes-devtools/pkgconfig/pkgconfig/fix-glib-configure-libtool-usage.patch b/poky/meta/recipes-devtools/pkgconfig/pkgconfig/fix-glib-configure-libtool-usage.patch
deleted file mode 100644
index 01c6247..0000000
--- a/poky/meta/recipes-devtools/pkgconfig/pkgconfig/fix-glib-configure-libtool-usage.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-
-Index: pkg-config-0.28/glib/configure.ac
-===================================================================
---- pkg-config-0.28.orig/glib/configure.ac
-+++ pkg-config-0.28/glib/configure.ac
-@@ -1438,7 +1438,7 @@ if test x"$glib_native_win32" = xyes; th
-   G_MODULE_LDFLAGS=
- else
-   export SED
--  G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+  G_MODULE_LDFLAGS=`(./${host_alias}-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- fi
- dnl G_MODULE_IMPL= don't reset, so cmd-line can override
- G_MODULE_NEED_USCORE=0
-@@ -1503,13 +1503,13 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMP
- 	LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
- dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
- 	echo "void glib_plugin_test(void) { }" > plugin.c
--	${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
-+	${SHELL} ./${host_alias}-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
- 		${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
--	${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
-+	${SHELL} ./${host_alias}-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
- 		${LDFLAGS} -module -o plugin.la -export-dynamic \
- 		-shrext ".o" -avoid-version plugin.lo \
- 		-rpath /dont/care >/dev/null 2>&1
--	eval `./libtool --config | grep ^objdir`
-+	eval `./${host_alias}-libtool --config | grep ^objdir`
- 	AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
- 		glib_cv_rtldglobal_broken,[
- 		AC_TRY_RUN([
-@@ -1582,7 +1582,7 @@ fi
- 
- AC_MSG_CHECKING(for the suffix of module shared libraries)
- export SED
--shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
-+shrext_cmds=`./${host_alias}-libtool --config | grep '^shrext_cmds='`
- eval $shrext_cmds
- module=yes eval std_shrext=$shrext_cmds
- # chop the initial dot
diff --git a/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index 39b87ec..16efcef 100644
--- a/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -14,7 +14,6 @@
 SRC_URI = "git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https \
            file://pkg-config-esdk.in \
            file://pkg-config-native.in \
-           file://fix-glib-configure-libtool-usage.patch \
            file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
            file://0001-autotools-remove-support-for-the-__int64-type.-See-1.patch \
            file://0001-autotools-use-C99-printf-format-specifiers-on-Window.patch \
@@ -67,7 +66,7 @@
 	if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
 		pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
 		mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
-		lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+		ln -rs $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
 		sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
 	fi
 }
diff --git a/poky/meta/recipes-devtools/python-numpy/files/0001-numpy-core-Define-RISCV-32-support.patch b/poky/meta/recipes-devtools/python-numpy/files/0001-numpy-core-Define-RISCV-32-support.patch
deleted file mode 100644
index b60ca1d..0000000
--- a/poky/meta/recipes-devtools/python-numpy/files/0001-numpy-core-Define-RISCV-32-support.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From dbcf296f84e5cef6a3ff0f1c469a4508f1e0fb15 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 15 Nov 2020 15:32:39 -0800
-Subject: [PATCH] numpy/core: Define RISCV-32 support
-
-Helps compile on riscv32
-
-Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- numpy/core/include/numpy/npy_cpu.h    | 9 +++++++--
- numpy/core/include/numpy/npy_endian.h | 1 +
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
-index 4dbf9d84e..bc41a7eda 100644
---- a/numpy/core/include/numpy/npy_cpu.h
-+++ b/numpy/core/include/numpy/npy_cpu.h
-@@ -18,6 +18,7 @@
-  *              NPY_CPU_ARCEL
-  *              NPY_CPU_ARCEB
-  *              NPY_CPU_RISCV64
-+ *              NPY_CPU_RISCV32
-  *              NPY_CPU_WASM
-  */
- #ifndef _NPY_CPUARCH_H_
-@@ -100,8 +101,12 @@
-     #define NPY_CPU_ARCEL
- #elif defined(__arc__) && defined(__BIG_ENDIAN__)
-     #define NPY_CPU_ARCEB
--#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
--    #define NPY_CPU_RISCV64
-+#elif defined(__riscv)
-+    #if __riscv_xlen == 64
-+	#define NPY_CPU_RISCV64
-+    #elif __riscv_xlen == 32
-+	#define NPY_CPU_RISCV32
-+    #endif
- #elif defined(__EMSCRIPTEN__)
-     /* __EMSCRIPTEN__ is defined by emscripten: an LLVM-to-Web compiler */
-     #define NPY_CPU_WASM
-diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
-index aa367a002..d59484573 100644
---- a/numpy/core/include/numpy/npy_endian.h
-+++ b/numpy/core/include/numpy/npy_endian.h
-@@ -49,6 +49,7 @@
-             || defined(NPY_CPU_PPC64LE)       \
-             || defined(NPY_CPU_ARCEL)         \
-             || defined(NPY_CPU_RISCV64)       \
-+            || defined(NPY_CPU_RISCV32)       \
-             || defined(NPY_CPU_WASM)
-         #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
-     #elif defined(NPY_CPU_PPC)                \
--- 
-2.29.2
-
diff --git a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
index 46546eb..5e2ee45 100644
--- a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
+++ b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
@@ -1,4 +1,4 @@
-From 58b614411867a31cf5f9684a45fe519b8e4f3e7b Mon Sep 17 00:00:00 2001
+From da88c57fe03e4474ba20325edacf519e80c1d7a8 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Tue, 17 Jul 2018 10:13:38 +0800
 Subject: [PATCH] conditionally do not fetch code by easy_install
@@ -15,7 +15,7 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
-index 1aed0e8..f491c0a 100644
+index fc848d0..c04a5de 100644
 --- a/setuptools/command/easy_install.py
 +++ b/setuptools/command/easy_install.py
 @@ -642,6 +642,11 @@ class easy_install(Command):
diff --git a/poky/meta/recipes-devtools/python/python-cython.inc b/poky/meta/recipes-devtools/python/python-cython.inc
index 5a8ec2a..278da5e 100644
--- a/poky/meta/recipes-devtools/python/python-cython.inc
+++ b/poky/meta/recipes-devtools/python/python-cython.inc
@@ -9,7 +9,7 @@
 PYPI_PACKAGE = "Cython"
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[sha256sum] = "cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443"
+SRC_URI[sha256sum] = "af377d543a762867da11fcf6e558f7a4a535ff8693f30cce123fab10c00fa312"
 UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
 
 inherit pypi
diff --git a/poky/meta/recipes-devtools/python/python-gitdb.inc b/poky/meta/recipes-devtools/python/python-gitdb.inc
index 5b24a1f..9482964 100644
--- a/poky/meta/recipes-devtools/python/python-gitdb.inc
+++ b/poky/meta/recipes-devtools/python/python-gitdb.inc
@@ -8,7 +8,7 @@
 
 PYPI_PACKAGE = "gitdb"
 
-SRC_URI[sha256sum] = "96bf5c08b157a666fec41129e6d327235284cca4c81e92109260f353ba138005"
+SRC_URI[sha256sum] = "bac2fd45c0a1c9cf619e63a90d62bdc63892ef92387424b855792a6cabe789aa"
 
 DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
 
diff --git a/poky/meta/recipes-devtools/python/python-pycryptodome.inc b/poky/meta/recipes-devtools/python/python-pycryptodome.inc
index 3f4c6e9..071af55 100644
--- a/poky/meta/recipes-devtools/python/python-pycryptodome.inc
+++ b/poky/meta/recipes-devtools/python/python-pycryptodome.inc
@@ -3,10 +3,12 @@
  cryptographic primitives."
 HOMEPAGE = "http://www.pycryptodome.org"
 LICENSE = "PD & BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=accfa6aeaceb3ba96676edf18e78302c"
+LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=29242a70410a4eeff488a28164e7ab93"
 
 inherit pypi
 
+PYPI_PACKAGE_EXT = "zip"
+
 RDEPENDS:${PN} += " \
     ${PYTHON_PN}-io \
     ${PYTHON_PN}-math \
diff --git a/poky/meta/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch b/poky/meta/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch
new file mode 100644
index 0000000..8a64687
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python-rfc3986-validator/0001-setup.py-move-pytest-runner-to-test_requirements.patch
@@ -0,0 +1,32 @@
+From 3531ff73631a0d59234eb4713e7b3a7f5ea57bbb Mon Sep 17 00:00:00 2001
+From: Nicola Lunghi <nicola.lunghi@jci.com>
+Date: Thu, 14 Nov 2019 12:17:51 +0000
+Subject: [PATCH] setup.py: move pytest-runner to test_requirements
+
+This fixes an issue with yocto build.
+pytest-runner is only needed when running tests.
+
+Upstream-Status: Pending
+---
+ setup.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 53ebea7..ebb0de2 100644
+--- a/setup.py
++++ b/setup.py
+@@ -10,9 +10,9 @@ with open('README.md') as readme_file:
+ 
+ requirements = []
+ 
+-setup_requirements = ['pytest-runner', ]
++setup_requirements = []
+ 
+-test_requirements = ['pytest>=3', ]
++test_requirements = ['pytest>=3', 'pytest-runner']
+ 
+ setup(
+     author="Nicolas Aimetti",
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/python/python3-attrs_21.2.0.bb b/poky/meta/recipes-devtools/python/python3-attrs_21.4.0.bb
similarity index 82%
rename from poky/meta/recipes-devtools/python/python3-attrs_21.2.0.bb
rename to poky/meta/recipes-devtools/python/python3-attrs_21.4.0.bb
index d52237f..d1dde29 100644
--- a/poky/meta/recipes-devtools/python/python3-attrs_21.2.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-attrs_21.4.0.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d4ab25949a73fe7d4fdee93bcbdbf8ff"
 
-SRC_URI[sha256sum] = "ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"
+SRC_URI[sha256sum] = "626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"
 
 inherit pypi setuptools3
 
diff --git a/poky/meta/recipes-devtools/python/python3-cython_0.29.24.bb b/poky/meta/recipes-devtools/python/python3-cython_0.29.26.bb
similarity index 96%
rename from poky/meta/recipes-devtools/python/python3-cython_0.29.24.bb
rename to poky/meta/recipes-devtools/python/python3-cython_0.29.26.bb
index b1d21bd..26333cb 100644
--- a/poky/meta/recipes-devtools/python/python3-cython_0.29.24.bb
+++ b/poky/meta/recipes-devtools/python/python3-cython_0.29.26.bb
@@ -8,7 +8,7 @@
 # running build_ext a second time during install fails, because Python
 # would then attempt to import cythonized modules built for the target
 # architecture.
-DISTUTILS_INSTALL_ARGS += "--skip-build"
+SETUPTOOLS_INSTALL_ARGS += "--skip-build"
 
 do_install:append() {
     # rename scripts that would conflict with the Python 2 build of Cython
diff --git a/poky/meta/recipes-devtools/python/python3-dbus_1.2.18.bb b/poky/meta/recipes-devtools/python/python3-dbus_1.2.18.bb
index 9592fbf..c4687de 100644
--- a/poky/meta/recipes-devtools/python/python3-dbus_1.2.18.bb
+++ b/poky/meta/recipes-devtools/python/python3-dbus_1.2.18.bb
@@ -11,7 +11,7 @@
 
 S = "${WORKDIR}/dbus-python-${PV}"
 
-inherit distutils3-base autotools pkgconfig
+inherit setuptools3-base autotools pkgconfig
 
 # documentation needs python3-sphinx, which is not in oe-core or meta-python for now
 # change to use PACKAGECONFIG when python3-sphinx is added to oe-core
diff --git a/poky/meta/recipes-devtools/python/python3-dbusmock_0.24.0.bb b/poky/meta/recipes-devtools/python/python3-dbusmock_0.25.0.bb
similarity index 82%
rename from poky/meta/recipes-devtools/python/python3-dbusmock_0.24.0.bb
rename to poky/meta/recipes-devtools/python/python3-dbusmock_0.25.0.bb
index 271a2b1..e64e343 100644
--- a/poky/meta/recipes-devtools/python/python3-dbusmock_0.24.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-dbusmock_0.25.0.bb
@@ -4,7 +4,7 @@
 LICENSE = "GPL-3.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02"
 
-SRC_URI[sha256sum] = "0be0d51dba4aee050bb2cd9074a377bf9308306df1eb7918038c6ffe7153c272"
+SRC_URI[sha256sum] = "6f4ce7650ecbb022684dc158df720e199635f3a3df75f7020f4fe8f6ff0394db"
 
 PYPI_PACKAGE = "python-dbusmock"
 
diff --git a/poky/meta/recipes-devtools/python/python3-docutils_0.17.1.bb b/poky/meta/recipes-devtools/python/python3-docutils_0.18.1.bb
similarity index 60%
rename from poky/meta/recipes-devtools/python/python3-docutils_0.17.1.bb
rename to poky/meta/recipes-devtools/python/python3-docutils_0.18.1.bb
index 54a8098..e0fbb2c 100644
--- a/poky/meta/recipes-devtools/python/python3-docutils_0.17.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-docutils_0.18.1.bb
@@ -2,9 +2,9 @@
 HOMEPAGE = "http://docutils.sourceforge.net"
 SECTION = "devel/python"
 LICENSE = "PSF & BSD-2-Clause & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=836a1950177996968a49ff477a4a61c4"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=fecee07ad8df9116e1f739e2ed2ea513"
 
-SRC_URI[sha256sum] = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"
+SRC_URI[sha256sum] = "679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06"
 
 inherit pypi setuptools3
 
diff --git a/poky/meta/recipes-devtools/python/python3-dtschema_2021.12.bb b/poky/meta/recipes-devtools/python/python3-dtschema_2021.12.bb
new file mode 100644
index 0000000..34d0bf6
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-dtschema_2021.12.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "Tooling for devicetree validation using YAML and jsonschema"
+HOMEPAGE = "https://github.com/devicetree-org/dt-schema"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=457495c8fa03540db4a576bf7869e811"
+
+inherit pypi setuptools3
+
+PYPI_PACKAGE = "dtschema"
+
+SRC_URI[sha256sum] = "f68af77fbce1ae00015c1fd2809fd20db8b72a27105c26a20e1ac0203aee1739"
+
+DEPENDS += "python3-setuptools-scm-native"
+RDEPENDS:${PN} += "python3-ruamel-yaml python3-jsonschema python3-rfc3987"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-git_3.1.24.bb b/poky/meta/recipes-devtools/python/python3-git_3.1.26.bb
similarity index 91%
rename from poky/meta/recipes-devtools/python/python3-git_3.1.24.bb
rename to poky/meta/recipes-devtools/python/python3-git_3.1.26.bb
index 445c7b0..b6171a0 100644
--- a/poky/meta/recipes-devtools/python/python3-git_3.1.24.bb
+++ b/poky/meta/recipes-devtools/python/python3-git_3.1.26.bb
@@ -12,7 +12,7 @@
 
 inherit pypi setuptools3
 
-SRC_URI[sha256sum] = "df83fdf5e684fef7c6ee2c02fc68a5ceb7e7e759d08b694088d0cacb4eba59e5"
+SRC_URI[sha256sum] = "fc8868f63a2e6d268fb25f481995ba185a85a66fcad126f039323ff6635669ee"
 
 DEPENDS += " ${PYTHON_PN}-gitdb"
 
diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.7.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.7.bb
deleted file mode 100644
index 988d67b..0000000
--- a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.7.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools3
-require python-gitdb.inc
-
-SRC_URI[md5sum] = "3f52187435ab0b6e64a15782ffaf29ab"
diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.9.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.9.bb
new file mode 100644
index 0000000..2dcd9c8
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.9.bb
@@ -0,0 +1,3 @@
+inherit setuptools3
+require python-gitdb.inc
+
diff --git a/poky/meta/recipes-devtools/python/python3-hypothesis_6.24.0.bb b/poky/meta/recipes-devtools/python/python3-hypothesis_6.35.0.bb
similarity index 90%
rename from poky/meta/recipes-devtools/python/python3-hypothesis_6.24.0.bb
rename to poky/meta/recipes-devtools/python/python3-hypothesis_6.35.0.bb
index 50f7e01..246ff84 100644
--- a/poky/meta/recipes-devtools/python/python3-hypothesis_6.24.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-hypothesis_6.35.0.bb
@@ -13,7 +13,7 @@
     file://test_rle.py \
     "
 
-SRC_URI[sha256sum] = "ef53bd1c4756436be2e8d4a2e16f6f5ffbca7acbe8041e6872aea16176ff3806"
+SRC_URI[sha256sum] = "ce3961fff61e7353d022608788cbc9876c293d2468749eeba27511adc9565131"
 
 RDEPENDS:${PN} += " \
     python3-attrs \
diff --git a/poky/meta/recipes-devtools/python/python3-idna_3.3.bb b/poky/meta/recipes-devtools/python/python3-idna_3.3.bb
new file mode 100644
index 0000000..ee92f44
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-idna_3.3.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Internationalised Domain Names in Applications"
+HOMEPAGE = "https://github.com/kjd/idna"
+LICENSE = "BSD-3-Clause & Python-2.0 & Unicode-TOU"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=239668a7c6066d9e0c5382e9c8c6c0e1"
+
+SRC_URI[sha256sum] = "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
+
+inherit pypi setuptools3
+
+# Remove bundled egg-info
+do_compile:prepend() {
+    rm -rf ${S}/idna.egg-info
+}
+
+RDEPENDS:${PN}:class-target = "\
+    ${PYTHON_PN}-codecs \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.8.1.bb b/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.10.0.bb
similarity index 87%
rename from poky/meta/recipes-devtools/python/python3-importlib-metadata_4.8.1.bb
rename to poky/meta/recipes-devtools/python/python3-importlib-metadata_4.10.0.bb
index 3f75668..ea19afc 100644
--- a/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.8.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.10.0.bb
@@ -8,7 +8,7 @@
 PYPI_PACKAGE = "importlib_metadata"
 UPSTREAM_CHECK_REGEX = "/importlib-metadata/(?P<pver>(\d+[\.\-_]*)+)/"
 
-SRC_URI[sha256sum] = "f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"
+SRC_URI[sha256sum] = "92a8b58ce734b2a4494878e0ecf7d79ccd7a128b5fc6014c401e0b61f006f0f6"
 
 S = "${WORKDIR}/importlib_metadata-${PV}"
 
diff --git a/poky/meta/recipes-devtools/python/python3-jinja2_3.0.2.bb b/poky/meta/recipes-devtools/python/python3-jinja2_3.0.3.bb
similarity index 91%
rename from poky/meta/recipes-devtools/python/python3-jinja2_3.0.2.bb
rename to poky/meta/recipes-devtools/python/python3-jinja2_3.0.3.bb
index 139fe66..c416acb 100644
--- a/poky/meta/recipes-devtools/python/python3-jinja2_3.0.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-jinja2_3.0.3.bb
@@ -4,7 +4,7 @@
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462"
 
-SRC_URI[sha256sum] = "827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"
+SRC_URI[sha256sum] = "611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"
 
 PYPI_PACKAGE = "Jinja2"
 
diff --git a/poky/meta/recipes-devtools/python/python3-jsonpointer/run-ptest b/poky/meta/recipes-devtools/python/python3-jsonpointer/run-ptest
new file mode 100644
index 0000000..51e609f
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-jsonpointer/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python3 tests.py
diff --git a/poky/meta/recipes-devtools/python/python3-jsonpointer_2.2.bb b/poky/meta/recipes-devtools/python/python3-jsonpointer_2.2.bb
new file mode 100644
index 0000000..225fde7
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-jsonpointer_2.2.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Resolve JSON Pointers in Python"
+HOMEPAGE = "https://github.com/stefankoegl/python-json-pointer"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=32b15c843b7a329130f4e266a281ebb3"
+
+inherit pypi ptest setuptools3
+
+SRC_URI[sha256sum] = "f09f8deecaaa5aea65b5eb4f67ca4e54e1a61f7a11c75085e360fe6feb6a48bf"
+
+RDEPENDS:${PN} += " \
+    ${PYTHON_PN}-json \
+"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+	${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+	cp -f ${S}/tests.py ${D}${PTEST_PATH}/
+}
diff --git a/poky/meta/recipes-devtools/python/python3-jsonschema_3.2.0.bb b/poky/meta/recipes-devtools/python/python3-jsonschema_3.2.0.bb
new file mode 100644
index 0000000..c7efe33
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-jsonschema_3.2.0.bb
@@ -0,0 +1,48 @@
+SUMMARY = "An implementation of JSON Schema validation for Python"
+HOMEPAGE = "https://github.com/Julian/jsonschema"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 \
+                    file://json/LICENSE;md5=9d4de43111d33570c8fe49b4cb0e01af"
+DEPENDS += "${PYTHON_PN}-vcversioner-native ${PYTHON_PN}-setuptools-scm-native"
+
+SRC_URI[md5sum] = "f1a0b5011f05a02a8dee1070cd10a26d"
+SRC_URI[sha256sum] = "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"
+
+inherit pypi setuptools3
+
+PACKAGECONFIG ??= "format"
+PACKAGECONFIG[format] = ",,,\
+    ${PYTHON_PN}-idna \
+    ${PYTHON_PN}-jsonpointer \
+    ${PYTHON_PN}-webcolors \
+    ${PYTHON_PN}-rfc3987 \
+    ${PYTHON_PN}-strict-rfc3339 \
+"
+PACKAGECONFIG[nongpl] = ",,,\
+    ${PYTHON_PN}-idna \
+    ${PYTHON_PN}-jsonpointer \
+    ${PYTHON_PN}-webcolors \
+    ${PYTHON_PN}-rfc3986-validator \
+    ${PYTHON_PN}-rfc3339-validator \
+"
+
+RDEPENDS:${PN} += " \
+    ${PYTHON_PN}-attrs \
+    ${PYTHON_PN}-core \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-importlib-metadata \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-json \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-numbers \
+    ${PYTHON_PN}-pkgutil \
+    ${PYTHON_PN}-pprint \
+    ${PYTHON_PN}-pyrsistent \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-six \
+    ${PYTHON_PN}-unittest \
+    ${PYTHON_PN}-setuptools-scm \
+    ${PYTHON_PN}-zipp \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb b/poky/meta/recipes-devtools/python/python3-libarchive-c_3.2.bb
similarity index 78%
rename from poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb
rename to poky/meta/recipes-devtools/python/python3-libarchive-c_3.2.bb
index ac8466e..cc04210 100644
--- a/poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-libarchive-c_3.2.bb
@@ -9,8 +9,7 @@
 
 inherit pypi setuptools3
 
-SRC_URI[md5sum] = "8c62da42a8b9bd24642e5430427e6f5a"
-SRC_URI[sha256sum] = "618a7ecfbfb58ca15e11e3138d4a636498da3b6bc212811af158298530fbb87e"
+SRC_URI[sha256sum] = "21ad493f4628972fc82440bff54c834a9fbe13be3893037a4bad332b9ee741e5"
 
 RDEPENDS:${PN} += "\
   libarchive \
diff --git a/poky/meta/recipes-devtools/python/python3-mako_1.1.5.bb b/poky/meta/recipes-devtools/python/python3-mako_1.1.6.bb
similarity index 82%
rename from poky/meta/recipes-devtools/python/python3-mako_1.1.5.bb
rename to poky/meta/recipes-devtools/python/python3-mako_1.1.6.bb
index f8be44a..ec8c9cc 100644
--- a/poky/meta/recipes-devtools/python/python3-mako_1.1.5.bb
+++ b/poky/meta/recipes-devtools/python/python3-mako_1.1.6.bb
@@ -8,7 +8,7 @@
 
 inherit pypi setuptools3
 
-SRC_URI[sha256sum] = "169fa52af22a91900d852e937400e79f535496191c63712e3b9fda5a9bed6fc3"
+SRC_URI[sha256sum] = "4e9e345a41924a954251b95b4b28e14a301145b544901332e658907a7464b6b2"
 
 RDEPENDS:${PN} = "${PYTHON_PN}-html \
                   ${PYTHON_PN}-netclient \
diff --git a/poky/meta/recipes-devtools/python/python3-markdown_3.3.4.bb b/poky/meta/recipes-devtools/python/python3-markdown_3.3.6.bb
similarity index 79%
rename from poky/meta/recipes-devtools/python/python3-markdown_3.3.4.bb
rename to poky/meta/recipes-devtools/python/python3-markdown_3.3.6.bb
index ec1d139..7b64da6 100644
--- a/poky/meta/recipes-devtools/python/python3-markdown_3.3.4.bb
+++ b/poky/meta/recipes-devtools/python/python3-markdown_3.3.6.bb
@@ -6,7 +6,7 @@
 inherit pypi setuptools3
 
 PYPI_PACKAGE = "Markdown"
-SRC_URI[sha256sum] = "31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"
+SRC_URI[sha256sum] = "76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"
 
 BBCLASSEXTEND = "native"
 
diff --git a/poky/meta/recipes-devtools/python/python3-more-itertools_8.10.0.bb b/poky/meta/recipes-devtools/python/python3-more-itertools_8.12.0.bb
similarity index 86%
rename from poky/meta/recipes-devtools/python/python3-more-itertools_8.10.0.bb
rename to poky/meta/recipes-devtools/python/python3-more-itertools_8.12.0.bb
index 93d3ad6..c1e34b2 100644
--- a/poky/meta/recipes-devtools/python/python3-more-itertools_8.10.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-more-itertools_8.12.0.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3396ea30f9d21389d7857719816f83b5"
 
-SRC_URI[sha256sum] = "1debcabeb1df793814859d64a81ad7cb10504c24349368ccf214c664c474f41f"
+SRC_URI[sha256sum] = "7dc6ad46f05f545f900dd59e8dfb4e84a4827b97b3cfecb175ea0c7d247f6064"
 
 inherit pypi setuptools3 ptest
 
diff --git a/poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/poky/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
similarity index 100%
rename from poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
rename to poky/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
diff --git a/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch b/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
new file mode 100644
index 0000000..676bdbb
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
@@ -0,0 +1,50 @@
+From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 15 Nov 2020 15:32:39 -0800
+Subject: [PATCH] numpy/core: Define RISCV-32 support
+
+Helps compile on riscv32
+
+Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ numpy/core/include/numpy/npy_cpu.h    | 3 +++
+ numpy/core/include/numpy/npy_endian.h | 1 +
+ 2 files changed, 4 insertions(+)
+
+diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
+index 78d229e..04be511 100644
+--- a/numpy/core/include/numpy/npy_cpu.h
++++ b/numpy/core/include/numpy/npy_cpu.h
+@@ -19,6 +19,7 @@
+  *              NPY_CPU_ARCEB
+  *              NPY_CPU_RISCV64
+  *              NPY_CPU_LOONGARCH
++ *              NPY_CPU_RISCV32
+  *              NPY_CPU_WASM
+  */
+ #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
+@@ -104,6 +105,8 @@
+     #define NPY_CPU_ARCEB
+ #elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+     #define NPY_CPU_RISCV64
++#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 32
++    #define NPY_CPU_RISCV32
+ #elif defined(__loongarch__)
+     #define NPY_CPU_LOONGARCH
+ #elif defined(__EMSCRIPTEN__)
+diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
+index 5e58a7f..0926212 100644
+--- a/numpy/core/include/numpy/npy_endian.h
++++ b/numpy/core/include/numpy/npy_endian.h
+@@ -49,6 +49,7 @@
+             || defined(NPY_CPU_PPC64LE)       \
+             || defined(NPY_CPU_ARCEL)         \
+             || defined(NPY_CPU_RISCV64)       \
++            || defined(NPY_CPU_RISCV32)       \
+             || defined(NPY_CPU_LOONGARCH)     \
+             || defined(NPY_CPU_WASM)
+         #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch b/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch
new file mode 100644
index 0000000..66e3221
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch
@@ -0,0 +1,29 @@
+From 0f0601e79f9ce7614d157284523e6cd8af2259d5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Wed, 5 Jan 2022 12:12:47 +0100
+Subject: [PATCH] numpy/core/setup.py: disable svml for now
+
+The check really doesn't work in cross compiling,
+as it is using host python to see what arch we're
+building on. Issue reported upstream:
+https://github.com/numpy/numpy/issues/20736
+
+Upstream-Status: Inappropriate [needs upstream fix]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ numpy/core/setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/numpy/core/setup.py b/numpy/core/setup.py
+index a5f423d..945f2dd 100644
+--- a/numpy/core/setup.py
++++ b/numpy/core/setup.py
+@@ -70,7 +70,7 @@ def can_link_svml():
+     """
+     machine = platform.machine()
+     system = platform.system()
+-    return "x86_64" in machine and system == "Linux"
++    return False
+ 
+ def check_svml_submodule(svmlpath):
+     if not os.path.exists(svmlpath + "/README.md"):
diff --git a/poky/meta/recipes-devtools/python-numpy/files/run-ptest b/poky/meta/recipes-devtools/python/python3-numpy/run-ptest
similarity index 100%
rename from poky/meta/recipes-devtools/python-numpy/files/run-ptest
rename to poky/meta/recipes-devtools/python/python3-numpy/run-ptest
diff --git a/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.21.3.bb b/poky/meta/recipes-devtools/python/python3-numpy_1.22.1.bb
similarity index 87%
rename from poky/meta/recipes-devtools/python-numpy/python3-numpy_1.21.3.bb
rename to poky/meta/recipes-devtools/python/python3-numpy_1.22.1.bb
index 4a289c2..b79ce61 100644
--- a/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.21.3.bb
+++ b/poky/meta/recipes-devtools/python/python3-numpy_1.22.1.bb
@@ -3,7 +3,7 @@
 DESCRIPTION = "NumPy is the fundamental package needed for scientific computing with Python."
 SECTION = "devel/python"
 LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b076ad374a7d311ba3126a22b2d52596"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8026691468924fb6ec155dadfe2a1a7f"
 
 SRCNAME = "numpy"
 
@@ -11,8 +11,9 @@
            file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
            file://0001-numpy-core-Define-RISCV-32-support.patch \
            file://run-ptest \
-"
-SRC_URI[sha256sum] = "d0bba24083c01ae43457514d875f10d9ce4c1125d55b1e2573277b2410f2d068"
+           file://0001-numpy-core-setup.py-disable-svml-for-now.patch \
+           "
+SRC_URI[sha256sum] = "dd1968402ae20dfd59b34acd799b494be340c774f6295e9bf1c2b9842a5e416d"
 
 UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
@@ -47,6 +48,7 @@
                   ${PYTHON_PN}-ctypes \
                   ${PYTHON_PN}-threading \
                   ${PYTHON_PN}-multiprocessing \
+                  ${PYTHON_PN}-json \
 "
 RDEPENDS:${PN}-ptest += "${PYTHON_PN}-pytest \
                          ${PYTHON_PN}-hypothesis \
diff --git a/poky/meta/recipes-devtools/python/python3-packaging_21.0.bb b/poky/meta/recipes-devtools/python/python3-packaging_21.3.bb
similarity index 80%
rename from poky/meta/recipes-devtools/python/python3-packaging_21.0.bb
rename to poky/meta/recipes-devtools/python/python3-packaging_21.3.bb
index f20f888..446edf0 100644
--- a/poky/meta/recipes-devtools/python/python3-packaging_21.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-packaging_21.3.bb
@@ -3,7 +3,7 @@
 LICENSE = "Apache-2.0 | BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=faadaedca9251a90b205c9167578ce91"
 
-SRC_URI[sha256sum] = "7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"
+SRC_URI[sha256sum] = "dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"
 
 inherit pypi setuptools3
 
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.6.0.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.6.0.bb
deleted file mode 100644
index 132e6e5..0000000
--- a/poky/meta/recipes-devtools/python/python3-pbr_5.6.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools3
-require python-pbr.inc
-
-SRC_URI[sha256sum] = "42df03e7797b796625b1029c0400279c7c34fd7df24a7d7818a1abb5b38710dd"
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.8.0.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.8.0.bb
new file mode 100644
index 0000000..b74fc16
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pbr_5.8.0.bb
@@ -0,0 +1,4 @@
+inherit setuptools3
+require python-pbr.inc
+
+SRC_URI[sha256sum] = "672d8ebee84921862110f23fcec2acea191ef58543d34dfe9ef3d9f13c31cddf"
diff --git a/poky/meta/recipes-devtools/python/python3-pip_21.3.1.bb b/poky/meta/recipes-devtools/python/python3-pip_21.3.1.bb
index 6ddb1d6..c893135 100644
--- a/poky/meta/recipes-devtools/python/python3-pip_21.3.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-pip_21.3.1.bb
@@ -6,7 +6,7 @@
 
 DEPENDS += "python3 python3-setuptools-native"
 
-inherit pypi distutils3
+inherit pypi setuptools3
 
 SRC_URI += "file://0001-change-shebang-to-python3.patch"
 
diff --git a/poky/meta/recipes-devtools/python/python3-py_1.10.0.bb b/poky/meta/recipes-devtools/python/python3-py_1.11.0.bb
similarity index 80%
rename from poky/meta/recipes-devtools/python/python3-py_1.10.0.bb
rename to poky/meta/recipes-devtools/python/python3-py_1.11.0.bb
index 8225c6b..f8be393 100644
--- a/poky/meta/recipes-devtools/python/python3-py_1.10.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-py_1.11.0.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=a6bb0320b04a0a503f12f69fea479de9"
 
-SRC_URI[sha256sum] = "21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"
+SRC_URI[sha256sum] = "51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"
 
 DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
 
diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.11.0.bb b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.11.0.bb
deleted file mode 100644
index b0e3717..0000000
--- a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.11.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require python-pycryptodome.inc
-inherit setuptools3
-
-SRC_URI[sha256sum] = "428096bbf7a77e207f418dfd4d7c284df8ade81d2dc80f010e92753a3e406ad0"
-
diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.12.0.bb b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.12.0.bb
new file mode 100644
index 0000000..a732441
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.12.0.bb
@@ -0,0 +1,5 @@
+require python-pycryptodome.inc
+inherit setuptools3
+
+SRC_URI[sha256sum] = "12c7343aec5a3b3df5c47265281b12b611f26ec9367b6129199d67da54b768c1"
+
diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.11.0.bb b/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.12.0.bb
similarity index 69%
rename from poky/meta/recipes-devtools/python/python3-pycryptodomex_3.11.0.bb
rename to poky/meta/recipes-devtools/python/python3-pycryptodomex_3.12.0.bb
index f1132c2..5f88419 100644
--- a/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.11.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.12.0.bb
@@ -1,7 +1,7 @@
 require python-pycryptodome.inc
 inherit setuptools3
 
-SRC_URI[sha256sum] = "0398366656bb55ebdb1d1d493a7175fc48ade449283086db254ac44c7d318d6d"
+SRC_URI[sha256sum] = "922e9dac0166e4617e5c7980d2cff6912a6eb5cb5c13e7ece222438650bd7f66"
 
 FILES:${PN}-tests = " \
     ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \
diff --git a/poky/meta/recipes-devtools/python/python3-pyelftools_0.27.bb b/poky/meta/recipes-devtools/python/python3-pyelftools_0.27.bb
index 0cfd995..e2d0e18 100644
--- a/poky/meta/recipes-devtools/python/python3-pyelftools_0.27.bb
+++ b/poky/meta/recipes-devtools/python/python3-pyelftools_0.27.bb
@@ -11,3 +11,5 @@
 inherit pypi setuptools3
 
 BBCLASSEXTEND = "native"
+
+RDEPENDS:${PN} += "${PYTHON_PN}-debugger ${PYTHON_PN}-pprint"
diff --git a/poky/meta/recipes-devtools/python/python3-pygments_2.10.0.bb b/poky/meta/recipes-devtools/python/python3-pygments_2.11.2.bb
similarity index 82%
rename from poky/meta/recipes-devtools/python/python3-pygments_2.10.0.bb
rename to poky/meta/recipes-devtools/python/python3-pygments_2.11.2.bb
index 3c1b5d1..35d288c 100644
--- a/poky/meta/recipes-devtools/python/python3-pygments_2.10.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygments_2.11.2.bb
@@ -5,7 +5,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=98419e351433ac106a24e3ad435930bc"
 
 inherit setuptools3
-SRC_URI[sha256sum] = "f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"
+SRC_URI[sha256sum] = "4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"
 
 DEPENDS += "\
             ${PYTHON_PN} \
diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.42.0.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.42.0.bb
index 7ff7c5b..7431833 100644
--- a/poky/meta/recipes-devtools/python/python3-pygobject_3.42.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.42.0.bb
@@ -6,19 +6,12 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
 
 GNOMEBASEBUILDCLASS = "meson"
-inherit gnomebase distutils3-base upstream-version-is-even
+GIR_MESON_OPTION = ""
+
+inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even
 
 DEPENDS += "python3 glib-2.0"
 
-# Generating introspection data depends on a combination of native and target
-# introspection tools, and qemu to run the target tools.
-DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native prelink-native"
-
-# Even though introspection is disabled on -native, gobject-introspection package is still
-# needed for m4 macros.
-DEPENDS:append:class-native = " gobject-introspection-native"
-DEPENDS:append:class-nativesdk = " gobject-introspection-native"
-
 SRCNAME="pygobject"
 
 SRC_URI = " \
diff --git a/poky/meta/recipes-devtools/python/python3-pyparsing_3.0.0.bb b/poky/meta/recipes-devtools/python/python3-pyparsing_3.0.6.bb
similarity index 84%
rename from poky/meta/recipes-devtools/python/python3-pyparsing_3.0.0.bb
rename to poky/meta/recipes-devtools/python/python3-pyparsing_3.0.6.bb
index f1f6b0d..d15ff33 100644
--- a/poky/meta/recipes-devtools/python/python3-pyparsing_3.0.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-pyparsing_3.0.6.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=657a566233888513e1f07ba13e2f47f1"
 
-SRC_URI[sha256sum] = "001cad8d467e7a9248ef9fd513f5c0d39afcbcb9a43684101853bd0ab962e479"
+SRC_URI[sha256sum] = "d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81"
 
 UPSTREAM_CHECK_REGEX = "pyparsing-(?P<pver>.*)\.tar"
 
diff --git a/poky/meta/recipes-devtools/python/python3-pyrsistent_0.18.1.bb b/poky/meta/recipes-devtools/python/python3-pyrsistent_0.18.1.bb
new file mode 100644
index 0000000..4c9b8ec
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pyrsistent_0.18.1.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Persistent/Immutable/Functional data structures for Python"
+HOMEPAGE = "https://github.com/tobgu/pyrsistent"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.mit;md5=b695eb9c6e7a6fb1b1bc2d193c42776e"
+
+SRC_URI[sha256sum] = "d4d61f8b993a7255ba714df3aca52700f8125289f84f704cf80916517c46eb96"
+
+inherit pypi setuptools3
+
+RDEPENDS:${PN} += " \
+    ${PYTHON_PN}-numbers \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-rfc3339-validator_0.1.4.bb b/poky/meta/recipes-devtools/python/python3-rfc3339-validator_0.1.4.bb
new file mode 100644
index 0000000..9bc5fed
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-rfc3339-validator_0.1.4.bb
@@ -0,0 +1,21 @@
+SUMMARY = "A pure python RFC3339 validator"
+HOMEPAGE = "https://github.com/naimetti/rfc3339-validator"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a21b13b5a996f08f7e0b088aa38ce9c6"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/python-rfc3339-validator:"
+
+SRC_URI[sha256sum] = "138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b"
+
+PYPI_PACKAGE = "rfc3339_validator"
+UPSTREAM_CHECK_REGEX = "/rfc3339-validator/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit pypi setuptools3
+
+RDEPENDS:${PN} += "\
+    ${PYTHON_PN}-core \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-six \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb b/poky/meta/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb
new file mode 100644
index 0000000..4abd181
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-rfc3986-validator_0.1.1.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Pure python rfc3986 validator"
+HOMEPAGE = "https://github.com/naimetti/rfc3986-validator"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a21b13b5a996f08f7e0b088aa38ce9c6"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/python-rfc3986-validator:"
+
+SRC_URI[md5sum] = "47f7657b790aaf6011a1ab3d86c6be95"
+SRC_URI[sha256sum] = "3d44bde7921b3b9ec3ae4e3adca370438eccebc676456449b145d533b240d055"
+
+PYPI_PACKAGE = "rfc3986_validator"
+UPSTREAM_CHECK_REGEX = "/rfc3986-validator/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit pypi setuptools3
+
+SRC_URI:append = " \
+    file://0001-setup.py-move-pytest-runner-to-test_requirements.patch \
+"
+
+RDEPENDS:${PN} += "\
+    python3-core \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-rfc3987_1.3.8.bb b/poky/meta/recipes-devtools/python/python3-rfc3987_1.3.8.bb
new file mode 100644
index 0000000..ae01540
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-rfc3987_1.3.8.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)"
+HOMEPAGE = "https://pypi.org/project/rfc3987/"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=9;md5=2b723edf67b2f3088bc5e339b1ceda2d"
+
+SRC_URI[md5sum] = "b6c4028acdc788a9ba697e1c1d6b896c"
+SRC_URI[sha256sum] = "d3c4d257a560d544e9826b38bc81db676890c79ab9d7ac92b39c7a253d5ca733"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-ruamel-yaml_0.17.20.bb b/poky/meta/recipes-devtools/python/python3-ruamel-yaml_0.17.20.bb
new file mode 100644
index 0000000..a6bee1b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-ruamel-yaml_0.17.20.bb
@@ -0,0 +1,24 @@
+SUMMARY = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order."
+HOMEPAGE = "https://pypi.org/project/ruamel.yaml/"
+AUTHOR = "Anthon van der Neut"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=034154b7344d15438bc5ed5ee9cc075f"
+
+PYPI_PACKAGE = "ruamel.yaml"
+
+inherit pypi setuptools3
+
+SRC_URI[sha256sum] = "4b8a33c1efb2b443a93fcaafcfa4d2e445f8e8c29c528d9f5cdafb7cc9e4004c"
+
+RDEPENDS:${PN} += "\
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-netclient \
+"
+
+do_install:prepend() {
+    export RUAMEL_NO_PIP_INSTALL_CHECK=1
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-scons-native_4.2.0.bb b/poky/meta/recipes-devtools/python/python3-scons-native_4.3.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python/python3-scons-native_4.2.0.bb
rename to poky/meta/recipes-devtools/python/python3-scons-native_4.3.0.bb
diff --git a/poky/meta/recipes-devtools/python/python3-scons_4.2.0.bb b/poky/meta/recipes-devtools/python/python3-scons_4.3.0.bb
similarity index 87%
rename from poky/meta/recipes-devtools/python/python3-scons_4.2.0.bb
rename to poky/meta/recipes-devtools/python/python3-scons_4.3.0.bb
index 23527a2..bff2fda 100644
--- a/poky/meta/recipes-devtools/python/python3-scons_4.2.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-scons_4.3.0.bb
@@ -5,7 +5,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d903b0b8027f461402bac9b5169b36f7"
 
 SRC_URI += " file://0001-Fix-man-page-installation.patch"
-SRC_URI[sha256sum] = "691893b63f38ad14295f5104661d55cb738ec6514421c6261323351c25432b0a"
+SRC_URI[sha256sum] = "d47081587e3675cc168f1f54f0d74a69b328a2fc90ec4feb85f728677419b879"
 
 PYPI_PACKAGE = "SCons"
 
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig-append-STAGING_LIBDIR-python-sy.patch b/poky/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig-append-STAGING_LIBDIR-python-sy.patch
index 565cf8a..3150187 100644
--- a/poky/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig-append-STAGING_LIBDIR-python-sy.patch
+++ b/poky/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig-append-STAGING_LIBDIR-python-sy.patch
@@ -1,4 +1,4 @@
-From 44349672cbff8945693c8d2821c82e9f04bfc8b5 Mon Sep 17 00:00:00 2001
+From 1ff575308248b183639c8cb14afee7c8572bd2b8 Mon Sep 17 00:00:00 2001
 From: Tim Orling <timothy.t.orling@intel.com>
 Date: Wed, 20 Oct 2021 17:38:10 +0000
 Subject: [PATCH] _distutils/sysconfig: append
@@ -15,18 +15,19 @@
 Upstream-Status: Inappropriate [oe-specific]
 
 Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
+
 ---
  setuptools/_distutils/sysconfig.py | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
-index 8832b3e..bbc7c08 100644
+index d36d94f..616eb91 100644
 --- a/setuptools/_distutils/sysconfig.py
 +++ b/setuptools/_distutils/sysconfig.py
-@@ -461,6 +461,8 @@ def _init_posix():
-         platform=sys.platform,
-         multiarch=getattr(sys.implementation, '_multiarch', ''),
-     ))
+@@ -484,6 +484,8 @@ def _init_posix():
+             multiarch=getattr(sys.implementation, '_multiarch', ''),
+         ),
+     )
 +    if 'STAGING_LIBDIR' in os.environ:
 +        sys.path.append(os.environ['STAGING_LIBDIR']+'/python-sysconfigdata')
      try:
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools_58.3.0.bb b/poky/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb
similarity index 92%
rename from poky/meta/recipes-devtools/python/python3-setuptools_58.3.0.bb
rename to poky/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb
index 47107ba..33ca928 100644
--- a/poky/meta/recipes-devtools/python/python3-setuptools_58.3.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb
@@ -13,7 +13,7 @@
     file://0001-_distutils-sysconfig-append-STAGING_LIBDIR-python-sy.patch \
 "
 
-SRC_URI[sha256sum] = "b0c2461641b58fe30e11d4c3dfba316c513bdf9ec85f9fed0c871c678447205e"
+SRC_URI[sha256sum] = "d144f85102f999444d06f9c0e8c737fd0194f10f2f7e5fdb77573f6e2fa4fad0"
 
 DEPENDS += "${PYTHON_PN}"
 
@@ -22,7 +22,6 @@
     ${PYTHON_PN}-compile \
     ${PYTHON_PN}-compression \
     ${PYTHON_PN}-ctypes \
-    ${PYTHON_PN}-distutils \
     ${PYTHON_PN}-email \
     ${PYTHON_PN}-html \
     ${PYTHON_PN}-json \
diff --git a/poky/meta/recipes-devtools/python/python3-strict-rfc3339_0.7.bb b/poky/meta/recipes-devtools/python/python3-strict-rfc3339_0.7.bb
new file mode 100644
index 0000000..aa2d5b4
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-strict-rfc3339_0.7.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Strict, simple, lightweight RFC3339 function.s"
+HOMEPAGE = "https://pypi.org/project/strict-rfc3339/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8f0e2cd40e05189ec81232da84bd6e1a"
+
+SRC_URI[md5sum] = "4d9b635b4df885bc37bc1189d66c9abc"
+SRC_URI[sha256sum] = "5cad17bedfc3af57b399db0fed32771f18fc54bbd917e85546088607ac5e1277"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-tomli_1.2.2.bb b/poky/meta/recipes-devtools/python/python3-tomli_2.0.0.bb
similarity index 86%
rename from poky/meta/recipes-devtools/python/python3-tomli_1.2.2.bb
rename to poky/meta/recipes-devtools/python/python3-tomli_2.0.0.bb
index 39030ed..aa23ad8 100644
--- a/poky/meta/recipes-devtools/python/python3-tomli_1.2.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-tomli_2.0.0.bb
@@ -8,7 +8,7 @@
 
 inherit pypi setuptools3
 
-SRC_URI[sha256sum] = "c6ce0015eb38820eaf32b5db832dbc26deb3dd427bd5f6556cf0acac2c214fee"
+SRC_URI[sha256sum] = "c292c34f58502a1eb2bbb9f5bbc9a5ebc37bee10ffb8c2d6bbdfa8eb13cc14e1"
 
 do_configure:prepend() {
 cat > ${S}/setup.py <<-EOF
diff --git a/poky/meta/recipes-devtools/python/python3-vcversioner_2.16.0.0.bb b/poky/meta/recipes-devtools/python/python3-vcversioner_2.16.0.0.bb
new file mode 100644
index 0000000..149078c
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-vcversioner_2.16.0.0.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Python vcversioner, automagically update the project's version"
+HOMEPAGE = "https://github.com/habnabit/vcversioner"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=827a7a91a8d20d3c666b665cd96db8e3"
+
+SRC_URI[md5sum] = "aab6ef5e0cf8614a1b1140ed5b7f107d"
+SRC_URI[sha256sum] = "dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/python/python3-webcolors/run-ptest b/poky/meta/recipes-devtools/python/python3-webcolors/run-ptest
new file mode 100644
index 0000000..3385d68
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-webcolors/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
diff --git a/poky/meta/recipes-devtools/python/python3-webcolors_1.11.1.bb b/poky/meta/recipes-devtools/python/python3-webcolors_1.11.1.bb
new file mode 100644
index 0000000..26dbe51
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-webcolors_1.11.1.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Simple Python module for working with HTML/CSS color definitions."
+HOMEPAGE = "https://pypi.org/project/webcolors/"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=25b90379a52351261c51272e7923d240"
+
+SRC_URI[md5sum] = "54d28a7c80b3e4d974ec2fee86768be9"
+SRC_URI[sha256sum] = "76f360636957d1c976db7466bc71dcb713bb95ac8911944dffc55c01cb516de6"
+
+inherit pypi setuptools3 ptest
+
+RDEPENDS:${PN}:class-target = "\
+    ${PYTHON_PN}-stringold \
+"
+
+SRC_URI += " \
+    file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+    ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-zipp_3.6.0.bb b/poky/meta/recipes-devtools/python/python3-zipp_3.7.0.bb
similarity index 84%
rename from poky/meta/recipes-devtools/python/python3-zipp_3.6.0.bb
rename to poky/meta/recipes-devtools/python/python3-zipp_3.7.0.bb
index c98bc7a..9ce987c 100644
--- a/poky/meta/recipes-devtools/python/python3-zipp_3.6.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-zipp_3.7.0.bb
@@ -3,7 +3,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=7a7126e068206290f3fe9f8d6c713ea6"
 
-SRC_URI[sha256sum] = "71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"
+SRC_URI[sha256sum] = "9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d"
 
 DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
 
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch b/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
index 5959282..62ef6ef 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
@@ -1,4 +1,4 @@
-From 039c53dd5baddec3359a05be0bff46a3b32bbb84 Mon Sep 17 00:00:00 2001
+From 80f872e4573f542d33f91514538755557d566f79 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 25 Jan 2019 19:04:13 +0100
 Subject: [PATCH] Do not add /usr/lib/termcap to linker flags to avoid host
@@ -12,10 +12,10 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/setup.py b/setup.py
-index 20d7f35..ab18ff0 100644
+index 43e807f..11b5cf5 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -957,7 +957,6 @@ class PyBuildExt(build_ext):
+@@ -1149,7 +1149,6 @@ class PyBuildExt(build_ext):
                                                       'termcap'):
                  readline_libs.append('termcap')
              self.add(Extension('readline', ['readline.c'],
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
index 83fd52d..d98f243 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
@@ -1,4 +1,4 @@
-From 148861fa16f2aaacd518770f337ea54b5182f981 Mon Sep 17 00:00:00 2001
+From 2406432449784243b7590009d42bd0e871253b2e Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 29 Jan 2019 15:03:01 +0100
 Subject: [PATCH] Do not use the shell version of python-config that was
@@ -9,15 +9,16 @@
 
 Upstream-Status: Inappropriate [oe-specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  Makefile.pre.in | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 2d2e11f..cc19942 100644
+index ee85f35..f0aedb7 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1431,12 +1431,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
+@@ -1640,12 +1640,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
  	sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
  	@ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
  	LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch b/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
index 46179ba..5485020 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
@@ -1,4 +1,4 @@
-From cebb772d718a8f798ed5ae311a6e3e61534bea95 Mon Sep 17 00:00:00 2001
+From b6ead2d17ceafed47e598b6f50f3ff669deec5ab Mon Sep 17 00:00:00 2001
 From: Jeremy Puhlman <jpuhlman@mvista.com>
 Date: Wed, 4 Mar 2020 00:06:42 +0000
 Subject: [PATCH] Don't search system for headers/libraries
@@ -11,10 +11,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/setup.py b/setup.py
-index 95e3e11..32a4d42 100644
+index c190002..5ef368d 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -840,8 +840,8 @@ class PyBuildExt(build_ext):
+@@ -854,8 +854,8 @@ class PyBuildExt(build_ext):
              add_dir_to_list(self.compiler.include_dirs,
                              sysconfig.get_config_var("INCLUDEDIR"))
  
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/poky/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch
index d6aa950..df5179e 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch
@@ -1,4 +1,4 @@
-From d8521ee967937184eadc59fff1a30740ad181a98 Mon Sep 17 00:00:00 2001
+From 86061629f4a179e740a17e53dd2c98ab47af2fe2 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex@linutronix.de>
 Date: Thu, 16 Sep 2021 16:35:37 +0200
 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O
@@ -24,12 +24,13 @@
 
 Upstream-Status: Submitted [https://github.com/python/cpython/pull/28388]
 Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
 ---
  Lib/pty.py | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/Lib/pty.py b/Lib/pty.py
-index 8d8ce40df5..35439c6b96 100644
+index 8d8ce40..35439c6 100644
 --- a/Lib/pty.py
 +++ b/Lib/pty.py
 @@ -154,7 +154,10 @@ def _copy(master_fd, master_read=_read, stdin_read=_read):
@@ -44,6 +45,3 @@
              if not data:
                  fds.remove(STDIN_FILENO)
              else:
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
index b72c709..a9240b3 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
@@ -1,4 +1,4 @@
-From aceaa16e25a8ab6a00f906c340843999635c8e23 Mon Sep 17 00:00:00 2001
+From 01d209277e145072e478d8b9acfea3638ee16cdc Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex@linutronix.de>
 Date: Fri, 10 Sep 2021 12:28:31 +0200
 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration
@@ -9,12 +9,13 @@
 
 Upstream-Status: Inappropriate [oe-core cross builds]
 Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
 ---
  Lib/sysconfig.py | 5 +++++
  1 file changed, 5 insertions(+)
 
 diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 95b48f6..84f6427 100644
+index e64bcdc..40c6b3e 100644
 --- a/Lib/sysconfig.py
 +++ b/Lib/sysconfig.py
 @@ -613,6 +613,11 @@ def get_config_vars(*args):
@@ -29,6 +30,3 @@
          # For backward compatibility, see issue19555
          SO = _CONFIG_VARS.get('EXT_SUFFIX')
          if SO is not None:
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch b/poky/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch
index b1bceac..2f037ec 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch
@@ -1,25 +1,32 @@
-From c501e121a872cbcef8ffe626c1de173a125be9f8 Mon Sep 17 00:00:00 2001
+From c960837b8fd83074bab5148236f3d0595468cea4 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 16 Jan 2020 12:34:20 +0100
 Subject: [PATCH] Makefile: do not compile .pyc in parallel
 
-This was found to break reproducibility, and produce strange file ownership
+This was found to lock up builds, break reproducibility, and produce strange file ownership
 races.
 
 The upstream commit introducing the change was:
 https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504
 
-Upstream-Status: Pending
+The build lock up issue is reported here:
+https://bugs.python.org/issue45945
+
+The repro failures are documented here:
+https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20211130-yr_o1a8d/packages/diff-html/
+
+Upstream-Status: Inappropriate [see issues above]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  Makefile.pre.in | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 1241112..5dfdf44 100644
+index edd70d4..5e13ba2 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1457,30 +1457,30 @@ libinstall:	build_all $(srcdir)/Modules/xxmodule.c
+@@ -1601,30 +1601,30 @@ libinstall:	build_all $(srcdir)/Modules/xxmodule.c
  	fi
  	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
  		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/poky/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
index fa7735f..e1dabc9 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
@@ -1,19 +1,20 @@
-From cf6a9100902484e4d028ee88742dd2487b014a98 Mon Sep 17 00:00:00 2001
+From 9f85089cc3a21d5ff235bb37c6c9758f2b70497d Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 30 Jan 2019 12:41:04 +0100
 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  Makefile.pre.in | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index a3a02a7..d5503dd 100644
+index f0aedb7..edd70d4 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -507,8 +507,7 @@ build_all_generate_profile:
+@@ -519,8 +519,7 @@ build_all_generate_profile:
  	$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
  
  run_profile_task:
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch b/poky/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
index a49d603..96c5a3c 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch
@@ -1,9 +1,8 @@
-From 0b25b66d4f54bd74615c9ff10f3fae8f0d1c548d Mon Sep 17 00:00:00 2001
+From 7171aeee22a0b7ab57cdf3d1ae15530549f8f92a Mon Sep 17 00:00:00 2001
 From: Yi Fan Yu <yifan.yu@windriver.com>
 Date: Thu, 1 Apr 2021 13:08:37 -0700
 Subject: [PATCH] Skip failing tests due to load variability on YP AB
 
-
 Skip these tests until AB-INT is solved.
 
 [YOCTO #14296]
@@ -11,16 +10,17 @@
 Upstream-Status: Inappropriate [OE-Specific]
 
 Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
+
 ---
  Lib/test/_test_multiprocessing.py | 2 ++
  Lib/test/test_time.py             | 1 +
  2 files changed, 3 insertions(+)
 
 diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
-index fd3b430..cda29f6 100644
+index 3bc5b8f..a6e106d 100644
 --- a/Lib/test/_test_multiprocessing.py
 +++ b/Lib/test/_test_multiprocessing.py
-@@ -568,6 +568,7 @@ def test_close(self):
+@@ -568,6 +568,7 @@ class _TestProcess(BaseTestCase):
  
          close_queue(q)
  
@@ -28,7 +28,7 @@
      def test_many_processes(self):
          if self.TYPE == 'threads':
              self.skipTest('test not appropriate for {}'.format(self.TYPE))
-@@ -4715,6 +4716,7 @@ def signal_and_sleep(cls, sem, period):
+@@ -4817,6 +4818,7 @@ class TestWait(unittest.TestCase):
          sem.release()
          time.sleep(period)
  
@@ -37,10 +37,10 @@
          from multiprocessing.connection import wait
  
 diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
-index 3258298..adcf407 100644
+index 875615a..aebaa8c 100644
 --- a/Lib/test/test_time.py
 +++ b/Lib/test/test_time.py
-@@ -474,6 +474,7 @@ def test_monotonic(self):
+@@ -474,6 +474,7 @@ class TimeTestCase(unittest.TestCase):
      def test_perf_counter(self):
          time.perf_counter()
  
@@ -48,6 +48,3 @@
      def test_process_time(self):
          # process_time() should not include time spend during a sleep
          start = time.process_time()
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch b/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch
index 793385d..993ac24 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch
@@ -1,4 +1,4 @@
-From 9f63e83b1cec872917647b11155edaffe399d103 Mon Sep 17 00:00:00 2001
+From d7217b79a4e125d4fcc1087743171b94d91d1121 Mon Sep 17 00:00:00 2001
 From: Inada Naoki <songofacandy@gmail.com>
 Date: Sat, 14 Jul 2018 00:46:11 +0900
 Subject: [PATCH] Use FLAG_REF always for interned strings
@@ -11,7 +11,7 @@
  1 file changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/Python/marshal.c b/Python/marshal.c
-index c4538bd..2437160 100644
+index 4125240..341c9aa 100644
 --- a/Python/marshal.c
 +++ b/Python/marshal.c
 @@ -298,9 +298,14 @@ w_ref(PyObject *v, char *flag, WFILE *p)
diff --git a/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch b/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
index c4fae09..6ab335a 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
@@ -1,7 +1,8 @@
-From 1ad771d86728ee2ed30e202e9768d8d825f96467 Mon Sep 17 00:00:00 2001
+From bb409432f03dd8256865292e382ad16613737829 Mon Sep 17 00:00:00 2001
 From: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
 Date: Fri, 31 May 2019 15:34:34 +0200
 Subject: [PATCH] bpo-36852: proper detection of mips architecture for soft
+
  float
 
 When (cross) compiling for softfloat mips, __mips_hard_float will not be
@@ -13,18 +14,17 @@
 Upstream-Status: Submitted [https://github.com/python/cpython/pull/13196]
 Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
 
-%% original patch: 0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
 ---
  configure.ac | 175 +++++++--------------------------------------------
  1 file changed, 21 insertions(+), 154 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index ede710e..bc81b0b 100644
+index 4230ef2..ee08b1b 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -710,160 +710,27 @@ fi
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
- AC_SUBST(MULTIARCH)
+@@ -718,160 +718,27 @@ then
+ fi
+ 
  
 -AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
 -cat >> conftest.c <<EOF
@@ -202,8 +202,5 @@
 +	;;
 +esac	
  
- if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
-   if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
--- 
-2.24.1
-
+ AC_MSG_CHECKING([for multiarch])
+ AS_CASE([$ac_sys_system],
diff --git a/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch b/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
index b323ed4..3c62c2a 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
@@ -1,4 +1,4 @@
-From 3a98c2eab187289dc8c55e36738c2c0f4216d906 Mon Sep 17 00:00:00 2001
+From 78dd1def953e18e7cda0325bb26d27c051bb6890 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 31 Jan 2019 16:46:30 +0100
 Subject: [PATCH] distutils/sysconfig: append
@@ -14,7 +14,7 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index a78c0b1..f5c5efe 100644
+index 40c6b3e..ac94cc7 100644
 --- a/Lib/sysconfig.py
 +++ b/Lib/sysconfig.py
 @@ -474,6 +474,8 @@ def _init_posix(vars):
diff --git a/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
index bfddc1a..6bb85fc 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
@@ -1,4 +1,4 @@
-From 5f9eea2c4f8716830f6c8855a3e10872119fae32 Mon Sep 17 00:00:00 2001
+From 9f68a27eb34394a00f1011c06900c609f15fb15c Mon Sep 17 00:00:00 2001
 From: Changqing Li <changqing.li@windriver.com>
 Date: Mon, 22 Oct 2018 15:19:51 +0800
 Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
@@ -27,10 +27,10 @@
  1 file changed, 10 insertions(+), 9 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index d60f052..e491e24 100644
+index 0c06914..299786b 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h)
+@@ -61,6 +61,7 @@ AC_CONFIG_HEADER(pyconfig.h)
  AC_CANONICAL_HOST
  AC_SUBST(build)
  AC_SUBST(host)
@@ -38,7 +38,7 @@
  
  # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
  rm -f pybuilddir.txt
-@@ -689,7 +690,7 @@ AC_MSG_RESULT($with_cxx_main)
+@@ -688,7 +689,7 @@ AC_MSG_RESULT($with_cxx_main)
  preset_cxx="$CXX"
  if test -z "$CXX"
  then
@@ -47,7 +47,7 @@
          gcc)    AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
          cc)     AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
          clang|*/clang)     AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
-@@ -975,7 +976,7 @@ rmdir CaseSensitiveTestDir
+@@ -976,7 +977,7 @@ rmdir CaseSensitiveTestDir
  
  case $ac_sys_system in
  hp*|HP*)
@@ -56,7 +56,7 @@
      cc|*/cc) CC="$CC -Ae";;
      esac;;
  esac
-@@ -1366,7 +1367,7 @@ else
+@@ -1374,7 +1375,7 @@ else
  fi],
  [AC_MSG_RESULT(no)])
  if test "$Py_LTO" = 'true' ; then
@@ -65,7 +65,7 @@
      *clang*)
        AC_SUBST(LLVM_AR)
        AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
-@@ -1456,7 +1457,7 @@ then
+@@ -1467,7 +1468,7 @@ then
    fi
  fi
  LLVM_PROF_ERR=no
@@ -74,7 +74,7 @@
    *clang*)
      # Any changes made here should be reflected in the GCC+Darwin case below
      PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
-@@ -1517,7 +1518,7 @@ esac
+@@ -1528,7 +1529,7 @@ esac
  # compiler and platform.  BASECFLAGS tweaks need to be made even if the
  # user set OPT.
  
@@ -83,7 +83,7 @@
      *clang*)
          cc_is_clang=1
          ;;
-@@ -1653,7 +1654,7 @@ yes)
+@@ -1664,7 +1665,7 @@ yes)
  
      # ICC doesn't recognize the option, but only emits a warning
      ## XXX does it emit an unused result warning and can it be disabled?
@@ -92,7 +92,7 @@
      *icc*)
      ac_cv_disable_unused_result_warning=no
      ;;
-@@ -1993,7 +1994,7 @@ yes)
+@@ -2018,7 +2019,7 @@ yes)
      ;;
  esac
  
@@ -101,7 +101,7 @@
  *icc*)
      # ICC needs -fp-model strict or floats behave badly
      CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
-@@ -2765,7 +2766,7 @@ then
+@@ -2836,7 +2837,7 @@ then
  		then
  			LINKFORSHARED="-Wl,--export-dynamic"
  		fi;;
@@ -110,7 +110,7 @@
  		  *gcc*)
  		    if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
  		    then
-@@ -5507,7 +5508,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
+@@ -5622,7 +5623,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
      # Some versions of gcc miscompile inline asm:
      # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
      # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
diff --git a/poky/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/poky/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
deleted file mode 100644
index 374433c..0000000
--- a/poky/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From bad7e6a625436402a01d03021fb9ccd58bc9930f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 9 Jan 2020 17:44:05 +0100
-Subject: [PATCH] setup.py: pass missing libraries to Extension for
- multiprocessing module
-
-In the following commit:
-...
-commit e711cafab13efc9c1fe6c5cd75826401445eb585
-Author: Benjamin Peterson <benjamin@python.org>
-Date:   Wed Jun 11 16:44:04 2008 +0000
-
-    Merged revisions 64104,64117 via svnmerge from
-    svn+ssh://pythondev@svn.python.org/python/trunk
-...
-(see diff in setup.py)
-It assigned libraries for multiprocessing module according
-the host_platform, but not pass it to Extension.
-
-In glibc, the following commit caused two definition of
-sem_getvalue are different.
-https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524
-(see diff in nptl/sem_getvalue.c for detail)
-`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1
-and `__old_sem_getvalue' is to compat the old version
-sem_getvalue@GLIBC_2.0.
-
-To build python for embedded Linux systems:
-http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html
-If not explicitly link to library pthread (-lpthread), it will
-load glibc's sem_getvalue randomly at runtime.
-
-Such as build python on linux x86_64 host and run the python
-on linux x86_32 target. If not link library pthread, it caused
-multiprocessing bounded semaphore could not work correctly.
-...
->>> import multiprocessing
->>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
->>> pool_sema.acquire()
-True
->>> pool_sema.release()
-Traceback (most recent call last):
-  File "<stdin>", line 1, in <module>
-ValueError: semaphore or lock released too many times
-...
-
-And the semaphore issue also caused multiprocessing.Queue().put() hung.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index d92face..f42bcbb 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1836,7 +1836,7 @@ class PyBuildExt(build_ext):
-             if (sysconfig.get_config_var('HAVE_SEM_OPEN') and not
-                 sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
-                 multiprocessing_srcs.append('_multiprocessing/semaphore.c')
--        self.add(Extension('_multiprocessing', multiprocessing_srcs,
-+        self.add(Extension('_multiprocessing', multiprocessing_srcs, libraries=['pthread'],
-                            include_dirs=["Modules/_multiprocessing"]))
- 
-         if (not MS_WINDOWS and
diff --git a/poky/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/poky/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
index 2b5a7d3..4fb63a9 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
@@ -1,4 +1,4 @@
-From 93346d1a2f5d4f7085391bc7c1230d85ebe00606 Mon Sep 17 00:00:00 2001
+From 9162460d81ccc725fb04a14b27d0bf4afcfb69c9 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex@linutronix.de>
 Date: Sun, 12 Sep 2021 21:44:36 +0200
 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib
@@ -8,12 +8,13 @@
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+
 ---
  Lib/sysconfig.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index b70d392..c418acd 100644
+index daf9f00..e64bcdc 100644
 --- a/Lib/sysconfig.py
 +++ b/Lib/sysconfig.py
 @@ -27,7 +27,7 @@ _INSTALL_SCHEMES = {
@@ -25,6 +26,3 @@
          'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
          'include':
              '{installed_base}/include/python{py_version_short}{abiflags}',
--- 
-2.20.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
index 7d684b3..371021c 100644
--- 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
@@ -1,4 +1,4 @@
-From 7a2bddfa437be633bb6945d0e6b7d6f27da870ad Mon Sep 17 00:00:00 2001
+From 13aa6449c47980c7270dad2527c3911517bf34e6 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
@@ -10,15 +10,16 @@
 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
+index 1ff9d01..59def26 100644
 --- a/Lib/ctypes/test/test_find.py
 +++ b/Lib/ctypes/test/test_find.py
-@@ -112,10 +112,12 @@ class FindLibraryLinux(unittest.TestCase):
+@@ -113,10 +113,12 @@ class FindLibraryLinux(unittest.TestCase):
                  # LD_LIBRARY_PATH)
                  self.assertEqual(find_library(libname), 'lib%s.so' % libname)
  
diff --git a/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
index c3d1e06..c762f98 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
@@ -1,4 +1,4 @@
-From b94995e0c694ec9561efec0d1a59b323340e6105 Mon Sep 17 00:00:00 2001
+From 46856e692377d21be3562f6f90c242f5c9594ae2 Mon Sep 17 00:00:00 2001
 From: Mingli Yu <mingli.yu@windriver.com>
 Date: Mon, 5 Aug 2019 15:57:39 +0800
 Subject: [PATCH] test_locale.py: correct the test output format
@@ -23,19 +23,19 @@
 
 Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132]
 
-
 Rebased for 3.9.4, still not accepted upstream Signed-off-by: Alejandro Hernandez <alejandro@enedino.org>
 
 Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
 ---
  Lib/test/test_locale.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: Python-3.9.4/Lib/test/test_locale.py
-===================================================================
---- Python-3.9.4.orig/Lib/test/test_locale.py
-+++ Python-3.9.4/Lib/test/test_locale.py
-@@ -562,7 +562,7 @@ class TestMiscellaneous(unittest.TestCas
+diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
+index f844e62..04df0c2 100644
+--- a/Lib/test/test_locale.py
++++ b/Lib/test/test_locale.py
+@@ -564,7 +564,7 @@ class TestMiscellaneous(unittest.TestCase):
              self.skipTest('test needs Turkish locale')
          loc = locale.getlocale(locale.LC_CTYPE)
          if verbose:
diff --git a/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
index 5823273..0ead57e 100644
--- a/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
+++ b/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch
@@ -1,4 +1,4 @@
-From a2dd127b4163aff6cc35af0d0251321964232ad4 Mon Sep 17 00:00:00 2001
+From 246c5ffe75a2d494e415d8a7522df9fe22056d41 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 7 Oct 2019 13:22:14 +0200
 Subject: [PATCH] setup.py: do not report missing dependencies for disabled
@@ -14,14 +14,14 @@
 Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
 
 ---
- setup.py | 4 ++++
- 1 file changed, 4 insertions(+)
+ setup.py | 8 ++++++++
+ 1 file changed, 8 insertions(+)
 
 diff --git a/setup.py b/setup.py
-index 7691258..ec3f2a4 100644
+index 2be4738..62f0e18 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -408,6 +408,14 @@ class PyBuildExt(build_ext):
+@@ -517,6 +517,14 @@ class PyBuildExt(build_ext):
                  print("%-*s   %-*s   %-*s" % (longest, e, longest, f,
                                                longest, g))
  
diff --git a/poky/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch b/poky/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
index e04a916..30d2906 100644
--- a/poky/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
+++ b/poky/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
@@ -1,4 +1,4 @@
-From 863c09f640a5dfd33ff22915b0d5fee7bc5df70a Mon Sep 17 00:00:00 2001
+From 788cd0464ee2b175493a0167ceee8c0045ce323c Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Sun, 16 Feb 2020 17:50:25 +0100
 Subject: [PATCH] configure.ac, setup.py: do not add a curses include path from
@@ -11,16 +11,17 @@
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  configure.ac | 6 ------
  setup.py     | 2 --
  2 files changed, 8 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 915f475..c911011 100644
+index e5e3df8..bfdd987 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -4828,12 +4828,6 @@ then
+@@ -5092,12 +5092,6 @@ then
    [Define if you have struct stat.st_mtimensec])
  fi
  
@@ -34,10 +35,10 @@
  
  # On Solaris, term.h requires curses.h
 diff --git a/setup.py b/setup.py
-index b0f1541..7208cd0 100644
+index 62f0e18..c190002 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -973,8 +973,6 @@ class PyBuildExt(build_ext):
+@@ -1169,8 +1169,6 @@ class PyBuildExt(build_ext):
          panel_library = 'panel'
          if curses_library == 'ncursesw':
              curses_defines.append(('HAVE_NCURSESW', '1'))
diff --git a/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
index cc64e3e..de4c6c4 100644
--- a/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
+++ b/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -1,4 +1,4 @@
-From f6411021856bafedd784748ec33494151e783b51 Mon Sep 17 00:00:00 2001
+From 33b5a31df6050110f4481a24f5a0a0bf7fe80096 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 14 May 2013 15:00:26 -0700
 Subject: [PATCH] python3: Add target and native recipes
@@ -12,6 +12,7 @@
 Signed-off-by: Phil Blundell <philb@gnu.org>
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
 ---
  Lib/distutils/sysconfig.py | 14 +++++++++++---
  1 file changed, 11 insertions(+), 3 deletions(-)
@@ -55,6 +56,3 @@
                                   "python" + get_python_version())
          if standard_lib:
              return libpython
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 184540e..2de72b7 100644
--- a/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -1,4 +1,4 @@
-From ba7202700578d435b07cfdfb7b57e83185752800 Mon Sep 17 00:00:00 2001
+From 6a23d52c905cd1f6a5944255903ec86ea8b904bb Mon Sep 17 00:00:00 2001
 From: Andrei Gherzan <andrei@gherzan.ro>
 Date: Mon, 28 Jan 2019 15:57:54 +0000
 Subject: [PATCH] _tkinter module needs tk module along with tcl. tk is not yet
@@ -15,10 +15,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/setup.py b/setup.py
-index ab18ff0..7691258 100644
+index 11b5cf5..2be4738 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -1706,8 +1706,8 @@ class PyBuildExt(build_ext):
+@@ -1895,8 +1895,8 @@ class PyBuildExt(build_ext):
          self.detect_decimal()
          self.detect_ctypes()
          self.detect_multiprocessing()
diff --git a/poky/meta/recipes-devtools/python/python3/cgi_py.patch b/poky/meta/recipes-devtools/python/python3/cgi_py.patch
index 6c4ba54..81e6099 100644
--- a/poky/meta/recipes-devtools/python/python3/cgi_py.patch
+++ b/poky/meta/recipes-devtools/python/python3/cgi_py.patch
@@ -1,4 +1,4 @@
-From 62336285cba38017b35cb761c03f0c7e80a671a3 Mon Sep 17 00:00:00 2001
+From 5b0d1212d661e9a8a36738279fc9109f96eebd25 Mon Sep 17 00:00:00 2001
 From: Mark Hatle <mark.hatle@windriver.com>
 Date: Wed, 21 Sep 2011 20:55:33 -0500
 Subject: [PATCH] Lib/cgi.py: Update the script as mentioned in the comment
@@ -12,7 +12,7 @@
  1 file changed, 1 insertion(+), 10 deletions(-)
 
 diff --git a/Lib/cgi.py b/Lib/cgi.py
-index 8cf6687..094c7b4 100755
+index 6cb8cf2..a873ff3 100755
 --- a/Lib/cgi.py
 +++ b/Lib/cgi.py
 @@ -1,13 +1,4 @@
diff --git a/poky/meta/recipes-devtools/python/python3/crosspythonpath.patch b/poky/meta/recipes-devtools/python/python3/crosspythonpath.patch
index d789ab5..5bb2526 100644
--- a/poky/meta/recipes-devtools/python/python3/crosspythonpath.patch
+++ b/poky/meta/recipes-devtools/python/python3/crosspythonpath.patch
@@ -1,4 +1,8 @@
-configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD
+From baa3a232e64e9bf5ae945366efdb8088ccf9b828 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda <ricardo@ribalda.com>
+Date: Tue, 18 Nov 2014 03:35:33 -0500
+Subject: [PATCH] configure.ac: add CROSSPYTHONPATH into PYTHONPATH for
+ PYTHON_FOR_BUILD
 
 When building x86->x86 the system will try to execute .so and related items
 from the default PYTHONPATH.  This will fail if the target CPU contains
@@ -10,11 +14,16 @@
 Credits-to: Mark Hatle <mark.hatle@windriver.com>
 Credits-to: Jackie Huang <jackie.huang@windriver.com>
 Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
 diff --git a/configure.ac b/configure.ac
-index 4ab19a6..7036a53 100644
+index d0db062..e5e3df8 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -76,7 +76,7 @@ if test "$cross_compiling" = yes; then
+@@ -83,7 +83,7 @@ if test "$cross_compiling" = yes; then
  	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
  	fi
          AC_MSG_RESULT($interp)
diff --git a/poky/meta/recipes-devtools/python/python3/makerace.patch b/poky/meta/recipes-devtools/python/python3/makerace.patch
index b150c1c..2c06784 100644
--- a/poky/meta/recipes-devtools/python/python3/makerace.patch
+++ b/poky/meta/recipes-devtools/python/python3/makerace.patch
@@ -1,4 +1,4 @@
-From 8b8583fb4f2bb3421e31ef06d17c04deec431c7e Mon Sep 17 00:00:00 2001
+From 7cc02dfa593d1350a689d64a7a6f2dc6478afe24 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Tue, 13 Jul 2021 23:19:29 +0100
 Subject: [PATCH] python3: Fix make race
@@ -18,10 +18,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 69d47a2..c471b60 100644
+index 5e13ba2..026bffd 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1528,7 +1528,7 @@ TESTSUBDIRS=	ctypes/test \
+@@ -1527,7 +1527,7 @@ TESTSUBDIRS=	ctypes/test \
  		unittest/test unittest/test/testmock
  
  TEST_MODULES=@TEST_MODULES@
diff --git a/poky/meta/recipes-devtools/python/python3/python-config.patch b/poky/meta/recipes-devtools/python/python3/python-config.patch
index d0ddbbc..4da399e 100644
--- a/poky/meta/recipes-devtools/python/python3/python-config.patch
+++ b/poky/meta/recipes-devtools/python/python3/python-config.patch
@@ -1,4 +1,4 @@
-From 57d073c12e7bede29919117b0141df14015eb27f Mon Sep 17 00:00:00 2001
+From 8632f25ac4e2c53a3c2c8a1b4fc97fc86e8aad5a Mon Sep 17 00:00:00 2001
 From: Tyler Hall <tylerwhall@gmail.com>
 Date: Sun, 4 May 2014 20:06:43 -0400
 Subject: [PATCH] python-config: Revert to using distutils.sysconfig
@@ -14,26 +14,27 @@
 Upstream-Status: Inappropriate [Embedded Specific]
 
 Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
-:
 
 ---
- Misc/python-config.in | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ Misc/python-config.in | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
 
 diff --git a/Misc/python-config.in b/Misc/python-config.in
-index ebd99da..13e57ae 100644
+index ebd99da..0492e08 100644
 --- a/Misc/python-config.in
 +++ b/Misc/python-config.in
-@@ -6,7 +6,7 @@
+@@ -6,7 +6,9 @@
  import getopt
  import os
  import sys
 -import sysconfig
++import warnings
++warnings.filterwarnings("ignore", category=DeprecationWarning)
 +from distutils import sysconfig
  
  valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
                'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir',
-@@ -35,14 +35,14 @@ if '--help' in opt_flags:
+@@ -35,14 +37,14 @@ if '--help' in opt_flags:
  
  for opt in opt_flags:
      if opt == '--prefix':
diff --git a/poky/meta/recipes-devtools/python/python3_3.10.0.bb b/poky/meta/recipes-devtools/python/python3_3.10.2.bb
similarity index 98%
rename from poky/meta/recipes-devtools/python/python3_3.10.0.bb
rename to poky/meta/recipes-devtools/python/python3_3.10.2.bb
index e3300b6..9c67461 100644
--- a/poky/meta/recipes-devtools/python/python3_3.10.0.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.10.2.bb
@@ -4,7 +4,7 @@
 LICENSE = "PSFv2"
 SECTION = "devel/python"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3dd7bed622743ef9b77169b3736f7990"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4b8801e752a2c70ac41a5f9aa243f766"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://run-ptest \
@@ -25,7 +25,6 @@
            file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
            file://0001-test_locale.py-correct-the-test-output-format.patch \
            file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \
-           file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
            file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \
            file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
            file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \
@@ -41,7 +40,7 @@
            file://12-distutils-prefix-is-inside-staging-area.patch \
            file://0001-Don-t-search-system-for-headers-libraries.patch \
            "
-SRC_URI[sha256sum] = "5a99f8e7a6a11a7b98b4e75e0d1303d3832cada5534068f69c7b6222a7b1b002"
+SRC_URI[sha256sum] = "17de3ac7da9f2519aa9d64378c603a73a0e9ad58dffa8812e45160c086de64c7"
 
 # exclude pre-releases for both python 2.x and 3.x
 UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
diff --git a/poky/meta/recipes-devtools/qemu/qemu-native_6.1.0.bb b/poky/meta/recipes-devtools/qemu/qemu-native_6.2.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/qemu/qemu-native_6.1.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu-native_6.2.0.bb
diff --git a/poky/meta/recipes-devtools/qemu/qemu-system-native_6.1.0.bb b/poky/meta/recipes-devtools/qemu/qemu-system-native_6.2.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/qemu/qemu-system-native_6.1.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu-system-native_6.2.0.bb
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index 33052a9..843de33 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -26,10 +26,11 @@
            file://mmap2.patch \
            file://determinism.patch \
            file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \
+           file://0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
-SRC_URI[sha256sum] = "eebc089db3414bbeedf1e464beda0a7515aad30f73261abc246c9b27503a3c96"
+SRC_URI[sha256sum] = "68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45"
 
 SRC_URI:append:class-target = " file://cross.patch"
 SRC_URI:append:class-nativesdk = " file://cross.patch"
@@ -47,6 +48,7 @@
 
 COMPATIBLE_HOST:mipsarchn32 = "null"
 COMPATIBLE_HOST:mipsarchn64 = "null"
+COMPATIBLE_HOST:riscv32 = "null"
 
 # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
 # upstream states qemu doesn't work without optimization
@@ -96,8 +98,6 @@
     ${PACKAGECONFIG_CONFARGS} \
     "
 
-export LIBTOOL="${HOST_SYS}-libtool"
-
 B = "${WORKDIR}/build"
 
 #EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3"
@@ -172,7 +172,7 @@
 PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
 PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
 PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
-PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib"
+PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib"
 PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,virtual/libgl"
 PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
 PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
@@ -199,6 +199,8 @@
 # libnfs is currently provided by meta-kodi
 PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs"
 PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk"
+PACKAGECONFIG[pulsedio] = "--enable-pa,--disable-pa,pulseaudio"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux"
 
 INSANE_SKIP:${PN} = "arch"
 
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
new file mode 100644
index 0000000..ac4b6dc
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
@@ -0,0 +1,40 @@
+From 359dc12eb32b2395cf10796157002024e6a58054 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Dec 2021 23:31:11 -0800
+Subject: [PATCH] riscv: Set 5.4 as minimum kernel version for riscv32
+
+5.4 is first stable API as far as rv32 is concerned see [1]
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=7a55dd3fb6d2c307a002a16776be84310b9c8989
+
+Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2021-12/msg02495.html]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Cc: Palmer Dabbelt <palmer@dabbelt.com>
+Cc: Alistair Francis <alistair.francis@wdc.com>
+Cc: Bin Meng <bin.meng@windriver.com>
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ linux-user/riscv/target_syscall.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/linux-user/riscv/target_syscall.h b/linux-user/riscv/target_syscall.h
+index dc597c897..9b1316132 100644
+--- a/linux-user/riscv/target_syscall.h
++++ b/linux-user/riscv/target_syscall.h
+@@ -45,10 +45,11 @@ struct target_pt_regs {
+ 
+ #ifdef TARGET_RISCV32
+ #define UNAME_MACHINE "riscv32"
++#define UNAME_MINIMUM_RELEASE "5.4.0"
+ #else
+ #define UNAME_MACHINE "riscv64"
+-#endif
+ #define UNAME_MINIMUM_RELEASE "4.15.0"
++#endif
+ 
+ #define TARGET_MINSIGSTKSZ 2048
+ #define TARGET_MCL_CURRENT 1
+-- 
+2.32.0
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
index d5e1ab4..fcef129 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -16,16 +16,19 @@
  tests/meson.build   | 2 +-
  1 files changed, 1 insertions(+), 1 deletion(-)
 
-Index: qemu-6.0.0/tests/unit/meson.build
+Index: qemu-6.2.0/tests/unit/meson.build
 ===================================================================
---- qemu-6.0.0.orig/tests/unit/meson.build
-+++ qemu-6.0.0/tests/unit/meson.build
-@@ -42,7 +42,7 @@ tests = {
+--- qemu-6.2.0.orig/tests/unit/meson.build
++++ qemu-6.2.0/tests/unit/meson.build
+@@ -44,9 +44,9 @@ tests = {
    'test-keyval': [testqapi],
    'test-logging': [],
    'test-uuid': [],
--  'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 'hw/core/ptimer.c'],
+-  'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'],
 +  'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'],
    'test-qapi-util': [],
+-  'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
++  'test-smp-parse': [qom, '../../hw/core/machine-smp.c'],
  }
  
+ if have_system or have_tools
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch b/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
index 05dc849..cf8b0e7 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
@@ -51,10 +51,10 @@
  qapi/char.json        |   5 +++
  3 files changed, 109 insertions(+)
 
-Index: qemu-6.0.0/chardev/char-socket.c
+Index: qemu-6.2.0/chardev/char-socket.c
 ===================================================================
---- qemu-6.0.0.orig/chardev/char-socket.c
-+++ qemu-6.0.0/chardev/char-socket.c
+--- qemu-6.2.0.orig/chardev/char-socket.c
++++ qemu-6.2.0/chardev/char-socket.c
 @@ -1362,6 +1362,67 @@ static bool qmp_chardev_validate_socket(
      return true;
  }
@@ -133,7 +133,7 @@
      bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
      bool is_listen      = sock->has_server  ? sock->server  : true;
      bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
-@@ -1446,6 +1510,14 @@ static void qmp_chardev_open_socket(Char
+@@ -1440,6 +1504,14 @@ static void qmp_chardev_open_socket(Char
  
      update_disconnected_filename(s);
  
@@ -148,7 +148,7 @@
      if (s->is_listen) {
          if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
                                             is_waitconnect, errp) < 0) {
-@@ -1465,6 +1537,9 @@ static void qemu_chr_parse_socket(QemuOp
+@@ -1459,6 +1531,9 @@ static void qemu_chr_parse_socket(QemuOp
      const char *host = qemu_opt_get(opts, "host");
      const char *port = qemu_opt_get(opts, "port");
      const char *fd = qemu_opt_get(opts, "fd");
@@ -158,7 +158,7 @@
  #ifdef CONFIG_LINUX
      bool tight = qemu_opt_get_bool(opts, "tight", true);
      bool abstract = qemu_opt_get_bool(opts, "abstract", false);
-@@ -1472,6 +1547,20 @@ static void qemu_chr_parse_socket(QemuOp
+@@ -1466,6 +1541,20 @@ static void qemu_chr_parse_socket(QemuOp
      SocketAddressLegacy *addr;
      ChardevSocket *sock;
  
@@ -179,7 +179,7 @@
      if ((!!path + !!fd + !!host) != 1) {
          error_setg(errp,
                     "Exactly one of 'path', 'fd' or 'host' required");
-@@ -1522,13 +1611,24 @@ static void qemu_chr_parse_socket(QemuOp
+@@ -1516,13 +1605,24 @@ static void qemu_chr_parse_socket(QemuOp
      sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds"));
      sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
      sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
@@ -194,7 +194,7 @@
      if (path) {
 +#endif
          UnixSocketAddress *q_unix;
-         addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
+         addr->type = SOCKET_ADDRESS_TYPE_UNIX;
          q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
 +#ifndef _WIN32
 +        q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
@@ -204,11 +204,11 @@
  #ifdef CONFIG_LINUX
          q_unix->has_tight = true;
          q_unix->tight = tight;
-Index: qemu-6.0.0/chardev/char.c
+Index: qemu-6.2.0/chardev/char.c
 ===================================================================
---- qemu-6.0.0.orig/chardev/char.c
-+++ qemu-6.0.0/chardev/char.c
-@@ -840,6 +840,9 @@ QemuOptsList qemu_chardev_opts = {
+--- qemu-6.2.0.orig/chardev/char.c
++++ qemu-6.2.0/chardev/char.c
+@@ -836,6 +836,9 @@ QemuOptsList qemu_chardev_opts = {
              .name = "path",
              .type = QEMU_OPT_STRING,
          },{
@@ -218,10 +218,10 @@
              .name = "host",
              .type = QEMU_OPT_STRING,
          },{
-Index: qemu-6.0.0/qapi/char.json
+Index: qemu-6.2.0/qapi/char.json
 ===================================================================
---- qemu-6.0.0.orig/qapi/char.json
-+++ qemu-6.0.0/qapi/char.json
+--- qemu-6.2.0.orig/qapi/char.json
++++ qemu-6.2.0/qapi/char.json
 @@ -250,6 +250,10 @@
  #
  # @addr: socket address to listen on (server=true)
diff --git a/poky/meta/recipes-devtools/qemu/qemu_6.1.0.bb b/poky/meta/recipes-devtools/qemu/qemu_6.2.0.bb
similarity index 85%
rename from poky/meta/recipes-devtools/qemu/qemu_6.1.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu_6.2.0.bb
index f8a816b..c9a53e3 100644
--- a/poky/meta/recipes-devtools/qemu/qemu_6.1.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu_6.2.0.bb
@@ -2,12 +2,10 @@
 
 require qemu.inc
 
-# error: a parameter list without types is only allowed in a function definition
-#            void (*_function)(sigval_t);
-COMPATIBLE_HOST:libc-musl = 'null'
-
 DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
 
+DEPENDS:append:libc-musl = " libucontext"
+
 RDEPENDS:${PN}:class-target += "bash"
 
 EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
diff --git a/poky/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch b/poky/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch
new file mode 100644
index 0000000..d3888c8
--- /dev/null
+++ b/poky/meta/recipes-devtools/repo/repo/0001-python3-shebang.patch
@@ -0,0 +1,26 @@
+From b8e84b202cd302a7c99288d3835dc9c63071f8f2 Mon Sep 17 00:00:00 2001
+From: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>
+Date: Tue, 14 Sep 2021 16:46:51 +0200
+Subject: [PATCH] python3 shebang
+
+Yocto does not symlink from python to python3, thus change the shebang from
+python to python3.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>
+---
+ repo | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/repo b/repo
+index b13e34c..205e0e5 100755
+--- a/repo
++++ b/repo
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding:utf-8 -*-
+ #
+ # Copyright (C) 2008 The Android Open Source Project
+--
+2.33.0
diff --git a/poky/meta/recipes-devtools/repo/repo_2.20.bb b/poky/meta/recipes-devtools/repo/repo_2.20.bb
new file mode 100644
index 0000000..b56559f
--- /dev/null
+++ b/poky/meta/recipes-devtools/repo/repo_2.20.bb
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: MIT
+# Copyright (C) 2021 iris-GmbH infrared & intelligent sensors
+
+SUMMARY = "Tool for managing many Git repositories"
+DESCRIPTION = "Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow."
+HOMEPAGE = "https://android.googlesource.com/tools/repo"
+SECTION = "console/utils"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "git://gerrit.googlesource.com/git-repo.git;protocol=https;branch=main \
+           file://0001-python3-shebang.patch \
+           "
+SRCREV = "98bb76577d9e7e0ffdeb643f1654ec006f6bbc8c"
+
+MIRRORS += "git://gerrit.googlesource.com/git-repo.git git://github.com/GerritCodeReview/git-repo.git"
+
+S = "${WORKDIR}/git"
+
+do_set_fixed_rev() {
+    sed -Ei "s/REPO_REV\s*=\s*('|\")stable('|\")/REPO_REV = '${SRCREV}'/g" ${S}/repo
+}
+
+do_patch[postfuncs] += "do_set_fixed_rev"
+
+do_install() {
+	install -D ${WORKDIR}/git/repo ${D}${bindir}/repo
+}
+
+RDEPENDS:${PN} = "python3 git"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch b/poky/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch
new file mode 100644
index 0000000..044b4dd
--- /dev/null
+++ b/poky/meta/recipes-devtools/rpm/files/0001-CVE-2021-3521.patch
@@ -0,0 +1,57 @@
+From 9a6871126f472feea057d5f803505ec8cc78f083 Mon Sep 17 00:00:00 2001
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Thu, 30 Sep 2021 09:56:20 +0300
+Subject: [PATCH 1/3] Refactor pgpDigParams construction to helper function
+
+No functional changes, just to reduce code duplication and needed by
+the following commits.
+
+CVE: CVE-2021-3521
+Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/9f03f42e2]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ rpmio/rpmpgp.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
+index d0688ebe9a..e472b5320f 100644
+--- a/rpmio/rpmpgp.c
++++ b/rpmio/rpmpgp.c
+@@ -1041,6 +1041,13 @@ unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype)
+     return algo;
+ }
+ 
++static pgpDigParams pgpDigParamsNew(uint8_t tag)
++{
++    pgpDigParams digp = xcalloc(1, sizeof(*digp));
++    digp->tag = tag;
++    return digp;
++}
++
+ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
+ 		 pgpDigParams * ret)
+ {
+@@ -1058,8 +1065,7 @@ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
+ 	    if (pkttype && pkt.tag != pkttype) {
+ 		break;
+ 	    } else {
+-		digp = xcalloc(1, sizeof(*digp));
+-		digp->tag = pkt.tag;
++		digp = pgpDigParamsNew(pkt.tag);
+ 	    }
+ 	}
+ 
+@@ -1105,8 +1111,7 @@ int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen,
+ 		digps = xrealloc(digps, alloced * sizeof(*digps));
+ 	    }
+ 
+-	    digps[count] = xcalloc(1, sizeof(**digps));
+-	    digps[count]->tag = PGPTAG_PUBLIC_SUBKEY;
++	    digps[count] = pgpDigParamsNew(PGPTAG_PUBLIC_SUBKEY);
+ 	    /* Copy UID from main key to subkey */
+ 	    digps[count]->userid = xstrdup(mainkey->userid);
+ 
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch b/poky/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch
new file mode 100644
index 0000000..683b57d
--- /dev/null
+++ b/poky/meta/recipes-devtools/rpm/files/0002-CVE-2021-3521.patch
@@ -0,0 +1,64 @@
+From c4b1bee51bbdd732b94b431a951481af99117703 Mon Sep 17 00:00:00 2001
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Thu, 30 Sep 2021 09:51:10 +0300
+Subject: [PATCH 2/3] Process MPI's from all kinds of signatures
+
+No immediate effect but needed by the following commits.
+
+CVE: CVE-2021-3521
+Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/b5e8bc74b]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+---
+ rpmio/rpmpgp.c | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
+index 25f67048fd..509e777e6d 100644
+--- a/rpmio/rpmpgp.c
++++ b/rpmio/rpmpgp.c
+@@ -543,7 +543,7 @@ pgpDigAlg pgpDigAlgFree(pgpDigAlg alg)
+     return NULL;
+ }
+ 
+-static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype,
++static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo,
+ 		const uint8_t *p, const uint8_t *h, size_t hlen,
+ 		pgpDigParams sigp)
+ {
+@@ -556,10 +556,8 @@ static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype,
+ 	int mpil = pgpMpiLen(p);
+ 	if (pend - p < mpil)
+ 	    break;
+-	if (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT) {
+-	    if (sigalg->setmpi(sigalg, i, p))
+-		break;
+-	}
++        if (sigalg->setmpi(sigalg, i, p))
++            break;
+ 	p += mpil;
+     }
+ 
+@@ -619,7 +617,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen,
+ 	}
+ 
+ 	p = ((uint8_t *)v) + sizeof(*v);
+-	rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp);
++	rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp);
+     }	break;
+     case 4:
+     {   pgpPktSigV4 v = (pgpPktSigV4)h;
+@@ -677,8 +675,7 @@ static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen,
+ 	p += 2;
+ 	if (p > hend)
+ 	    return 1;
+-
+-	rc = pgpPrtSigParams(tag, v->pubkey_algo, v->sigtype, p, h, hlen, _digp);
++	rc = pgpPrtSigParams(tag, v->pubkey_algo, p, h, hlen, _digp);
+     }	break;
+     default:
+ 	rpmlog(RPMLOG_WARNING, _("Unsupported version of signature: V%d\n"), version);
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch b/poky/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch
new file mode 100644
index 0000000..a5ec802
--- /dev/null
+++ b/poky/meta/recipes-devtools/rpm/files/0003-CVE-2021-3521.patch
@@ -0,0 +1,329 @@
+From 07676ca03ad8afcf1ca95a2353c83fbb1d970b9b Mon Sep 17 00:00:00 2001
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Thu, 30 Sep 2021 09:59:30 +0300
+Subject: [PATCH 3/3] Validate and require subkey binding signatures on PGP
+ public keys
+
+All subkeys must be followed by a binding signature by the primary key
+as per the OpenPGP RFC, enforce the presence and validity in the parser.
+
+The implementation is as kludgey as they come to work around our
+simple-minded parser structure without touching API, to maximise
+backportability. Store all the raw packets internally as we decode them
+to be able to access previous elements at will, needed to validate ordering
+and access the actual data. Add testcases for manipulated keys whose
+import previously would succeed.
+
+Depends on the two previous commits:
+7b399fcb8f52566e6f3b4327197a85facd08db91 and
+236b802a4aa48711823a191d1b7f753c82a89ec5
+
+Fixes CVE-2021-3521.
+
+Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/bd36c5dc9]
+CVE:CVE-2021-3521
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+---
+ rpmio/rpmpgp.c                                | 99 +++++++++++++++++--
+ tests/Makefile.am                             |  3 +
+ tests/data/keys/CVE-2021-3521-badbind.asc     | 25 +++++
+ .../data/keys/CVE-2021-3521-nosubsig-last.asc | 25 +++++
+ tests/data/keys/CVE-2021-3521-nosubsig.asc    | 37 +++++++
+ tests/rpmsigdig.at                            | 28 ++++++
+ 6 files changed, 209 insertions(+), 8 deletions(-)
+ create mode 100644 tests/data/keys/CVE-2021-3521-badbind.asc
+ create mode 100644 tests/data/keys/CVE-2021-3521-nosubsig-last.asc
+ create mode 100644 tests/data/keys/CVE-2021-3521-nosubsig.asc
+
+diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c
+index 509e777e6d..371ad4d9b6 100644
+--- a/rpmio/rpmpgp.c
++++ b/rpmio/rpmpgp.c
+@@ -1061,33 +1061,116 @@ static pgpDigParams pgpDigParamsNew(uint8_t tag)
+     return digp;
+ }
+ 
++static int hashKey(DIGEST_CTX hash, const struct pgpPkt *pkt, int exptag)
++{
++    int rc = -1;
++    if (pkt->tag == exptag) {
++       uint8_t head[] = {
++           0x99,
++           (pkt->blen >> 8),
++           (pkt->blen     ),
++       };
++
++       rpmDigestUpdate(hash, head, 3);
++       rpmDigestUpdate(hash, pkt->body, pkt->blen);
++       rc = 0;
++    }
++    return rc;
++}
++
++static int pgpVerifySelf(pgpDigParams key, pgpDigParams selfsig,
++                       const struct pgpPkt *all, int i)
++{
++    int rc = -1;
++    DIGEST_CTX hash = NULL;
++
++    switch (selfsig->sigtype) {
++    case PGPSIGTYPE_SUBKEY_BINDING:
++       hash = rpmDigestInit(selfsig->hash_algo, 0);
++       if (hash) {
++           rc = hashKey(hash, &all[0], PGPTAG_PUBLIC_KEY);
++           if (!rc)
++               rc = hashKey(hash, &all[i-1], PGPTAG_PUBLIC_SUBKEY);
++       }
++       break;
++    default:
++       /* ignore types we can't handle */
++       rc = 0;
++       break;
++    }
++
++    if (hash && rc == 0)
++       rc = pgpVerifySignature(key, selfsig, hash);
++
++    rpmDigestFinal(hash, NULL, NULL, 0);
++
++    return rc;
++}
++
+ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
+ 		 pgpDigParams * ret)
+ {
+     const uint8_t *p = pkts;
+     const uint8_t *pend = pkts + pktlen;
+     pgpDigParams digp = NULL;
+-    struct pgpPkt pkt;
++    pgpDigParams selfsig = NULL;
++    int i = 0;
++    int alloced = 16; /* plenty for normal cases */
++    struct pgpPkt *all = xmalloc(alloced * sizeof(*all));
+     int rc = -1; /* assume failure */
++    int expect = 0;
++    int prevtag = 0;
+ 
+     while (p < pend) {
+-	if (decodePkt(p, (pend - p), &pkt))
++	struct pgpPkt *pkt = &all[i];
++	if (decodePkt(p, (pend - p), pkt))
+ 	    break;
+ 
+ 	if (digp == NULL) {
+-	    if (pkttype && pkt.tag != pkttype) {
++               if (pkttype && pkt->tag != pkttype) {
+ 		break;
+ 	    } else {
+-		digp = pgpDigParamsNew(pkt.tag);
++		digp = pgpDigParamsNew(pkt->tag);
+ 	    }
+ 	}
+ 
+-	if (pgpPrtPkt(&pkt, digp))
++        if (expect) {
++            if (pkt->tag != expect)
++                break;
++            selfsig = pgpDigParamsNew(pkt->tag);
++        }
++	if (pgpPrtPkt(pkt, selfsig ? selfsig : digp))
+ 	    break;
+ 
+-	p += (pkt.body - pkt.head) + pkt.blen;
+-	if (pkttype == PGPTAG_SIGNATURE)
+-	    break;
++	if (selfsig) {
++           /* subkeys must be followed by binding signature */
++           if (prevtag == PGPTAG_PUBLIC_SUBKEY) {
++               if (selfsig->sigtype != PGPSIGTYPE_SUBKEY_BINDING)
++                   break;
++           }
++
++           int xx = pgpVerifySelf(digp, selfsig, all, i);
++
++           selfsig = pgpDigParamsFree(selfsig);
++           if (xx)
++               break;
++           expect = 0;
++       }
++
++       if (pkt->tag == PGPTAG_PUBLIC_SUBKEY)
++           expect = PGPTAG_SIGNATURE;
++       prevtag = pkt->tag;
++
++       i++;
++       p += (pkt->body - pkt->head) + pkt->blen;
++       if (pkttype == PGPTAG_SIGNATURE)
++           break;
++
++       if (alloced <= i) {
++           alloced *= 2;
++           all = xrealloc(all, alloced * sizeof(*all));
++       }
++
+     }
+ 
+     rc = (digp && (p == pend)) ? 0 : -1;
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index a41ce10de8..7bb23247f1 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -107,6 +107,9 @@ EXTRA_DIST += data/SPECS/hello-config-buildid.spec
+ EXTRA_DIST += data/SPECS/hello-cd.spec
+ EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.pub
+ EXTRA_DIST += data/keys/rpm.org-rsa-2048-test.secret
++EXTRA_DIST += data/keys/CVE-2021-3521-badbind.asc
++EXTRA_DIST += data/keys/CVE-2022-3521-nosubsig.asc
++EXTRA_DIST += data/keys/CVE-2022-3521-nosubsig-last.asc
+ EXTRA_DIST += data/macros.testfile
+ EXTRA_DIST += data/macros.debug
+ EXTRA_DIST += data/SOURCES/foo.c
+diff --git a/tests/data/keys/CVE-2021-3521-badbind.asc b/tests/data/keys/CVE-2021-3521-badbind.asc
+new file mode 100644
+index 0000000000..aea00f9d7a
+--- /dev/null
++++ b/tests/data/keys/CVE-2021-3521-badbind.asc
+@@ -0,0 +1,25 @@
++-----BEGIN PGP PUBLIC KEY BLOCK-----
++Version: rpm-4.17.90 (NSS-3)
++
++mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g
++HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY
++91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8
++eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas
++7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ
++1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl
++c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK
++CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf
++Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB
++BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr
++XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX
++fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq
+++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN
++BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY
++zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz
++iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6
++Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c
++KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m
++L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE=
++=WCfs
++-----END PGP PUBLIC KEY BLOCK-----
++
+diff --git a/tests/data/keys/CVE-2021-3521-nosubsig-last.asc b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc
+new file mode 100644
+index 0000000000..aea00f9d7a
+--- /dev/null
++++ b/tests/data/keys/CVE-2021-3521-nosubsig-last.asc
+@@ -0,0 +1,25 @@
++-----BEGIN PGP PUBLIC KEY BLOCK-----
++Version: rpm-4.17.90 (NSS-3)
++
++mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g
++HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY
++91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8
++eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas
++7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ
++1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl
++c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK
++CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf
++Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB
++BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr
++XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX
++fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq
+++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN
++BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY
++zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz
++iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6
++Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c
++KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m
++L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAE=
++=WCfs
++-----END PGP PUBLIC KEY BLOCK-----
++
+diff --git a/tests/data/keys/CVE-2021-3521-nosubsig.asc b/tests/data/keys/CVE-2021-3521-nosubsig.asc
+new file mode 100644
+index 0000000000..3a2e7417f8
+--- /dev/null
++++ b/tests/data/keys/CVE-2021-3521-nosubsig.asc
+@@ -0,0 +1,37 @@
++-----BEGIN PGP PUBLIC KEY BLOCK-----
++Version: rpm-4.17.90 (NSS-3)
++
++mQENBFjmORgBCAC7TMEk6wnjSs8Dr4yqSScWdU2pjcqrkTxuzdWvowcIUPZI0w/g
++HkRqGd4apjvY2V15kjL10gk3QhFP3pZ/9p7zh8o8NHX7aGdSGDK7NOq1eFaErPRY
++91LW9RiZ0lbOjXEzIL0KHxUiTQEmdXJT43DJMFPyW9fkCWg0OltiX618FUdWWfI8
++eySdLur1utnqBvdEbCUvWK2RX3vQZQdvEBODnNk2pxqTyV0w6VPQ96W++lF/5Aas
++7rUv3HIyIXxIggc8FRrnH+y9XvvHDonhTIlGnYZN4ubm9i4y3gOkrZlGTrEw7elQ
++1QeMyG2QQEbze8YjpTm4iLABCBrRfPRaQpwrABEBAAG0IXJwbS5vcmcgUlNBIHRl
++c3RrZXkgPHJzYUBycG0ub3JnPokBNwQTAQgAIQUCWOY5GAIbAwULCQgHAgYVCAkK
++CwIEFgIDAQIeAQIXgAAKCRBDRFkeGWTF/MxxCACnjqFL+MmPh9W9JQKT2DcLbBzf
++Cqo6wcEBoCOcwgRSk8dSikhARoteoa55JRJhuMyeKhhEAogE9HRmCPFdjezFTwgB
++BDVBpO2dZ023mLXDVCYX3S8pShOgCP6Tn4wqCnYeAdLcGg106N4xcmgtcssJE+Pr
++XzTZksbZsrTVEmL/Ym+R5w5jBfFnGk7Yw7ndwfQsfNXQb5AZynClFxnX546lcyZX
++fEx3/e6ezw57WNOUK6WT+8b+EGovPkbetK/rGxNXuWaP6X4A/QUm8O98nCuHYFQq
+++mvNdsCBqGf7mhaRGtpHk/JgCn5rFvArMDqLVrR9hX0LdCSsH7EGE+bR3r7wuQEN
++BFjmORgBCACk+vDZrIXQuFXEYToZVwb2attzbbJJCqD71vmZTLsW0QxuPKRgbcYY
++zp4K4lVBnHhFrF8MOUOxJ7kQWIJZMZFt+BDcptCYurbD2H4W2xvnWViiC+LzCMzz
++iMJT6165uefL4JHTDPxC2fFiM9yrc72LmylJNkM/vepT128J5Qv0gRUaQbHiQuS6
++Dm/+WRnUfx3i89SV4mnBxb/Ta93GVqoOciWwzWSnwEnWYAvOb95JL4U7c5J5f/+c
++KnQDHsW7sIiIdscsWzvgf6qs2Ra1Zrt7Fdk4+ZS2f/adagLhDO1C24sXf5XfMk5m
++L0OGwZSr9m5s17VXxfspgU5ugc8kBJfzABEBAAG5AQ0EWOY5GAEIAKT68NmshdC4
++VcRhOhlXBvZq23NtskkKoPvW+ZlMuxbRDG48pGBtxhjOngriVUGceEWsXww5Q7En
++uRBYglkxkW34ENym0Ji6tsPYfhbbG+dZWKIL4vMIzPOIwlPrXrm558vgkdMM/ELZ
++8WIz3KtzvYubKUk2Qz+96lPXbwnlC/SBFRpBseJC5LoOb/5ZGdR/HeLz1JXiacHF
++v9Nr3cZWqg5yJbDNZKfASdZgC85v3kkvhTtzknl//5wqdAMexbuwiIh2xyxbO+B/
++qqzZFrVmu3sV2Tj5lLZ/9p1qAuEM7ULbixd/ld8yTmYvQ4bBlKv2bmzXtVfF+ymB
++Tm6BzyQEl/MAEQEAAYkBHwQYAQgACQUCWOY5GAIbDAAKCRBDRFkeGWTF/PANB/9j
++mifmj6z/EPe0PJFhrpISt9PjiUQCt0IPtiL5zKAkWjHePIzyi+0kCTBF6DDLFxos
++3vN4bWnVKT1kBhZAQlPqpJTg+m74JUYeDGCdNx9SK7oRllATqyu+5rncgxjWVPnQ
++zu/HRPlWJwcVFYEVXYL8xzfantwQTqefjmcRmBRdA2XJITK+hGWwAmrqAWx+q5xX
++Pa8wkNMxVzNS2rUKO9SoVuJ/wlUvfoShkJ/VJ5HDp3qzUqncADfdGN35TDzscngQ
++gHvnMwVBfYfSCABV1hNByoZcc/kxkrWMmsd/EnIyLd1Q1baKqc3cEDuC6E6/o4yJ
++E4XX4jtDmdZPreZALsiB
++=rRop
++-----END PGP PUBLIC KEY BLOCK-----
++
+diff --git a/tests/rpmsigdig.at b/tests/rpmsigdig.at
+index 8e7c759b8f..e2d30a7f1b 100644
+--- a/tests/rpmsigdig.at
++++ b/tests/rpmsigdig.at
+@@ -2,6 +2,34 @@
+ 
+ AT_BANNER([RPM signatures and digests])
+ 
++AT_SETUP([rpmkeys --import invalid keys])
++AT_KEYWORDS([rpmkeys import])
++RPMDB_INIT
++
++AT_CHECK([
++runroot rpmkeys --import /data/keys/CVE-2021-3521-badbind.asc
++],
++[1],
++[],
++[error: /data/keys/CVE-2021-3521-badbind.asc: key 1 import failed.]
++)
++AT_CHECK([
++runroot rpmkeys --import /data/keys/CVE-2021-3521-nosubsig.asc
++],
++[1],
++[],
++[error: /data/keys/CVE-2021-3521-nosubsig.asc: key 1 import failed.]
++)
++
++AT_CHECK([
++runroot rpmkeys --import /data/keys/CVE-2021-3521-nosubsig-last.asc
++],
++[1],
++[],
++[error: /data/keys/CVE-2021-3521-nosubsig-last.asc: key 1 import failed.]
++)
++AT_CLEANUP
++
+ # ------------------------------
+ # Test pre-built package verification
+ AT_SETUP([rpmkeys -Kv <unsigned> 1])
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.17.0.bb b/poky/meta/recipes-devtools/rpm/rpm_4.17.0.bb
index 00e480b..0e852d0 100644
--- a/poky/meta/recipes-devtools/rpm/rpm_4.17.0.bb
+++ b/poky/meta/recipes-devtools/rpm/rpm_4.17.0.bb
@@ -24,7 +24,7 @@
 LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f"
 
-SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.17.x \
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.17.x;protocol=https \
            file://environment.d-rpm.sh \
            file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
            file://0001-Do-not-read-config-files-from-HOME.patch \
@@ -39,6 +39,9 @@
            file://0001-tools-Add-error.h-for-non-glibc-case.patch \
            file://0001-docs-do-not-build-manpages-requires-pandoc.patch \
            file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \
+           file://0001-CVE-2021-3521.patch \
+           file://0002-CVE-2021-3521.patch \
+           file://0003-CVE-2021-3521.patch \
            "
 
 PE = "1"
@@ -134,6 +137,9 @@
 do_install:append:class-target() {
     rm -rf ${D}/var
 }
+do_install:append:class-nativesdk() {
+    rm -rf ${D}${SDKPATHNATIVE}/var
+}
 
 do_install:append () {
 	sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
diff --git a/poky/meta/recipes-devtools/ruby/ruby.inc b/poky/meta/recipes-devtools/ruby/ruby.inc
index 2b5caf3..20ae15b 100644
--- a/poky/meta/recipes-devtools/ruby/ruby.inc
+++ b/poky/meta/recipes-devtools/ruby/ruby.inc
@@ -10,7 +10,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=5b8c87559868796979806100db3f3805 \
                     file://BSDL;md5=8b50bc6de8f586dc66790ba11d064d75 \
                     file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://LEGAL;md5=cfe5b0bc9f051b58c7e78db882ca5f9b \
+                    file://LEGAL;md5=f260190bc1e92e363f0ee3c0463d4c7c \
                     "
 
 DEPENDS = "ruby-native zlib openssl libyaml gdbm readline libffi"
@@ -23,7 +23,7 @@
            "
 UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
 
-inherit autotools ptest
+inherit autotools ptest pkgconfig
 
 
 # This snippet lets compiled extensions which rely on external libraries,
@@ -37,8 +37,3 @@
     sed -i "s#%%TARGET_CFLAGS%%#$CFLAGS#; s#%%TARGET_LDFLAGS%%#$LDFLAGS#" ${S}/common.mk
     rm -rf ${S}/ruby/
 }
-
-# Disable openssl extension until it becomes compatible with openssl 3
-do_configure:prepend() {
-    rm -rf ${S}/ext/openssl/extconf.rb
-}
diff --git a/poky/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch b/poky/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch
index 504893b..de8d4f0 100644
--- a/poky/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch
+++ b/poky/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch
@@ -1,6 +1,7 @@
+From 6e1dc610724a7aa8368cbcddf4bbe21cccc0f731 Mon Sep 17 00:00:00 2001
 From: Lucas Kanashiro <kanashiro@debian.org>
 Date: Fri, 1 Nov 2019 15:25:17 -0300
-Subject: Make gemspecs reproducible
+Subject: [PATCH] Make gemspecs reproducible
 
 Without an explicit date, they will get the current date and make the
 build unreproducible
@@ -10,34 +11,40 @@
 ---
  ext/bigdecimal/bigdecimal.gemspec | 1 +
  ext/fiddle/fiddle.gemspec         | 1 +
- ext/io/console/io-console.gemspec | 2 +-
+ ext/io/console/io-console.gemspec | 1 +
  lib/ipaddr.gemspec                | 1 +
  lib/rdoc/rdoc.gemspec             | 1 +
- 5 files changed, 5 insertions(+), 1 deletion(-)
+ 5 files changed, 5 insertions(+)
 
+diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
+index fd49c1b..5b8bb00 100644
 --- a/ext/bigdecimal/bigdecimal.gemspec
 +++ b/ext/bigdecimal/bigdecimal.gemspec
-@@ -6,6 +6,7 @@
+@@ -4,6 +4,7 @@ Gem::Specification.new do |s|
    s.name          = "bigdecimal"
-   s.version       = bigdecimal_version
+   s.version       = "3.1.1"
    s.authors       = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
 +  s.date          = RUBY_RELEASE_DATE
    s.email         = ["mrkn@mrkn.jp"]
-
+ 
    s.summary       = "Arbitrary-precision decimal floating-point number library."
+diff --git a/ext/fiddle/fiddle.gemspec b/ext/fiddle/fiddle.gemspec
+index a9c0ec4..89da078 100644
 --- a/ext/fiddle/fiddle.gemspec
 +++ b/ext/fiddle/fiddle.gemspec
-@@ -8,6 +8,7 @@
+@@ -8,6 +8,7 @@ end
  Gem::Specification.new do |spec|
    spec.name          = "fiddle"
    spec.version       = version_module::Fiddle::VERSION
 +  spec.date          = RUBY_RELEASE_DATE
    spec.authors       = ["Aaron Patterson", "SHIBATA Hiroshi"]
    spec.email         = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]
-
+ 
+diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec
+index 36beda7..e932d83 100644
 --- a/ext/io/console/io-console.gemspec
 +++ b/ext/io/console/io-console.gemspec
-@@ -4,6 +4,7 @@
+@@ -4,6 +4,7 @@ _VERSION = "0.5.10"
  Gem::Specification.new do |s|
    s.name = "io-console"
    s.version = _VERSION
@@ -45,23 +52,27 @@
    s.summary = "Console interface"
    s.email = "nobu@ruby-lang.org"
    s.description = "add console capabilities to IO instances."
+diff --git a/lib/ipaddr.gemspec b/lib/ipaddr.gemspec
+index 36e2300..06dc888 100644
 --- a/lib/ipaddr.gemspec
 +++ b/lib/ipaddr.gemspec
-@@ -6,6 +6,7 @@
+@@ -6,6 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
  Gem::Specification.new do |spec|
    spec.name          = "ipaddr"
-   spec.version       = "1.2.2"
+   spec.version       = "1.2.3"
 +  spec.date          = RUBY_RELEASE_DATE
    spec.authors       = ["Akinori MUSHA", "Hajimu UMEMOTO"]
    spec.email         = ["knu@idaemons.org", "ume@mahoroba.org"]
-
+ 
+diff --git a/lib/rdoc/rdoc.gemspec b/lib/rdoc/rdoc.gemspec
+index 525a15f..f6d0e22 100644
 --- a/lib/rdoc/rdoc.gemspec
 +++ b/lib/rdoc/rdoc.gemspec
-@@ -7,6 +7,7 @@
-
+@@ -7,6 +7,7 @@ end
+ 
  Gem::Specification.new do |s|
    s.name = "rdoc"
 +  s.date = RUBY_RELEASE_DATE
    s.version = RDoc::VERSION
-
+ 
    s.authors = [
diff --git a/poky/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch b/poky/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch
index 6e90a8e..b78e3db 100644
--- a/poky/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch
+++ b/poky/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch
@@ -1,4 +1,4 @@
-From 303fe0d20184203f1ac86d2a77b1447d47c8c29d Mon Sep 17 00:00:00 2001
+From e74b57febec9bd806e29025e6eeb8091e7021d75 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 26 Jan 2020 11:27:40 -0800
 Subject: [PATCH] Filter out __has_include* compiler defines
@@ -21,12 +21,12 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/common.mk b/common.mk
-index 7633050..422aa9c 100644
+index 664f750..3b8fbe6 100644
 --- a/common.mk
 +++ b/common.mk
-@@ -233,6 +233,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJE
+@@ -238,6 +238,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJE
  	$(ECHO) building $(@F:.time=.h)
- 	$(MINIRUBY) $(tooldir)/mjit_tabs.rb "$(MJIT_TABS)" \
+ 	$(Q)$(MINIRUBY) $(tooldir)/mjit_tabs.rb "$(MJIT_TABS)" \
  		$(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new
 +	$(Q)sed -i -e "/#define __has_include __has_include/d" $(@F:.time=.h).new
 +	$(Q)sed -i -e "/#define __has_include_next __has_include_next/d" $(@F:.time=.h).new
diff --git a/poky/meta/recipes-devtools/ruby/ruby_3.0.2.bb b/poky/meta/recipes-devtools/ruby/ruby_3.1.0.bb
similarity index 74%
rename from poky/meta/recipes-devtools/ruby/ruby_3.0.2.bb
rename to poky/meta/recipes-devtools/ruby/ruby_3.1.0.bb
index 2abf504..7183c93 100644
--- a/poky/meta/recipes-devtools/ruby/ruby_3.0.2.bb
+++ b/poky/meta/recipes-devtools/ruby/ruby_3.1.0.bb
@@ -13,7 +13,7 @@
            file://0006-Make-gemspecs-reproducible.patch \
            "
 
-SRC_URI[sha256sum] = "5085dee0ad9f06996a8acec7ebea4a8735e6fac22f22e2d98c3f2bc3bef7e6f1"
+SRC_URI[sha256sum] = "50a0504c6edcb4d61ce6b8cfdbddaa95707195fab0ecd7b5e92654b2a9412854"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
@@ -21,6 +21,9 @@
 PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
 PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
 PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6,"
+# rdoc is off by default due to non-reproducibility reported in
+# https://bugs.ruby-lang.org/issues/18456
+PACKAGECONFIG[rdoc] = "--enable-install-rdoc,--disable-install-rdoc,"
 
 EXTRA_OECONF = "\
     --disable-versioned-paths \
@@ -29,6 +32,7 @@
     --enable-shared \
     --enable-load-relative \
     --with-pkg-config=pkg-config \
+    --with-static-linked-ext \
 "
 
 EXTRA_OECONF:append:libc-musl = "\
@@ -64,6 +68,8 @@
     sed -i -e 's|${DEBUG_PREFIX_MAP}||g' \
         ${D}${libdir}/pkgconfig/*.pc
 
+    # logs that may contain host-specific paths
+    find ${D} -name gem_make.out -delete
 }
 
 do_install_ptest () {
@@ -75,16 +81,19 @@
     cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib
 
     # install test-binaries
-    find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \
-        | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \
-        | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf -
+    # These .so files have sporadic reproducibility fails as seen here:
+    # https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20220107-rm1diuww/packages/diff-html/
+    # As they are needed only in ruby-ptest, and that is currently altogether disabled, let's take them out.
+    # If someone wants to look at where the non-determinism comes from, one possible reason is use of
+    # -rdynamic -Wl,-export-dynamic
+    #find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \
+    #    | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \
+    #    | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf -
     # adjust path to not assume build directory layout
     sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \
         -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb
 
     cp -r ${S}/include ${D}/${libdir}/ruby/
-    test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list`
-    sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb
 }
 
 PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
diff --git a/poky/meta/recipes-devtools/rust/files/riscv-march.patch b/poky/meta/recipes-devtools/rust/files/riscv-march.patch
deleted file mode 100644
index a10b3a4..0000000
--- a/poky/meta/recipes-devtools/rust/files/riscv-march.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Add suppor for riscv64 and riscv32 musl targets
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/vendor/cc/src/lib.rs
-+++ b/vendor/cc/src/lib.rs
-@@ -2361,6 +2361,7 @@ impl Build {
-                 "riscv-none-embed",
-             ]),
-             "riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"),
-+            "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"),
-             "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-             "sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
-             "sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -641,9 +641,11 @@ supported_targets! {
-     ("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf),
-     ("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf),
-     ("riscv32gc-unknown-linux-gnu", riscv32gc_unknown_linux_gnu),
-+    ("riscv32gc-unknown-linux-musl", riscv32gc_unknown_linux_musl),
-     ("riscv64imac-unknown-none-elf", riscv64imac_unknown_none_elf),
-     ("riscv64gc-unknown-none-elf", riscv64gc_unknown_none_elf),
-     ("riscv64gc-unknown-linux-gnu", riscv64gc_unknown_linux_gnu),
-+    ("riscv64gc-unknown-linux-musl", riscv64gc_unknown_linux_musl),
- 
-     ("aarch64-unknown-none", aarch64_unknown_none),
-     ("aarch64-unknown-none-softfloat", aarch64_unknown_none_softfloat),
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_musl.rs
-@@ -0,0 +1,19 @@
-+use crate::spec::{CodeModel, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    Target {
-+        llvm_target: "riscv32-unknown-linux-musl".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
-+        arch: "riscv32".to_string(),
-+        options: TargetOptions {
-+            unsupported_abis: super::riscv_base::unsupported_abis(),
-+            code_model: Some(CodeModel::Medium),
-+            cpu: "generic-rv32".to_string(),
-+            features: "+m,+a,+f,+d,+c".to_string(),
-+            llvm_abiname: "ilp32d".to_string(),
-+            max_atomic_width: Some(32),
-+            ..super::linux_musl_base::opts()
-+        },
-+    }
-+}
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs
-@@ -0,0 +1,19 @@
-+use crate::spec::{CodeModel, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    Target {
-+        llvm_target: "riscv64-unknown-linux-musl".to_string(),
-+        pointer_width: 64,
-+        data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(),
-+        arch: "riscv64".to_string(),
-+        options: TargetOptions {
-+            unsupported_abis: super::riscv_base::unsupported_abis(),
-+            code_model: Some(CodeModel::Medium),
-+            cpu: "generic-rv64".to_string(),
-+            features: "+m,+a,+f,+d,+c".to_string(),
-+            llvm_abiname: "lp64d".to_string(),
-+            max_atomic_width: Some(64),
-+            ..super::linux_musl_base::opts()
-+        },
-+    }
-+}
diff --git a/poky/meta/recipes-devtools/rust/files/rv64gc.patch b/poky/meta/recipes-devtools/rust/files/rv64gc.patch
deleted file mode 100644
index aab1e18..0000000
--- a/poky/meta/recipes-devtools/rust/files/rv64gc.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/vendor/cc-1.0.60/.cargo-checksum.json
-+++ b/vendor/cc-1.0.60/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"Cargo.lock":"30b9e23f97015aea3eed3e17c6d76d565c2924efec8bdae64c899080847afe89","Cargo.toml":"f6f22b69df3df57c58373cdee72b22218ffa030bc375b36632660037dd72c866","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"51405d284d2e0620db62c655c652fc0ec84f20c1cb30529227355c9575a9e6dd","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"903c5f2f5dd0cc7d04f99f605a95e6abde8b38156fd4e73eefc58493f55a4e5a","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"52afe8554f577c87841c48ddee3ba7ffe70a00129e1d6eeb2ec0efb3d2b9aa11","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"16274867f23871e9b07614eda4c7344da13d1751fed63d4f633857e40be86394","tests/test.rs":"65c073e0e2cf4aa0433066102788e9f57442719e6f32f5ad5248aa7132bb4597"},"package":"ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c"}
-\ No newline at end of file
-+{"files":{"Cargo.lock":"30b9e23f97015aea3eed3e17c6d76d565c2924efec8bdae64c899080847afe89","Cargo.toml":"f6f22b69df3df57c58373cdee72b22218ffa030bc375b36632660037dd72c866","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"51405d284d2e0620db62c655c652fc0ec84f20c1cb30529227355c9575a9e6dd","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"2788af2bdf425f267b33bc524f3e627851b52422e38f480a7e39eb834264fd73","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"52afe8554f577c87841c48ddee3ba7ffe70a00129e1d6eeb2ec0efb3d2b9aa11","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"16274867f23871e9b07614eda4c7344da13d1751fed63d4f633857e40be86394","tests/test.rs":"65c073e0e2cf4aa0433066102788e9f57442719e6f32f5ad5248aa7132bb4597"},"package":"ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c"}
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -1639,14 +1639,17 @@ impl Build {
-                     let mut parts = target.split('-');
-                     if let Some(arch) = parts.next() {
-                         let arch = &arch[5..];
--                        cmd.args.push(("-march=rv".to_owned() + arch).into());
-                         if target.contains("linux") && arch.starts_with("64") {
-+                            cmd.args.push(("-march=rv64gc").into());
-                             cmd.args.push("-mabi=lp64d".into());
-                         } else if target.contains("linux") && arch.starts_with("32") {
-+                            cmd.args.push(("-march=rv32gc").into());
-                             cmd.args.push("-mabi=ilp32d".into());
-                         } else if arch.starts_with("64") {
-+                            cmd.args.push(("-march=rv".to_owned() + arch).into());
-                             cmd.args.push("-mabi=lp64".into());
-                         } else {
-+                            cmd.args.push(("-march=rv".to_owned() + arch).into());
-                             cmd.args.push("-mabi=ilp32".into());
-                         }
-                         cmd.args.push("-mcmodel=medany".into());
-@@ -2332,6 +2335,9 @@ impl Build {
-                 "riscv-none-embed",
-             ]),
-             "riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"),
-+            "riscv32gc-unknown-linux-gnu" => Some("riscv32-linux-gnu"),
-+            "riscv64gc-unknown-linux-musl" => Some("riscv64-linux-musl"),
-+            "riscv32gc-unknown-linux-musl" => Some("riscv32-linux-musl"),
-             "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-             "sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
-             "sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
diff --git a/poky/meta/recipes-devtools/rust/libstd-rs/0005-Add-base-definitions-for-riscv64-musl-libc.patch b/poky/meta/recipes-devtools/rust/libstd-rs/0001-Add-base-definitions-for-riscv64-musl.patch
similarity index 97%
rename from poky/meta/recipes-devtools/rust/libstd-rs/0005-Add-base-definitions-for-riscv64-musl-libc.patch
rename to poky/meta/recipes-devtools/rust/libstd-rs/0001-Add-base-definitions-for-riscv64-musl.patch
index 180e2b5..b1cd45d 100644
--- a/poky/meta/recipes-devtools/rust/libstd-rs/0005-Add-base-definitions-for-riscv64-musl-libc.patch
+++ b/poky/meta/recipes-devtools/rust/libstd-rs/0001-Add-base-definitions-for-riscv64-musl.patch
@@ -1,18 +1,21 @@
-From 4e188d047dee33a19902113a3c90cdf1d8310a9e Mon Sep 17 00:00:00 2001
+From 8b86ecf87cf3589861b458f099572ad8487fc6cc Mon Sep 17 00:00:00 2001
 From: Ralf Anton Beier <ralf_beier@me.com>
 Date: Sun, 8 Aug 2021 11:05:06 +0200
-Subject: [PATCH 5/8] Add base definitions for riscv64 + musl
+Subject: [PATCH 1/4] Add base definitions for riscv64 + musl
 
 https://github.com/rust-lang/libc/pull/1994/commits/030a07761f61f3293d53752e60edbd330a9d718d
 
+Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/2537]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
 ---
  .../src/unix/linux_like/linux/musl/b64/mod.rs |   3 +
- .../linux_like/linux/musl/b64/riscv64/mod.rs  | 867 ++++++++++++++++++
- 2 files changed, 870 insertions(+)
- create mode 100644 vendor/libc-0.2.98/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
+ .../linux_like/linux/musl/b64/riscv64/mod.rs  | 832 ++++++++++++++++++
+ 2 files changed, 835 insertions(+)
+ create mode 100644 vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
 
+diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs
+index cfcdaaecf..7261b95d2 100644
 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs
 +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs
 @@ -163,6 +163,9 @@ cfg_if! {
@@ -25,6 +28,9 @@
      } else {
          // Unknown target_arch
      }
+diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
+new file mode 100644
+index 000000000..c656189c4
 --- /dev/null
 +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
 @@ -0,0 +1,832 @@
@@ -860,3 +866,6 @@
 +pub const SYS_process_madvise: ::c_long = 440;
 +pub const SYS_epoll_pwait2: ::c_long = 441;
 +pub const SYS_mount_setattr: ::c_long = 442;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/rust/libstd-rs/0006-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch b/poky/meta/recipes-devtools/rust/libstd-rs/0002-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch
similarity index 64%
rename from poky/meta/recipes-devtools/rust/libstd-rs/0006-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch
rename to poky/meta/recipes-devtools/rust/libstd-rs/0002-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch
index 047c4f2..0f159c6 100644
--- a/poky/meta/recipes-devtools/rust/libstd-rs/0006-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch
+++ b/poky/meta/recipes-devtools/rust/libstd-rs/0002-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch
@@ -1,19 +1,22 @@
-From 4319893ebb7fca8bbd2bffc4bddb8d3ecdc08cc2 Mon Sep 17 00:00:00 2001
+From bd805ef63035ecefa03f67d5ab2e1d79f7daf9bc Mon Sep 17 00:00:00 2001
 From: Ralf Anton Beier <ralf_beier@me.com>
 Date: Sun, 8 Aug 2021 11:07:21 +0200
-Subject: [PATCH 6/8] FIXUP: linux/musl/mod.rs: add riscv64 to b64 set
+Subject: [PATCH 2/4] FIXUP: linux/musl/mod.rs: add riscv64 to b64 set
 
 https://github.com/rust-lang/libc/pull/1994/commits/30070c822be2ef399b2ba38cdc1d72ac694d65a3
 
+Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/2537]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
 ---
- vendor/libc-0.2.98/src/unix/linux_like/linux/musl/mod.rs | 3 ++-
+ vendor/libc/src/unix/linux_like/linux/musl/mod.rs | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
+diff --git a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
+index df596e968..1ab13a712 100644
 --- a/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
 +++ b/vendor/libc/src/unix/linux_like/linux/musl/mod.rs
-@@ -709,7 +709,8 @@ cfg_if! {
+@@ -765,7 +765,8 @@ cfg_if! {
                   target_arch = "aarch64",
                   target_arch = "mips64",
                   target_arch = "powerpc64",
@@ -23,3 +26,6 @@
          mod b64;
          pub use self::b64::*;
      } else if #[cfg(any(target_arch = "x86",
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/rust/libstd-rs/0007-FIXUP-Correct-definitions-to-match-musl.patch b/poky/meta/recipes-devtools/rust/libstd-rs/0003-FIXUP-Correct-definitions-to-match-musl.patch
similarity index 97%
rename from poky/meta/recipes-devtools/rust/libstd-rs/0007-FIXUP-Correct-definitions-to-match-musl.patch
rename to poky/meta/recipes-devtools/rust/libstd-rs/0003-FIXUP-Correct-definitions-to-match-musl.patch
index 211d2e2..288f4c5 100644
--- a/poky/meta/recipes-devtools/rust/libstd-rs/0007-FIXUP-Correct-definitions-to-match-musl.patch
+++ b/poky/meta/recipes-devtools/rust/libstd-rs/0003-FIXUP-Correct-definitions-to-match-musl.patch
@@ -1,16 +1,19 @@
-From 9d240d05c6e6620f36e4ddbcbcb5862fb3269d9f Mon Sep 17 00:00:00 2001
+From a811c933372b18b98fdef3d5901b512131b27b1c Mon Sep 17 00:00:00 2001
 From: Ralf Anton Beier <ralf_beier@me.com>
 Date: Sun, 8 Aug 2021 11:09:17 +0200
-Subject: [PATCH 7/8] FIXUP Correct definitions to match musl
+Subject: [PATCH 3/4] FIXUP Correct definitions to match musl
 
 https://github.com/rust-lang/libc/pull/1994/commits/5f6a4d9745c79c81be63c708515ab116786554a3
 
+Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/2537]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
 ---
- .../linux_like/linux/musl/b64/riscv64/mod.rs  | 708 ++++++++----------
- 1 file changed, 311 insertions(+), 397 deletions(-)
+ .../linux_like/linux/musl/b64/riscv64/mod.rs  | 655 +++++++++---------
+ 1 file changed, 312 insertions(+), 343 deletions(-)
 
+diff --git a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
+index c656189c4..1799539c2 100644
 --- a/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
 +++ b/vendor/libc/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
 @@ -191,351 +191,8 @@ s! {
@@ -365,7 +368,7 @@
  pub const SYS_read: ::c_long = 63;
  pub const SYS_write: ::c_long = 64;
  pub const SYS_close: ::c_long = 57;
-@@ -830,3 +487,315 @@ pub const SYS_faccessat2: ::c_long = 439
+@@ -830,3 +487,315 @@ pub const SYS_faccessat2: ::c_long = 439;
  pub const SYS_process_madvise: ::c_long = 440;
  pub const SYS_epoll_pwait2: ::c_long = 441;
  pub const SYS_mount_setattr: ::c_long = 442;
@@ -681,3 +684,6 @@
 +extern "C" {
 +    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
 +}
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/rust/libstd-rs/0004-Update-checksums-for-modified-files-for-rust.patch b/poky/meta/recipes-devtools/rust/libstd-rs/0004-Update-checksums-for-modified-files-for-rust.patch
new file mode 100644
index 0000000..6f0e331
--- /dev/null
+++ b/poky/meta/recipes-devtools/rust/libstd-rs/0004-Update-checksums-for-modified-files-for-rust.patch
@@ -0,0 +1,22 @@
+From 6dc0a4273b01ec9492af4965f47450a8b8a7c202 Mon Sep 17 00:00:00 2001
+From: Ralf Anton Beier <ralf_beier@me.com>
+Date: Sun, 8 Aug 2021 11:19:24 +0200
+Subject: [PATCH 4/4] Update checksums for modified files for rust
+
+Upstream-Status: Inappropriate [previous patches need to be upstreamed]
+Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
+---
+ vendor/libc/.cargo-checksum.json | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vendor/libc/.cargo-checksum.json b/vendor/libc/.cargo-checksum.json
+index 8cf4eba1b..333cb7cf9 100644
+--- a/vendor/libc/.cargo-checksum.json
++++ b/vendor/libc/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"CONTRIBUTING.md":"752eea5a703d11b485c6b5f195f51bd2c79aa5159b619ce09555c779e1fb586b","Cargo.toml":"d6f6253f05d207b6c676e5647b31ad0ca3f05da3ac05db47f81d4ebd901ba22f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"8228847944f1332882fbb00275b6f30e4a8aad08a13569c25d52cac012cc2a47","build.rs":"a71b92db5077b33af4ee6f1de33574ac33c2b292840eddbe3f7cce37f1fb16b9","rustfmt.toml":"eaa2ea84fc1ba0359b77680804903e07bb38d257ab11986b95b158e460f787b2","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"520300ff260d377930f2f456135ec9a3ac7740a949ce7bf5269c0dc60d56c0df","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"e92c56b42f1bd1b9e66be2a9b73aca6ba29024b9bd17c16f327dfbe8831e3f86","src/macros.rs":"c1a299d5327ba033f079388f8ac8a44848f9aeff6a72e9be6dfa70f4769cc619","src/psp.rs":"dd31aabd46171d474ec5828372e28588935120e7355c90c105360d8fa9264c1c","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/solid/aarch64.rs":"8cdae0cc37c43dabd4253a534e700bec6b6a57293c0c8e36c9ce16675d16799a","src/solid/arm.rs":"852b58a0837fde089cb9b5af131bf653daeb8c726f7540032756db8b7d4f8149","src/solid/mod.rs":"98dc29c3e5773318ba258a4a2b7407f25aa52d40885a0024fbe43676fe54d14b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"2546ad3eb6aecb95f916648bc63264117c92b4b4859532b34cb011e4c75a5a72","src/unix/bsd/apple/b64/aarch64/align.rs":"f0c321265dd7671f16106b84951ac7dd77ed2e65c6623cbf2d29e76531984770","src/unix/bsd/apple/b64/aarch64/mod.rs":"44c217a4f263afe7a97435de9323d20a96c37836f899ca0925306d4b7e073c27","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"f5e278a1af7fb358891d1c9be4eb7e815aaca0c5cb738d0c3604ba2208a856f7","src/unix/bsd/apple/b64/x86_64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/x86_64/mod.rs":"8c87c5855038aae5d433c8f5eb3b29b0a175879a0245342b3bfd83bdf4cfd936","src/unix/bsd/apple/mod.rs":"96f101bdab46a9f0a5249a8143d4a9def055284a0c2bd62bce15532a5bed428c","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"8295b8bb0dfd38d2cdb4d9192cdeeb534cc6c3b208170e64615fa3e0edb3e578","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6ea4129eb5d6da5c09f8cf3692b5e7716f058b48d1e8c61115691709eda7ce51","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"2a215bd6136b8617aacedf9be738ccee94da9d29b418e9a78101d6291c182352","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"bf0a994e2079b8aad9da5efd3a3b9a7194a53ae60887a25c57964fb68499e847","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"295b3e3b67394f731d4e88d169e3d3d1d80026b99898745cd0d1d163f085ff61","src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/freebsd13/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"98f6af2021b434f9c3197094312b457774381220f31a22c3b15b1fe8a60cb365","src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6b825079ffe3f9aec6e78ea6b50acedcb91a4e1312d721105b7f8b1555f254df","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"9ca3f82f88974e6db5569f2d76a5a3749b248a31747a6c0da5820492bdfeca42","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/unix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"c3a0111252e201c172b99e7d9cbee4cf088d3dd47995110e819f04276bccd198","src/unix/bsd/freebsdlike/mod.rs":"98d322b22050a80636841287d9ed12549a2004a9dbe151763e5b1270f5e73ea3","src/unix/bsd/mod.rs":"2fed08973739d7f6a7412b204724af64b1a915c712689c250cf9a08263ba05ff","src/unix/bsd/netbsdlike/mod.rs":"4e9da54e541773c7ad4cca9dade1df00f28f2fdac3f8df5957f4c74b7e082344","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"65dcb58d11e8d8028401a9d07ca3eb4cb4f053e04249cc877353449d84ccc4cb","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"f6de6981382af87518e4a5b6d26c2ea551ed74640dd7166107a824af30ced243","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"1afe5ef46b14397cdd68664b5b232e4f5b035b6db1d4cf411c899d51ebca9f30","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"dd91931d373b7ecaf6e2de25adadee10d16fa9b12c2cbacdff3eb291e1ba36af","src/unix/bsd/netbsdlike/openbsd/mod.rs":"47aaab2bd8238e937112ff17e8262945c8e5865d5e696f218b11c1da59830808","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"d31db31630289c85af3339dbe357998a21ca584cbae31607448fe2cf7675a4e1","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"80a6cfb58acbbc471dbd412dd76a41f372befc8f217fb1671ed4ce8d391dced0","src/unix/haiku/native.rs":"44855f52906f607de137fc4baa8c6b1b9a26baaa666f25d5f7a7ec5e017c8be6","src/unix/haiku/x86_64.rs":"3ec3aeeb7ed208b8916f3e32d42bfd085ff5e16936a1a35d9a52789f043b7237","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"859814f5df89e28fd4b345db399d181e11e7ed413841b6ff703a1fcbdbf013ae","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"433c1530f602cc5ed26610c58055dde0c4ceea5e00150063b24ddc60768332a4","src/unix/linux_like/android/b32/mod.rs":"d971b98530a96f5892f98e1edc3133cf278d1b3939d77ab0a27a6323e0961715","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"8388bd3a0fcb5636bf965eee6dc95ae6860b85a2b555b387c868aa4d4e01ec89","src/unix/linux_like/android/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"8fe667d2b14abc5ac8aad32e16c3da24350471d8156eaea9ab4989f73dd9f9fc","src/unix/linux_like/android/b64/mod.rs":"d7bbbadafdb2cb2ff8e9cde3d89a03b9facaabb6b2d45705225d3ece1c5cce37","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"06b22dc184e85a988ab969c75cadc52b9878faeab0eb9d21215878c95fe07c19","src/unix/linux_like/android/mod.rs":"07cebaa8d953446b8df5cb7c5de3932ae85b04d9e9993e3a3a126ff8f15111a4","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"b71d37106750f57bc2dae4e9bcb473ff098ef48235827e41a1687a39825f0aa4","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"213e70ebed2703e14a9cf17666b21ecbf180b7bff7fa22fdbb36dbbd52df326d","src/unix/linux_like/linux/arch/generic/mod.rs":"1618634d37348032f5ce1dc9df1aaa1f1681bca4a275f23d41f42098c4d3b423","src/unix/linux_like/linux/arch/mips/mod.rs":"dac02cd01dbd3b222286887c64d398c031afc08d38850c2b3ce2fe7158d888e0","src/unix/linux_like/linux/arch/mod.rs":"466a29622e47c6c7f1500682b2eb17f5566dd81b322cd6348f0fdd355cec593a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"1789eb5b41f75c29239795124a4a7cdcf7c8d213b88cf581b2f5bda08d7cf15b","src/unix/linux_like/linux/arch/sparc/mod.rs":"e7139d3bfb291a283c767e6201eac8bbb58c91839a36fa56bfe500fcb3aa754a","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"5e40c273b767c369a46c3315c7cfde97379944ed63c74735e98d4dae2c49d414","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"20b4c897fb3f63e31a04849b348ec8e6e6405ce9463048d411114f8c9dbabd8a","src/unix/linux_like/linux/gnu/b32/mod.rs":"794dbcbae7dae8fd6b0b814573243197ceb532b56ef0772ad86b4b401478fcd9","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"0cd7348badb9c4f8a0db31a2503b30c456a2bfcc7a0e5919762b1e12f912c5ad","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"ee5145a383386b716605a8d1ff3df212d418aae1aa1f37d2307d4f9cd1a08e99","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"a2c4ae8f31a74e4843b8ff4b6507419f403b52713169fcee9b1b24eb2324162a","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"525ee4917b54790cefc1298ec1015cea6332d818d9c7475434e94d06afdd59c0","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"21a21503ef2e095f4371044915d4bfb07a8578011cb5c713cd9f45947b0b5730","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"e78c3cd197f44832338b414d1a9bc0d194f44c74db77bd7bf830c1fff62b2690","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"d179cbb462c451ff8805029b2b922c4bf90e35f667e80d716d5064f563aebc52","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"7d456da436017cb388b65b2c4b626c83b489cbb19a591673b9c627a608d53cfc","src/unix/linux_like/linux/gnu/b64/mod.rs":"6336065423c26b59681fd2ce77f1117ea36af13e163fdadaefd108bd8191e8c8","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"dbb8905e363ed4a2dfb984554ad9b6389d27f6a2d599ec2d80e38a6c7551a019","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"5b982c41097f4f91adcb0968290afeccb27dce1695a261c964d34ef85df87cf4","src/unix/linux_like/linux/gnu/b64/s390x.rs":"fce37140468f8914411eed0b25a882e60e1b54bcffcd33d6263a91b57d04f6c1","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"518ef78da0d81fe74cec30be411145d763fdfd249de4d108602fd0995781f590","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"76cba0a3f9456a968d2ae6ea587162b2ff04278dc5250cb176395c936579771b","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"f775ac2b754f90b63053fe22afe1d19d306b5404995568d6805baa9249fb617f","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"4ba1b58468f55254717366f50fdfd3e4114fde6dc442a56681926c4d7e5b6b0d","src/unix/linux_like/linux/gnu/mod.rs":"af3590c392bd06394cb307ccb993e66f53de7e2a0211c689dbb1845220475445","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"88ce2c4105c07c1262495e0ff1bd53f3ceec99adba9c20c612439838b4dbfdd6","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"6255abe2ee04986832d12b7b2190589580f2a43e9bfb285b32b5747227f62727","src/unix/linux_like/linux/musl/b32/hexagon.rs":"10067cde5706e1173aa8e0a3a364cf44fe5b7a9f8b71cb086c653be71af00564","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"b9e9ff42363ebbb884ddf6445129ec4164471df45846874fc08f5f458e659254","src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"4592dc5f1f2fe888dfef85fa862d42d168e73a2c6f4fc052b58287d0f4d4ffcd","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"a19a8decfab185af3cebd34aae4b15082e7552be573904b8c1a3f0c0e493ef34","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"798a9229d70ce235394f2dd625f6c4c1e10519a94382dc5b091952b638ae2928","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"a73035c6d9b776f13b839008e15c04c2c53455571efd06664affcb047e457112","src/unix/linux_like/linux/musl/b64/mips64.rs":"2744895451f3a777fbe54f7f2695be53310b965fd62084c9b7e9121c7fe28346","src/unix/linux_like/linux/musl/b64/mod.rs":"d18abc0aeba2e26342bf3416a4dba0836db2bb0ee013b0a39629475cf8640289","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"e5a55525b42493923956d668f978fb45e22d51deea00ce5edbfddf76ff19c741","src/unix/linux_like/linux/musl/b64/s390x.rs":"03dfec6794d93cb31a7c52b2d53a0973755168f91f8fa437cc5dbd54882c8ee7","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"0dd168f5a6881f32e5239fb312b23cf137b800d0ff323286a92c8a2c382b5456","src/unix/linux_like/linux/musl/mod.rs":"55ccd71342276ccb4c441a4bc2772aebfd163af299669b658c6c8c6add331ec3","src/unix/linux_like/linux/no_align.rs":"5ed04c53bf9d27da9b4d65ba7625c6ac53330162683d1b3df98950caafa3507b","src/unix/linux_like/linux/uclibc/align.rs":"9ed16138d8e439bd90930845a65eafa7ebd67366e6bf633936d44014f6e4c959","src/unix/linux_like/linux/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/arm/mod.rs":"1e3bf809508b5872949136859bf48ddf58b7d24ae9f0b663e79f0efd1aaeb6a6","src/unix/linux_like/linux/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"fa4102d9a596d90de604ce2962b0e64f184dfbf10552a4c3ecf28f12d4704379","src/unix/linux_like/linux/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/linux_like/linux/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/linux_like/linux/uclibc/mips/mod.rs":"a2877679fef0f14f54a89ccbc41fb02f0c25bf6e536f9eb2cb2fa437e1d3f739","src/unix/linux_like/linux/uclibc/mod.rs":"82d504d3aa12cb0f7933980f81c4708fa6e070d4c57efdf407f2de05b71bc06d","src/unix/linux_like/linux/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/linux_like/linux/uclibc/x86_64/l4re.rs":"024eba5753e852dbdd212427351affe7e83f9916c1864bce414d7aa2618f192e","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"66e8f5b7509a6e638b8b904906f89badbab0da8fb5b602d07ebd88649c4b961a","src/unix/linux_like/linux/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/unix/linux_like/mod.rs":"ffce98bdd208fd9d335c65feafbf0d9742bea67c7eec1ee48657f292132ec3f0","src/unix/mod.rs":"b72f18e053cca0ade0f0606f1848a773fcf1885c72cbb31889275e8195f060bd","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/espidf/mod.rs":"c198cb4beccdab483be61c102da74dc51ac80f766797e33021f3110394ed5a3d","src/unix/newlib/mod.rs":"d7271c13748be08305d36f9af6f41f6950a7a1d6d4382149194a35d5fe2090de","src/unix/newlib/no_align.rs":"e0743b2179495a9514bc3a4d1781e492878c4ec834ee0085d0891dd1712e82fb","src/unix/newlib/powerpc/mod.rs":"2d0f7af28b47f7a2a6c210ebd1c1f33ed8eac62e56b5af2b856de2ad3fdc5187","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"cc4794afa4fbed9d6612894ea476228f9d8533950162d6416fc4d16073e1dac4","src/unix/solarish/compat.rs":"b07a5bfac925eb012003a459ba6bddbd3bfa9c44b3394da2ac5a602e54beae9c","src/unix/solarish/illumos.rs":"7d8f47fd37880715b449723688aaee568785325a46f1c360a05bdca13252278e","src/unix/solarish/mod.rs":"ea9dd1c1d68927408342762ee8998a9628838974c91089f620c867910c29adba","src/unix/solarish/solaris.rs":"65b005453aefa9b9d4fc860fe77cfec80d8c97a51342b15daf55fc3e808bb384","src/unix/solarish/x86_64.rs":"9d761573bdccbdd1ac61da571f7e96b5374df70241d9b72d45a069611f495085","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"aea3da66f2140f2a82dfc9c58f6e6531d2dd9c15ea696e0f95a0d4a2a187b5b6","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"44ce56183380d18aedea9b7bec2edc5819e8529302c913bfe5d01f760155b82a","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"3c8c7edb7cdf5d0c44af936db2a94869585c69dfabeef30571b4f4e38375767a","src/windows/mod.rs":"1cd9223293255b994814487e28d9979fb8ebef4538a236c1aa47fdc166a149cc","src/windows/msvc/mod.rs":"c068271e00fca6b62bc4bf44bcf142cfc38caeded9b6c4e01d1ceef3ccf986f4","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4"},"package":"fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"}
+\ No newline at end of file
++{"files":{"CONTRIBUTING.md":"752eea5a703d11b485c6b5f195f51bd2c79aa5159b619ce09555c779e1fb586b","Cargo.toml":"d6f6253f05d207b6c676e5647b31ad0ca3f05da3ac05db47f81d4ebd901ba22f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"8228847944f1332882fbb00275b6f30e4a8aad08a13569c25d52cac012cc2a47","build.rs":"a71b92db5077b33af4ee6f1de33574ac33c2b292840eddbe3f7cce37f1fb16b9","rustfmt.toml":"eaa2ea84fc1ba0359b77680804903e07bb38d257ab11986b95b158e460f787b2","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"520300ff260d377930f2f456135ec9a3ac7740a949ce7bf5269c0dc60d56c0df","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"e92c56b42f1bd1b9e66be2a9b73aca6ba29024b9bd17c16f327dfbe8831e3f86","src/macros.rs":"c1a299d5327ba033f079388f8ac8a44848f9aeff6a72e9be6dfa70f4769cc619","src/psp.rs":"dd31aabd46171d474ec5828372e28588935120e7355c90c105360d8fa9264c1c","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/solid/aarch64.rs":"8cdae0cc37c43dabd4253a534e700bec6b6a57293c0c8e36c9ce16675d16799a","src/solid/arm.rs":"852b58a0837fde089cb9b5af131bf653daeb8c726f7540032756db8b7d4f8149","src/solid/mod.rs":"98dc29c3e5773318ba258a4a2b7407f25aa52d40885a0024fbe43676fe54d14b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"2546ad3eb6aecb95f916648bc63264117c92b4b4859532b34cb011e4c75a5a72","src/unix/bsd/apple/b64/aarch64/align.rs":"f0c321265dd7671f16106b84951ac7dd77ed2e65c6623cbf2d29e76531984770","src/unix/bsd/apple/b64/aarch64/mod.rs":"44c217a4f263afe7a97435de9323d20a96c37836f899ca0925306d4b7e073c27","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"f5e278a1af7fb358891d1c9be4eb7e815aaca0c5cb738d0c3604ba2208a856f7","src/unix/bsd/apple/b64/x86_64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/x86_64/mod.rs":"8c87c5855038aae5d433c8f5eb3b29b0a175879a0245342b3bfd83bdf4cfd936","src/unix/bsd/apple/mod.rs":"96f101bdab46a9f0a5249a8143d4a9def055284a0c2bd62bce15532a5bed428c","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"8295b8bb0dfd38d2cdb4d9192cdeeb534cc6c3b208170e64615fa3e0edb3e578","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"6ea4129eb5d6da5c09f8cf3692b5e7716f058b48d1e8c61115691709eda7ce51","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"2a215bd6136b8617aacedf9be738ccee94da9d29b418e9a78101d6291c182352","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"bf0a994e2079b8aad9da5efd3a3b9a7194a53ae60887a25c57964fb68499e847","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"295b3e3b67394f731d4e88d169e3d3d1d80026b99898745cd0d1d163f085ff61","src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/freebsd13/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"98f6af2021b434f9c3197094312b457774381220f31a22c3b15b1fe8a60cb365","src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6b825079ffe3f9aec6e78ea6b50acedcb91a4e1312d721105b7f8b1555f254df","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"9ca3f82f88974e6db5569f2d76a5a3749b248a31747a6c0da5820492bdfeca42","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/unix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"c3a0111252e201c172b99e7d9cbee4cf088d3dd47995110e819f04276bccd198","src/unix/bsd/freebsdlike/mod.rs":"98d322b22050a80636841287d9ed12549a2004a9dbe151763e5b1270f5e73ea3","src/unix/bsd/mod.rs":"2fed08973739d7f6a7412b204724af64b1a915c712689c250cf9a08263ba05ff","src/unix/bsd/netbsdlike/mod.rs":"4e9da54e541773c7ad4cca9dade1df00f28f2fdac3f8df5957f4c74b7e082344","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"65dcb58d11e8d8028401a9d07ca3eb4cb4f053e04249cc877353449d84ccc4cb","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"f6de6981382af87518e4a5b6d26c2ea551ed74640dd7166107a824af30ced243","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"1afe5ef46b14397cdd68664b5b232e4f5b035b6db1d4cf411c899d51ebca9f30","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"dd91931d373b7ecaf6e2de25adadee10d16fa9b12c2cbacdff3eb291e1ba36af","src/unix/bsd/netbsdlike/openbsd/mod.rs":"47aaab2bd8238e937112ff17e8262945c8e5865d5e696f218b11c1da59830808","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"d31db31630289c85af3339dbe357998a21ca584cbae31607448fe2cf7675a4e1","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"80a6cfb58acbbc471dbd412dd76a41f372befc8f217fb1671ed4ce8d391dced0","src/unix/haiku/native.rs":"44855f52906f607de137fc4baa8c6b1b9a26baaa666f25d5f7a7ec5e017c8be6","src/unix/haiku/x86_64.rs":"3ec3aeeb7ed208b8916f3e32d42bfd085ff5e16936a1a35d9a52789f043b7237","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"859814f5df89e28fd4b345db399d181e11e7ed413841b6ff703a1fcbdbf013ae","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"433c1530f602cc5ed26610c58055dde0c4ceea5e00150063b24ddc60768332a4","src/unix/linux_like/android/b32/mod.rs":"d971b98530a96f5892f98e1edc3133cf278d1b3939d77ab0a27a6323e0961715","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"8388bd3a0fcb5636bf965eee6dc95ae6860b85a2b555b387c868aa4d4e01ec89","src/unix/linux_like/android/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"8fe667d2b14abc5ac8aad32e16c3da24350471d8156eaea9ab4989f73dd9f9fc","src/unix/linux_like/android/b64/mod.rs":"d7bbbadafdb2cb2ff8e9cde3d89a03b9facaabb6b2d45705225d3ece1c5cce37","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"06b22dc184e85a988ab969c75cadc52b9878faeab0eb9d21215878c95fe07c19","src/unix/linux_like/android/mod.rs":"07cebaa8d953446b8df5cb7c5de3932ae85b04d9e9993e3a3a126ff8f15111a4","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"b71d37106750f57bc2dae4e9bcb473ff098ef48235827e41a1687a39825f0aa4","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"213e70ebed2703e14a9cf17666b21ecbf180b7bff7fa22fdbb36dbbd52df326d","src/unix/linux_like/linux/arch/generic/mod.rs":"1618634d37348032f5ce1dc9df1aaa1f1681bca4a275f23d41f42098c4d3b423","src/unix/linux_like/linux/arch/mips/mod.rs":"dac02cd01dbd3b222286887c64d398c031afc08d38850c2b3ce2fe7158d888e0","src/unix/linux_like/linux/arch/mod.rs":"466a29622e47c6c7f1500682b2eb17f5566dd81b322cd6348f0fdd355cec593a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"1789eb5b41f75c29239795124a4a7cdcf7c8d213b88cf581b2f5bda08d7cf15b","src/unix/linux_like/linux/arch/sparc/mod.rs":"e7139d3bfb291a283c767e6201eac8bbb58c91839a36fa56bfe500fcb3aa754a","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"5e40c273b767c369a46c3315c7cfde97379944ed63c74735e98d4dae2c49d414","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"20b4c897fb3f63e31a04849b348ec8e6e6405ce9463048d411114f8c9dbabd8a","src/unix/linux_like/linux/gnu/b32/mod.rs":"794dbcbae7dae8fd6b0b814573243197ceb532b56ef0772ad86b4b401478fcd9","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"0cd7348badb9c4f8a0db31a2503b30c456a2bfcc7a0e5919762b1e12f912c5ad","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"ee5145a383386b716605a8d1ff3df212d418aae1aa1f37d2307d4f9cd1a08e99","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"a2c4ae8f31a74e4843b8ff4b6507419f403b52713169fcee9b1b24eb2324162a","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"525ee4917b54790cefc1298ec1015cea6332d818d9c7475434e94d06afdd59c0","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"21a21503ef2e095f4371044915d4bfb07a8578011cb5c713cd9f45947b0b5730","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"e78c3cd197f44832338b414d1a9bc0d194f44c74db77bd7bf830c1fff62b2690","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"d179cbb462c451ff8805029b2b922c4bf90e35f667e80d716d5064f563aebc52","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"7d456da436017cb388b65b2c4b626c83b489cbb19a591673b9c627a608d53cfc","src/unix/linux_like/linux/gnu/b64/mod.rs":"6336065423c26b59681fd2ce77f1117ea36af13e163fdadaefd108bd8191e8c8","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"dbb8905e363ed4a2dfb984554ad9b6389d27f6a2d599ec2d80e38a6c7551a019","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"5b982c41097f4f91adcb0968290afeccb27dce1695a261c964d34ef85df87cf4","src/unix/linux_like/linux/gnu/b64/s390x.rs":"fce37140468f8914411eed0b25a882e60e1b54bcffcd33d6263a91b57d04f6c1","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"518ef78da0d81fe74cec30be411145d763fdfd249de4d108602fd0995781f590","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"76cba0a3f9456a968d2ae6ea587162b2ff04278dc5250cb176395c936579771b","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"f775ac2b754f90b63053fe22afe1d19d306b5404995568d6805baa9249fb617f","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"4ba1b58468f55254717366f50fdfd3e4114fde6dc442a56681926c4d7e5b6b0d","src/unix/linux_like/linux/gnu/mod.rs":"af3590c392bd06394cb307ccb993e66f53de7e2a0211c689dbb1845220475445","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"88ce2c4105c07c1262495e0ff1bd53f3ceec99adba9c20c612439838b4dbfdd6","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"6255abe2ee04986832d12b7b2190589580f2a43e9bfb285b32b5747227f62727","src/unix/linux_like/linux/musl/b32/hexagon.rs":"10067cde5706e1173aa8e0a3a364cf44fe5b7a9f8b71cb086c653be71af00564","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"b9e9ff42363ebbb884ddf6445129ec4164471df45846874fc08f5f458e659254","src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"4592dc5f1f2fe888dfef85fa862d42d168e73a2c6f4fc052b58287d0f4d4ffcd","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"a19a8decfab185af3cebd34aae4b15082e7552be573904b8c1a3f0c0e493ef34","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"798a9229d70ce235394f2dd625f6c4c1e10519a94382dc5b091952b638ae2928","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"a73035c6d9b776f13b839008e15c04c2c53455571efd06664affcb047e457112","src/unix/linux_like/linux/musl/b64/mips64.rs":"2744895451f3a777fbe54f7f2695be53310b965fd62084c9b7e9121c7fe28346","src/unix/linux_like/linux/musl/b64/mod.rs":"d18abc0aeba2e26342bf3416a4dba0836db2bb0ee013b0a39629475cf8640289","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"e5a55525b42493923956d668f978fb45e22d51deea00ce5edbfddf76ff19c741","src/unix/linux_like/linux/musl/b64/s390x.rs":"03dfec6794d93cb31a7c52b2d53a0973755168f91f8fa437cc5dbd54882c8ee7","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"0dd168f5a6881f32e5239fb312b23cf137b800d0ff323286a92c8a2c382b5456","src/unix/linux_like/linux/musl/mod.rs":"55ccd71342276ccb4c441a4bc2772aebfd163af299669b658c6c8c6add331ec3","src/unix/linux_like/linux/no_align.rs":"5ed04c53bf9d27da9b4d65ba7625c6ac53330162683d1b3df98950caafa3507b","src/unix/linux_like/linux/uclibc/align.rs":"9ed16138d8e439bd90930845a65eafa7ebd67366e6bf633936d44014f6e4c959","src/unix/linux_like/linux/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/arm/mod.rs":"1e3bf809508b5872949136859bf48ddf58b7d24ae9f0b663e79f0efd1aaeb6a6","src/unix/linux_like/linux/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"fa4102d9a596d90de604ce2962b0e64f184dfbf10552a4c3ecf28f12d4704379","src/unix/linux_like/linux/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/linux_like/linux/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/linux_like/linux/uclibc/mips/mod.rs":"a2877679fef0f14f54a89ccbc41fb02f0c25bf6e536f9eb2cb2fa437e1d3f739","src/unix/linux_like/linux/uclibc/mod.rs":"82d504d3aa12cb0f7933980f81c4708fa6e070d4c57efdf407f2de05b71bc06d","src/unix/linux_like/linux/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/linux_like/linux/uclibc/x86_64/l4re.rs":"024eba5753e852dbdd212427351affe7e83f9916c1864bce414d7aa2618f192e","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"66e8f5b7509a6e638b8b904906f89badbab0da8fb5b602d07ebd88649c4b961a","src/unix/linux_like/linux/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/unix/linux_like/mod.rs":"ffce98bdd208fd9d335c65feafbf0d9742bea67c7eec1ee48657f292132ec3f0","src/unix/mod.rs":"b72f18e053cca0ade0f0606f1848a773fcf1885c72cbb31889275e8195f060bd","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/espidf/mod.rs":"c198cb4beccdab483be61c102da74dc51ac80f766797e33021f3110394ed5a3d","src/unix/newlib/mod.rs":"d7271c13748be08305d36f9af6f41f6950a7a1d6d4382149194a35d5fe2090de","src/unix/newlib/no_align.rs":"e0743b2179495a9514bc3a4d1781e492878c4ec834ee0085d0891dd1712e82fb","src/unix/newlib/powerpc/mod.rs":"2d0f7af28b47f7a2a6c210ebd1c1f33ed8eac62e56b5af2b856de2ad3fdc5187","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"cc4794afa4fbed9d6612894ea476228f9d8533950162d6416fc4d16073e1dac4","src/unix/solarish/compat.rs":"b07a5bfac925eb012003a459ba6bddbd3bfa9c44b3394da2ac5a602e54beae9c","src/unix/solarish/illumos.rs":"7d8f47fd37880715b449723688aaee568785325a46f1c360a05bdca13252278e","src/unix/solarish/mod.rs":"ea9dd1c1d68927408342762ee8998a9628838974c91089f620c867910c29adba","src/unix/solarish/solaris.rs":"65b005453aefa9b9d4fc860fe77cfec80d8c97a51342b15daf55fc3e808bb384","src/unix/solarish/x86_64.rs":"9d761573bdccbdd1ac61da571f7e96b5374df70241d9b72d45a069611f495085","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"aea3da66f2140f2a82dfc9c58f6e6531d2dd9c15ea696e0f95a0d4a2a187b5b6","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"44ce56183380d18aedea9b7bec2edc5819e8529302c913bfe5d01f760155b82a","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"3c8c7edb7cdf5d0c44af936db2a94869585c69dfabeef30571b4f4e38375767a","src/windows/mod.rs":"1cd9223293255b994814487e28d9979fb8ebef4538a236c1aa47fdc166a149cc","src/windows/msvc/mod.rs":"c068271e00fca6b62bc4bf44bcf142cfc38caeded9b6c4e01d1ceef3ccf986f4","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4"},"package":"fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"}
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/rust/libstd-rs/0008-Update-checksums-for-modified-files-for-rust.patch b/poky/meta/recipes-devtools/rust/libstd-rs/0008-Update-checksums-for-modified-files-for-rust.patch
deleted file mode 100644
index 29131a0..0000000
--- a/poky/meta/recipes-devtools/rust/libstd-rs/0008-Update-checksums-for-modified-files-for-rust.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-From 2b1c373f9a3341e8926d6be8d7cdcedc1fc6fca3 Mon Sep 17 00:00:00 2001
-From: Ralf Anton Beier <ralf_beier@me.com>
-Date: Sun, 8 Aug 2021 11:19:24 +0200
-Subject: [PATCH 8/8] Update checksums for modified files for rust
-
-Signed-off-by: Ralf Anton Beier <ralf_beier@me.com>
----
- vendor/libc-0.2.93/.cargo-checksum.json | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/vendor/libc/.cargo-checksum.json
-+++ b/vendor/libc/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"CONTRIBUTING.md":"752eea5a703d11b485c6b5f195f51bd2c79aa5159b619ce09555c779e1fb586b","Cargo.toml":"9d8cd25bb60fc4bb42c4b034bfa26ba45a691fd7cae155dab8f8b5819fe12647","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"8228847944f1332882fbb00275b6f30e4a8aad08a13569c25d52cac012cc2a47","build.rs":"8e0e8d33cc9e7c25cde75c2b502420f943266a681024169f94084774b422681d","rustfmt.toml":"eaa2ea84fc1ba0359b77680804903e07bb38d257ab11986b95b158e460f787b2","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"975b86cbe0335d64082ca88bb24f0e3402371f6f5b33e940c4e12ce4342bb658","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"d4f7452c0fe720f3a961b918b74ec86d19cef33e6b4aac08efbbad6f6d818e09","src/macros.rs":"7844312c233a6889fa15395fe3106f6a8f6229211104a92f33ea3c9536eef763","src/psp.rs":"dd31aabd46171d474ec5828372e28588935120e7355c90c105360d8fa9264c1c","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"6a4ce300da0d2b0db04b18548286603ffe4b47d679a41cf60f1902895894aa1f","src/unix/bsd/apple/b64/aarch64/align.rs":"f0c321265dd7671f16106b84951ac7dd77ed2e65c6623cbf2d29e76531984770","src/unix/bsd/apple/b64/aarch64/mod.rs":"46d5d061c7a74cbc09cbdfb3bee9a600867bf4e04c0e4d0ca6c817e6033b32e1","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"f5e278a1af7fb358891d1c9be4eb7e815aaca0c5cb738d0c3604ba2208a856f7","src/unix/bsd/apple/b64/x86_64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/x86_64/mod.rs":"cc6878dd130c3f255418e4da74992ae9ba6a3cdb0530772de76c518077d3b12a","src/unix/bsd/apple/mod.rs":"55e2ddba00f002fac0e3ed1c43932423ea6682aaff95491542dce9562c81e217","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"8295b8bb0dfd38d2cdb4d9192cdeeb534cc6c3b208170e64615fa3e0edb3e578","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"efdfed8f750d6a6233a3a753be80bdb6e06ec9ccdfa5b9246f09aa1d39d3cffe","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"14f0bd6693967d4fedec904f7042bd51f2138cb843ec4df18c911b357417cdd2","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"6523af60c0e4937ad374003c1653e9e721f5b6f11572c747732f76522d07d034","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"b449a5914d3175e0a390bad616370f28fe59efaee3b81c38fb6e556507c2711a","src/unix/bsd/freebsdlike/freebsd/freebsd13/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"ce31af8c04d1a1b384f55f80db14b5f74c59d02c94b3b30288411c9bca5eba04","src/unix/bsd/freebsdlike/freebsd/mod.rs":"a4fc19429762fac85106180e87c4d10a61b4c07563f4e844771fcde71c14fc51","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"9ca3f82f88974e6db5569f2d76a5a3749b248a31747a6c0da5820492bdfeca42","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/unix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"6132aa0973454379674ea6cbc77e6eace1e1032dd9f38182071388a036f1bc08","src/unix/bsd/freebsdlike/mod.rs":"9dbe0fcf66f13ba27f163d9f4362c25036ff1973a3b67244bcb3e8f39c3efbfd","src/unix/bsd/mod.rs":"67e0932ebcd1605045744c3f15286204cc547019b0a2696419da1c14c61393f5","src/unix/bsd/netbsdlike/mod.rs":"ceaec69f85bbe5beaf0b2dd73e0fd2b7fa49c0ea9727dcf51415f99bd2bc4b9c","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"6b30cadcf243eb6098cad6ec869f4739570df0f356aefd826ef1c347c146685c","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"1afe5ef46b14397cdd68664b5b232e4f5b035b6db1d4cf411c899d51ebca9f30","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/mod.rs":"ac6fff797511b00659849242b997de4d9f948698b5677de928375fc84d2ac1f3","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"e59b7fd65f68f8e857eec39e0c03bac1d3af6ddc26c9ba58494336b83659bb9b","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"cb829d468fecc8dacf3f03f5808f0c265a62dc82e34a208a025a8b903027a121","src/unix/haiku/native.rs":"fd34e56a7b27591d83a980c92afefc543df9a2d4fe64c732d2b7d6aea31ac0a3","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"859814f5df89e28fd4b345db399d181e11e7ed413841b6ff703a1fcbdbf013ae","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"433c1530f602cc5ed26610c58055dde0c4ceea5e00150063b24ddc60768332a4","src/unix/linux_like/android/b32/mod.rs":"d971b98530a96f5892f98e1edc3133cf278d1b3939d77ab0a27a6323e0961715","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"8388bd3a0fcb5636bf965eee6dc95ae6860b85a2b555b387c868aa4d4e01ec89","src/unix/linux_like/android/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"8fe667d2b14abc5ac8aad32e16c3da24350471d8156eaea9ab4989f73dd9f9fc","src/unix/linux_like/android/b64/mod.rs":"5d94d05d8c10a748f0b1f67a4abaf4dd8415351e14e3bc6c84f6a46c8e18874c","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"06b22dc184e85a988ab969c75cadc52b9878faeab0eb9d21215878c95fe07c19","src/unix/linux_like/android/mod.rs":"9e79edebb5c7b1b62f0e253570d02338a50f06fdb2fd4b27488e0ae50871a836","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"6ef97140ca6fb24125fdd0aacb986ef785aa21993229660d7f703f8875ebfe49","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"213e70ebed2703e14a9cf17666b21ecbf180b7bff7fa22fdbb36dbbd52df326d","src/unix/linux_like/linux/arch/generic/mod.rs":"ff1fe8fad4ea15d9bec3db25efcfcb4939190c5189f86cfa4d05825aa8c10956","src/unix/linux_like/linux/arch/mips/mod.rs":"e4a980b002105aaa057eb6568e1e2c6168ade5c00e13a31ef67e316ddffdb900","src/unix/linux_like/linux/arch/mod.rs":"466a29622e47c6c7f1500682b2eb17f5566dd81b322cd6348f0fdd355cec593a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"1789eb5b41f75c29239795124a4a7cdcf7c8d213b88cf581b2f5bda08d7cf15b","src/unix/linux_like/linux/arch/sparc/mod.rs":"ded708124ee610267d011dee31fb02d1ec697c334aa822776ec95a7ddf6fc541","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"07adf9f4b96854062db518aaf08521fde0ad4a21a5c049efccba437bd97b2b5a","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"1cb5c0c9df3af2bbe131a91593583259fac9118931744c8435e197a394eb0462","src/unix/linux_like/linux/gnu/b32/mod.rs":"794dbcbae7dae8fd6b0b814573243197ceb532b56ef0772ad86b4b401478fcd9","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"0cd7348badb9c4f8a0db31a2503b30c456a2bfcc7a0e5919762b1e12f912c5ad","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"9c628cd97806181dc4d34b072f63fe1eb42f08108712002e0628ffe27f2fa93f","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"1bcec269a8416ccc48a384ca5765eaaa23f30f39f32311f50008ef4eeadafb2f","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"5317dbf2323577b89370bbee3894882b89d8333176db4f7b271ddc2f036ef43c","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"21a21503ef2e095f4371044915d4bfb07a8578011cb5c713cd9f45947b0b5730","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"e78c3cd197f44832338b414d1a9bc0d194f44c74db77bd7bf830c1fff62b2690","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"c3730792dabcc166d8fd22929ef2633d49bc626875382dfcd401e8e125fb7a84","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"68bcb71bbfccb4e8648948e494366d94767ce96f36daab9c1329375cdd32a459","src/unix/linux_like/linux/gnu/b64/mod.rs":"6336065423c26b59681fd2ce77f1117ea36af13e163fdadaefd108bd8191e8c8","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"dbb8905e363ed4a2dfb984554ad9b6389d27f6a2d599ec2d80e38a6c7551a019","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"18edaa89c9746125863ff53182e0ef32cb1e1612e1ed9a2672558a9de85440e9","src/unix/linux_like/linux/gnu/b64/s390x.rs":"d9bb4e524e70d6fef49e0f77d89a92f478fd95d9a1aea32f4dc845275a7465d4","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"26fda11bdce99372c2c246e60866b56d98beb9fb49a2f6b69347ecfd03d18255","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"5a5ce7c5c92f60d8900dce63d363a38f3126aaf5be981710e172bec96ef95ac6","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"f775ac2b754f90b63053fe22afe1d19d306b5404995568d6805baa9249fb617f","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"4ba1b58468f55254717366f50fdfd3e4114fde6dc442a56681926c4d7e5b6b0d","src/unix/linux_like/linux/gnu/mod.rs":"5597b67f1cfc4e2012540a8cebf17ff139363c0835834ca8f308952ffe6e99c9","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"d6f8e72a6d67e0af6d1f7a09420f92906a52ae226a66f43268064249ce7019df","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"6255abe2ee04986832d12b7b2190589580f2a43e9bfb285b32b5747227f62727","src/unix/linux_like/linux/musl/b32/hexagon.rs":"a8811791809672be8338e6e27d1c4fcf383c2f26585be8bf9ab2923b219de032","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"b9e9ff42363ebbb884ddf6445129ec4164471df45846874fc08f5f458e659254","src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"4592dc5f1f2fe888dfef85fa862d42d168e73a2c6f4fc052b58287d0f4d4ffcd","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"a19a8decfab185af3cebd34aae4b15082e7552be573904b8c1a3f0c0e493ef34","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"798a9229d70ce235394f2dd625f6c4c1e10519a94382dc5b091952b638ae2928","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"a73035c6d9b776f13b839008e15c04c2c53455571efd06664affcb047e457112","src/unix/linux_like/linux/musl/b64/mips64.rs":"2744895451f3a777fbe54f7f2695be53310b965fd62084c9b7e9121c7fe28346","src/unix/linux_like/linux/musl/b64/mod.rs":"d18abc0aeba2e26342bf3416a4dba0836db2bb0ee013b0a39629475cf8640289","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"e5a55525b42493923956d668f978fb45e22d51deea00ce5edbfddf76ff19c741","src/unix/linux_like/linux/musl/b64/s390x.rs":"03dfec6794d93cb31a7c52b2d53a0973755168f91f8fa437cc5dbd54882c8ee7","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"0dd168f5a6881f32e5239fb312b23cf137b800d0ff323286a92c8a2c382b5456","src/unix/linux_like/linux/musl/mod.rs":"0602b1ee75b70eea30ad64234c9c6e772b6a73262ce886971781a2bcf923f9b4","src/unix/linux_like/linux/no_align.rs":"5ed04c53bf9d27da9b4d65ba7625c6ac53330162683d1b3df98950caafa3507b","src/unix/linux_like/linux/uclibc/align.rs":"9ed16138d8e439bd90930845a65eafa7ebd67366e6bf633936d44014f6e4c959","src/unix/linux_like/linux/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/arm/mod.rs":"9b691eeec0a9bf7b2abb87e09062d2c148d18e11c96ecad0edd0b74d1d0509fd","src/unix/linux_like/linux/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"18753a99b820d69e062e3ba22a63fa86577b6dcc42f740479c7be1a4c658e1be","src/unix/linux_like/linux/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/linux_like/linux/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/linux_like/linux/uclibc/mips/mod.rs":"656fbf5157ab6d06fc365a8353b138818ad5b8429ea5628ff35a3972c63a1a7c","src/unix/linux_like/linux/uclibc/mod.rs":"22f712c3e08fd8cb37e274718de1bac09966a4cd4b0f018f28737bc30940b8af","src/unix/linux_like/linux/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/linux_like/linux/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"02e21c0550a423a3f6db0a0af6a0f37cf5937feb2562a490e0ad0e09a8d9fc77","src/unix/linux_like/linux/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/unix/linux_like/mod.rs":"9f6eadebed153e31777482932dae2f3fd3471d5b5465099f98f1e2a9429922fe","src/unix/mod.rs":"0550f5ed6a8292e62781cdfcca54b0f2652dd279314d1b73db555fccfb059499","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/espidf/mod.rs":"c198cb4beccdab483be61c102da74dc51ac80f766797e33021f3110394ed5a3d","src/unix/newlib/mod.rs":"07c282da3fedf04d061c70ab918b561ba44e5d67670e0b04664505afc9c5979f","src/unix/newlib/no_align.rs":"e0743b2179495a9514bc3a4d1781e492878c4ec834ee0085d0891dd1712e82fb","src/unix/newlib/powerpc/mod.rs":"2d0f7af28b47f7a2a6c210ebd1c1f33ed8eac62e56b5af2b856de2ad3fdc5187","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"251ade5cbe9d648ba7186f58dfe7d4fd8e08be1ab9d0d51bba13e0bf3a0207d0","src/unix/solarish/compat.rs":"b07a5bfac925eb012003a459ba6bddbd3bfa9c44b3394da2ac5a602e54beae9c","src/unix/solarish/illumos.rs":"be7cf5334fc8f2c6bc1b856288e53af7f90a92bd64793eb19b60b660383e508c","src/unix/solarish/mod.rs":"a5e87e2197011ceae4d6aa1bc8a16d2e01dd39583448e6809f32ba58143baee9","src/unix/solarish/solaris.rs":"65b005453aefa9b9d4fc860fe77cfec80d8c97a51342b15daf55fc3e808bb384","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"2689e3cad6461682892fcae8a23c0c51600e4750c147dd8d7538c6c6c876b7ec","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"3800e710a40322fe0229f7665b18542dc066680c4d151e3c4f29f82202a1c294","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"3c8c7edb7cdf5d0c44af936db2a94869585c69dfabeef30571b4f4e38375767a","src/windows/mod.rs":"2b960d585c2fc0c82659cc4caeaa3268e67a8de0a0390d084629eefd39a14c8d","src/windows/msvc.rs":"ea6d87a6a9cd668261b1c043e7c36cf599e80b5d09f6e4502e85daa4797c7927","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4"},"package":"a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765"}
-\ No newline at end of file
-+{"files":{"CONTRIBUTING.md":"752eea5a703d11b485c6b5f195f51bd2c79aa5159b619ce09555c779e1fb586b","Cargo.toml":"9d8cd25bb60fc4bb42c4b034bfa26ba45a691fd7cae155dab8f8b5819fe12647","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"8228847944f1332882fbb00275b6f30e4a8aad08a13569c25d52cac012cc2a47","build.rs":"8e0e8d33cc9e7c25cde75c2b502420f943266a681024169f94084774b422681d","rustfmt.toml":"eaa2ea84fc1ba0359b77680804903e07bb38d257ab11986b95b158e460f787b2","src/fixed_width_ints.rs":"34c60f12ec5eeb90f13ec3b954427532111c2446e69617616a97aefc1086a9f1","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"975b86cbe0335d64082ca88bb24f0e3402371f6f5b33e940c4e12ce4342bb658","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"d4f7452c0fe720f3a961b918b74ec86d19cef33e6b4aac08efbbad6f6d818e09","src/macros.rs":"7844312c233a6889fa15395fe3106f6a8f6229211104a92f33ea3c9536eef763","src/psp.rs":"dd31aabd46171d474ec5828372e28588935120e7355c90c105360d8fa9264c1c","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"6a4ce300da0d2b0db04b18548286603ffe4b47d679a41cf60f1902895894aa1f","src/unix/bsd/apple/b64/aarch64/align.rs":"f0c321265dd7671f16106b84951ac7dd77ed2e65c6623cbf2d29e76531984770","src/unix/bsd/apple/b64/aarch64/mod.rs":"46d5d061c7a74cbc09cbdfb3bee9a600867bf4e04c0e4d0ca6c817e6033b32e1","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"f5e278a1af7fb358891d1c9be4eb7e815aaca0c5cb738d0c3604ba2208a856f7","src/unix/bsd/apple/b64/x86_64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/x86_64/mod.rs":"cc6878dd130c3f255418e4da74992ae9ba6a3cdb0530772de76c518077d3b12a","src/unix/bsd/apple/mod.rs":"55e2ddba00f002fac0e3ed1c43932423ea6682aaff95491542dce9562c81e217","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"8295b8bb0dfd38d2cdb4d9192cdeeb534cc6c3b208170e64615fa3e0edb3e578","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"efdfed8f750d6a6233a3a753be80bdb6e06ec9ccdfa5b9246f09aa1d39d3cffe","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"14f0bd6693967d4fedec904f7042bd51f2138cb843ec4df18c911b357417cdd2","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"6523af60c0e4937ad374003c1653e9e721f5b6f11572c747732f76522d07d034","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"b449a5914d3175e0a390bad616370f28fe59efaee3b81c38fb6e556507c2711a","src/unix/bsd/freebsdlike/freebsd/freebsd13/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"ce31af8c04d1a1b384f55f80db14b5f74c59d02c94b3b30288411c9bca5eba04","src/unix/bsd/freebsdlike/freebsd/mod.rs":"a4fc19429762fac85106180e87c4d10a61b4c07563f4e844771fcde71c14fc51","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"9ca3f82f88974e6db5569f2d76a5a3749b248a31747a6c0da5820492bdfeca42","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/unix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"6132aa0973454379674ea6cbc77e6eace1e1032dd9f38182071388a036f1bc08","src/unix/bsd/freebsdlike/mod.rs":"9dbe0fcf66f13ba27f163d9f4362c25036ff1973a3b67244bcb3e8f39c3efbfd","src/unix/bsd/mod.rs":"67e0932ebcd1605045744c3f15286204cc547019b0a2696419da1c14c61393f5","src/unix/bsd/netbsdlike/mod.rs":"ceaec69f85bbe5beaf0b2dd73e0fd2b7fa49c0ea9727dcf51415f99bd2bc4b9c","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"6b30cadcf243eb6098cad6ec869f4739570df0f356aefd826ef1c347c146685c","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"1afe5ef46b14397cdd68664b5b232e4f5b035b6db1d4cf411c899d51ebca9f30","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/mod.rs":"ac6fff797511b00659849242b997de4d9f948698b5677de928375fc84d2ac1f3","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"e59b7fd65f68f8e857eec39e0c03bac1d3af6ddc26c9ba58494336b83659bb9b","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"cb829d468fecc8dacf3f03f5808f0c265a62dc82e34a208a025a8b903027a121","src/unix/haiku/native.rs":"fd34e56a7b27591d83a980c92afefc543df9a2d4fe64c732d2b7d6aea31ac0a3","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"859814f5df89e28fd4b345db399d181e11e7ed413841b6ff703a1fcbdbf013ae","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"433c1530f602cc5ed26610c58055dde0c4ceea5e00150063b24ddc60768332a4","src/unix/linux_like/android/b32/mod.rs":"d971b98530a96f5892f98e1edc3133cf278d1b3939d77ab0a27a6323e0961715","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"8388bd3a0fcb5636bf965eee6dc95ae6860b85a2b555b387c868aa4d4e01ec89","src/unix/linux_like/android/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/mod.rs":"8fe667d2b14abc5ac8aad32e16c3da24350471d8156eaea9ab4989f73dd9f9fc","src/unix/linux_like/android/b64/mod.rs":"5d94d05d8c10a748f0b1f67a4abaf4dd8415351e14e3bc6c84f6a46c8e18874c","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"06b22dc184e85a988ab969c75cadc52b9878faeab0eb9d21215878c95fe07c19","src/unix/linux_like/android/mod.rs":"9e79edebb5c7b1b62f0e253570d02338a50f06fdb2fd4b27488e0ae50871a836","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"6ef97140ca6fb24125fdd0aacb986ef785aa21993229660d7f703f8875ebfe49","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"213e70ebed2703e14a9cf17666b21ecbf180b7bff7fa22fdbb36dbbd52df326d","src/unix/linux_like/linux/arch/generic/mod.rs":"ff1fe8fad4ea15d9bec3db25efcfcb4939190c5189f86cfa4d05825aa8c10956","src/unix/linux_like/linux/arch/mips/mod.rs":"e4a980b002105aaa057eb6568e1e2c6168ade5c00e13a31ef67e316ddffdb900","src/unix/linux_like/linux/arch/mod.rs":"466a29622e47c6c7f1500682b2eb17f5566dd81b322cd6348f0fdd355cec593a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"1789eb5b41f75c29239795124a4a7cdcf7c8d213b88cf581b2f5bda08d7cf15b","src/unix/linux_like/linux/arch/sparc/mod.rs":"ded708124ee610267d011dee31fb02d1ec697c334aa822776ec95a7ddf6fc541","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"3fed009dc9af3cc81be7087da9d2d7d1f39845e4497e290259c5cdbae25f039d","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"07adf9f4b96854062db518aaf08521fde0ad4a21a5c049efccba437bd97b2b5a","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"1cb5c0c9df3af2bbe131a91593583259fac9118931744c8435e197a394eb0462","src/unix/linux_like/linux/gnu/b32/mod.rs":"794dbcbae7dae8fd6b0b814573243197ceb532b56ef0772ad86b4b401478fcd9","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"0cd7348badb9c4f8a0db31a2503b30c456a2bfcc7a0e5919762b1e12f912c5ad","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"9c628cd97806181dc4d34b072f63fe1eb42f08108712002e0628ffe27f2fa93f","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"1bcec269a8416ccc48a384ca5765eaaa23f30f39f32311f50008ef4eeadafb2f","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"5317dbf2323577b89370bbee3894882b89d8333176db4f7b271ddc2f036ef43c","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"21a21503ef2e095f4371044915d4bfb07a8578011cb5c713cd9f45947b0b5730","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"e78c3cd197f44832338b414d1a9bc0d194f44c74db77bd7bf830c1fff62b2690","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"c3730792dabcc166d8fd22929ef2633d49bc626875382dfcd401e8e125fb7a84","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"68bcb71bbfccb4e8648948e494366d94767ce96f36daab9c1329375cdd32a459","src/unix/linux_like/linux/gnu/b64/mod.rs":"6336065423c26b59681fd2ce77f1117ea36af13e163fdadaefd108bd8191e8c8","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"dbb8905e363ed4a2dfb984554ad9b6389d27f6a2d599ec2d80e38a6c7551a019","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"18edaa89c9746125863ff53182e0ef32cb1e1612e1ed9a2672558a9de85440e9","src/unix/linux_like/linux/gnu/b64/s390x.rs":"d9bb4e524e70d6fef49e0f77d89a92f478fd95d9a1aea32f4dc845275a7465d4","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"26fda11bdce99372c2c246e60866b56d98beb9fb49a2f6b69347ecfd03d18255","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"5a5ce7c5c92f60d8900dce63d363a38f3126aaf5be981710e172bec96ef95ac6","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"f775ac2b754f90b63053fe22afe1d19d306b5404995568d6805baa9249fb617f","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"4ba1b58468f55254717366f50fdfd3e4114fde6dc442a56681926c4d7e5b6b0d","src/unix/linux_like/linux/gnu/mod.rs":"5597b67f1cfc4e2012540a8cebf17ff139363c0835834ca8f308952ffe6e99c9","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"d6f8e72a6d67e0af6d1f7a09420f92906a52ae226a66f43268064249ce7019df","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"6255abe2ee04986832d12b7b2190589580f2a43e9bfb285b32b5747227f62727","src/unix/linux_like/linux/musl/b32/hexagon.rs":"a8811791809672be8338e6e27d1c4fcf383c2f26585be8bf9ab2923b219de032","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"b9e9ff42363ebbb884ddf6445129ec4164471df45846874fc08f5f458e659254","src/unix/linux_like/linux/musl/b32/mod.rs":"8ede3985e6243882814ce91e8ce543e7edbafc0cee5932816072b6f14207a671","src/unix/linux_like/linux/musl/b32/powerpc.rs":"4592dc5f1f2fe888dfef85fa862d42d168e73a2c6f4fc052b58287d0f4d4ffcd","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"a19a8decfab185af3cebd34aae4b15082e7552be573904b8c1a3f0c0e493ef34","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"798a9229d70ce235394f2dd625f6c4c1e10519a94382dc5b091952b638ae2928","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"a73035c6d9b776f13b839008e15c04c2c53455571efd06664affcb047e457112","src/unix/linux_like/linux/musl/b64/mips64.rs":"2744895451f3a777fbe54f7f2695be53310b965fd62084c9b7e9121c7fe28346","src/unix/linux_like/linux/musl/b64/mod.rs":"d847206d9f2d594c8febe780a938cdccf40d985dafc11e90f235947735a09bac","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"e5a55525b42493923956d668f978fb45e22d51deea00ce5edbfddf76ff19c741","src/unix/linux_like/linux/musl/b64/s390x.rs":"03dfec6794d93cb31a7c52b2d53a0973755168f91f8fa437cc5dbd54882c8ee7","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"0dd168f5a6881f32e5239fb312b23cf137b800d0ff323286a92c8a2c382b5456","src/unix/linux_like/linux/musl/mod.rs":"b69394bbcab5c452d3d3c04541a35702b9394f52cf63628449a5a2b61059517a","src/unix/linux_like/linux/no_align.rs":"5ed04c53bf9d27da9b4d65ba7625c6ac53330162683d1b3df98950caafa3507b","src/unix/linux_like/linux/uclibc/align.rs":"9ed16138d8e439bd90930845a65eafa7ebd67366e6bf633936d44014f6e4c959","src/unix/linux_like/linux/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/arm/mod.rs":"9b691eeec0a9bf7b2abb87e09062d2c148d18e11c96ecad0edd0b74d1d0509fd","src/unix/linux_like/linux/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"18753a99b820d69e062e3ba22a63fa86577b6dcc42f740479c7be1a4c658e1be","src/unix/linux_like/linux/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"e3085ba56cfbc528d7c3c55065880603238c333b6047ef51c58177508a487fcd","src/unix/linux_like/linux/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/linux_like/linux/uclibc/mips/mod.rs":"656fbf5157ab6d06fc365a8353b138818ad5b8429ea5628ff35a3972c63a1a7c","src/unix/linux_like/linux/uclibc/mod.rs":"22f712c3e08fd8cb37e274718de1bac09966a4cd4b0f018f28737bc30940b8af","src/unix/linux_like/linux/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/linux_like/linux/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"02e21c0550a423a3f6db0a0af6a0f37cf5937feb2562a490e0ad0e09a8d9fc77","src/unix/linux_like/linux/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/unix/linux_like/mod.rs":"9f6eadebed153e31777482932dae2f3fd3471d5b5465099f98f1e2a9429922fe","src/unix/mod.rs":"0550f5ed6a8292e62781cdfcca54b0f2652dd279314d1b73db555fccfb059499","src/unix/newlib/aarch64/mod.rs":"bb269c1468a9676442554600e87417079a787fe6220dfc23b3109639259e8710","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"c71be856bfd7f576b2db28af9f680211cbe6c1cac7d537bbc8020b39591af07c","src/unix/newlib/espidf/mod.rs":"c198cb4beccdab483be61c102da74dc51ac80f766797e33021f3110394ed5a3d","src/unix/newlib/mod.rs":"07c282da3fedf04d061c70ab918b561ba44e5d67670e0b04664505afc9c5979f","src/unix/newlib/no_align.rs":"e0743b2179495a9514bc3a4d1781e492878c4ec834ee0085d0891dd1712e82fb","src/unix/newlib/powerpc/mod.rs":"2d0f7af28b47f7a2a6c210ebd1c1f33ed8eac62e56b5af2b856de2ad3fdc5187","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"251ade5cbe9d648ba7186f58dfe7d4fd8e08be1ab9d0d51bba13e0bf3a0207d0","src/unix/solarish/compat.rs":"b07a5bfac925eb012003a459ba6bddbd3bfa9c44b3394da2ac5a602e54beae9c","src/unix/solarish/illumos.rs":"be7cf5334fc8f2c6bc1b856288e53af7f90a92bd64793eb19b60b660383e508c","src/unix/solarish/mod.rs":"a5e87e2197011ceae4d6aa1bc8a16d2e01dd39583448e6809f32ba58143baee9","src/unix/solarish/solaris.rs":"65b005453aefa9b9d4fc860fe77cfec80d8c97a51342b15daf55fc3e808bb384","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"2689e3cad6461682892fcae8a23c0c51600e4750c147dd8d7538c6c6c876b7ec","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"3800e710a40322fe0229f7665b18542dc066680c4d151e3c4f29f82202a1c294","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"3c8c7edb7cdf5d0c44af936db2a94869585c69dfabeef30571b4f4e38375767a","src/windows/mod.rs":"2b960d585c2fc0c82659cc4caeaa3268e67a8de0a0390d084629eefd39a14c8d","src/windows/msvc.rs":"ea6d87a6a9cd668261b1c043e7c36cf599e80b5d09f6e4502e85daa4797c7927","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4"},"package":"a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765"}
diff --git a/poky/meta/recipes-devtools/rust/libstd-rs_1.56.0.bb b/poky/meta/recipes-devtools/rust/libstd-rs_1.56.0.bb
deleted file mode 100644
index e50665e..0000000
--- a/poky/meta/recipes-devtools/rust/libstd-rs_1.56.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require rust-source.inc
-require libstd-rs.inc
-
-SRC_URI += " \
-    file://0005-Add-base-definitions-for-riscv64-musl-libc.patch;patchdir=../../ \
-    file://0006-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch;patchdir=../../ \
-    file://0007-FIXUP-Correct-definitions-to-match-musl.patch;patchdir=../../ \
-    file://0008-Update-checksums-for-modified-files-for-rust.patch;patchdir=../../ \
-"
-# libstd moved from src/libstd to library/std in 1.47+
-S = "${RUSTSRC}/library/std"
diff --git a/poky/meta/recipes-devtools/rust/libstd-rs_1.58.0.bb b/poky/meta/recipes-devtools/rust/libstd-rs_1.58.0.bb
new file mode 100644
index 0000000..141fea1
--- /dev/null
+++ b/poky/meta/recipes-devtools/rust/libstd-rs_1.58.0.bb
@@ -0,0 +1,12 @@
+require rust-source.inc
+require libstd-rs.inc
+
+SRC_URI += " \
+    file://0001-Add-base-definitions-for-riscv64-musl.patch;patchdir=../../ \
+    file://0002-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set.patch;patchdir=../../ \
+    file://0003-FIXUP-Correct-definitions-to-match-musl.patch;patchdir=../../ \
+    file://0004-Update-checksums-for-modified-files-for-rust.patch;patchdir=../../ \
+    "
+
+# libstd moved from src/libstd to library/std in 1.47+
+S = "${RUSTSRC}/library/std"
diff --git a/poky/meta/recipes-devtools/rust/rust-cross-canadian_1.56.0.bb b/poky/meta/recipes-devtools/rust/rust-cross-canadian_1.58.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/rust/rust-cross-canadian_1.56.0.bb
rename to poky/meta/recipes-devtools/rust/rust-cross-canadian_1.58.0.bb
diff --git a/poky/meta/recipes-devtools/rust/rust-cross.inc b/poky/meta/recipes-devtools/rust/rust-cross.inc
index bb625f4..a77f7d5 100644
--- a/poky/meta/recipes-devtools/rust/rust-cross.inc
+++ b/poky/meta/recipes-devtools/rust/rust-cross.inc
@@ -34,7 +34,7 @@
 DEPENDS += "rust-native"
 
 PROVIDES = "virtual/${TARGET_PREFIX}rust"
-PN = "rust-cross-${TARGET_ARCH}-${TCLIBC}"
+PN = "rust-cross-${TUNE_PKGARCH}-${TCLIBC}"
 
 # In the cross compilation case, rustc doesn't seem to get the rpath quite
 # right. It manages to include '../../lib/${TARGET_PREFIX}', but doesn't
diff --git a/poky/meta/recipes-devtools/rust/rust-cross_1.56.0.bb b/poky/meta/recipes-devtools/rust/rust-cross_1.58.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/rust/rust-cross_1.56.0.bb
rename to poky/meta/recipes-devtools/rust/rust-cross_1.58.0.bb
diff --git a/poky/meta/recipes-devtools/rust/rust-llvm.inc b/poky/meta/recipes-devtools/rust/rust-llvm.inc
index 0f8fb78..5c2ccda 100644
--- a/poky/meta/recipes-devtools/rust/rust-llvm.inc
+++ b/poky/meta/recipes-devtools/rust/rust-llvm.inc
@@ -2,7 +2,8 @@
 LICENSE ?= "Apache-2.0-with-LLVM-exception"
 HOMEPAGE = "http://www.rust-lang.org"
 
-SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2"
+SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
+            file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2"
 
 S = "${RUSTSRC}/src/llvm-project/llvm"
 
diff --git a/poky/meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/poky/meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch
new file mode 100644
index 0000000..48af6fc
--- /dev/null
+++ b/poky/meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch
@@ -0,0 +1,31 @@
+From 86940d87026432683fb6741cd8a34d3b9b18e40d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 27 Nov 2020 10:11:08 +0000
+Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well
+
+Otherwise, there are instances which are identical in
+every other field and therefore sort non-reproducibly
+(which breaks binary and source reproducibiliy).
+
+Upstream-Status: Submitted [https://reviews.llvm.org/D97477]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+index ccf0959389b..1f801e83b7d 100644
+--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
++++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+@@ -359,7 +359,10 @@ public:
+     // name of a class shouldn't be significant. However, some of the backends
+     // accidentally rely on this behaviour, so it will have to stay like this
+     // until they are fixed.
+-    return ValueName < RHS.ValueName;
++    if (ValueName != RHS.ValueName)
++        return ValueName < RHS.ValueName;
++    // All else being equal, we should sort by name, for source and binary reproducibility
++    return Name < RHS.Name;
+   }
+ };
+ 
diff --git a/poky/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch b/poky/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch
index 943c211..9be2667 100644
--- a/poky/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch
+++ b/poky/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch
@@ -8,6 +8,7 @@
 than from the native sysroot. Thus provide an env override for calling
 llvm-config from a target sysroot.
 
+Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Martin Kelly <mkelly@xevo.com>
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
diff --git a/poky/meta/recipes-devtools/rust/rust-llvm_1.56.0.bb b/poky/meta/recipes-devtools/rust/rust-llvm_1.58.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/rust/rust-llvm_1.56.0.bb
rename to poky/meta/recipes-devtools/rust/rust-llvm_1.58.0.bb
diff --git a/poky/meta/recipes-devtools/rust/rust-snapshot.inc b/poky/meta/recipes-devtools/rust/rust-snapshot.inc
index 18e98d7..74b5582 100644
--- a/poky/meta/recipes-devtools/rust/rust-snapshot.inc
+++ b/poky/meta/recipes-devtools/rust/rust-snapshot.inc
@@ -2,17 +2,17 @@
 ## snapshot info is taken from rust/src/stage0.txt
 ## TODO: find a way to add additional SRC_URIs based on the contents of an
 ##       earlier SRC_URI.
-RS_VERSION = "1.56.0"
-CARGO_VERSION = "1.56.0"
+RS_VERSION = "1.57.0"
+CARGO_VERSION = "1.57.0"
 
 # TODO: Add hashes for other architecture toolchains as well. Make a script?
-SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "f693e4f41a959d62528e0043b0b010c4815fb9f5887267ae34ff8b860f8ec4ae"
-SRC_URI[rustc-snapshot-x86_64.sha256sum] = "2a5f919e2036496c02ab4707a5eb8bd8a4ce6ea589e01cb39f25d213a26dcdfe"
-SRC_URI[cargo-snapshot-x86_64.sha256sum] = "f972125810d2db7df2e0af56d9f6a3dcdacc52d983bdf0ca17309b45fc44209b"
+SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
+SRC_URI[rustc-snapshot-x86_64.sha256sum] = "c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86"
+SRC_URI[cargo-snapshot-x86_64.sha256sum] = "ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
 
-SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "3cd1c69c618e5efaf578a156c2a950c93964f9b47ba4d705d5700bdc64880231"
-SRC_URI[rustc-snapshot-aarch64.sha256sum] = "0d2491a59f697d2ea52fc429b8d4665acb5f79b0e16703f3604b61b8aa68d1c4"
-SRC_URI[cargo-snapshot-aarch64.sha256sum] = "9d97cd655845572846c058577f68ea74b6111f8ea7649db308f786475f764a09"
+SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "3618da916a0f92f241cf1d67d04bb57835b303cf2047b57dc2f2487b89a4fc1f"
+SRC_URI[rustc-snapshot-aarch64.sha256sum] = "f26811e48d03c56c125de03d389e1ae7c6df36990953c1670c6a5676bc12d4cb"
+SRC_URI[cargo-snapshot-aarch64.sha256sum] = "6d11cd94618d80cda273eeeae7285980445f61a49ebacc616777b482a41cbf3f"
 
 SRC_URI += " \
     https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
diff --git a/poky/meta/recipes-devtools/rust/rust-source.inc b/poky/meta/recipes-devtools/rust/rust-source.inc
index 326a592..63ba02b 100644
--- a/poky/meta/recipes-devtools/rust/rust-source.inc
+++ b/poky/meta/recipes-devtools/rust/rust-source.inc
@@ -1,5 +1,5 @@
 SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust"
-SRC_URI[rust.sha256sum] = "f13468889833c88e744ad579c5d8fbb7ecb53216159b54481a90e5dcdaa9e320"
+SRC_URI[rust.sha256sum] = "37dce222b82a438e550ccd5e45ca9bad1c57aa7acc7adfec6a897c4ff94b6485"
 
 RUSTSRC = "${WORKDIR}/rustc-${PV}-src"
 
diff --git a/poky/meta/recipes-devtools/rust/rust-tools-cross-canadian_1.56.0.bb b/poky/meta/recipes-devtools/rust/rust-tools-cross-canadian_1.58.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/rust/rust-tools-cross-canadian_1.56.0.bb
rename to poky/meta/recipes-devtools/rust/rust-tools-cross-canadian_1.58.0.bb
diff --git a/poky/meta/recipes-devtools/rust/rust_1.56.0.bb b/poky/meta/recipes-devtools/rust/rust_1.58.0.bb
similarity index 99%
rename from poky/meta/recipes-devtools/rust/rust_1.56.0.bb
rename to poky/meta/recipes-devtools/rust/rust_1.58.0.bb
index 036fb43..b505ad4 100644
--- a/poky/meta/recipes-devtools/rust/rust_1.56.0.bb
+++ b/poky/meta/recipes-devtools/rust/rust_1.58.0.bb
@@ -18,3 +18,4 @@
     if not pn.endswith("-native"):
         raise bb.parse.SkipRecipe("Rust recipe doesn't work for target builds at this time. Fixes welcome.")
 }
+
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-1.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-1.patch
new file mode 100644
index 0000000..d01b5c6
--- /dev/null
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-1.patch
@@ -0,0 +1,135 @@
+The commit is required by the fix for CVE-2021-41072.
+
+Upstream-Status: Backport [https://github.com/plougher/squashfs-tools/commit/80b8441]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From 80b8441a37fcf8bf07dacf24d9d6c6459a0f6e36 Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <phillip@squashfs.org.uk>
+Date: Sun, 12 Sep 2021 19:58:19 +0100
+Subject: [PATCH] unsquashfs: use squashfs_closedir() to delete directory
+
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+---
+ squashfs-tools/unsquash-1.c    |  3 +--
+ squashfs-tools/unsquash-1234.c | 11 +++++++++--
+ squashfs-tools/unsquash-2.c    |  3 +--
+ squashfs-tools/unsquash-3.c    |  3 +--
+ squashfs-tools/unsquash-4.c    |  3 +--
+ squashfs-tools/unsquashfs.c    |  7 -------
+ squashfs-tools/unsquashfs.h    |  1 +
+ 7 files changed, 14 insertions(+), 17 deletions(-)
+
+diff --git a/squashfs-tools/unsquash-1.c b/squashfs-tools/unsquash-1.c
+index acba821..7598499 100644
+--- a/squashfs-tools/unsquash-1.c
++++ b/squashfs-tools/unsquash-1.c
+@@ -373,8 +373,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-1234.c b/squashfs-tools/unsquash-1234.c
+index c2d4f42..0c8dfbb 100644
+--- a/squashfs-tools/unsquash-1234.c
++++ b/squashfs-tools/unsquash-1234.c
+@@ -25,8 +25,8 @@
+  * unsquash-4.
+  */
+ 
+-#define TRUE 1
+-#define FALSE 0
++#include "unsquashfs.h"
++
+ /*
+  * Check name for validity, name should not
+  *  - be ".", "./", or
+@@ -56,3 +56,10 @@ int check_name(char *name, int size)
+ 
+ 	return TRUE;
+ }
++
++
++void squashfs_closedir(struct dir *dir)
++{
++	free(dir->dirs);
++	free(dir);
++}
+diff --git a/squashfs-tools/unsquash-2.c b/squashfs-tools/unsquash-2.c
+index 0746b3d..86f62ba 100644
+--- a/squashfs-tools/unsquash-2.c
++++ b/squashfs-tools/unsquash-2.c
+@@ -465,8 +465,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-3.c b/squashfs-tools/unsquash-3.c
+index 094caaa..c04aa9e 100644
+--- a/squashfs-tools/unsquash-3.c
++++ b/squashfs-tools/unsquash-3.c
+@@ -499,8 +499,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index 3a1b9e1..ff62dcc 100644
+--- a/squashfs-tools/unsquash-4.c
++++ b/squashfs-tools/unsquash-4.c
+@@ -436,8 +436,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	return dir;
+ 
+ corrupted:
+-	free(dir->dirs);
+-	free(dir);
++	squashfs_closedir(dir);
+ 	return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 7b590bd..04be53c 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -1350,13 +1350,6 @@ unsigned int *offset, unsigned int *type)
+ }
+ 
+ 
+-void squashfs_closedir(struct dir *dir)
+-{
+-	free(dir->dirs);
+-	free(dir);
+-}
+-
+-
+ char *get_component(char *target, char **targname)
+ {
+ 	char *start;
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index 2e9201c..5ecb2ab 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -291,4 +291,5 @@ extern long long *alloc_index_table(int);
+ 
+ /* unsquash-1234.c */
+ extern int check_name(char *, int);
++extern void squashfs_closedir(struct dir *);
+ #endif
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-2.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-2.patch
new file mode 100644
index 0000000..6b230b3
--- /dev/null
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-2.patch
@@ -0,0 +1,108 @@
+The commit is required by the fix for CVE-2021-41072.
+
+Upstream-Status: Backport [https://github.com/plougher/squashfs-tools/commit/1993a4e]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From 1993a4e7aeda04962bf26e84c15fba8b58837e10 Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <phillip@squashfs.org.uk>
+Date: Sun, 12 Sep 2021 20:09:13 +0100
+Subject: [PATCH] unsquashfs: dynamically allocate name
+
+Dynamically allocate name rather than store it
+directly in structure.
+
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+---
+ squashfs-tools/unsquash-1.c    | 2 +-
+ squashfs-tools/unsquash-1234.c | 5 +++++
+ squashfs-tools/unsquash-2.c    | 2 +-
+ squashfs-tools/unsquash-3.c    | 2 +-
+ squashfs-tools/unsquash-4.c    | 2 +-
+ squashfs-tools/unsquashfs.h    | 2 +-
+ 6 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/squashfs-tools/unsquash-1.c b/squashfs-tools/unsquash-1.c
+index 7598499..d0121c6 100644
+--- a/squashfs-tools/unsquash-1.c
++++ b/squashfs-tools/unsquash-1.c
+@@ -360,7 +360,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				dir->dirs = new_dir;
+ 			}
+ 
+-			strcpy(dir->dirs[dir->dir_count].name, dire->name);
++			dir->dirs[dir->dir_count].name = strdup(dire->name);
+ 			dir->dirs[dir->dir_count].start_block =
+ 				dirh.start_block;
+ 			dir->dirs[dir->dir_count].offset = dire->offset;
+diff --git a/squashfs-tools/unsquash-1234.c b/squashfs-tools/unsquash-1234.c
+index 0c8dfbb..ac46d9d 100644
+--- a/squashfs-tools/unsquash-1234.c
++++ b/squashfs-tools/unsquash-1234.c
+@@ -60,6 +60,11 @@ int check_name(char *name, int size)
+ 
+ void squashfs_closedir(struct dir *dir)
+ {
++	int i;
++
++	for(i = 0; i < dir->dir_count; i++)
++		free(dir->dirs[i].name);
++
+ 	free(dir->dirs);
+ 	free(dir);
+ }
+diff --git a/squashfs-tools/unsquash-2.c b/squashfs-tools/unsquash-2.c
+index 86f62ba..e847980 100644
+--- a/squashfs-tools/unsquash-2.c
++++ b/squashfs-tools/unsquash-2.c
+@@ -452,7 +452,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				dir->dirs = new_dir;
+ 			}
+ 
+-			strcpy(dir->dirs[dir->dir_count].name, dire->name);
++			dir->dirs[dir->dir_count].name = strdup(dire->name);
+ 			dir->dirs[dir->dir_count].start_block =
+ 				dirh.start_block;
+ 			dir->dirs[dir->dir_count].offset = dire->offset;
+diff --git a/squashfs-tools/unsquash-3.c b/squashfs-tools/unsquash-3.c
+index c04aa9e..8223f27 100644
+--- a/squashfs-tools/unsquash-3.c
++++ b/squashfs-tools/unsquash-3.c
+@@ -486,7 +486,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				dir->dirs = new_dir;
+ 			}
+ 
+-			strcpy(dir->dirs[dir->dir_count].name, dire->name);
++			dir->dirs[dir->dir_count].name = strdup(dire->name);
+ 			dir->dirs[dir->dir_count].start_block =
+ 				dirh.start_block;
+ 			dir->dirs[dir->dir_count].offset = dire->offset;
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index ff62dcc..1e199a7 100644
+--- a/squashfs-tools/unsquash-4.c
++++ b/squashfs-tools/unsquash-4.c
+@@ -423,7 +423,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				dir->dirs = new_dir;
+ 			}
+ 
+-			strcpy(dir->dirs[dir->dir_count].name, dire->name);
++			dir->dirs[dir->dir_count].name = strdup(dire->name);
+ 			dir->dirs[dir->dir_count].start_block =
+ 				dirh.start_block;
+ 			dir->dirs[dir->dir_count].offset = dire->offset;
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index 5ecb2ab..583fbe4 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -164,7 +164,7 @@ struct queue {
+ #define DIR_ENT_SIZE	16
+ 
+ struct dir_ent	{
+-	char		name[SQUASHFS_NAME_LEN + 1];
++	char		*name;
+ 	unsigned int	start_block;
+ 	unsigned int	offset;
+ 	unsigned int	type;
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-3.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-3.patch
new file mode 100644
index 0000000..5d5df6f
--- /dev/null
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-3.patch
@@ -0,0 +1,326 @@
+The commit is required by the fix for CVE-2021-41072.
+
+Upstream-Status: Backport [https://github.com/plougher/squashfs-tools/commit/9938154]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From 9938154174756ee48a94ea0b076397a2944b028d Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <phillip@squashfs.org.uk>
+Date: Sun, 12 Sep 2021 22:58:11 +0100
+Subject: [PATCH] unsquashfs: use linked list to store directory names
+
+This should bring higher performance, and it allows sorting
+if necessary (1.x and 2.0 filesystems).
+
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+---
+ squashfs-tools/unsquash-1.c    | 30 +++++++++++++++---------------
+ squashfs-tools/unsquash-1234.c | 12 ++++++++----
+ squashfs-tools/unsquash-2.c    | 29 +++++++++++++++--------------
+ squashfs-tools/unsquash-3.c    | 29 +++++++++++++++--------------
+ squashfs-tools/unsquash-4.c    | 29 +++++++++++++++--------------
+ squashfs-tools/unsquashfs.c    | 16 ++++++++++------
+ squashfs-tools/unsquashfs.h    |  3 ++-
+ 7 files changed, 80 insertions(+), 68 deletions(-)
+
+diff --git a/squashfs-tools/unsquash-1.c b/squashfs-tools/unsquash-1.c
+index d0121c6..b604434 100644
+--- a/squashfs-tools/unsquash-1.c
++++ b/squashfs-tools/unsquash-1.c
+@@ -254,7 +254,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	long long start;
+ 	int bytes = 0;
+ 	int dir_count, size, res;
+-	struct dir_ent *new_dir;
++	struct dir_ent *ent, *cur_ent = NULL;
+ 	struct dir *dir;
+ 
+ 	TRACE("squashfs_opendir: inode start block %d, offset %d\n",
+@@ -267,7 +267,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		MEM_ERROR();
+ 
+ 	dir->dir_count = 0;
+-	dir->cur_entry = 0;
++	dir->cur_entry = NULL;
+ 	dir->mode = (*i)->mode;
+ 	dir->uid = (*i)->uid;
+ 	dir->guid = (*i)->gid;
+@@ -351,20 +351,20 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				"%d:%d, type %d\n", dire->name,
+ 				dirh.start_block, dire->offset, dire->type);
+ 
+-			if((dir->dir_count % DIR_ENT_SIZE) == 0) {
+-				new_dir = realloc(dir->dirs, (dir->dir_count +
+-					DIR_ENT_SIZE) * sizeof(struct dir_ent));
+-				if(new_dir == NULL)
+-					MEM_ERROR();
+-
+-				dir->dirs = new_dir;
+-			}
++			ent = malloc(sizeof(struct dir_ent));
++			if(ent == NULL)
++				MEM_ERROR();
+ 
+-			dir->dirs[dir->dir_count].name = strdup(dire->name);
+-			dir->dirs[dir->dir_count].start_block =
+-				dirh.start_block;
+-			dir->dirs[dir->dir_count].offset = dire->offset;
+-			dir->dirs[dir->dir_count].type = dire->type;
++			ent->name = strdup(dire->name);
++			ent->start_block = dirh.start_block;
++			ent->offset = dire->offset;
++			ent->type = dire->type;
++			ent->next = NULL;
++			if(cur_ent == NULL)
++				dir->dirs = ent;
++			else
++				cur_ent->next = ent;
++			cur_ent = ent;
+ 			dir->dir_count ++;
+ 			bytes += dire->size + 1;
+ 		}
+diff --git a/squashfs-tools/unsquash-1234.c b/squashfs-tools/unsquash-1234.c
+index ac46d9d..e389f8d 100644
+--- a/squashfs-tools/unsquash-1234.c
++++ b/squashfs-tools/unsquash-1234.c
+@@ -60,11 +60,15 @@ int check_name(char *name, int size)
+ 
+ void squashfs_closedir(struct dir *dir)
+ {
+-	int i;
++	struct dir_ent *ent = dir->dirs;
+ 
+-	for(i = 0; i < dir->dir_count; i++)
+-		free(dir->dirs[i].name);
++	while(ent) {
++		struct dir_ent *tmp = ent;
++
++		ent = ent->next;
++		free(tmp->name);
++		free(tmp);
++	}
+ 
+-	free(dir->dirs);
+ 	free(dir);
+ }
+diff --git a/squashfs-tools/unsquash-2.c b/squashfs-tools/unsquash-2.c
+index e847980..956f96f 100644
+--- a/squashfs-tools/unsquash-2.c
++++ b/squashfs-tools/unsquash-2.c
+@@ -347,7 +347,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	long long start;
+ 	int bytes = 0;
+ 	int dir_count, size, res;
+-	struct dir_ent *new_dir;
++	struct dir_ent *ent, *cur_ent = NULL;
+ 	struct dir *dir;
+ 
+ 	TRACE("squashfs_opendir: inode start block %d, offset %d\n",
+@@ -360,7 +360,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		MEM_ERROR();
+ 
+ 	dir->dir_count = 0;
+-	dir->cur_entry = 0;
++	dir->cur_entry = NULL;
+ 	dir->mode = (*i)->mode;
+ 	dir->uid = (*i)->uid;
+ 	dir->guid = (*i)->gid;
+@@ -444,19 +444,20 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				"%d:%d, type %d\n", dire->name,
+ 				dirh.start_block, dire->offset, dire->type);
+ 
+-			if((dir->dir_count % DIR_ENT_SIZE) == 0) {
+-				new_dir = realloc(dir->dirs, (dir->dir_count +
+-					DIR_ENT_SIZE) * sizeof(struct dir_ent));
+-				if(new_dir == NULL)
+-					MEM_ERROR();
+-				dir->dirs = new_dir;
+-			}
++			ent = malloc(sizeof(struct dir_ent));
++			if(ent == NULL)
++				MEM_ERROR();
+ 
+-			dir->dirs[dir->dir_count].name = strdup(dire->name);
+-			dir->dirs[dir->dir_count].start_block =
+-				dirh.start_block;
+-			dir->dirs[dir->dir_count].offset = dire->offset;
+-			dir->dirs[dir->dir_count].type = dire->type;
++			ent->name = strdup(dire->name);
++			ent->start_block = dirh.start_block;
++			ent->offset = dire->offset;
++			ent->type = dire->type;
++			ent->next = NULL;
++			if(cur_ent == NULL)
++				dir->dirs = ent;
++			else
++				cur_ent->next = ent;
++			cur_ent = ent;
+ 			dir->dir_count ++;
+ 			bytes += dire->size + 1;
+ 		}
+diff --git a/squashfs-tools/unsquash-3.c b/squashfs-tools/unsquash-3.c
+index 8223f27..835a574 100644
+--- a/squashfs-tools/unsquash-3.c
++++ b/squashfs-tools/unsquash-3.c
+@@ -381,7 +381,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	long long start;
+ 	int bytes = 0;
+ 	int dir_count, size, res;
+-	struct dir_ent *new_dir;
++	struct dir_ent *ent, *cur_ent = NULL;
+ 	struct dir *dir;
+ 
+ 	TRACE("squashfs_opendir: inode start block %d, offset %d\n",
+@@ -394,7 +394,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		MEM_ERROR();
+ 
+ 	dir->dir_count = 0;
+-	dir->cur_entry = 0;
++	dir->cur_entry = NULL;
+ 	dir->mode = (*i)->mode;
+ 	dir->uid = (*i)->uid;
+ 	dir->guid = (*i)->gid;
+@@ -478,19 +478,20 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				"%d:%d, type %d\n", dire->name,
+ 				dirh.start_block, dire->offset, dire->type);
+ 
+-			if((dir->dir_count % DIR_ENT_SIZE) == 0) {
+-				new_dir = realloc(dir->dirs, (dir->dir_count +
+-					DIR_ENT_SIZE) * sizeof(struct dir_ent));
+-				if(new_dir == NULL)
+-					MEM_ERROR();
+-				dir->dirs = new_dir;
+-			}
++			ent = malloc(sizeof(struct dir_ent));
++			if(ent == NULL)
++				MEM_ERROR();
+ 
+-			dir->dirs[dir->dir_count].name = strdup(dire->name);
+-			dir->dirs[dir->dir_count].start_block =
+-				dirh.start_block;
+-			dir->dirs[dir->dir_count].offset = dire->offset;
+-			dir->dirs[dir->dir_count].type = dire->type;
++			ent->name = strdup(dire->name);
++			ent->start_block = dirh.start_block;
++			ent->offset = dire->offset;
++			ent->type = dire->type;
++			ent->next = NULL;
++			if(cur_ent == NULL)
++				dir->dirs = ent;
++			else
++				cur_ent->next = ent;
++			cur_ent = ent;
+ 			dir->dir_count ++;
+ 			bytes += dire->size + 1;
+ 		}
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index 1e199a7..694783d 100644
+--- a/squashfs-tools/unsquash-4.c
++++ b/squashfs-tools/unsquash-4.c
+@@ -331,7 +331,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 	struct squashfs_dir_entry *dire = (struct squashfs_dir_entry *) buffer;
+ 	long long start;
+ 	int bytes = 0, dir_count, size, res;
+-	struct dir_ent *new_dir;
++	struct dir_ent *ent, *cur_ent = NULL;
+ 	struct dir *dir;
+ 
+ 	TRACE("squashfs_opendir: inode start block %d, offset %d\n",
+@@ -344,7 +344,7 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		MEM_ERROR();
+ 
+ 	dir->dir_count = 0;
+-	dir->cur_entry = 0;
++	dir->cur_entry = NULL;
+ 	dir->mode = (*i)->mode;
+ 	dir->uid = (*i)->uid;
+ 	dir->guid = (*i)->gid;
+@@ -415,19 +415,20 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 				"%d:%d, type %d\n", dire->name,
+ 				dirh.start_block, dire->offset, dire->type);
+ 
+-			if((dir->dir_count % DIR_ENT_SIZE) == 0) {
+-				new_dir = realloc(dir->dirs, (dir->dir_count +
+-					DIR_ENT_SIZE) * sizeof(struct dir_ent));
+-				if(new_dir == NULL)
+-					MEM_ERROR();
+-				dir->dirs = new_dir;
+-			}
++			ent = malloc(sizeof(struct dir_ent));
++			if(ent == NULL)
++				MEM_ERROR();
+ 
+-			dir->dirs[dir->dir_count].name = strdup(dire->name);
+-			dir->dirs[dir->dir_count].start_block =
+-				dirh.start_block;
+-			dir->dirs[dir->dir_count].offset = dire->offset;
+-			dir->dirs[dir->dir_count].type = dire->type;
++			ent->name = strdup(dire->name);
++			ent->start_block = dirh.start_block;
++			ent->offset = dire->offset;
++			ent->type = dire->type;
++			ent->next = NULL;
++			if(cur_ent == NULL)
++				dir->dirs = ent;
++			else
++				cur_ent->next = ent;
++			cur_ent = ent;
+ 			dir->dir_count ++;
+ 			bytes += dire->size + 1;
+ 		}
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 04be53c..fee28ec 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -1337,14 +1337,18 @@ failed:
+ int squashfs_readdir(struct dir *dir, char **name, unsigned int *start_block,
+ unsigned int *offset, unsigned int *type)
+ {
+-	if(dir->cur_entry == dir->dir_count)
++	if(dir->cur_entry == NULL)
++		dir->cur_entry = dir->dirs;
++	else
++		dir->cur_entry = dir->cur_entry->next;
++
++	if(dir->cur_entry == NULL)
+ 		return FALSE;
+ 
+-	*name = dir->dirs[dir->cur_entry].name;
+-	*start_block = dir->dirs[dir->cur_entry].start_block;
+-	*offset = dir->dirs[dir->cur_entry].offset;
+-	*type = dir->dirs[dir->cur_entry].type;
+-	dir->cur_entry ++;
++	*name = dir->cur_entry->name;
++	*start_block = dir->cur_entry->start_block;
++	*offset = dir->cur_entry->offset;
++	*type = dir->cur_entry->type;
+ 
+ 	return TRUE;
+ }
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index 583fbe4..f8cf78c 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -168,17 +168,18 @@ struct dir_ent	{
+ 	unsigned int	start_block;
+ 	unsigned int	offset;
+ 	unsigned int	type;
++	struct dir_ent	*next;
+ };
+ 
+ struct dir {
+ 	int		dir_count;
+-	int 		cur_entry;
+ 	unsigned int	mode;
+ 	uid_t		uid;
+ 	gid_t		guid;
+ 	unsigned int	mtime;
+ 	unsigned int	xattr;
+ 	struct dir_ent	*dirs;
++	struct dir_ent	*cur_entry;
+ };
+ 
+ struct file_entry {
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch
new file mode 100644
index 0000000..f807af6
--- /dev/null
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch
@@ -0,0 +1,329 @@
+CVE: CVE-2021-41072
+Upstream-Status: Backport [https://github.com/plougher/squashfs-tools/commit/e048580]
+
+Update on 20211109:
+Squash a follow-up fix for CVE-2021-41072 from upstream:
+https://github.com/plougher/squashfs-tools/commit/19fcc93
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From e0485802ec72996c20026da320650d8362f555bd Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <phillip@squashfs.org.uk>
+Date: Sun, 12 Sep 2021 23:50:06 +0100
+Subject: [PATCH] Unsquashfs: additional write outside destination directory
+ exploit fix
+
+An issue on github (https://github.com/plougher/squashfs-tools/issues/72)
+showed how some specially crafted Squashfs filesystems containing
+invalid file names (with '/' and '..') can cause Unsquashfs to write
+files outside of the destination directory.
+
+Since then it has been shown that specially crafted Squashfs filesystems
+that contain a symbolic link pointing outside of the destination directory,
+coupled with an identically named file within the same directory, can
+cause Unsquashfs to write files outside of the destination directory.
+
+Specifically the symbolic link produces a pathname pointing outside
+of the destination directory, which is then followed when writing the
+duplicate identically named file within the directory.
+
+This commit fixes this exploit by explictly checking for duplicate
+filenames within a directory.  As directories in v2.1, v3.x, and v4.0
+filesystems are sorted, this is achieved by checking for consecutively
+identical filenames.  Additionally directories are checked to
+ensure they are sorted, to avoid attempts to evade the duplicate
+check.
+
+Version 1.x and 2.0 filesystems (where the directories were unsorted)
+are sorted and then the above duplicate filename check is applied.
+
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+---
+ squashfs-tools/Makefile        |   6 +-
+ squashfs-tools/unsquash-1.c    |   6 ++
+ squashfs-tools/unsquash-12.c   | 110 +++++++++++++++++++++++++++++++++
+ squashfs-tools/unsquash-1234.c |  21 +++++++
+ squashfs-tools/unsquash-2.c    |  16 +++++
+ squashfs-tools/unsquash-3.c    |   6 ++
+ squashfs-tools/unsquash-4.c    |   6 ++
+ squashfs-tools/unsquashfs.h    |   4 ++
+ 8 files changed, 173 insertions(+), 2 deletions(-)
+ create mode 100644 squashfs-tools/unsquash-12.c
+
+diff --git a/squashfs-tools/Makefile b/squashfs-tools/Makefile
+index 7262a2e..1b544ed 100755
+--- a/squashfs-tools/Makefile
++++ b/squashfs-tools/Makefile
+@@ -160,8 +160,8 @@ MKSQUASHFS_OBJS = mksquashfs.o read_fs.o action.o swap.o pseudo.o compressor.o \
+ 	caches-queues-lists.o reader.o tar.o
+ 
+ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o \
+-	unsquash-4.o unsquash-123.o unsquash-34.o unsquash-1234.o swap.o \
+-	compressor.o unsquashfs_info.o
++	unsquash-4.o unsquash-123.o unsquash-34.o unsquash-1234.o unsquash-12.o \
++	swap.o compressor.o unsquashfs_info.o
+ 
+ CFLAGS ?= -O2
+ CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \
+@@ -393,6 +393,8 @@ unsquash-34.o: unsquashfs.h unsquash-34.c unsquashfs_error.h
+ 
+ unsquash-1234.o: unsquash-1234.c unsquashfs_error.h
+ 
++unsquash-12.o: unsquash-12.c unsquashfs.h
++
+ unsquashfs_xattr.o: unsquashfs_xattr.c unsquashfs.h squashfs_fs.h xattr.h unsquashfs_error.h
+ 
+ unsquashfs_info.o: unsquashfs.h squashfs_fs.h unsquashfs_error.h
+diff --git a/squashfs-tools/unsquash-1.c b/squashfs-tools/unsquash-1.c
+index b604434..88866fc 100644
+--- a/squashfs-tools/unsquash-1.c
++++ b/squashfs-tools/unsquash-1.c
+@@ -370,6 +370,12 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		}
+ 	}
+ 
++	/* check directory for duplicate names.  Need to sort directory first */
++	sort_directory(dir);
++	if(check_directory(dir) == FALSE) {
++		ERROR("File system corrupted: directory has duplicate names\n");
++		goto corrupted;
++	}
+ 	return dir;
+ 
+ corrupted:
+diff --git a/squashfs-tools/unsquash-12.c b/squashfs-tools/unsquash-12.c
+new file mode 100644
+index 0000000..61bf128
+--- /dev/null
++++ b/squashfs-tools/unsquash-12.c
+@@ -0,0 +1,110 @@
++/*
++ * Unsquash a squashfs filesystem.  This is a highly compressed read only
++ * filesystem.
++ *
++ * Copyright (c) 2021
++ * Phillip Lougher <phillip@squashfs.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * unsquash-12.c
++ *
++ * Helper functions used by unsquash-1 and unsquash-2.
++ */
++
++#include "unsquashfs.h"
++
++/*
++ * Bottom up linked list merge sort.
++ *
++ */
++void sort_directory(struct dir *dir)
++{
++	struct dir_ent *cur, *l1, *l2, *next;
++	int len1, len2, stride = 1;
++
++	if(dir->dir_count < 2)
++		return;
++
++	/*
++	 * We can consider our linked-list to be made up of stride length
++	 * sublists.  Eacn iteration around this loop merges adjacent
++	 * stride length sublists into larger 2*stride sublists.  We stop
++	 * when stride becomes equal to the entire list.
++	 *
++	 * Initially stride = 1 (by definition a sublist of 1 is sorted), and
++	 * these 1 element sublists are merged into 2 element sublists,  which
++	 * are then merged into 4 element sublists and so on.
++	 */
++	do {
++		l2 = dir->dirs; /* head of current linked list */
++		cur = NULL; /* empty output list */
++
++		/*
++		 * Iterate through the linked list, merging adjacent sublists.
++		 * On each interation l2 points to the next sublist pair to be
++		 * merged (if there's only one sublist left this is simply added
++		 * to the output list)
++		 */
++		while(l2) {
++			l1 = l2;
++			for(len1 = 0; l2 && len1 < stride; len1 ++, l2 = l2->next);
++			len2 = stride;
++
++			/*
++			 * l1 points to first sublist.
++			 * l2 points to second sublist.
++			 * Merge them onto the output list
++			 */
++			while(len1 && l2 && len2) {
++				if(strcmp(l1->name, l2->name) <= 0) {
++					next = l1;
++					l1 = l1->next;
++					len1 --;
++				} else {
++					next = l2;
++					l2 = l2->next;
++					len2 --;
++				}
++
++				if(cur) {
++					cur->next = next;
++					cur = next;
++				} else
++					dir->dirs = cur = next;
++			}
++			/*
++			 * One sublist is now empty, copy the other one onto the
++			 * output list
++			 */
++			for(; len1; len1 --, l1 = l1->next) {
++				if(cur) {
++					cur->next = l1;
++					cur = l1;
++				} else
++					dir->dirs = cur = l1;
++			}
++			for(; l2 && len2; len2 --, l2 = l2->next) {
++				if(cur) {
++					cur->next = l2;
++					cur = l2;
++				} else
++					dir->dirs = cur = l2;
++			}
++		}
++		cur->next = NULL;
++		stride = stride << 1;
++	} while(stride < dir->dir_count);
++}
+diff --git a/squashfs-tools/unsquash-1234.c b/squashfs-tools/unsquash-1234.c
+index e389f8d..98a81ed 100644
+--- a/squashfs-tools/unsquash-1234.c
++++ b/squashfs-tools/unsquash-1234.c
+@@ -72,3 +72,24 @@ void squashfs_closedir(struct dir *dir)
+ 
+ 	free(dir);
+ }
++
++
++/*
++ * Check directory for duplicate names.  As the directory should be sorted,
++ * duplicates will be consecutive.  Obviously we also need to check if the
++ * directory has been deliberately unsorted, to evade this check.
++ */
++int check_directory(struct dir *dir)
++{
++	int i;
++	struct dir_ent *ent;
++
++	if(dir->dir_count < 2)
++		return TRUE;
++
++	for(ent = dir->dirs, i = 0; i < dir->dir_count - 1; ent = ent->next, i++)
++		if(strcmp(ent->name, ent->next->name) >= 0)
++			return FALSE;
++
++	return TRUE;
++}
+diff --git a/squashfs-tools/unsquash-2.c b/squashfs-tools/unsquash-2.c
+index 956f96f..0e36f7d 100644
+--- a/squashfs-tools/unsquash-2.c
++++ b/squashfs-tools/unsquash-2.c
+@@ -29,6 +29,7 @@
+ static squashfs_fragment_entry_2 *fragment_table;
+ static unsigned int *uid_table, *guid_table;
+ static squashfs_operations ops;
++static int needs_sorting = FALSE;
+ 
+ 
+ static void read_block_list(unsigned int *block_list, long long start,
+@@ -463,6 +464,17 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		}
+ 	}
+ 
++	if(needs_sorting)
++		sort_directory(dir);
++
++	/* check directory for duplicate names and sorting */
++	if(check_directory(dir) == FALSE) {
++		if(needs_sorting)
++			ERROR("File system corrupted: directory has duplicate names\n");
++		else
++			ERROR("File system corrupted: directory has duplicate names or is unsorted\n");
++		goto corrupted;
++	}
+ 	return dir;
+ 
+ corrupted:
+@@ -596,6 +608,10 @@ int read_super_2(squashfs_operations **s_ops, void *s)
+ 	 * 2.x filesystems use gzip compression.
+ 	 */
+ 	comp = lookup_compressor("gzip");
++
++	if(sBlk_3->s_minor == 0)
++		needs_sorting = TRUE;
++
+ 	return TRUE;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-3.c b/squashfs-tools/unsquash-3.c
+index 835a574..0123562 100644
+--- a/squashfs-tools/unsquash-3.c
++++ b/squashfs-tools/unsquash-3.c
+@@ -497,6 +497,12 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		}
+ 	}
+ 
++	/* check directory for duplicate names and sorting */
++	if(check_directory(dir) == FALSE) {
++		ERROR("File system corrupted: directory has duplicate names or is unsorted\n");
++		goto corrupted;
++	}
++
+ 	return dir;
+ 
+ corrupted:
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index 694783d..c615bb8 100644
+--- a/squashfs-tools/unsquash-4.c
++++ b/squashfs-tools/unsquash-4.c
+@@ -434,6 +434,12 @@ static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offse
+ 		}
+ 	}
+ 
++	/* check directory for duplicate names and sorting */
++	if(check_directory(dir) == FALSE) {
++		ERROR("File system corrupted: directory has duplicate names or is unsorted\n");
++		goto corrupted;
++	}
++
+ 	return dir;
+ 
+ corrupted:
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index f8cf78c..bf2a80d 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -293,4 +293,8 @@ extern long long *alloc_index_table(int);
+ /* unsquash-1234.c */
+ extern int check_name(char *, int);
+ extern void squashfs_closedir(struct dir *);
++extern int check_directory(struct dir *);
++
++/* unsquash-12.c */
++extern void sort_directory(struct dir *);
+ #endif
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index c78f446..6a19cba 100644
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -9,8 +9,12 @@
 
 PV = "4.5"
 SRCREV = "0496d7c3de3e09da37ba492081c86159806ebb07"
-SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
+SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https;branch=master \
            file://0001-Avoid-use-of-INSTALL_DIR-for-symlink-targets.patch \
+           file://CVE-2021-41072-requisite-1.patch;striplevel=2 \
+           file://CVE-2021-41072-requisite-2.patch;striplevel=2 \
+           file://CVE-2021-41072-requisite-3.patch;striplevel=2 \
+           file://CVE-2021-41072.patch;striplevel=2 \
            "
 
 S = "${WORKDIR}/git/squashfs-tools"
diff --git a/poky/meta/recipes-devtools/strace/strace_5.14.bb b/poky/meta/recipes-devtools/strace/strace_5.16.bb
similarity index 92%
rename from poky/meta/recipes-devtools/strace/strace_5.14.bb
rename to poky/meta/recipes-devtools/strace/strace_5.16.bb
index aa6b06d..1874ef1 100644
--- a/poky/meta/recipes-devtools/strace/strace_5.14.bb
+++ b/poky/meta/recipes-devtools/strace/strace_5.16.bb
@@ -3,7 +3,7 @@
 DESCRIPTION = "strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state."
 SECTION = "console/utils"
 LICENSE = "LGPL-2.1+ & GPL-2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=318cfc887fc8723f4e9d4709b55e065b"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59a33f0a3e6122d67c0b3befccbdaa6b"
 
 SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
            file://update-gawk-paths.patch \
@@ -14,7 +14,7 @@
            file://ptest-spacesave.patch \
            file://0001-strace-fix-reproducibilty-issues.patch \
            "
-SRC_URI[sha256sum] = "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73"
+SRC_URI[sha256sum] = "dc7db230ff3e57c249830ba94acab2b862da1fcaac55417e9b85041a833ca285"
 
 inherit autotools ptest
 
diff --git a/poky/meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch b/poky/meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch
deleted file mode 100644
index 5a1b10b..0000000
--- a/poky/meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From cbcfe0399347989e45a8fb695f55c855d6b3da72 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 7 Dec 2015 17:11:02 +0200
-Subject: [PATCH] Fix libtool name in configure.ac
-
-Upstream-Status: Inappropriate [embedded specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4ed66d4..ceb64f9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -221,8 +221,8 @@ if test "$experimental_libtool" = "yes"; then
-   LIBTOOL="$sh_libtool"
-   SVN_LIBTOOL="$sh_libtool"
- else
--  sh_libtool="$abs_builddir/libtool"
--  SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\""
-+  sh_libtool="$abs_builddir/$host_alias-libtool"
-+  SVN_LIBTOOL="\$(SHELL) \$(abs_builddir)/$host_alias-libtool"
- fi
- AC_SUBST(SVN_LIBTOOL)
- 
--- 
-2.6.2
-
diff --git a/poky/meta/recipes-devtools/subversion/subversion_1.14.1.bb b/poky/meta/recipes-devtools/subversion/subversion_1.14.1.bb
index 87dc359..a0a9376 100644
--- a/poky/meta/recipes-devtools/subversion/subversion_1.14.1.bb
+++ b/poky/meta/recipes-devtools/subversion/subversion_1.14.1.bb
@@ -10,7 +10,6 @@
 
 SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://disable_macos.patch \
-           file://0001-Fix-libtool-name-in-configure.ac.patch \
            file://serfmacro.patch \
            "
 
diff --git a/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch b/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
index 114de7e..fdb9760 100644
--- a/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
+++ b/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
@@ -4,7 +4,7 @@
 Subject: [PATCH] configure: use pkg-config for pcre detection
 
 Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-Upstream-Status: pending
+Upstream-Status: Pending
 ---
  configure.ac | 38 +++++++-------------------------------
  1 file changed, 7 insertions(+), 31 deletions(-)
diff --git a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
index f392cea..12eecc9 100644
--- a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+++ b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -12,8 +12,8 @@
 Based on work by: Khem Raj <raj.khem@gmail.com>
 
 Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+Upstream-Status: Submitted [https://github.com/systemd/systemd-bootchart/pull/47]
 ---
-Upstream-Status: Pending
 
  src/util.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
index 196272f..8be3bed 100644
--- a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
+++ b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
@@ -10,8 +10,8 @@
 Includes work by: Khem Raj <raj.khem@gmail.com>
 
 Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+Upstream-Status: Submitted [https://github.com/systemd/systemd-bootchart/pull/47]
 ---
-Upstream-Status: Pending
 
  Makefile.am               |   4 +
  configure.ac              |   3 +
diff --git a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
index 7670d95..c2c276e 100644
--- a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
+++ b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
@@ -9,8 +9,8 @@
 Based on work by: Khem Raj <raj.khem@gmail.com>
 
 Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+Upstream-Status: Submitted [https://github.com/systemd/systemd-bootchart/pull/47]
 ---
-Upstream-Status: Pending
 
  src/path-util.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_234.bb b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_234.bb
index 30dbbcc..fe6f045 100644
--- a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_234.bb
+++ b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_234.bb
@@ -8,7 +8,7 @@
 LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
                     file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
+SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https;branch=master \
            file://0001-architecture-Recognise-RISCV-32-RISCV-64.patch \
            file://mips64.patch \
            file://no_lto.patch \
@@ -38,7 +38,7 @@
     rm -f ${S}/m4/intltool.m4
 }
 
-FILES:${PN} += "${systemd_system_unitdir}d-bootchart"
+FILES:${PN} += "${systemd_unitdir}/systemd-bootchart"
 
 EXTRA_OECONF = " --with-rootprefix=${root_prefix} \
                  --with-rootlibdir=${base_libdir}"
diff --git a/poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch b/poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
deleted file mode 100644
index abd33ba..0000000
--- a/poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Actually pass the arguments to RANLIB.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Index: agent/Makefile.inc
-===================================================================
---- a/Makefile.inc
-+++ b/Makefile.inc
-@@ -92,6 +92,7 @@ ifeq ($(OPSYS),GNU/Linux)
-     OPTS += -DUSE_uuid_generate=0
-   endif
-   OPTS += -DENABLE_arch_$(shell uname -m)
-+  RANLIB += $@
- endif
-
- ifneq ($(OPSYS),Windows)
diff --git a/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch b/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
index c03c55d..dfe4920 100644
--- a/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
+++ b/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
@@ -1,4 +1,8 @@
-Upstream-Status: Pending
+We need LDFLAGS to be respected otherwise there are QA warnings as the right
+flags don't get used.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@arm.com>
 
 From d92af0483c20365fd0af740d0baef8870b4aa374 Mon Sep 17 00:00:00 2001
 From: Abdur Rehman <abdur_rehman@mentor.com>
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 e67eccc..0d627f4 100644
--- a/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -10,8 +10,7 @@
 PV = "1.7.0+git${SRCPV}"
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRC_URI = "git://git.eclipse.org/r/tcf/org.eclipse.tcf.agent.git;protocol=https \
-           file://fix_ranlib.patch \
+SRC_URI = "git://git.eclipse.org/r/tcf/org.eclipse.tcf.agent.git;protocol=https;branch=master \
            file://ldflags.patch \
            file://tcf-agent.init \
            file://tcf-agent.service \
diff --git a/poky/meta/recipes-devtools/unfs3/unfs3/no-yywrap.patch b/poky/meta/recipes-devtools/unfs3/unfs3/no-yywrap.patch
index e0746ad..e349681 100644
--- a/poky/meta/recipes-devtools/unfs3/unfs3/no-yywrap.patch
+++ b/poky/meta/recipes-devtools/unfs3/unfs3/no-yywrap.patch
@@ -1,3 +1,5 @@
+Upstream-Status: Backport [https://github.com/unfs3/unfs3/commit/3fa0568e6ef96e045286afe18444bc28fe93962b]
+
 diff --git a/Config/exports.l b/Config/exports.l
 index 662603c..7e7c4fc 100644
 --- a/Config/exports.l
diff --git a/poky/meta/recipes-devtools/unfs3/unfs3_git.bb b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
index 2bc7a92..7a5d273 100644
--- a/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
+++ b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
@@ -14,7 +14,7 @@
 ASNEEDED = ""
 
 S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https \
+SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https;branch=master \
            file://unfs3_parallel_build.patch \
            file://alternate_rpc_ports.patch \
            file://fix_pid_race_parent_writes_child_pid.patch \
diff --git a/poky/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch b/poky/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch
deleted file mode 100644
index ecab0fc..0000000
--- a/poky/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From dbb1c58e86f2af4613f3ac9571d9b163d4bca675 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 23 Oct 2015 16:13:54 +0300
-Subject: [PATCH] vapigen.m4: use $PKG_CONFIG_SYSROOT_DIR
-
-This is necessary in cross-compiling environments, where directories
-returned by pkg-config should be prefixed with sysroot location.
-
-Upstream-Status: Pending [review in oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- vapigen/vapigen.m4 | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/vapigen/vapigen.m4 b/vapigen/vapigen.m4
-index 2c435e7..6228991 100644
---- a/vapigen/vapigen.m4
-+++ b/vapigen/vapigen.m4
-@@ -82,12 +82,12 @@ AC_DEFUN([VAPIGEN_CHECK],
- 
-   AS_CASE([$enable_vala],
-     [yes], [
--      VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
--      VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
-+      VAPIGEN=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
-+      VAPIGEN_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
-       AS_IF([test "x$2" = "x"], [
--          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
-+          VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
-         ], [
--          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
-+          VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
-         ])
-     ])
- 
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/vala/vala_0.54.2.bb b/poky/meta/recipes-devtools/vala/vala_0.54.2.bb
deleted file mode 100644
index faaf761..0000000
--- a/poky/meta/recipes-devtools/vala/vala_0.54.2.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] = "884de745317d4d56e4e8cede993dc8f04d50cfca36cf60d2f2f278c30c2b1311"
diff --git a/poky/meta/recipes-devtools/vala/vala_0.54.6.bb b/poky/meta/recipes-devtools/vala/vala_0.54.6.bb
new file mode 100644
index 0000000..d1202b8
--- /dev/null
+++ b/poky/meta/recipes-devtools/vala/vala_0.54.6.bb
@@ -0,0 +1,3 @@
+require ${BPN}.inc
+
+SRC_URI[sha256sum] = "49d60d96a3fdf6c4287397442bc6d6d95bf40aa7df678ee49128c4b11ba6e469"
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Implement-linux-rseq-syscall-as-ENOSYS.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Implement-linux-rseq-syscall-as-ENOSYS.patch
new file mode 100644
index 0000000..be15369
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Implement-linux-rseq-syscall-as-ENOSYS.patch
@@ -0,0 +1,198 @@
+From 1024237358f01009fe233cb1294f3b8211304eaa Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Fri, 10 Dec 2021 17:41:59 +0100
+Subject: [PATCH] Implement linux rseq syscall as ENOSYS
+
+This implements rseq for amd64, arm, arm64, ppc32, ppc64,
+s390x and x86 linux as ENOSYS (without warning).
+
+glibc will start using rseq to accelerate sched_getcpu, if
+available. This would cause a warning from valgrind every
+time a new thread is started.
+
+Real rseq (restartable sequences) support is pretty hard, so
+for now just explicitly return ENOSYS (just like we do for clone3).
+
+Upstream-Status: Backport [ 1024237358f01009fe233cb1294f3b8211304eaa ]
+
+https://sourceware.org/pipermail/libc-alpha/2021-December/133656.html
+---
+ coregrind/m_syswrap/syswrap-amd64-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-arm-linux.c   | 1 +
+ coregrind/m_syswrap/syswrap-arm64-linux.c | 3 ++-
+ coregrind/m_syswrap/syswrap-ppc32-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-s390x-linux.c | 2 ++
+ coregrind/m_syswrap/syswrap-x86-linux.c   | 2 ++
+ include/vki/vki-scnums-arm-linux.h        | 1 +
+ include/vki/vki-scnums-arm64-linux.h      | 4 +++-
+ include/vki/vki-scnums-ppc32-linux.h      | 1 +
+ include/vki/vki-scnums-ppc64-linux.h      | 1 +
+ include/vki/vki-scnums-s390x-linux.h      | 5 ++++-
+ 12 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
+index 5062324a1..18b25f80a 100644
+--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
++++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
+@@ -862,6 +862,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx,             sys_statx),             // 332
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),        // 334
++
+    LINX_(__NR_membarrier,        sys_membarrier),        // 324
+ 
+    LINX_(__NR_copy_file_range,   sys_copy_file_range),   // 326
+diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
+index 556dd844b..d583cef0c 100644
+--- a/coregrind/m_syswrap/syswrap-arm-linux.c
++++ b/coregrind/m_syswrap/syswrap-arm-linux.c
+@@ -1024,6 +1024,7 @@ static SyscallTableEntry syscall_main_table[] = {
+    LINX_(__NR_pwritev2,          sys_pwritev2),         // 393
+ 
+    LINXY(__NR_statx,             sys_statx),            // 397
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 398
+ 
+    LINXY(__NR_clock_gettime64,   sys_clock_gettime64),  // 403
+    LINX_(__NR_clock_settime64,   sys_clock_settime64),  // 404
+diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
+index b87107727..2066a38ea 100644
+--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
++++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
+@@ -823,8 +823,9 @@ static SyscallTableEntry syscall_main_table[] = {
+    //   (__NR_pkey_mprotect,     sys_ni_syscall),        // 288
+    //   (__NR_pkey_alloc,        sys_ni_syscall),        // 289
+    //   (__NR_pkey_free,         sys_ni_syscall),        // 290
++   LINXY(__NR_statx,             sys_statx),             // 291
+ 
+-   LINXY(__NR_statx,             sys_statx),             // 397
++   GENX_(__NR_rseq,              sys_ni_syscall),        // 293
+ 
+    LINXY(__NR_io_uring_setup,    sys_io_uring_setup),    // 425
+    LINXY(__NR_io_uring_enter,    sys_io_uring_enter),    // 426
+diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
+index 6263ab845..637b2504e 100644
+--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
++++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
+@@ -1028,6 +1028,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx,             sys_statx),            // 383
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 387
++
+    LINXY(__NR_clock_gettime64,   sys_clock_gettime64),  // 403
+    LINX_(__NR_clock_settime64,   sys_clock_settime64),  // 404
+ 
+diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
+index a26b41c32..93956d3cc 100644
+--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
++++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
+@@ -1019,6 +1019,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx,             sys_statx),            // 383
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 387
++
+    LINXY(__NR_io_uring_setup,    sys_io_uring_setup),    // 425
+    LINXY(__NR_io_uring_enter,    sys_io_uring_enter),    // 426
+    LINXY(__NR_io_uring_register, sys_io_uring_register), // 427
+diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
+index 5c9209859..73f9684c4 100644
+--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
++++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
+@@ -860,6 +860,8 @@ static SyscallTableEntry syscall_table[] = {
+ 
+    LINXY(__NR_statx, sys_statx),                                      // 379
+ 
++   GENX_(__NR_rseq, sys_ni_syscall),                                  // 381
++
+    LINXY(__NR_io_uring_setup, sys_io_uring_setup),                    // 425
+    LINXY(__NR_io_uring_enter, sys_io_uring_enter),                    // 426
+    LINXY(__NR_io_uring_register, sys_io_uring_register),              // 427
+diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
+index 1d8f45d33..8662ff501 100644
+--- a/coregrind/m_syswrap/syswrap-x86-linux.c
++++ b/coregrind/m_syswrap/syswrap-x86-linux.c
+@@ -1619,6 +1619,8 @@ static SyscallTableEntry syscall_table[] = {
+    /* Explicitly not supported on i386 yet. */
+    GENX_(__NR_arch_prctl,        sys_ni_syscall),       // 384
+ 
++   GENX_(__NR_rseq,              sys_ni_syscall),       // 386
++
+    LINXY(__NR_clock_gettime64,   sys_clock_gettime64),  // 403
+    LINX_(__NR_clock_settime64,   sys_clock_settime64),  // 404
+ 
+diff --git a/include/vki/vki-scnums-arm-linux.h b/include/vki/vki-scnums-arm-linux.h
+index ff560e19d..485db8b26 100644
+--- a/include/vki/vki-scnums-arm-linux.h
++++ b/include/vki/vki-scnums-arm-linux.h
+@@ -432,6 +432,7 @@
+ #define __NR_pkey_alloc                 395
+ #define __NR_pkey_free                  396
+ #define __NR_statx                      397
++#define __NR_rseq                       398
+ 
+ 
+ 
+diff --git a/include/vki/vki-scnums-arm64-linux.h b/include/vki/vki-scnums-arm64-linux.h
+index 9aa3b2b5f..acdfb39c6 100644
+--- a/include/vki/vki-scnums-arm64-linux.h
++++ b/include/vki/vki-scnums-arm64-linux.h
+@@ -323,9 +323,11 @@
+ #define __NR_pkey_alloc 289
+ #define __NR_pkey_free 290
+ #define __NR_statx 291
++#define __NR_io_pgetevents 291
++#define __NR_rseq 293
+ 
+ #undef __NR_syscalls
+-#define __NR_syscalls 292
++#define __NR_syscalls 294
+ 
+ ///*
+ // * All syscalls below here should go away really,
+diff --git a/include/vki/vki-scnums-ppc32-linux.h b/include/vki/vki-scnums-ppc32-linux.h
+index 6987ad941..08fa77df0 100644
+--- a/include/vki/vki-scnums-ppc32-linux.h
++++ b/include/vki/vki-scnums-ppc32-linux.h
+@@ -415,6 +415,7 @@
+ #define __NR_pkey_alloc		384
+ #define __NR_pkey_free		385
+ #define __NR_pkey_mprotect	386
++#define __NR_rseq		387
+ 
+ #endif /* __VKI_SCNUMS_PPC32_LINUX_H */
+ 
+diff --git a/include/vki/vki-scnums-ppc64-linux.h b/include/vki/vki-scnums-ppc64-linux.h
+index 6827964fd..a76fa6d32 100644
+--- a/include/vki/vki-scnums-ppc64-linux.h
++++ b/include/vki/vki-scnums-ppc64-linux.h
+@@ -407,6 +407,7 @@
+ #define __NR_pkey_alloc		384
+ #define __NR_pkey_free		385
+ #define __NR_pkey_mprotect	386
++#define __NR_rseq		387
+ 
+ #endif /* __VKI_SCNUMS_PPC64_LINUX_H */
+ 
+diff --git a/include/vki/vki-scnums-s390x-linux.h b/include/vki/vki-scnums-s390x-linux.h
+index 6487e20c9..869c04584 100644
+--- a/include/vki/vki-scnums-s390x-linux.h
++++ b/include/vki/vki-scnums-s390x-linux.h
+@@ -342,8 +342,11 @@
+ #define __NR_s390_guarded_storage	378
+ #define __NR_statx			379
+ #define __NR_s390_sthyi			380
++#define __NR_kexec_file_load		381
++#define __NR_io_pgetevents		382
++#define __NR_rseq			383
+ 
+-#define NR_syscalls 381
++#define NR_syscalls 384
+ 
+ /* 
+  * There are some system calls that are not present on 64 bit, some
+-- 
+2.30.2
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch
deleted file mode 100644
index a78e195..0000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 9762fd23e1f1db66d4b977c694a17d3bca3fe99a Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 8 Jan 2016 16:36:29 +0200
-Subject: [PATCH] Remove tests that fail to build on some PPC32 configurations
-
-Failures are documented here:
-http://errors.yoctoproject.org/Errors/Search/?items=10&query=862d702fbb99e484631315aa44b9e46f8fc567da&filter=valgrind&type=recipe
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-Upstream-Status: Pending
----
- memcheck/tests/ppc32/Makefile.am | 2 +-
- none/tests/ppc32/Makefile.am     | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am
-index 26b95a2..8f05743 100644
---- a/memcheck/tests/ppc32/Makefile.am
-+++ b/memcheck/tests/ppc32/Makefile.am
-@@ -10,7 +10,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
- 	power_ISA2_07.stderr.exp power_ISA2_07.vgtest
- 
- check_PROGRAMS = \
--	power_ISA2_05 power_ISA2_07
-+	power_ISA2_07
- 
- power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \
- 		-I$(top_srcdir)/include @FLAG_M32@
-diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am
-index 196239e..0fe3425 100644
---- a/none/tests/ppc32/Makefile.am
-+++ b/none/tests/ppc32/Makefile.am
-@@ -50,13 +50,13 @@ EXTRA_DIST = \
- 
- check_PROGRAMS = \
- 	allexec \
--	lsw jm-insns round \
-+	lsw \
- 	test_isa_2_06_part1 test_isa_2_06_part2 test_isa_2_06_part3 \
- 	test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \
- 	test_isa_2_07_part1 test_isa_2_07_part2 \
- 	test_tm test_touch_tm ldst_multiple data-cache-instructions \
- 	test_fx test_gx \
--	testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \
-+	twi tw xlc_dbl_u32 power6_bcmp \
- 	bug129390-ppc32 bug139050-ppc32 \
- 	ldstrev mftocrf mcrfs
- 
--- 
-2.6.4
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch
new file mode 100644
index 0000000..256ddb0
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-docs-Disable-manual-validation.patch
@@ -0,0 +1,36 @@
+From 99fc6fe9b66becac3c94068129e84217330a71a6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jan 2022 18:26:02 -0800
+Subject: [PATCH] docs: Disable manual validation
+
+validating manual and manpages, this task involves calling xmllint which
+accesses network and --nonet option also does not disable this,
+therefore disable it.
+
+Fixes
+| error : Resource temporarily unavailable
+| ../callgrind/docs/cl-manual.xml:4: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+|  <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ docs/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/docs/Makefile.am b/docs/Makefile.am
+index d4250e8..c500306 100644
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -192,7 +192,7 @@ valid-manpages: $(MANPAGES_XML_FILES)
+ 	  touch $@; \
+ 	fi
+ 
+-check-local: valid-manual valid-manpages
++check-local:
+ 
+ # The text version of the FAQ.
+ FAQ.txt:
+-- 
+2.34.1
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
index 06b19b0..9a25b67 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
@@ -12,7 +12,7 @@
 
 Patch refreshed for valgrind-3.14.0.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=445211]
 
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
index 0c399ef..a3637ea 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
@@ -14,7 +14,7 @@
 Enforce 30 seconds limit for the test.
 This resume execution of the remaining tests when valgrind hangs.
 
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [oe-core specific]
 
 Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
 Signed-off-by: Tudor Florea <tudor.florea@enea.com>
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
index 440e8be..887bfd2 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
@@ -32,8 +32,8 @@
 drd/tests/annotate_trace_memory_xml
 drd/tests/atomic_var
 drd/tests/bar_bad
-drd/tests/bar_bad_xml
 drd/tests/bar_trivial
+drd/tests/boost_thread
 drd/tests/bug-235681
 drd/tests/bug322621
 drd/tests/circular_buffer
@@ -66,7 +66,6 @@
 drd/tests/pth_barrier3
 drd/tests/pth_barrier_race
 drd/tests/pth_barrier_reinit
-drd/tests/pth_barrier_thr_cr
 drd/tests/pth_broadcast
 drd/tests/pth_cancel_locked
 drd/tests/pth_cleanup_handler
@@ -109,7 +108,6 @@
 drd/tests/tc06_two_races
 drd/tests/tc07_hbl1
 drd/tests/tc08_hbl2
-drd/tests/tc09_bad_unlock
 drd/tests/tc10_rec_lock
 drd/tests/tc11_XCHG
 drd/tests/tc12_rwl_trivial
@@ -174,7 +172,6 @@
 helgrind/tests/tc22_exit_w_lock
 helgrind/tests/tc23_bogus_condwait
 helgrind/tests/tc24_nonzero_sem
-helgrind/tests/tls_threads
 memcheck/tests/accounting
 memcheck/tests/addressable
 memcheck/tests/arm64-linux/scalar
@@ -194,13 +191,11 @@
 memcheck/tests/err_disable4
 memcheck/tests/err_disable_arange1
 memcheck/tests/leak-autofreepool-5
-memcheck/tests/leak_cpp_interior
 memcheck/tests/linux/lsframe1
 memcheck/tests/linux/lsframe2
 memcheck/tests/linux/with-space
 memcheck/tests/origin5-bz2
 memcheck/tests/origin6-fp
-memcheck/tests/overlap
 memcheck/tests/partial_load_dflt
 memcheck/tests/pdb-realloc2
 memcheck/tests/sh-mem
@@ -208,7 +203,6 @@
 memcheck/tests/sigaltstack
 memcheck/tests/sigkill
 memcheck/tests/signal2
-memcheck/tests/supp_unknown
 memcheck/tests/threadname
 memcheck/tests/threadname_xml
 memcheck/tests/unit_oset
@@ -236,5 +230,4 @@
 memcheck/tests/writev1
 memcheck/tests/xml1
 memcheck/tests/linux/stack_changes
-gdbserver_tests/hginfo
 memcheck/tests/linux/timerfd-syscall
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
index caeae84..15cf03f 100755
--- a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -32,13 +32,16 @@
    done
 fi
 
-echo "Run flaky tests using taskset to limit them to a single core."
+echo "Run non-deterministic 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
+   # The remove-for-aarch64 and taskset_nondeterministic_tests may overlap so 
+   # check if a file exist.
+   if test -f "${i}.vgtest"; then
+      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
+   fi
 done
 
-
 cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
     --valgrind=${VALGRIND_BIN} \
     --valgrind-lib=${VALGRIND_LIBEXECDIR} \
@@ -51,6 +54,13 @@
     gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
     2>&1|tee -a ${LOG}
 
+echo "Restore non-deterministic tests"
+for i in `cat taskset_nondeterministic_tests`; do
+   if test -f "${i}.vgtest.IGNORE"; then
+      mv $i.IGNORE $i.vgtest;
+   fi
+done
+
 if [ "$arch" = "aarch64" ]; then
    echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory"
    for i in `cat remove-for-aarch64`; do
@@ -63,11 +73,6 @@
    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_3.18.1.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
index 6fc2f36..2305889 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
@@ -21,7 +21,6 @@
            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 \
            file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
            file://avoid-neon-for-targets-which-don-t-support-it.patch \
            file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
@@ -43,6 +42,8 @@
            file://s390x_vec_op_t.patch \
            file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
            file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
+           file://0001-Implement-linux-rseq-syscall-as-ENOSYS.patch \
+           file://0001-docs-Disable-manual-validation.patch \
            "
 SRC_URI[sha256sum] = "00859aa13a772eddf7822225f4b46ee0d39afbe071d32778da4d99984081f7f5"
 UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
@@ -134,7 +135,8 @@
    perl-module-file-basename perl-module-file-glob perl-module-getopt-long \
    perl-module-overloading perl-module-cwd perl-module-ipc-open3 \
    perl-module-carp perl-module-symbol \
-   procps sed ${PN}-dbg ${PN}-src ${TCLIBC}-src gcc-runtime-dbg"
+   procps sed ${PN}-dbg ${PN}-src ${TCLIBC}-src gcc-runtime-dbg \
+   util-linux-taskset"
 RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils"
 
 # One of the tests contains a bogus interpreter path on purpose.