subtree updates

poky: 4e511f0abc..a015ed7704:
  Adrian Bunk (22):
        gnutls: upgrade 3.6.5 -> 3.6.7
        dhcp: Replace OE specific patch for compatibility with latest bind with upstream patch
        Set XZ_COMPRESSION_LEVEL to -9
        gcc: Remove Java support variables
        Use the best xz compression for the SDK
        gnome-doc-utils: Remove stale patch
        libxcrypt: Stop adding -std=gnu99 to CPPFLAGS
        file: Stop adding -std=c99 to CFLAGS
        gnu-efi: Remove support patch for gcc < 4.7
        grub: Use -Wno-error instead of doing this on a per-warning basis
        socat: upgrade 1.7.3.2 -> 1.7.3.3
        bison: upgrade 3.0.4 -> 3.1
        mmc-utils: update to the latest upstream code
        cogl: upgrade 1.22.2 -> 1.22.4
        cogl: remove -Werror=maybe-uninitialized workaround
        libxcb: remove workaround patch for a bug that was fixed in gcc 5 in 2015
        sysstat: inherit upstream-version-is-even
        ccache: upgrade 3.6 -> 3.7.1
        lttng-modules: upgrade 2.10.8 -> 2.10.9
        iproute2: Remove bogus workaround patch for musl
        openssl: Remove openssl10
        Remove irda-utils and the irda feature

  Alejandro Enedino Hernandez Samaniego (1):
        run-postinsts: Fix full execution of scripts at first boot

  Alejandro del Castillo (1):
        opkg: add ptest

  Alex Kiernan (12):
        systemd-conf: simplify creation of machine-specific configuration
        systemctl-native: Rewrite in Python supporting preset-all and mask
        image: call systemctl preset-all for images
        uboot-sign: Fix build when UBOOT_DTB_BINARY is empty
        patchelf: Upgrade 0.9 -> 0.10
        python3: Add ntpath.py to python core
        go: Exclude vcs files when installing deps
        recipetool: fix unbound variable when fixed SRCREV can't be found
        systemd: Default to non-stateless images
        systemd-systemctl: Restore support for enable command
        systemd: Restore mask and preset targets, fix instance creation
        shadow: Backport last change reproducibility

  Alexander Kanavin (38):
        python3: add a tr-tr locale for test_locale ptest
        gobject-introspection: update to 1.60.1
        dtc: upgrade 1.4.7 -> 1.5.0
        webkitgtk: update to 2.24.0
        libdazzle: update to 3.32.1
        vala: update to 0.44.3
        libdnf: update to 0.28.1
        libcomps: upgrade 0.1.10 -> 0.1.11
        dnf: upgrade 4.1.0 -> 4.2.2
        btrfs-tools: upgrade 4.20.1 -> 4.20.2
        meson: update to 0.50.0
        libmodulemd: update to 2.2.3
        at-spi2-core: fix meson 0.50 build
        ffmpeg: update to 4.1.3
        python: update to 2.7.16
        python: update to 3.7.3
        python-numpy: update to 1.16.2
        icu: update to 64.1
        epiphany: update to 3.32.1.2
        python3: add another multilib fix
        meson: do not try to substitute the prefix in python supplied paths
        python3-pygobject: update to 3.32.0
        meson: add missing Upstream-Status and SOB to a patch
        acpica: update to 20190405
        msmtp: fix upstream version check
        python-scons: update to 3.0.5
        python-setuptools: update to 41.0.1
        python3-mako: update to 1.0.9
        python3-pbr: update to 5.1.3
        python3-pip: update to 19.0.3
        buildhistory: call a dependency parser only on actual dependency lists
        gtk-doc.bbclass: unify option setting for meson-based recipes
        python3-pycairo: update to 1.18.1
        maintainers.inc: take over as perl maintainer
        xorg-lib: drop native overrides for REQUIRED_DISTRO_FEATURES
        meson: update to 0.50.1
        perl: update to 5.28.2
        packagegroup-self-hosted: drop epiphany

  Alistair Francis (5):
        u-boot: Upgrade from 2019.01 to 2019.04
        beaglebone-yocto: Update u-boot config to match u-boot 19.04
        u-boot: Fix missing Python.h build failure
        libsoup: Upgrade from 2.64.2 to 2.66.1
        qemu: Upgrade from 3.1.0 to 4.0.0

  Andre Rosa (1):
        bitbake: utils: Let mkdirhier fail if existing path is not a folder

  Andreas Müller (17):
        gobject-introspection: auto-enable/-disable gobject-introspection for meson
        libmodulemd: use gobject-introspection.bbclass on/off mechanism
        gdk-pixbuf: use gobject-introspection.bbclass on/off mechanism
        json-glib: use gobject-introspection.bbclass on/off mechanism
        libdazzle: use gobject-introspection.bbclass on/off mechanism
        clutter-gtk-1.0: use gobject-introspection.bbclass on/off mechanism
        pango: use gobject-introspection.bbclass on/off mechanism
        at-spi2-core: use gobject-introspection.bbclass on/off mechanism
        atk: use gobject-introspection.bbclass on/off mechanism
        libsoup-2.4: use gobject-introspection.bbclass on/off mechanism
        glib-networking: upgrade 2.58.0 -> 2.60.1
        gst-plugins: move 'inherit gobject-introspection' to recipes supporting GI
        gstreamer1.0-python: rework gobject-introspection handling
        insane.bbclass: Trigger unrecognzed configure option for meson
        vte: upgrade 0.52.2 -> 0.56.1
        vte: move shell auto scripts into seperate package
        qemu: split out vte into seperate PACKAGECONFIG

  Andreas Obergschwandtner (1):
        uboot-sign: add support for different u-boot configurations

  Andrej Valek (2):
        dropbear: update to 2019.78
        systemd: upgrade to 242

  Angus Lees (1):
        Revert "wic: Set a miniumum FAT16 volume size."

  Anuj Mittal (4):
        gcc: fix CVE-2018-18484
        gdb: fix CVE-2017-9778
        binutils: fix CVE-2019-9074 CVE-2019-9075 CVE-2019-9076 CVE-2019-9077
        openssh: fix CVE-2018-20685, CVE-2019-6109, CVE-2019-6111

  Armin Kuster (8):
        resulttool: add ltp test support
        logparser: Add decoding ltp logs
        ltp: add runtime test
        resulttool: add LTP compliance section
        logparser: Add LTP compliance section
        ltp_compliance: add new runtime
        manual compliance: remove bits done at runtime
        nss: cleanup recipe to match OE style

  Beniamin Sandu (1):
        kernel-devsrc: check for localversion files in the kernel source tree

  Breno Leitao (3):
        weston-init: Fix tab indentation
        weston-init: Add support for non-root start
        weston-init: Fix WESTON_USER typo

  Bruce Ashfield (8):
        linux-yocto/5.0: update to v5.0.5
        linux-yocto-rt: update to 5.0.5-rt3
        linux-yocto/5.0: update to v5.0.7
        linux-yocto/4.19: update to v4.19.34
        linux-yocto-rt/4.19: fix merge conflict in lru_drain
        linux-yocto/5.0: port RAID configuration tweaks from master
        linux-yocto/5.0: integrate TCP timeout / hang fix
        linux-yocto/5.0: update TCP patch to mainline version

  Changhyeok Bae (2):
        iw: upgrade 4.14 -> 5.0.1
        iptables: upgrade 1.6.2 -> 1.8.2

  Changqing Li (11):
        ruby: make ext module fiddle can compile success
        ruby: add ptest
        cogl: fix compile error caused by -Werror=maybe-uninitialized
        systemd: change default locale from C.UTF-8 to C
        m4: add ptest support
        gettext: add ptest support
        waffle: supprt build waffle without x11
        piglit: support build piglit without x11
        dbus: fix ptest failure
        populate_sdk_base: provide options to set sdk type
        python3: fix do_install fail for parallel buiild

  Chee Yang Lee (1):
        wic/bootimg-efi: replace hardcoded volume name with label

  Chen Qi (9):
        runqemu: do not check return code of tput
        busybox: fix ptest failure about 'dc'
        base-files: move hostname operations out of issue file settings
        webkitgtk: set CVE_PRODUCT
        dropbear: set CVE_PRODUCT
        libsdl: set CVE_PRODUCT
        ghostscript: set CVE_PRODUCT
        flac: also add flac to CVE_PRODUCT
        squashfs-tools: set CVE_PRODUCT

  David Reyna (1):
        bitbake: toaster: update to Warrior

  Dengke Du (2):
        perf: workaround the error cased by maybe-uninitialized warning
        linux-yocto_5.0: set devicetree for armv5

  Denys Dmytriyenko (1):
        weston: upgrade 5.0.0 -> 6.0.0

  Douglas Royds (2):
        distutils: Run python from the PATH in the -native case as well
        distutils: Tidy and simplify for readability

  Fabio Berton (1):
        mesa: Update 19.0.1 -> 19.0.3

  He Zhe (2):
        ltp: Fix setrlimit03 call succeeded unexpectedly
        systemd: Bump up SRCREV to systemd-stable top to include the fix for shutdown now hang

  Hongxu Jia (15):
        image_types.bbclass: fix a race between the ubi and ubifs FSTYPES
        cpio/tar/native.bbclass: move rmt to sbindir and add a prefix to avoid native clashing
        acpica: use update-alternatives for acpidump
        apr: upgrade 1.6.5 -> 1.7.0
        man-pages: upgrade 4.16 -> 5.01
        man-db: upgrade 2.8.4 -> 2.8.5
        bash: upgrade 4.4.18 -> 5.0
        ncurses: fix incorrect UPSTREAM_CHECK_GITTAGREGEX
        gpgme: upgrade 1.12.0 -> 1.13.0
        subversion: upgrade 1.11.1 -> 1.12.0
        groff: upgrade 1.22.3 -> 1.22.4
        libxml2: upgrade 2.9.8 -> 2.9.9
        ghostscript: 9.26 -> 9.27
        groff: imporve musl support
        oeqa/targetcontrol.py: fix qemuparams not work in runqemu with launch_cmd

  Jacob Kroon (3):
        grub-efi-native: Install grub-editenv
        bitbake: knotty: Pretty print task elapsed time
        base-passwd: Add kvm group

  Jaewon Lee (1):
        Adding back wrapper and using OEPYTHON3HOME variable for python3

  Jens Rehsack (1):
        kernel-module-split.bbclass: support CONFIG_MODULE_COMPRESS=y

  Jonas Bonn (3):
        systemd: don't build firstboot by default
        systemd: do not create machine-id
        systemd: create preset files instead of installing in image

  Joshua Watt (6):
        classes/waf: Set WAFLOCK
        resulttool: Load results from URL
        resulttool: Add log subcommand
        qemux86: Allow higher tunes
        bitbake.conf: Account for older versions of bitbake
        resulttool: Add option to dump all ptest logs

  Kai Kang (5):
        msmtp: 1.6.6 -> 1.8.3
        cryptodev: fix module loading error
        target-sdk-provides-dummy: resolve sstate conflict
        bitbake.conf: set NO_RECOMMENDATIONS with weak assignment
        webkitgtk: fix compile error for arm64

  Kevin Hao (1):
        meta-yocto-bsp: Bump to the latest stable kernel for all the BSP

  Khem Raj (9):
        gcc-cross-canadian: Make baremetal specific code generic
        musl: Upgrade to master past 1.1.22
        webkitgtk: Fix build with clang
        mdadm: Disable Werror
        gcc-target: Do not set --with-sysroot and gxx-include-dir paths
        systemd: Add -Wno-error=format-overflow to fix build with gcc9
        systemd: Backport patch to fix build with gcc9
        libgfortan: Package target gcc include directory to fix
        gcc-9: Add recipes for gcc 9.1 release

  Lei Maohui (2):
        dnf: Enable nativesdk
        icu: Added armeb support.

  Lei Yang (1):
        recipetool: add missed module

  Luca Boccassi (1):
        systemd: add cgroupv2 PACKAGECONFIG

  Mardegan, Alberto (1):
        oeqa/core/runner: dump stdout and stderr of each test case

  Mariano Lopez (5):
        update-alternatives.bbclass: Add function to get metadata
        ptest.bbclass: Add feature to populate a binary directory
        util-linux: Use PTEST binary directory
        busybox: Use PTEST binary directory
        ptest.bbclass: Use d.getVar instead of os.environ

  Martin Jansa (6):
        connman: add PACKAGECONFIG for nfc, fix MACHINE_ARCH signature when l2tp is enabled
        icecc.bbclass: stop causing everything to be effectivelly MACHINE_ARCH
        glibc: always use bfd linker
        opkg: fix ptest packaging when OPKGLIBDIR == libdir
        kexec-tools: refresh patches with devtool
        perf: make sure that the tools/include/uapi/asm-generic directory exists

  Matthias Schiffer (1):
        systemd: move "machines" symlinks to systemd-container

  Max Kellermann (2):
        useradd-staticids: print exception after parse_args() error
        initrdscripts: merge multiple "mkdir" calls

  Michael Scott (2):
        kernel-fitimage: support RISC-V
        procps: update legacy sysctl.conf to fix rp_filter sysctl issue

  Mikko Rapeli (3):
        elfutils: remove Elfutils-Exception and include GPLv2 for shared libraries
        oeqa/sdk: use bash to execute SDK test commands
        openssh: recommend rng-tools with sshd

  Mingli Yu (6):
        nettle: fix ptest failure
        elfutils: add ptest support
        elfutils: fix build failure with musl
        gcc-sanitizers: fix -Werror=maybe-uninitialized issue
        nettle: fix the Segmentation fault
        nettle: fix ptest failure

  Nathan Rossi (1):
        ccmake.bbclass: Fix up un-escaped quotes in output formatting

  Naveen Saini (5):
        core-image-rt: make sure that we append to DEPENDS
        core-image-rt-sdk: make sure that we append to DEPENDS
        bitbake.conf: add git-lfs to HOSTTOOLS_NONFATAL
        bitbake: bitbake: fetch2/git: git-lfs check
        linux-yocto: update genericx86* SRCREV for 4.19

  Oleksandr Kravchuk (52):
        iproute2: update to 5.0.0
        curl: update to 7.64.1
        libxext: update to 1.3.4
        x11perf: update to 1.6.1
        libxdmcp: update to 1.1.3
        libxkbfile: update 1.1.0
        libxvmc: update to 1.0.11
        libxrandr: update to 1.5.2
        connman: update to 1.37
        ethtool: update to 5.0
        tar: update to 1.32
        ffmpeg: update to 4.1.2
        librepo: update to 1.9.6
        libxmu: update to 1.1.3
        libxcrypt: update to 4.4.4
        wget: update to 1.20.2
        libsecret: 0.18.8
        createrepo-c: update to 0.12.2
        libinput: update to 1.13.0
        cronie: update to 1.5.4
        libyaml: update to 0.2.2
        fontconfig: update to 2.13.1
        makedepend: update to 1.0.6
        libdrm: update to 2.4.98
        libinput: update to 1.13.1
        libnotify: update to 0.7.8
        libpng: update to 1.6.37
        libcroco: update to 0.6.13
        libpsl: update to 0.21.0
        git: update to 2.21.0
        quota: update to 4.05
        gnupg: update to 2.2.15
        lz4: update to 1.9.0
        orc: update to 0.4.29
        help2man-native: update to 1.47.10
        cups: update to 2.2.11
        pixman: update to 0.38.4
        libcap: update to 2.27
        ninja: add Upstream-Status and SOB for musl patch
        python-numpy: update to 1.16.3
        python3-pygobject: update to 3.32.1
        wget: update to 1.20.3
        libsolv: update to 0.7.4
        ell: add recipe
        sqlite3: update to 3.28.0
        kmscube: update to latest revision
        coreutils: update to 8.31
        mtools: update to 4.0.23
        msmtp: update to 1.8.4
        wpa-supplicant: update to 2.8
        bitbake.conf: use https instead of http
        ell: update to 0.20

  Paul Barker (3):
        oe.path: Add copyhardlink() helper function
        license_image: Use new oe.path.copyhardlink() helper
        gdb: Fix aarch64 build with musl

  Peter Kjellerstedt (1):
        systemd: Use PACKAGECONFIG definition to depend on libnss-myhostname

  Randy MacLeod (5):
        valgrind: update from 3.14.0 to 3.15.0
        valgrind: fix vg_regtest return code
        valgrind: update the ptest subdirs list
        valgrind: adjust test filters and expected output
        valgrind: fix call/cachegrind ptests

  Richard Purdie (52):
        pseudo: Update to gain key bugfixes
        python3: Avoid hanging tests
        python3: Fix ptest output parsing
        go.bbclass: Remove unused override
        goarch.bbclass: Simplify logic
        e2fsprogs: Skip slow ptest tests
        bitbake: bitbake: Update version to 1.42.0
        poky.conf: Bump version for 2.7 warrior release
        build-appliance-image: Update to warrior head revision
        bitbake: bitbake: Post release version bumnp to 1.43
        poky.conf: Post release version bump
        build-appliance-image: Update to master head revision
        Revert "nettle: fix ptest failure"
        core-image-sato-sdk-ptest: Try and keep image below 4GB limit
        core-image-sato-ptest-fast: Add 'fast' ptest execution image
        core-image-sato-sdk-ptest: Include more ptests in ptest image
        core-image-sato-sdk-ptest: Add temporary PROVIDES core-image-sato-ptest
        resultool/resultutils: Fix module import error
        lttng-tools: Add missing patch Upstream-Status
        utils/multiprocess_launch: Improve failing subprocess output
        python3: Drop ptest hack
        ptest-packagelists: Add m4 and gettext as 'fast' ptests
        bitbake: knotty: Implement console 'keepalive' output
        bitbake: build: Ensure warning for invalid task dependencies is useful
        bitbake: build: Disable warning about dependent tasks for now
        oeqa/ssh: Avoid unicode decode exceptions
        elfutils: ptest fixes
        elfutils: Fix ptest compile failures on musl
        bitbake: bitbake: Add initial pass of SPDX license headers to source code
        bitbake: bitbake: Drop duplicate license boilerplace text
        bitbake: bitbake: Strip old editor directives from file headers
        bitbake: HEADER: Drop it
        openssh/systemd/python/qemu: Fix patch Upstream-Status
        scripts/pybootchart: Fix mixed indentation
        scripts/pybootchart: Port to python3
        scripts/pybootchart/draw: Clarify some variable names
        scripts/pybootchart/draw: Fix some bounding problems
        coreutils: Fix patch upstream status field
        oeqa: Drop OETestID
        meta/lib+scripts: Convert to SPDX license headers
        oeqa/core/runner: Handle unexpectedSucesses
        oeqa/systemd_boot: Drop OETestID
        oeqa/runner: Fix subunit setupClass/setupModule failure handling
        oeqa/concurrenttest: Patch subunit module to handle classSetup failures
        tcmode-default: Add PREFERRED_VERSION for libgfortran
        oeqa/selftest: Automate manual pybootchart tests
        openssh: Avoid PROVIDES warning from rng-tools dependency
        oeqa/target/ssh: Replace suggogatepass with ignoring errors
        core-image-sato-sdk-ptest: Tweak size to stay within 4GB limit
        valgrind: Include debugging symbols in ptests
        dbus-test: Improve ptest dependencies dependencies
        ptest: Add RDEPENDS frpm PN-ptest to PN package

  Robert Joslyn (1):
        qemu: Add PACKAGECONFIG for snappy

  Robert Yang (6):
        bitbake: bitbake-diffsigs: Use 4 spaces as indent for recursecb
        bitbake: bb: siggen: Make dump_sigfile and compare_sigfiles print uuid4
        bitbake: bb: siggen: Print more info when basehash are mis-matched
        bitbake: BBHandler: Fix addtask and deltask
        bitbake: build.py: check dependendent task for addtask
        bitbake: tests/parse.py: Add testcase for addtask and deltask

  Ross Burton (14):
        lttng-tools: fix Upstream-Status
        acpica: upgrade to 20190215
        staging: add ${datadir}/gtk-doc/html to the sysroot blacklist
        mpg123: port to use libsdl2
        meta-poky: remove obsolete DISTRO_FEATURES_LIBC
        m4: update patch status
        packagegroup-core-full-cmdline: remove zlib
        wic: change expand behaviour to match docs
        wic: add global debug option
        gtk-icon-cache: clean up DEPENDS
        patch: add minver and maxver parameters
        glib-2.0: fix locale handling
        glib-2.0: add missing locales for the tests
        glib-2.0: fix last failing ptest

  Scott Rifenbark (34):
        bitbake: poky.ent: Removed "ECLIPSE" entity variables.
        bitbake: bitbake-user-manual: Added section on modifying variables
        Makefile: Removed Eclipse support
        Documentation: Removed customization.xsl files for Eclipse
        mega-manual: Removed two Eclipse figures from tarball list
        mega-manual, overview-manual: Added updated index releases figure
        poky.ent: Removed Eclipse related variables.
        mega-manual: Removed the Eclipse chapters
        dev-manual: Removed all references to Eclipse.
        overview-manual: Removed all references to Eclipse
        profile-manual: Removed all references to Eclipse
        ref-manual: Removed all references to Eclipse
        sdk-manual: Removed all references to Eclipse
        sdk-manual: Removed all references to Eclipse
        dev-manual; brief-yoctoprojectqs: Updated checkout branch example
        dev-manual: Added reasoning blurb to "Viewing Variables" section.
        ref-manual: Inserted Migration 2.7 section.
        ref-manual: Added Eclipse removal for migration section.
        ref-manual: Added "License Value Corrections to migration.
        ref-manual: Added Fedora 29 to the supported distros list.
        poky.ent: changed 2.7 release variable date to "May 2019"
        ref-manual: Review comments applied to 2.7 migration section.
        documentation: Prepared for 2.8 release
        bsp-guide: Removed inaccurate "container layer" references.
        ref-manual: Updated the "Container Layer" term.
        bsp-guide: Updated the "beaglebone-yocto.conf" example.
        documentation: Cleaned up "plug-in"/"plugin" terminology.
        bsp-guide: Updated the BSP kernel recipe example.
        ref-manual: Updated PREFERRED_VERSION variable to use 5.0
        bsp-guide: More corrections to the BSP Kernel Recipe example
        dev-manual: Added cross-link to "Fetchers" section in BB manual.
        bitbake: bitbake-user-manual: Added npm to other fetcher list.
        overview-manual: Updated SMC section to link to fetchers
        ref-manual: Added "npm" information to the SRC_URI variable.

  Stefan Kral (1):
        bitbake: build: Add verbnote to shell log commands

  Stefan Müller-Klieser (1):
        cml1.bbclass: fix undefined behavior

  Steven Hung (洪于玉) (1):
        kernel.bbclass: convert base_do_unpack_append() to a task

  Tom Rini (2):
        vim: Rework to not rely on relative directories
        vim: Update to 8.1.1240

  Wenlin Kang (1):
        systemd: install libnss-myhostname.so when myhostname be enabled

  Yeoh Ee Peng (1):
        resulttool/manualexecution: Refactor and remove duplicate code

  Yi Zhao (2):
        harfbuzz: update source checksums after upstream replaced the tarball
        libyaml: update SRC_URI[md5sum] and SRC_URI[sha256sum]

  Ying-Chun Liu (PaulLiu) (1):
        uboot-sign: Fix u-boot-nodtb symlinks

  Zang Ruochen (10):
        libatomic-ops:upgrade 7.6.8 -> 7.6.10
        libgpg-error:upgrade 1.35 -> 1.36
        libxft:upgrade 2.3.2 -> 2.3.3
        libxxf86dga:upgrade 1.1.4 -> 1.1.5
        nss:upgrade 3.42.1 -> 3.43
        sysprof:upgrade 3.30.2 -> 3.32.0
        libtirpc:upgrade 1.0.3 -> 1.1.4
        xtrans:upgrade 1.3.5 -> 1.4.0
        harfbuzz:upgrade 2.3.1 -> 2.4.0
        icu: Upgrade 64.1 -> 64.2

  Zheng Ruoqin (1):
        sanity: check_perl_modules bug fix

  sangeeta jain (1):
        resulttool/manualexecution: Enable test case configuration option

meta-openembedded: 4a9deabbc8..1ecd8b4364:
  Adrian Bunk (34):
        linux-atm: Remove DEPENDS on virtual/kernel and PACKAGE_ARCH
        linux-atm: Replace bogus on_exit removal with musl-specific hack
        ledmon: Mark as incompatible on musl instead of adding bogus patch
        efivars: Drop workaround patch for host gcc < 4.7
        sshfs-fuse: upgrade 2.8 -> 2.10
        wv: upgrade 1.2.4 -> 1.2.9
        caps: Upgrade 0.9.24 -> 0.9.26
        dvb-apps: Remove dvb-fe-xc5000c-4.1.30.7.fw
        schroedinger: Remove the obsolete DEPENDS on liboil
        vlc: Remove workaround and patches for problems fixed upstream
        Remove liboil
        dnrd: Remove stale files of recipe removed 2 years ago
        postfix: Upgrade 3.4.1 -> 3.4.5
        pptp-linux: Upgrade 1.9.0 -> 1.10.0
        dovecot: Upgrade 2.2.36 -> 2.2.36.3
        postgresql: Upgrade 11.2 -> 11.3
        rocksdb: Upgrade 5.18.2 -> 5.18.3
        cloud9: Remove stale files of recipe removed 2 years ago
        fluentbit: Upgrade 0.12.1 -> 0.12.19
        libcec: Upgrade 4.0.2 -> 4.0.4
        libqb: Upgrade 1.0.3 -> 1.0.5
        openwsman: Upgrade 2.6.8 -> 2.6.9
        glm: Upgrade 0.9.9.3 -> 0.9.9.5
        fvwm: Upgrade 2.6.7 -> 2.6.8
        augeas: Upgrade 1.11.0 -> 1.12.0
        ccid: Upgrade 1.4.24 -> 1.4.30
        daemonize: Upgrade 1.7.7 -> 1.7.8
        inotify-tools: Upgrade 3.14 -> 3.20.1
        liboop: Upgrade 1.0 -> 1.0.1
        ode: Remove stale file of recipe removed 2 years ago
        openwbem: Remove stale files of recipe removed 2 years ago
        catch2: Upgrade 2.6.1 -> 2.7.2
        geos: Upgrade 3.4.2 -> 3.4.3
        rdfind: Upgrade 1.3.4 -> 1.4.1

  Akshay Bhat (3):
        python-urllib3: Set CVE_PRODUCT
        python3-pillow: Set CVE_PRODUCT
        python-requests: Set CVE_PRODUCT

  Alistair Francis (3):
        mycroft: Update the systemd service to ensure we are ready to start
        mycroft: Bump from 19.2.2 to 19.2.3
        python-obd: Add missing RDEPENDS

  Andreas Müller (33):
        gvfs: remove executable permission from systemd user services
        udisks2: upgrade 2.8.1 -> 2.8.2
        parole: upgrade 1.0.1 -> 1.0.2
        ristretto: upgrade 0.8.3 -> 0.8.4
        networkmanager: rework musl build
        gvfs: remove systemd user unit executable permission adjustment
        fltk: upgrade 1.3.4-2 -> 1.3.5
        samba: install bundled libs into seperate packages
        samba: rework localstatedir package split
        fluidsynth: upgrade 2.0.4 -> 2.0.5
        xfce4-vala: auto-detect vala api version
        gnome-desktop3: set correct meson gtk doc option
        vlc: rework qt PACKAGECONFIG
        evince: add patch to fix build with recent gobject-introspection
        xfce4-cpufreq-plugin: Fix memory leak and reduce CPU load
        packagegroup-meta-networking: replace DISTRO_FEATURE by DISTRO_FEATURES
        meta-xfce: add meta-networking to layer depends
        gtksourceview4: initial add 4.2.0
        gtksourceview-classic-light: extend to gtksourceview4
        itstool: rework - it went out too early
        fontforge: upgrade 20170731 -> 20190413
        exo: upgrade 0.12.4 -> 0.12.5
        xfce4-places-plugin: upgrade 1.7.0 -> 1.8.0
        xfce4-datetime-plugin: upgrade 0.7.0 -> 0.7.1
        xfce4-notifyd: upgrade 0.4.3 -> 0.4.4
        desktop-file-utils: remove - a more recent version is in oe-core
        libwnck3: upgrade 3.30.0 and move to meson build
        xfce4-terminal: add vte-prompt to RRECOMMENDS
        xfce4-session: get rid of machine-host
        xfce4-session: remove strange entry in FILES_${PN}
        libxfce4ui: Add PACKAGECONFIG 'gladeui2' for glade (gtk3) support
        glade3: move to to meta-xfce
        Remove me as maintainer

  Andrej Valek (2):
        squid: upgrade squid 3.5.28 -> 4.6
        ntp: upgrade 4.2.8p12 -> 4.2.8p13

  Ankit Navik (1):
        libnfc: Initial recipe for Near Field Communication library.

  Armin Kuster (1):
        meta-filesystems: drop bitbake from README

  Changqing Li (5):
        gd: fix compile error caused by -Werror=maybe-uninitialized
        apache2: add back patch for set perlbin
        php: upgrade 7.3.2 -> 7.3.4
        postgresql: fix compile error
        php: correct httpd path

  Chris Garren (1):
        python-cryptography: Move linker flag to .inc

  Denys Dmytriyenko (1):
        v4l-utils: upgrade 1.16.0 -> 1.16.5

  Gianfranco Costamagna (1):
        cpprest: update to 2.10.13, drop 32bit build fix upstream

  Hains van den Bosch (1):
        libcdio: update to version 2.1.0

  Hongxu Jia (1):
        pmtools: use update-alternatives for acpidump

  Hongzhi.Song (1):
        lua: upgrade from v5.3.4 to v5.3.5

  Ivan Maidanski (1):
        bdwgc: upgrade 7.6.12 -> 8.0.4

  Johannes Pointner (1):
        samba: update to 4.8.11

  Kai Kang (3):
        gvfs: fix typo libexec
        drbd: fix compile errors
        drbd-utils: fix file conflict with base-files

  Khem Raj (3):
        redis: Upgrade to 4.0.14
        squid: Link with libatomic on mips/ppc
        cpupower: Inherit bash completion class

  Leon Anavi (1):
        openbox: Add python-shell as a runtime dependency

  Liwei Song (1):
        ledmon: control hard disk led for RAID arrays

  Mark Asselstine (1):
        xfconf: fix 'Failed to get connection to xfconfd' during do_rootfs

  Martin Jansa (13):
        ftgl: add x11 to required DISTRO_FEATURES like freeglut
        libforms: add x11 to required DISTRO_FEATURES because of libx11
        Revert "ell: remove recipe"
        ne10: set NE10_TARGET_ARCH with an override instead of anonymous python
        libopus: use armv7a, aarch64 overrides when adding ne10 dependency
        esound: fix SRC_URI for multilib
        opusfile: fix SRC_URI for multilib
        miniupnpd: fix SRC_URI for multilib
        zbar: fix SRC_URI for multilib
        libvncserver: set PV in the recipe
        efivar: prevent native efivar depending on target kernel
        libdbi-perl: prevent native libdbi-perl depending on target perl
        aufs-util: prevent native aufs-util depending on target kernel

  Ming Liu (1):
        libmodbus: add documentation PACKAGECONFIG

  Mingli Yu (6):
        indent: Upgrade to 2.2.12
        hostapd: Upgrade to 2.8
        hwdata: Upgrade to 0.322
        rrdtool: Upgrade to 1.7.1
        libdev-checklib-perl: add new recipe
        libdbd-mysql-perl: Upgrade to 4.050

  Nathan Rossi (1):
        fatresize_1.0.2.bb: Add recipe for fatresize command line tool

  Nicolas Dechesne (3):
        cpupower: remove LIC_FILES_CHKSUM
        bpftool: remove LIC_FILES_CHKSUM
        cannelloni: move from meta-oe to meta-networking

  Oleksandr Kravchuk (38):
        smcroute: update to 2.4.4
        phytool: update to v2
        fwknop: update to 2.6.10
        cifs-utils: update to 6.9
        keepalived: update to 2.0.15
        usbredir: update to 0.8.0
        open-isns: update to 0.99
        nanomsg: update to 1.1.5
        stunnel: update to 5.51
        babeld: update to 1.8.4
        drbd-utils: update to 9.8.0
        drbd: update to 9.0.17-1
        macchanger: update to 1.7.0
        wolfssl: update to 4.0.0
        ell: remove recipe
        analyze-suspend: update to 5.3
        chrony: update to 3.4
        nghttp2: update to 1.38
        nano: update to 4.1
        networkmanager-openvpn: update to 1.8.10
        wpan-tools: update to 0.9
        uftp: update to 4.9.9
        vblade: add UPSTREAM_CHECK_URI
        traceroute: add UPSTREAM_CHECK_URI
        nuttcp: update to 8.2.2
        nfacct: add UPSTREAM_CHECK_URI
        nftables: add UPSTREAM_CHECK_URI
        libnetfilter-queue: update to 1.0.3
        arno-iptables-firewall: update to 2.0.3
        ypbind-mt: update to 2.6
        ebtables: add UPSTREAM_CHECK_URI
        doxygen: replace ninja 1.9.0 fix with official one
        libnetfilter-queue: fix update to 1.0.3
        networkd-dispatcher: update to 2.0.1
        opensaf: update to 5.19.01
        libnetfilter-conntrack: update to 1.0.7
        conntrack-tools: update to 1.4.5
        openvpn: update to 2.4.7

  Paolo Valente (1):
        s-suite: push SRCREV to version 3.2

  Parthiban Nallathambi (6):
        python3-aiohttp: add version 3.5.4
        python3-supervisor: add version 4.0.2
        python3-websocket-client: add version 0.56.0
        python3-tinyrecord: add version 0.1.5
        python3-sentry-sdk: add version 0.7.14
        python3-raven: add version 6.10.0

  Pascal Bach (2):
        paho-mqtt-c: 1.2.1 -> 1.3.0
        thrift: update to 0.12.0

  Pavel Modilaynen (1):
        jsoncpp: add native BBCLASSEXTEND

  Peter Kjellerstedt (2):
        apache2: Correct appending to SYSROOT_PREPROCESS_FUNCS
        apache2: Correct packaging of build and doc related files

  Philip Balister (1):
        sip: Update to 4.19.16.

  Qi.Chen@windriver.com (4):
        multipath-tools: fix up patch to avoid segfault
        netkit-rsh: add tag to CVE patch
        ipsec-tools: fix CVE tag in patch
        gd: set CVE_PRODUCT

  Randy MacLeod (1):
        imagemagick: update from 7.0.8-35 to 7.0.8-43

  Robert Joslyn (5):
        gpm: Fix gpm path in unit file
        gpm: Add PID file to systemd unit file
        gpm: Generate documentation
        gpm: Remove duplicate definition of _GNU_SOURCE
        gpm: Recipe cleanup

  Sean Nyekjaer (2):
        cannelloni: new package, CAN to ethernet proxy
        ser2net: upgrade to version 3.5.1

  Vincent Prince (1):
        mongodb: Fix build with gcc

  Wenlin Kang (1):
        samba: add PACKAGECONFIG for libunwind

  Yi Zhao (7):
        python-flask-socketio: move to meta-python directory
        apache2: upgrade 2.4.34 -> 2.4.39
        apache-websocket: upgrade to latest git rev
        netkit-rsh: security fixes
        openhpi: fix failure of ptest case ohpi_035
        openhpi: update openhpi-fix-testfail-errors.patch
        phpmyadmin: upgrade 4.8.3 -> 4.8.5

  Zang Ruochen (43):
        xlsatoms: upgrade 1.1.2 -> 1.1.3
        xrdb: upgrade 1.1.1 -> 1.2.0
        xrefresh: upgrade 1.0.5 -> 1.0.6
        xsetroot: upgrade 1.1.1 -> 1.1.2
        xstdcmap: upgrade 1.0.3 -> 1.0.4
        xbitmaps: upgrade 1.1.1 -> 1.1.2
        wireshark: upgrade 3.0.0 -> 3.0.1
        python-cffi: upgrade 1.11.5 -> 1.12.2
        python-attrs: upgrade 18.1.0 -> 19.1.0
        python-certifi: upgrade 2018.8.13 -> 2019.3.9
        python-beabutifulsoup4: upgrade 4.6.0 -> 4.7.1
        python-dateutil: upgrade 2.7.3 -> 2.8.0
        python-mako: upgrade 1.0.7 -> 1.0.9
        python-msgpack: upgrade 0.6.0 -> 0.6.1
        python-paste: upgrade 3.0.6 -> 3.0.8
        python-psutil: upgrade 5.4.6 -> 5.6.1
        python-py: upgrade 1.6.0 -> 1.8.0
        python-pymongo: upgrade 3.7.1 -> 3.7.2
        python-pyopenssl: upgrade 18.0.0 -> 19.0.0
        python-pytz: upgrade 2018.5 -> 2019.1
        python-stevedore: upgrade 1.29.0 -> 1.30.1
        python-pbr: upgrade 4.2.0 -> 5.1.3
        python-cython: upgrade 0.28.5 -> 0.29.6
        python-editor: upgrade 1.0.3 -> 1.0.4
        python-jinja2: upgrade 2.10 -> 2.10.1
        python-lxml: upgrade 4.3.1 -> 4.3.3
        python-alembic: upgrade 1.0.0 -> 1.0.9
        python-cffi: upgrade 1.12.2 -> 1.12.3
        python-hyperlink: upgrade 18.0.0 -> 19.0.0
        python-twisted: upgrade 18.4.0 -> 19.2.0
        python-zopeinterface: upgrade 4.5.0 -> 4.6.0
        python-decorator: upgrade 4.3.0 -> 4.4.0
        python-pip: upgrade 18.0 -> 19.1
        python-pyasn1: upgrade 0.4.4 -> 0.4.5
        libnet-dns-perl: upgrade 1.19 -> 1.20
        python-alembic: upgrade 1.0.9 -> 1.0.10
        python-cython: upgrade 0.29.6 -> 0.29.7
        python-mock: upgrade 2.0.0 -> 3.0.5
        python-pbr: upgrade 5.1.3 -> 5.2.0
        python-psutil: upgrade 5.6.1 -> 5.6.2
        python-pymongo: upgrade 3.7.2 -> 3.8.0
        python-pyperclip: upgrade 1.6.2 -> 1.7.0
        python-rfc3987: upgrade 1.3.7 -> 1.3.8

  leimaohui (3):
        To fix confilict error with python3-pbr.
        python-pycodestyle: Fix conflict error with python3-pycodestyle during do_rootfs
        mozjs: Make mozjs support arm32BE.

meta-raspberrypi: 9ceb84ee9e..7059c37451:
  Francesco Giancane (1):
        qtbase_%.bbappend: update PACKAGECONFIG name for xkbcommon

  Gianluigi Tiesi (1):
        psplash: Raise alternatives priority to 200

  Martin Jansa (3):
        linux_raspberrypi_4.19: Update to 4.19.34
        bluez5: apply the same patches and pi-bluetooth dependency for all rpi MACHINEs
        userland: use default PACKAGE_ARCH

  Paul Barker (3):
        linux-raspberrypi: Update 4.14.y kernel
        linux-raspberrypi: Switch default back to 4.14.y
        linux-raspberrypi 4.9: Drop old version

meta-security: 8a1f54a246..9f5cc2a7eb:
  Alexander Kanavin (1):
        apparmor: fetch from git

  Armin Kuster (15):
        clamav runtime: add resolve.conf support
        clamav: fix llvm reference version
        libldb: add waf-cross-answeres
        clamav: runtime fix local routing
        clamav: add clamav-cvd package for cvd db
        clamav-native: fix new build issue
        apparmor: fix fragment for 5.0 kernel
        apparmor: add a few more runtime
        smack: move patch to smack dir
        smack-test: add smack tests from meta-intel-iot-security
        samhain: add more tests and fix ret checks
        libldb: add earlier version
        libseccomp: update to 2.4.1
        oe-selftest: add running cve checker
        smack: kernel fragment update

  Yi Zhao (2):
        meta-tpm/conf/layer.conf: update layer dependencies
        meta-tpm/README: update

Change-Id: I9e02cb75a779f25fca84395144025410bb609dfa
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.32.inc b/poky/meta/recipes-devtools/binutils/binutils-2.32.inc
index 5d0c16b..49e6827 100644
--- a/poky/meta/recipes-devtools/binutils/binutils-2.32.inc
+++ b/poky/meta/recipes-devtools/binutils/binutils-2.32.inc
@@ -44,6 +44,10 @@
      file://0013-Detect-64-bit-MIPS-targets.patch \
      file://0014-sync-with-OE-libtool-changes.patch \
      file://0015-binutils-enable-x86_64-pep-for-producing-EFI-binarie.patch \
+     file://CVE-2019-9074.patch \
+     file://CVE-2019-9075.patch \
+     file://CVE-2019-9076.patch \
+     file://CVE-2019-9077.patch \
 "
 S  = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9074.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9074.patch
new file mode 100644
index 0000000..a11a512
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9074.patch
@@ -0,0 +1,68 @@
+From e2ebb3906432dcca2727186ad79415f920730fb2 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Tue, 19 Feb 2019 22:48:44 +1030
+Subject: [PATCH] PR24235, Read memory violation in pei-x86_64.c
+
+	PR 24235
+	* pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
+	attempting to prevent read past end of section.
+
+Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/179f2db0d9c397d7dd8a59907b84208b79f7f48c]
+CVE: CVE-2019-9074
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ bfd/ChangeLog    | 6 ++++++
+ bfd/pei-x86_64.c | 9 ++++-----
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/bfd/ChangeLog b/bfd/ChangeLog
+index dd2c741..cbf30de 100644
+--- a/bfd/ChangeLog
++++ b/bfd/ChangeLog
+@@ -1,3 +1,9 @@
++2019-02-19  Alan Modra  <amodra@gmail.com>
++
++	PR 24235
++	* pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
++	attempting to prevent read past end of section.
++
+ 2019-02-04  Nick Clifton  <nickc@redhat.com>
+ 
+ 	* development.sh (experimental) Set to false.
+diff --git a/bfd/pei-x86_64.c b/bfd/pei-x86_64.c
+index ff1093c..7e75104 100644
+--- a/bfd/pei-x86_64.c
++++ b/bfd/pei-x86_64.c
+@@ -541,7 +541,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
+   /* virt_size might be zero for objects.  */
+   if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0)
+     {
+-      stop = (datasize / onaline) * onaline;
++      stop = datasize;
+       virt_size_is_zero = TRUE;
+     }
+   else if (datasize < stop)
+@@ -551,8 +551,8 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
+ 		 _("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"),
+ 		 pdata_section->name, (unsigned long) datasize,
+ 		 (unsigned long) stop);
+-	/* Be sure not to read passed datasize.  */
+-	stop = datasize / onaline;
++	/* Be sure not to read past datasize.  */
++	stop = datasize;
+       }
+ 
+   /* Display functions table.  */
+@@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
+ 	      altent += imagebase;
+ 
+ 	      if (altent >= pdata_vma
+-		  && (altent + PDATA_ROW_SIZE <= pdata_vma
+-		      + pei_section_data (abfd, pdata_section)->virt_size))
++		  && altent - pdata_vma + PDATA_ROW_SIZE <= stop)
+ 		{
+ 		  pex64_get_runtime_function
+ 		    (abfd, &arf, &pdata[altent - pdata_vma]);
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9075.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9075.patch
new file mode 100644
index 0000000..bcb1310
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9075.patch
@@ -0,0 +1,119 @@
+From 8abac8031ed369a2734b1cdb7df28a39a54b4b49 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Wed, 20 Feb 2019 08:21:24 +1030
+Subject: [PATCH] PR24236, Heap buffer overflow in
+ _bfd_archive_64_bit_slurp_armap
+
+	PR 24236
+	* archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
+	sentinel NUL to string buffer nearer to loop where it is used.
+	Don't go past sentinel when scanning strings, and don't write
+	NUL again.
+	* archive.c (do_slurp_coff_armap): Simplify string handling to
+	archive64.c style.
+
+Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/8abac8031ed369a2734b1cdb7df28a39a54b4b49]
+CVE: CVE-2019-9075
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> 
+---
+ bfd/ChangeLog   | 10 ++++++++++
+ bfd/archive.c   | 17 +++++++----------
+ bfd/archive64.c | 10 +++++-----
+ 3 files changed, 22 insertions(+), 15 deletions(-)
+
+diff --git a/bfd/ChangeLog b/bfd/ChangeLog
+index 72c87c7..e39bb12 100644
+--- a/bfd/ChangeLog
++++ b/bfd/ChangeLog
+@@ -1,3 +1,13 @@
++2019-02-20  Alan Modra  <amodra@gmail.com>
++
++	PR 24236
++	* archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
++	sentinel NUL to string buffer nearer to loop where it is used.
++	Don't go past sentinel when scanning strings, and don't write
++	NUL again.
++	* archive.c (do_slurp_coff_armap): Simplify string handling to
++	archive64.c style.
++
+ 2019-02-19  Alan Modra  <amodra@gmail.com>
+ 
+ 	PR 24235
+diff --git a/bfd/archive.c b/bfd/archive.c
+index d2d9b72..68a92a3 100644
+--- a/bfd/archive.c
++++ b/bfd/archive.c
+@@ -1012,6 +1012,7 @@ do_slurp_coff_armap (bfd *abfd)
+   int *raw_armap, *rawptr;
+   struct artdata *ardata = bfd_ardata (abfd);
+   char *stringbase;
++  char *stringend;
+   bfd_size_type stringsize;
+   bfd_size_type parsed_size;
+   carsym *carsyms;
+@@ -1071,22 +1072,18 @@ do_slurp_coff_armap (bfd *abfd)
+     }
+ 
+   /* OK, build the carsyms.  */
+-  for (i = 0; i < nsymz && stringsize > 0; i++)
++  stringend = stringbase + stringsize;
++  *stringend = 0;
++  for (i = 0; i < nsymz; i++)
+     {
+-      bfd_size_type len;
+-
+       rawptr = raw_armap + i;
+       carsyms->file_offset = swap ((bfd_byte *) rawptr);
+       carsyms->name = stringbase;
+-      /* PR 17512: file: 4a1d50c1.  */
+-      len = strnlen (stringbase, stringsize);
+-      if (len < stringsize)
+-	len ++;
+-      stringbase += len;
+-      stringsize -= len;
++      stringbase += strlen (stringbase);
++      if (stringbase != stringend)
++	++stringbase;
+       carsyms++;
+     }
+-  *stringbase = 0;
+ 
+   ardata->symdef_count = nsymz;
+   ardata->first_file_filepos = bfd_tell (abfd);
+diff --git a/bfd/archive64.c b/bfd/archive64.c
+index 312bf82..42f6ed9 100644
+--- a/bfd/archive64.c
++++ b/bfd/archive64.c
+@@ -100,8 +100,6 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
+     return FALSE;
+   carsyms = ardata->symdefs;
+   stringbase = ((char *) ardata->symdefs) + carsym_size;
+-  stringbase[stringsize] = 0;
+-  stringend = stringbase + stringsize;
+ 
+   raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize);
+   if (raw_armap == NULL)
+@@ -115,15 +113,17 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd)
+       goto release_raw_armap;
+     }
+ 
++  stringend = stringbase + stringsize;
++  *stringend = 0;
+   for (i = 0; i < nsymz; i++)
+     {
+       carsyms->file_offset = bfd_getb64 (raw_armap + i * 8);
+       carsyms->name = stringbase;
+-      if (stringbase < stringend)
+-	stringbase += strlen (stringbase) + 1;
++      stringbase += strlen (stringbase);
++      if (stringbase != stringend)
++	++stringbase;
+       ++carsyms;
+     }
+-  *stringbase = '\0';
+ 
+   ardata->symdef_count = nsymz;
+   ardata->first_file_filepos = bfd_tell (abfd);
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9076.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9076.patch
new file mode 100644
index 0000000..ec8cde2
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9076.patch
@@ -0,0 +1,49 @@
+From 9f841c583880eb6d0194455c1583a766f853e628 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Wed, 20 Feb 2019 12:06:31 +1030
+Subject: [PATCH] PR24233, Out of memory
+
+	PR 24233
+	* objdump.c (dump_bfd_private_header): Print warning if
+	bfd_print_private_bfd_data returns false.
+
+Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/7d272a55caebfc26ab2e15d1e9439bac978b9bb7]
+CVE: CVE-2019-9076
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ binutils/ChangeLog | 6 ++++++
+ binutils/objdump.c | 4 +++-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/binutils/ChangeLog b/binutils/ChangeLog
+index f837c37..d5dd7cb 100644
+--- a/binutils/ChangeLog
++++ b/binutils/ChangeLog
+@@ -1,3 +1,9 @@
++2019-02-20  Alan Modra  <amodra@gmail.com>
++
++	PR 24233
++	* objdump.c (dump_bfd_private_header): Print warning if
++	bfd_print_private_bfd_data returns false.
++
+ 2019-02-02  Nick Clifton  <nickc@redhat.com>
+ 
+ 	* configure: Regenerate.
+diff --git a/binutils/objdump.c b/binutils/objdump.c
+index 8725390..7d0c6a4 100644
+--- a/binutils/objdump.c
++++ b/binutils/objdump.c
+@@ -3178,7 +3178,9 @@ dump_bfd_header (bfd *abfd)
+ static void
+ dump_bfd_private_header (bfd *abfd)
+ {
+-  bfd_print_private_bfd_data (abfd, stdout);
++  if (!bfd_print_private_bfd_data (abfd, stdout))
++    non_fatal (_("warning: private headers incomplete: %s"),
++	       bfd_errmsg (bfd_get_error ()));
+ }
+ 
+ static void
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9077.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9077.patch
new file mode 100644
index 0000000..11ecb71
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9077.patch
@@ -0,0 +1,37 @@
+From f7bbc8890de45df6eda0ddef5dd04f835f54eecf Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Wed, 20 Feb 2019 17:03:47 +0000
+Subject: [PATCH] Fix a illegal memory access fault when parsing a corrupt MIPS
+ option section using readelf.
+
+	PR 24243
+	* readelf.c (process_mips_specific): Check for an options section
+	that is too small to even contain a single option.
+
+Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/7fc0c668f2aceb8582d74db1ad2528e2bba8a921]
+CVE: CVE-2019-9077
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ binutils/readelf.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/binutils/readelf.c b/binutils/readelf.c
+index 9df3742..18ab806 100644
+--- a/binutils/readelf.c
++++ b/binutils/readelf.c
+@@ -16179,6 +16179,12 @@ process_mips_specific (Filedata * filedata)
+ 	  error (_("No MIPS_OPTIONS header found\n"));
+ 	  return FALSE;
+ 	}
++      /* PR 24243  */
++      if (sect->sh_size < sizeof (* eopt))
++	{
++	  error (_("The MIPS options section is too small.\n"));
++	  return FALSE;
++	}
+ 
+       eopt = (Elf_External_Options *) get_data (NULL, filedata, options_offset, 1,
+                                                 sect->sh_size, _("options"));
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4ba..0000000
--- a/poky/meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- 	  case '$(host_os)' in \
- 	    darwin[56]*) \
- 	      need_charset_alias=true ;; \
--	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- 	      need_charset_alias=false ;; \
- 	    *) \
- 	      need_charset_alias=true ;; \
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch b/poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch
deleted file mode 100644
index 1e86f55..0000000
--- a/poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 5b9204eee4b06b48d54ecc3ef3a0b56fc5cc84f8 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Fri, 24 Apr 2015 00:38:32 -0700
-Subject: [PATCH] src/local.mk: fix parallel issue
-
-Fixed:
-rm -f src/yacc src/yacc.tmp
-echo '#! /bin/sh' >src/yacc.tmp
-/bin/bash: src/yacc.tmp: No such file or directory
-Makefile:6670: recipe for target 'src/yacc' failed
-
-Upstream-Status: Submitted [ http://lists.gnu.org/archive/html/bison-patches/2017-07/msg00000.html ]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- src/local.mk | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/local.mk b/src/local.mk
-index 573ad00..28bfae4 100644
---- a/src/local.mk
-+++ b/src/local.mk
-@@ -119,6 +119,7 @@ MOSTLYCLEANFILES += src/yacc
- 
- src/yacc:
- 	$(AM_V_GEN)rm -f $@ $@.tmp
-+	$(AM_V_at)$(MKDIR_P) src
- 	$(AM_V_at)echo '#! /bin/sh' >$@.tmp
- 	$(AM_V_at)echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@.tmp
- 	$(AM_V_at)chmod a+x $@.tmp
--- 
-2.8.1
-
diff --git a/poky/meta/recipes-devtools/bison/bison/gnulib.patch b/poky/meta/recipes-devtools/bison/bison/gnulib.patch
deleted file mode 100644
index 7eaf0ce..0000000
--- a/poky/meta/recipes-devtools/bison/bison/gnulib.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix gnulib issues found with glibc 2.28 libio.h removal
-
-see
-https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: bison-3.0.4/lib/fseterr.c
-===================================================================
---- bison-3.0.4.orig/lib/fseterr.c
-+++ bison-3.0.4/lib/fseterr.c
-@@ -29,7 +29,7 @@ fseterr (FILE *fp)
-   /* Most systems provide FILE as a struct and the necessary bitmask in
-      <stdio.h>, because they need it for implementing getc() and putc() as
-      fast macros.  */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-   fp->_flags |= _IO_ERR_SEEN;
- #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
-   fp_->_flags |= __SERR;
diff --git a/poky/meta/recipes-devtools/bison/bison_3.0.4.bb b/poky/meta/recipes-devtools/bison/bison_3.1.bb
similarity index 80%
rename from poky/meta/recipes-devtools/bison/bison_3.0.4.bb
rename to poky/meta/recipes-devtools/bison/bison_3.1.bb
index f1b05da..a743bfd 100644
--- a/poky/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/poky/meta/recipes-devtools/bison/bison_3.1.bb
@@ -10,18 +10,15 @@
 DEPENDS = "bison-native flex-native"
 
 SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
            file://dont-depend-on-help2man.patch.patch \
-           file://0001-src-local.mk-fix-parallel-issue.patch \
            file://add-with-bisonlocaledir.patch \
-           file://gnulib.patch \
 "
 
 # No point in hardcoding path to m4, just use PATH
 EXTRA_OECONF += "M4=m4"
 
-SRC_URI[md5sum] = "c342201de104cc9ce0a21e0ad10d4021"
-SRC_URI[sha256sum] = "a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1"
+SRC_URI[md5sum] = "db7e431785ad96870bfa570a15cab079"
+SRC_URI[sha256sum] = "7c2464ad6cb7b513b2c350a092d919327e1f63d12ff024836acbb504475da5c6"
 
 inherit autotools gettext texinfo
 
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.1.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.2.bb
similarity index 96%
rename from poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.1.bb
rename to poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.2.bb
index 3647232..a1e7309 100644
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.1.bb
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.2.bb
@@ -14,7 +14,7 @@
 DEPENDS_append_class-target = " udev"
 RDEPENDS_${PN} = "libgcc"
 
-SRCREV = "6c33832b8c7bf2d7b64d6aed023c0bda43a03311"
+SRCREV = "5c748404b97035463c79ba4e5fd41b6858535509"
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
            file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
diff --git a/poky/meta/recipes-devtools/ccache/ccache.inc b/poky/meta/recipes-devtools/ccache/ccache.inc
index 7f80065..a31acad 100644
--- a/poky/meta/recipes-devtools/ccache/ccache.inc
+++ b/poky/meta/recipes-devtools/ccache/ccache.inc
@@ -9,7 +9,7 @@
 
 DEPENDS = "zlib"
 
-SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz"
+SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
 
 inherit autotools
 
diff --git a/poky/meta/recipes-devtools/ccache/ccache_3.6.bb b/poky/meta/recipes-devtools/ccache/ccache_3.6.bb
deleted file mode 100644
index 60807be..0000000
--- a/poky/meta/recipes-devtools/ccache/ccache_3.6.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ccache.inc
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=70762511f9c509cc2a4e4ba2ef687ae3"
-
-SRC_URI[md5sum] = "bd6fd69db28426baf22ec0acdd5c4b2a"
-SRC_URI[sha256sum] = "a3f2b91a2353b65a863c5901251efe48060ecdebec46b5eaec8ea8e092b9e871"
-
-SRC_URI += " \
-            file://0002-dev.mk.in-fix-file-name-too-long.patch \
-            file://0003-Fix-Segmentation-fault-error-when-gcc-o-dev-null.patch \
-"
diff --git a/poky/meta/recipes-devtools/ccache/ccache_3.7.1.bb b/poky/meta/recipes-devtools/ccache/ccache_3.7.1.bb
new file mode 100644
index 0000000..1db7094
--- /dev/null
+++ b/poky/meta/recipes-devtools/ccache/ccache_3.7.1.bb
@@ -0,0 +1,7 @@
+require ccache.inc
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=0094c59039cec66b8a4c905204333514"
+
+SRC_URI[md5sum] = "74339465ab87e0b406985ed69515f19b"
+SRC_URI[sha256sum] = "e562fcdbe766406b6fe4bf97ce5c001d2be8a17465f33bcddefc9499bbb057d8"
diff --git a/poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch b/poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
deleted file mode 100644
index 16a6e9d..0000000
--- a/poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 7dab2995ed8eeccd7b0acd79668bc28f3a2427d5 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 16 Sep 2015 19:45:40 -0700
-Subject: [PATCH] dev.mk.in: fix file name too long error
-
-The all_cppflags changes path to filename which causes file name too long
-error when the path is longer than NAME_MAX (usually 255). Strip srcdir
-to fix the problem.
-
-Upstream-Status: Backport [https://github.com/ccache/ccache/commit/4d86e884d07ba1853a0c70507cc4d04107f57c29]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
----
- dev.mk.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dev.mk.in b/dev.mk.in
-index 91b0a57..583ade0 100644
---- a/dev.mk.in
-+++ b/dev.mk.in
-@@ -1,7 +1,7 @@
- # GNU make syntax reigns in this file.
- 
- all_cflags += -Werror @more_warnings@
--all_cppflags += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$<)).d
-+all_cppflags += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$(subst $(srcdir)/,,$<))).d
- 
- A2X = a2x
- ASCIIDOC = asciidoc
diff --git a/poky/meta/recipes-devtools/ccache/files/0003-Fix-Segmentation-fault-error-when-gcc-o-dev-null.patch b/poky/meta/recipes-devtools/ccache/files/0003-Fix-Segmentation-fault-error-when-gcc-o-dev-null.patch
deleted file mode 100644
index b3012b7..0000000
--- a/poky/meta/recipes-devtools/ccache/files/0003-Fix-Segmentation-fault-error-when-gcc-o-dev-null.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From c51b63758e95247e3c1e2f06e5f5bfb49849e66d Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 22 Jan 2019 16:30:52 +0800
-Subject: [PATCH] Fix Segmentation fault error when gcc -o /dev/null
-
-Fixed:
-$ export CCACHE_DEBUG=1
-$ ccache gcc -c hello.c -o /dev/null
-
-Segmentation fault (core dumped)
-
-This is because failed to open /dev/null.foo (Permission denied), check file
-stream before write to it can fix the problem.
-
-Upstream-Status: Backport [https://github.com/ccache/ccache/commit/4d86e884d07ba1853a0c70507cc4d04107f57c29]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- src/ccache.c | 15 ++++++++++++---
- src/util.c   |  8 ++++++--
- 2 files changed, 18 insertions(+), 5 deletions(-)
-
-diff --git a/src/ccache.c b/src/ccache.c
-index b4cdb86..8c227df 100644
---- a/src/ccache.c
-+++ b/src/ccache.c
-@@ -521,9 +521,13 @@ init_hash_debug(struct hash *hash, const char *obj_path, char type,
- 
- 	char *path = format("%s.ccache-input-%c", obj_path, type);
- 	FILE *debug_binary_file = fopen(path, "wb");
--	hash_enable_debug(hash, section_name, debug_binary_file, debug_text_file);
-+	if (debug_binary_file) {
-+		hash_enable_debug(hash, section_name, debug_binary_file, debug_text_file);
-+		exitfn_add(fclose_exitfn, debug_binary_file);
-+	} else {
-+		cc_log("Failed to open %s: %s", path, strerror(errno));
-+	}
- 	free(path);
--	exitfn_add(fclose_exitfn, debug_binary_file);
- }
- 
- static enum guessed_compiler
-@@ -3670,8 +3674,13 @@ ccache(int argc, char *argv[])
- 	if (conf->debug) {
- 		char *path = format("%s.ccache-input-text", output_obj);
- 		debug_text_file = fopen(path, "w");
-+		if (debug_text_file) {
-+			exitfn_add(fclose_exitfn, debug_text_file);
-+		}
-+		else {
-+			cc_log("Failed to open %s: %s", path, strerror(errno));
-+		}
- 		free(path);
--		exitfn_add(fclose_exitfn, debug_text_file);
- 	}
- 
- 	struct hash *common_hash = hash_init();
-diff --git a/src/util.c b/src/util.c
-index e442cc4..a49fb4c 100644
---- a/src/util.c
-+++ b/src/util.c
-@@ -219,8 +219,12 @@ void
- cc_dump_log_buffer(const char *path)
- {
- 	FILE *file = fopen(path, "w");
--	(void) fwrite(logbuffer, 1, logsize, file);
--	fclose(file);
-+	if (file) {
-+		(void) fwrite(logbuffer, 1, logsize, file);
-+		fclose(file);
-+	} else {
-+		cc_log("Failed to open %s: %s", path, strerror(errno));
-+	}
- }
- 
- // Something went badly wrong!
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.12.2.bb
similarity index 94%
rename from poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
rename to poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.12.2.bb
index 9aa8d2a..c70523d 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.12.2.bb
@@ -8,8 +8,7 @@
            file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
            "
 
-PV = "0.12.1"
-SRCREV = "7744554ddef7c5be2cd7fbcac49c8b24ce60ef88"
+SRCREV = "5b4c06f6af24633f667da37455281f24a4abd461"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/dnf/dnf_4.1.0.bb b/poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb
similarity index 88%
rename from poky/meta/recipes-devtools/dnf/dnf_4.1.0.bb
rename to poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb
index d45023e..c777733 100644
--- a/poky/meta/recipes-devtools/dnf/dnf_4.1.0.bb
+++ b/poky/meta/recipes-devtools/dnf/dnf_4.2.2.bb
@@ -12,7 +12,7 @@
            file://0030-Run-python-scripts-using-env.patch \
            "
 
-SRCREV = "ad9b2175517c896c898cf9c8660e9b9b688ac5c7"
+SRCREV = "9947306a55271b8b7c9e2b6e3b7d582885b6045d"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
 S = "${WORKDIR}/git"
@@ -26,7 +26,7 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-RDEPENDS_${PN}_class-target += " \
+RDEPENDS_${PN} += " \
   python3-core \
   python3-codecs \
   python3-netclient \
@@ -49,6 +49,8 @@
   python3-gpg \
   "
 
+RDEPENDS_${PN}_class-native = ""
+
 RRECOMMENDS_${PN}_class-target += "gnupg"
 
 # Create a symlink called 'dnf' as 'make install' does not do it, but
@@ -66,6 +68,12 @@
                 RPM_NO_CHROOT_FOR_SCRIPTS=1
 }
 
+do_install_append_class-nativesdk() {
+        create_wrapper ${D}/${bindir}/dnf \
+                RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \
+                RPM_NO_CHROOT_FOR_SCRIPTS=1 
+}
+
 SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic.service dnf-automatic.timer \
                          dnf-automatic-download.service dnf-automatic-download.timer \
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
index ef10b08..c97c037 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 cd ./test
-./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /'
+SKIP_SLOW_TESTS=yes ./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /'
 rm -rf /var/volatile/tmp/*e2fsprogs*
 rm -f tmp-*
 rm -f *.tmp
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
index fd901c9..157551e 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Utilities and libraries for handling compiled object files"
 HOMEPAGE = "https://sourceware.org/elfutils"
 SECTION = "base"
-LICENSE = "(GPLv3 & Elfutils-Exception)"
+LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "libtool bzip2 zlib virtual/libintl"
 DEPENDS_append_libc-musl = " argp-standalone fts "
@@ -27,16 +27,26 @@
            file://debian/hurd_path.patch \
            file://debian/ignore_strmerge.diff \
            file://debian/disable_werror.patch \
+           file://debian/testsuite-ignore-elflint.diff \
+           file://0001-skip-the-test-when-gcc-not-deployed.patch \
+           file://run-ptest \
+           file://ptest.patch \
+           file://musl.patch \
            "
-SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
+SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch \
+                             file://0001-fix-err-variable-and-function-conflicts.patch \
+"
 
 SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9"
 SRC_URI[sha256sum] = "eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023"
 
-inherit autotools gettext
+inherit autotools gettext ptest
 
 EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
 EXTRA_OECONF_append_class-native = " --without-bzlib"
+RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}"
+
+EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
 
 do_install_append() {
 	if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
@@ -44,6 +54,22 @@
 	fi
 }
 
+do_compile_ptest() {
+	cd ${B}/tests
+	oe_runmake buildtest-TESTS oecheck
+}
+
+do_install_ptest() {
+	if [ ${PTEST_ENABLED} = "1" ]; then
+		cp -r ${S}/tests/                       ${D}${PTEST_PATH}
+		cp -r ${B}/tests/*                      ${D}${PTEST_PATH}/tests
+		cp -r ${B}/config.h                     ${D}${PTEST_PATH}
+		cp -r ${B}/backends                     ${D}${PTEST_PATH}
+		sed -i '/^Makefile:/c Makefile:'        ${D}${PTEST_PATH}/tests/Makefile
+		find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
+	fi
+}
+
 EXTRA_OEMAKE_class-native = ""
 EXTRA_OEMAKE_class-nativesdk = ""
 
@@ -53,6 +79,18 @@
 
 # Package utilities separately
 PACKAGES =+ "${PN}-binutils libelf libasm libdw"
+
+# shared libraries are licensed GPLv2 or GPLv3+, binaries GPLv3+
+# according to NEWS file:
+# "The license is now GPLv2/LGPLv3+ for the libraries and GPLv3+ for stand-alone
+# programs. There is now also a formal CONTRIBUTING document describing how to
+# submit patches."
+LICENSE_${PN}-binutils = "GPLv3+"
+LICENSE_${PN} = "GPLv3+"
+LICENSE_libelf = "GPLv2 | LGPLv3+"
+LICENSE_libasm = "GPLv2 | LGPLv3+"
+LICENSE_libdw = "GPLv2 | LGPLv3+"
+
 FILES_${PN}-binutils = "\
     ${bindir}/eu-addr2line \
     ${bindir}/eu-ld \
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch b/poky/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
new file mode 100644
index 0000000..433db13
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
@@ -0,0 +1,91 @@
+From 2c50fe7068bd6911958c6d851aef88179e73bb21 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Tue, 16 Apr 2019 15:30:38 +0800
+Subject: [PATCH] fix err variable and function conflicts
+
+There comes below build failure with musl when
+ptest enabled.
+| In file included from ../../elfutils-0.176/tests/dwfl-proc-attach.c:33:
+| ../../elfutils-0.176/lib/system.h:63:35: error: called object 'err' is not a function or function pointer
+|  #define error(status, errno, ...) err(status, __VA_ARGS__)
+|                                    ^~~
+| ../../elfutils-0.176/tests/dwfl-proc-attach.c:92:5: note: in expansion of macro 'error'
+|      error (-1, 0, "dwfl_linux_proc_attach pid %d: %s", pid,
+|      ^~~~~
+| ../../elfutils-0.176/tests/dwfl-proc-attach.c:79:7: note: declared here
+|    int err;
+|        ^~~
+
+It is because there is no error.h in musl and
+the patch 0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+has updated to use err.h to replace error.h
+and also added macro definiton as below when
+use musl.
+ #define error(status, errno, ...) err(status, __VA_ARGS__)
+
+And in err.h, there is below logic:
+_Noreturn void err(int, const char *, ...);
+
+But when ptest enabled, there comes below error
+as there is both variable and function defined
+to be err in tests/dwfl-proc-attach.c.
+So change the err variable's name to workaround
+the build failure with musl.
+
+Upstream-Status: Inappropriate [workaround in musl]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ tests/dwfl-proc-attach.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: elfutils-0.176/tests/dwfl-proc-attach.c
+===================================================================
+--- elfutils-0.176.orig/tests/dwfl-proc-attach.c
++++ elfutils-0.176/tests/dwfl-proc-attach.c
+@@ -76,10 +76,10 @@ main (int argc __attribute__ ((unused)),
+       char **argv __attribute__ ((unused)))
+ {
+   /* Create two extra threads to iterate through.  */
+-  int err;
+-  if ((err = pthread_create (&thread1, NULL, sleeper, NULL)) != 0)
++  int err1;
++  if ((err1 = pthread_create (&thread1, NULL, sleeper, NULL)) != 0)
+     error (-1, err, "Couldn't create thread1");
+-  if ((err = pthread_create (&thread2, NULL, sleeper, NULL)) != 0)
++  if ((err1 = pthread_create (&thread2, NULL, sleeper, NULL)) != 0)
+     error (-1, err, "Couldn't create thread2");
+ 
+   Dwfl *dwfl = dwfl_begin (&proc_callbacks);
+Index: elfutils-0.176/tests/backtrace.c
+===================================================================
+--- elfutils-0.176.orig/tests/backtrace.c
++++ elfutils-0.176/tests/backtrace.c
+@@ -219,23 +219,23 @@ dump (Dwfl *dwfl)
+ {
+   ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, dump_modules, NULL, 0);
+   assert (ptrdiff == 0);
+-  bool err = false;
++  bool err1 = false;
+   switch (dwfl_getthreads (dwfl, thread_callback, NULL))
+     {
+     case 0:
+       break;
+     case DWARF_CB_ABORT:
+-      err = true;
++      err1 = true;
+       break;
+     case -1:
+       error (0, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
+-      err = true;
++      err1 = true;
+       break;
+     default:
+       abort ();
+     }
+   callback_verify (0, 0, 0, NULL, dwfl);
+-  if (err)
++  if (err1)
+     exit (EXIT_FAILURE);
+ }
+ 
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
new file mode 100644
index 0000000..67ca0e4
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
@@ -0,0 +1,45 @@
+From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 12 Apr 2019 16:29:58 +0800
+Subject: [PATCH] skip the test when gcc not deployed
+
+Skip the tests which depend on gcc when
+gcc not deployed.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ tests/run-strip-g.sh       | 2 ++
+ tests/run-strip-nothing.sh | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
+index 1303819..a943dec 100755
+--- a/tests/run-strip-g.sh
++++ b/tests/run-strip-g.sh
+@@ -24,6 +24,8 @@
+ 
+ tempfiles a.out strip.out debug.out readelf.out
+ 
++# skip the test if gcc deployed
++which gcc || exit 77
+ echo Create debug a.out.
+ echo "int main() { return 1; }" | gcc -g -xc -
+ 
+diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh
+index 914fdfb..d03f734 100755
+--- a/tests/run-strip-nothing.sh
++++ b/tests/run-strip-nothing.sh
+@@ -22,6 +22,8 @@
+ 
+ tempfiles a.out strip.out debug.out
+ 
++# skip the case if no gcc deployed
++which gcc || exit 77
+ # Create no-debug a.out.
+ echo "int main() { return 1; }" | gcc -s -xc -
+ 
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff b/poky/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
new file mode 100644
index 0000000..c4ce20c
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
@@ -0,0 +1,52 @@
+From 03a343c6b1b72598fce654b8a638f106da44abfb Mon Sep 17 00:00:00 2001
+From: OpenEmbedded <oe.patch@oe>
+Date: Fri, 12 Apr 2019 08:05:50 +0000
+Subject: [PATCH] On many architectures this test fails because binaries/libs
+ produced by binutils don't pass elflint. However elfutils shouldn't FTBFS
+ because of this.
+
+So we run the tests on all archs to see what breaks, but if it breaks we ignore
+the result (exitcode 77 means: this test was skipped).
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ tests/run-elflint-self.sh |  2 +-
+ tests/test-subr.sh        | 15 +++++++++++++++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh
+index 58fa7d0..85d21a5 100755
+--- a/tests/run-elflint-self.sh
++++ b/tests/run-elflint-self.sh
+@@ -18,5 +18,5 @@
+ 
+ . $srcdir/test-subr.sh
+ 
+-testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
++testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+ testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+diff --git a/tests/test-subr.sh b/tests/test-subr.sh
+index 09f428d..26f61f1 100644
+--- a/tests/test-subr.sh
++++ b/tests/test-subr.sh
+@@ -201,3 +201,18 @@ testrun_on_self_quiet()
+   # Only exit if something failed
+   if test $exit_status != 0; then exit $exit_status; fi
+ }
++
++# Same as testrun_on_self(), but skip on failure.
++testrun_on_self_skip()
++{
++  exit_status=0
++
++  for file in $self_test_files; do
++      testrun $* $file \
++	  || { echo "*** failure in $* $file"; exit_status=77; }
++  done
++
++  # Only exit if something failed
++  if test $exit_status != 0; then exit $exit_status; fi
++}
++
diff --git a/poky/meta/recipes-devtools/elfutils/files/musl.patch b/poky/meta/recipes-devtools/elfutils/files/musl.patch
new file mode 100644
index 0000000..be35791
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/musl.patch
@@ -0,0 +1,29 @@
+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>
+
+Index: elfutils-0.176/tests/elfstrmerge.c
+===================================================================
+--- elfutils-0.176.orig/tests/elfstrmerge.c
++++ elfutils-0.176/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/ptest.patch b/poky/meta/recipes-devtools/elfutils/files/ptest.patch
new file mode 100644
index 0000000..35b23f4
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/ptest.patch
@@ -0,0 +1,76 @@
+Changes to allow ptest to run standalone on target:
+
+a) Run the tests serially
+b) Use the standalone test mode which allows the tests to be run in their
+  'installled' locations on target (but not any of the standalone build pieces)
+c) We want to use the binaries from their installed locations so the run-subr
+   script needs tweaking to run them like that. The rpath conditional isn't
+   enough since we want the second entry in the case statement.
+d) Add an oecheck make target which we can use to build the test binaries we need
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Upstream-Status: Inappropriate [oe specific]
+
+Index: elfutils-0.176/configure.ac
+===================================================================
+--- elfutils-0.176.orig/configure.ac
++++ elfutils-0.176/configure.ac
+@@ -45,7 +45,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2018 Th
+ AC_PREREQ(2.63)			dnl Minimum Autoconf version required.
+ 
+ dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
+-AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
++AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
+ AM_MAINTAINER_MODE
+ 
+ AM_SILENT_RULES([yes])
+Index: elfutils-0.176/tests/Makefile.am
+===================================================================
+--- elfutils-0.176.orig/tests/Makefile.am
++++ elfutils-0.176/tests/Makefile.am
+@@ -445,10 +445,10 @@ installed_TESTS_ENVIRONMENT = libdir=$(D
+ installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ 			 installed $(tests_rpath) \
+ 			 '$(program_transform_name)'
+-if STANDALONE
++if !STANDALONE
+ TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
+ LOG_COMPILER = $(installed_LOG_COMPILER)
+-else !STANDALONE
++else STANDALONE
+ TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+ 		    abs_srcdir=$(abs_srcdir);  abs_builddir=$(abs_builddir); \
+ 		    abs_top_builddir=$(abs_top_builddir); \
+@@ -463,7 +463,7 @@ installcheck-local:
+ 	$(MAKE) $(AM_MAKEFLAGS) \
+ 		TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+ 		LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
+-endif !STANDALONE
++endif STANDALONE
+ 
+ if STANDALONE
+ libdw = -ldw
+@@ -612,3 +612,5 @@ check: check-am coverage
+ coverage:
+ 	-$(srcdir)/coverage.sh
+ endif
++oecheck:
++	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+Index: elfutils-0.176/tests/test-subr.sh
+===================================================================
+--- elfutils-0.176.orig/tests/test-subr.sh
++++ elfutils-0.176/tests/test-subr.sh
+@@ -91,12 +91,6 @@ installed_testrun()
+   program="$1"
+   shift
+   case "$program" in
+-  ${abs_builddir}/*)
+-    if [ "x$elfutils_tests_rpath" != xno ]; then
+-      echo >&2 installcheck not possible with --enable-tests-rpath
+-      exit 77
+-    fi
+-    ;;
+   ${abs_top_builddir}/src/*)
+     program=${bindir}/`program_transform ${program##*/}`
+     ;;
diff --git a/poky/meta/recipes-devtools/elfutils/files/run-ptest b/poky/meta/recipes-devtools/elfutils/files/run-ptest
new file mode 100644
index 0000000..81b81f2
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+#This script is used to run elfutils test suites
+cd tests
+
+make -k runtest-TESTS abs_srcdir=$PWD abs_builddir=$PWD srcdir=$PWD top_srcdir=$PWD/../ abs_top_builddir=$PWD/../ elfutils_testrun=installed elfutils_tests_rpath=no program_transform_name=s,^,eu-,
diff --git a/poky/meta/recipes-devtools/file/file_5.36.bb b/poky/meta/recipes-devtools/file/file_5.36.bb
index 1a81fde..9a0e5bd 100644
--- a/poky/meta/recipes-devtools/file/file_5.36.bb
+++ b/poky/meta/recipes-devtools/file/file_5.36.bb
@@ -27,8 +27,6 @@
 EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
 EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
 
-CFLAGS_append = " -std=c99"
-
 FILES_${PN} += "${datadir}/misc/*.mgc"
 
 do_install_append_class-native() {
diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3.inc b/poky/meta/recipes-devtools/gcc/gcc-8.3.inc
index f7bf257..fe9c7c3 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-8.3.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-8.3.inc
@@ -71,6 +71,7 @@
            file://0038-Re-introduce-spe-commandline-options.patch \
            file://0039-riscv-Disable-multilib-for-OE.patch \
            file://0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch \
+           file://0041-Add-a-recursion-limit-to-libiberty-s-demangling-code.patch \
 "
 SRC_URI[md5sum] = "65b210b4bfe7e060051f799e0f994896"
 SRC_URI[sha256sum] = "64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c"
@@ -82,7 +83,6 @@
 
 # Language Overrides
 FORTRAN = ""
-JAVA = ""
 
 LTO = "--enable-lto"
 SSP ?= "--disable-libssp"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3/0041-Add-a-recursion-limit-to-libiberty-s-demangling-code.patch b/poky/meta/recipes-devtools/gcc/gcc-8.3/0041-Add-a-recursion-limit-to-libiberty-s-demangling-code.patch
new file mode 100644
index 0000000..f3303b6
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-8.3/0041-Add-a-recursion-limit-to-libiberty-s-demangling-code.patch
@@ -0,0 +1,325 @@
+From e1744e11b1c2b36f91a8847b61bafb8c5e7407ae Mon Sep 17 00:00:00 2001
+From: nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 7 Dec 2018 10:33:30 +0000
+Subject: [PATCH] Add a recursion limit to libiberty's demangling code. The
+ limit is enabled by default, but can be disabled via a new demangling option.
+
+include	* demangle.h (DMGL_NO_RECURSE_LIMIT): Define.
+        (DEMANGLE_RECURSION_LIMIT): Define
+
+	PR 87681
+	PR 87675
+	PR 87636
+	PR 87350
+	PR 87335
+libiberty * cp-demangle.h (struct d_info): Add recursion_level field.
+	* cp-demangle.c (d_function_type): Add recursion counter.
+	If the recursion limit is reached and the check is not disabled,
+	then return with a failure result.
+	(cplus_demangle_init_info): Initialise the recursion_level field.
+        (d_demangle_callback): If the recursion limit is enabled, check
+	for a mangled string that is so long that there is not enough
+	stack space for the local arrays.
+        * cplus-dem.c (struct work): Add recursion_level field.
+	(squangle_mop_up): Set the numb and numk fields to zero.
+	(work_stuff_copy_to_from): Handle the case where a btypevec or
+	ktypevec field is NULL.
+	(demangle_nested_args): Add recursion counter.  If
+	the recursion limit is not disabled and reached, return with a
+	failure result.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266886 138bc75d-0d04-0410-961f-82ee72b054a4
+
+CVE: CVE-2018-18484
+Upstream-Status: Backport [https://github.com/gcc-mirror/gcc/commit/03e51746ed98d9106803f6009ebd71ea670ad3b9]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ include/ChangeLog       |  5 +++++
+ include/demangle.h      | 11 +++++++++++
+ libiberty/ChangeLog     | 23 ++++++++++++++++++++++
+ libiberty/cp-demangle.c | 51 ++++++++++++++++++++++++++++++++++++++-----------
+ libiberty/cp-demangle.h |  3 +++
+ libiberty/cplus-dem.c   | 37 +++++++++++++++++++++++++++++++++--
+ 6 files changed, 117 insertions(+), 13 deletions(-)
+
+diff --git a/include/ChangeLog b/include/ChangeLog
+index 02ab336..88b0648 100644
+--- a/include/ChangeLog
++++ b/include/ChangeLog
+@@ -2,6 +2,11 @@
+ 
+ 	* GCC 8.3.0 released.
+ 
++2018-12-07  Nick Clifton  <nickc@redhat.com>
++
++	* demangle.h (DMGL_NO_RECURSE_LIMIT): Define.
++	(DEMANGLE_RECURSION_LIMIT): Define
++
+ 2018-07-26  Release Manager
+ 
+ 	* GCC 8.2.0 released.
+diff --git a/include/demangle.h b/include/demangle.h
+index b8d57cf..9bb8a19 100644
+--- a/include/demangle.h
++++ b/include/demangle.h
+@@ -68,6 +68,17 @@ extern "C" {
+ /* If none of these are set, use 'current_demangling_style' as the default. */
+ #define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT|DMGL_DLANG|DMGL_RUST)
+ 
++/* Disable a limit on the depth of recursion in mangled strings.
++   Note if this limit is disabled then stack exhaustion is possible when
++   demangling pathologically complicated strings.  Bug reports about stack
++   exhaustion when the option is enabled will be rejected.  */  
++#define DMGL_NO_RECURSE_LIMIT (1 << 18)	
++
++/* If DMGL_NO_RECURSE_LIMIT is not enabled, then this is the value used as
++   the maximum depth of recursion allowed.  It should be enough for any
++   real-world mangled name.  */
++#define DEMANGLE_RECURSION_LIMIT 1024
++  
+ /* Enumeration of possible demangling styles.
+ 
+    Lucid and ARM styles are still kept logically distinct, even though
+diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
+index 1dd05da..2f77038 100644
+--- a/libiberty/ChangeLog
++++ b/libiberty/ChangeLog
+@@ -9,6 +9,29 @@
+ 	(simple_object_copy_lto_debug_sections): Create file in binary
+ 	mode.
+ 
++2018-12-07  Nick Clifton  <nickc@redhat.com>
++
++	PR 87681
++	PR 87675
++	PR 87636
++	PR 87350
++	PR 87335
++	* cp-demangle.h (struct d_info): Add recursion_level field.
++	* cp-demangle.c (d_function_type): Add recursion counter.
++	If the recursion limit is reached and the check is not disabled,
++	then return with a failure result.
++	(cplus_demangle_init_info): Initialise the recursion_level field.
++	 (d_demangle_callback): If the recursion limit is enabled, check
++	for a mangled string that is so long that there is not enough
++	stack space for the local arrays.
++	 * cplus-dem.c (struct work): Add recursion_level field.
++	(squangle_mop_up): Set the numb and numk fields to zero.
++	(work_stuff_copy_to_from): Handle the case where a btypevec or
++	ktypevec field is NULL.
++	(demangle_nested_args): Add recursion counter.  If
++	the recursion limit is not disabled and reached, return with a
++	failure result.
++
+ 2018-07-26  Release Manager
+ 
+ 	* GCC 8.2.0 released.
+diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
+index 3f2a097..c374e46 100644
+--- a/libiberty/cp-demangle.c
++++ b/libiberty/cp-demangle.c
+@@ -2843,21 +2843,35 @@ d_ref_qualifier (struct d_info *di, struct demangle_component *sub)
+ static struct demangle_component *
+ d_function_type (struct d_info *di)
+ {
+-  struct demangle_component *ret;
++  struct demangle_component *ret = NULL;
+ 
+-  if (! d_check_char (di, 'F'))
+-    return NULL;
+-  if (d_peek_char (di) == 'Y')
++  if ((di->options & DMGL_NO_RECURSE_LIMIT) == 0)
+     {
+-      /* Function has C linkage.  We don't print this information.
+-	 FIXME: We should print it in verbose mode.  */
+-      d_advance (di, 1);
++      if (di->recursion_level > DEMANGLE_RECURSION_LIMIT)
++	/* FIXME: There ought to be a way to report
++	   that the recursion limit has been reached.  */
++	return NULL;
++
++      di->recursion_level ++;
+     }
+-  ret = d_bare_function_type (di, 1);
+-  ret = d_ref_qualifier (di, ret);
+ 
+-  if (! d_check_char (di, 'E'))
+-    return NULL;
++  if (d_check_char (di, 'F'))
++    {
++      if (d_peek_char (di) == 'Y')
++	{
++	  /* Function has C linkage.  We don't print this information.
++	     FIXME: We should print it in verbose mode.  */
++	  d_advance (di, 1);
++	}
++      ret = d_bare_function_type (di, 1);
++      ret = d_ref_qualifier (di, ret);
++      
++      if (! d_check_char (di, 'E'))
++	ret = NULL;
++    }
++
++  if ((di->options & DMGL_NO_RECURSE_LIMIT) == 0)
++    di->recursion_level --;
+   return ret;
+ }
+ 
+@@ -6188,6 +6202,7 @@ cplus_demangle_init_info (const char *mangled, int options, size_t len,
+   di->expansion = 0;
+   di->is_expression = 0;
+   di->is_conversion = 0;
++  di->recursion_level = 0;
+ }
+ 
+ /* Internal implementation for the demangler.  If MANGLED is a g++ v3 ABI
+@@ -6227,6 +6242,20 @@ d_demangle_callback (const char *mangled, int options,
+ 
+   cplus_demangle_init_info (mangled, options, strlen (mangled), &di);
+ 
++  /* PR 87675 - Check for a mangled string that is so long
++     that we do not have enough stack space to demangle it.  */
++  if (((options & DMGL_NO_RECURSE_LIMIT) == 0)
++      /* This check is a bit arbitrary, since what we really want to do is to
++	 compare the sizes of the di.comps and di.subs arrays against the
++	 amount of stack space remaining.  But there is no portable way to do
++	 this, so instead we use the recursion limit as a guide to the maximum
++	 size of the arrays.  */
++      && (unsigned long) di.num_comps > DEMANGLE_RECURSION_LIMIT)
++    {
++      /* FIXME: We need a way to indicate that a stack limit has been reached.  */
++      return 0;
++    }
++
+   {
+ #ifdef CP_DYNAMIC_ARRAYS
+     __extension__ struct demangle_component comps[di.num_comps];
+diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h
+index 51b8a24..d87a830 100644
+--- a/libiberty/cp-demangle.h
++++ b/libiberty/cp-demangle.h
+@@ -122,6 +122,9 @@ struct d_info
+   /* Non-zero if we are parsing the type operand of a conversion
+      operator, but not when in an expression.  */
+   int is_conversion;
++  /* If DMGL_NO_RECURSE_LIMIT is not active then this is set to
++     the current recursion level.  */
++  unsigned int recursion_level;
+ };
+ 
+ /* To avoid running past the ending '\0', don't:
+diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
+index 6d58bd8..8b9646f 100644
+--- a/libiberty/cplus-dem.c
++++ b/libiberty/cplus-dem.c
+@@ -146,6 +146,7 @@ struct work_stuff
+   int *proctypevec;     /* Indices of currently processed remembered typevecs.  */
+   int proctypevec_size;
+   int nproctypes;
++  unsigned int recursion_level;
+ };
+ 
+ #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI)
+@@ -1292,12 +1293,14 @@ squangle_mop_up (struct work_stuff *work)
+       free ((char *) work -> btypevec);
+       work->btypevec = NULL;
+       work->bsize = 0;
++      work->numb = 0;
+     }
+   if (work -> ktypevec != NULL)
+     {
+       free ((char *) work -> ktypevec);
+       work->ktypevec = NULL;
+       work->ksize = 0;
++      work->numk = 0;
+     }
+ }
+ 
+@@ -1331,8 +1334,15 @@ work_stuff_copy_to_from (struct work_stuff *to, struct work_stuff *from)
+ 
+   for (i = 0; i < from->numk; i++)
+     {
+-      int len = strlen (from->ktypevec[i]) + 1;
++      int len;
++
++      if (from->ktypevec[i] == NULL)
++	{
++	  to->ktypevec[i] = NULL;
++	  continue;
++	}
+ 
++      len = strlen (from->ktypevec[i]) + 1;
+       to->ktypevec[i] = XNEWVEC (char, len);
+       memcpy (to->ktypevec[i], from->ktypevec[i], len);
+     }
+@@ -1342,8 +1352,15 @@ work_stuff_copy_to_from (struct work_stuff *to, struct work_stuff *from)
+ 
+   for (i = 0; i < from->numb; i++)
+     {
+-      int len = strlen (from->btypevec[i]) + 1;
++      int len;
++
++      if (from->btypevec[i] == NULL)
++	{
++	  to->btypevec[i] = NULL;
++	  continue;
++	}
+ 
++      len = strlen (from->btypevec[i]) + 1;
+       to->btypevec[i] = XNEWVEC (char , len);
+       memcpy (to->btypevec[i], from->btypevec[i], len);
+     }
+@@ -1401,6 +1418,7 @@ delete_non_B_K_work_stuff (struct work_stuff *work)
+ 
+       free ((char*) work->tmpl_argvec);
+       work->tmpl_argvec = NULL;
++      work->ntmpl_args = 0;
+     }
+   if (work->previous_argument)
+     {
+@@ -4477,6 +4495,7 @@ remember_Btype (struct work_stuff *work, const char *start,
+ }
+ 
+ /* Lose all the info related to B and K type codes. */
++
+ static void
+ forget_B_and_K_types (struct work_stuff *work)
+ {
+@@ -4502,6 +4521,7 @@ forget_B_and_K_types (struct work_stuff *work)
+ 	}
+     }
+ }
++
+ /* Forget the remembered types, but not the type vector itself.  */
+ 
+ static void
+@@ -4696,6 +4716,16 @@ demangle_nested_args (struct work_stuff *work, const char **mangled,
+   int result;
+   int saved_nrepeats;
+ 
++  if ((work->options & DMGL_NO_RECURSE_LIMIT) == 0)
++    {
++      if (work->recursion_level > DEMANGLE_RECURSION_LIMIT)
++	/* FIXME: There ought to be a way to report
++	   that the recursion limit has been reached.  */
++	return 0;
++
++      work->recursion_level ++;
++    }
++
+   /* The G++ name-mangling algorithm does not remember types on nested
+      argument lists, unless -fsquangling is used, and in that case the
+      type vector updated by remember_type is not used.  So, we turn
+@@ -4722,6 +4752,9 @@ demangle_nested_args (struct work_stuff *work, const char **mangled,
+   --work->forgetting_types;
+   work->nrepeats = saved_nrepeats;
+ 
++  if ((work->options & DMGL_NO_RECURSE_LIMIT) == 0)
++    --work->recursion_level;
++
+   return result;
+ }
+ 
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1.inc b/poky/meta/recipes-devtools/gcc/gcc-9.1.inc
new file mode 100644
index 0000000..eb25380
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1.inc
@@ -0,0 +1,118 @@
+require gcc-common.inc
+
+# Third digit in PV should be incremented after a minor release
+
+PV = "9.1.0"
+
+# BINV should be incremented to a revision after a minor gcc release
+
+BINV = "9.1.0"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-9.1:${FILE_DIRNAME}/gcc-9.1/backport:"
+
+DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
+
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "\
+    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+    file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
+"
+
+BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
+#RELEASE ?= "5a5ca2d"
+#BASEURI ?= "https://repo.or.cz/official-gcc.git/snapshot/${RELEASE}.tar.gz;downloadfilename=gcc-${RELEASE}.tar.gz"
+SRC_URI = "\
+           ${BASEURI} \
+           file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+           file://0002-gcc-poison-system-directories.patch \
+           file://0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+           file://0004-64-bit-multilib-hack.patch \
+           file://0005-optional-libstdc.patch \
+           file://0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+           file://0007-COLLECT_GCC_OPTIONS.patch \
+           file://0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+           file://0009-fortran-cross-compile-hack.patch \
+           file://0010-cpp-honor-sysroot.patch \
+           file://0011-MIPS64-Default-to-N64-ABI.patch \
+           file://0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+           file://0013-gcc-Fix-argument-list-too-long-error.patch \
+           file://0014-Disable-sdt.patch \
+           file://0015-libtool.patch \
+           file://0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+           file://0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+           file://0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
+           file://0019-export-CPP.patch \
+           file://0020-Ensure-target-gcc-headers-can-be-included.patch \
+           file://0021-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
+           file://0022-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
+           file://0023-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
+           file://0024-aarch64-Add-support-for-musl-ldso.patch \
+           file://0025-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
+           file://0026-handle-sysroot-support-for-nativesdk-gcc.patch \
+           file://0027-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
+           file://0028-Fix-various-_FOR_BUILD-and-related-variables.patch \
+           file://0029-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
+           file://0030-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
+           file://0031-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
+           file://0032-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
+           file://0033-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
+           file://0034-sync-gcc-stddef.h-with-musl.patch \
+           file://0035-fix-segmentation-fault-in-precompiled-header-generat.patch \
+           file://0036-Fix-for-testsuite-failure.patch \
+           file://0037-Re-introduce-spe-commandline-options.patch \
+"
+SRC_URI[md5sum] = "6069ae3737cf02bf2cb44a391ef0e937"
+SRC_URI[sha256sum] = "79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0"
+S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+# For dev release snapshotting
+#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/official-gcc-${RELEASE}"
+#B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+LTO = "--enable-lto"
+SSP ?= "--disable-libssp"
+SSP_mingw32 = "--enable-libssp"
+
+EXTRA_OECONF_BASE = "\
+    ${LTO} \
+    ${SSP} \
+    --enable-libitm \
+    --disable-bootstrap \
+    --disable-libmudflap \
+    --with-system-zlib \
+    ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
+    --enable-linker-build-id \
+    --with-ppl=no \
+    --with-cloog=no \
+    --enable-checking=release \
+    --enable-cheaders=c_global \
+    --without-isl \
+"
+
+EXTRA_OECONF_INITIAL = "\
+    --disable-libmudflap \
+    --disable-libgomp \
+    --disable-libitm \
+    --disable-libquadmath \
+    --with-system-zlib \
+    --disable-lto \
+    --disable-plugin \
+    --enable-linker-build-id \
+    --enable-decimal-float=no \
+    --without-isl \
+    --disable-libssp \
+"
+
+EXTRA_OECONF_PATHS = "\
+    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
+    --with-sysroot=/not/exist \
+    --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000..33c910c
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,42 @@
+From f1f6d84aadc4e3cde707b1ec8490f5dc46d4c8e0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:37:11 +0400
+Subject: [PATCH 01/37] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ configure    | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index adf4fda0f69..8a04eea4c71 100755
+--- a/configure
++++ b/configure
+@@ -7602,7 +7602,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+ 
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+  *" newlib "*)
+   case " $target_configargs " in
+diff --git a/configure.ac b/configure.ac
+index 87f2aee0500..01b46b8bed4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3118,7 +3118,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+ 
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+  *" newlib "*)
+   case " $target_configargs " in
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0002-gcc-poison-system-directories.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0002-gcc-poison-system-directories.patch
new file mode 100644
index 0000000..1231567
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0002-gcc-poison-system-directories.patch
@@ -0,0 +1,203 @@
+From 733ca3372e4125170d4531bcd33e48eeb36bfec0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:59:00 +0400
+Subject: [PATCH 02/37] gcc: poison-system-directories
+
+Add /sw/include and /opt/include based on the original
+zecke-no-host-includes.patch patch.  The original patch checked for
+/usr/include, /sw/include and /opt/include and then triggered a failure and
+aborted.
+
+Instead, we add the two missing items to the current scan.  If the user
+wants this to be a failure, they can add "-Werror=poison-system-directories".
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/common.opt      |  4 ++++
+ gcc/config.in       |  6 ++++++
+ gcc/configure       | 16 ++++++++++++++++
+ gcc/configure.ac    | 10 ++++++++++
+ gcc/doc/invoke.texi |  9 +++++++++
+ gcc/gcc.c           |  2 ++
+ gcc/incpath.c       | 21 +++++++++++++++++++++
+ 7 files changed, 68 insertions(+)
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+index 9a5e9af06ca..211f2b2260e 100644
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -684,6 +684,10 @@ Wreturn-local-addr
+ Common Var(warn_return_local_addr) Init(1) Warning
+ Warn about returning a pointer/reference to a local or temporary variable.
+ 
++Wpoison-system-directories
++Common Var(flag_poison_system_directories) Init(1) Warning
++Warn for -I and -L options using system directories if cross compiling
++
+ Wshadow
+ Common Var(warn_shadow) Warning
+ Warn when one variable shadows another.  Same as -Wshadow=global.
+diff --git a/gcc/config.in b/gcc/config.in
+index 48a533bf208..fc3043bbdfb 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -200,6 +200,12 @@
+ #endif
+ 
+ 
++/* Define to warn for use of native system header directories */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++#endif
++
++
+ /* Define if you want all operations on RTL (the basic data structure of the
+    optimizer and back end) to be checked for dynamic type safety at runtime.
+    This is quite expensive. */
+diff --git a/gcc/configure b/gcc/configure
+index d6a48ef76e7..2e08396622e 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -995,6 +995,7 @@ with_system_zlib
+ enable_maintainer_mode
+ enable_link_mutex
+ enable_version_specific_runtime_libs
++enable_poison_system_directories
+ enable_plugin
+ enable_host_shared
+ enable_libquadmath_support
+@@ -1748,6 +1749,8 @@ Optional Features:
+   --enable-version-specific-runtime-libs
+                           specify that runtime libraries should be installed
+                           in a compiler-specific directory
++  --enable-poison-system-directories
++                          warn for use of native system header directories
+   --enable-plugin         enable plugin support
+   --enable-host-shared    build host code as shared libraries
+   --disable-libquadmath-support
+@@ -29717,6 +29720,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+ fi
+ 
+ 
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++  enableval=$enable_poison_system_directories;
++else
++  enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
++
+ # Substitute configuration variables
+ 
+ 
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 78370352938..7d34911573e 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -6375,6 +6375,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+                 [specify that runtime libraries should be
+                  installed in a compiler-specific directory])])
+ 
++AC_ARG_ENABLE([poison-system-directories],
++             AS_HELP_STRING([--enable-poison-system-directories],
++                            [warn for use of native system header directories]),,
++             [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++           [1],
++           [Define to warn for use of native system header directories])
++fi
++
+ # Substitute configuration variables
+ AC_SUBST(subdirs)
+ AC_SUBST(srcdir)
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 99fd97404e1..001868e1509 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -330,6 +330,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Wpacked  -Wpacked-bitfield-compat -Wpacked-not-aligned  -Wpadded @gol
+ -Wparentheses  -Wno-pedantic-ms-format @gol
+ -Wplacement-new  -Wplacement-new=@var{n} @gol
++-Wno-poison-system-directories @gol
+ -Wpointer-arith  -Wpointer-compare  -Wno-pointer-to-int-cast @gol
+ -Wno-pragmas  -Wno-prio-ctor-dtor  -Wredundant-decls @gol
+ -Wrestrict  -Wno-return-local-addr @gol
+@@ -6254,6 +6255,14 @@ made up of data only and thus requires no special treatment.  But, for
+ most targets, it is made up of code and thus requires the stack to be
+ made executable in order for the program to work properly.
+ 
++@item -Wno-poison-system-directories
++@opindex Wno-poison-system-directories
++Do not warn for @option{-I} or @option{-L} options using system
++directories such as @file{/usr/include} when cross compiling.  This
++option is intended for use in chroot environments when such
++directories contain the correct headers and libraries for the target
++system rather than the host.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 797ed36616f..79c38d858d1 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1042,6 +1042,8 @@ proper position among the other output files.  */
+    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+    "%X %{o*} %{e*} %{N} %{n} %{r}\
+     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
++    %{Wno-poison-system-directories:--no-poison-system-directories} \
++    %{Werror=poison-system-directories:--error-poison-system-directories} \
+     %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
+     VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
+     %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index bcbe2082905..5752298bbf2 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -26,6 +26,7 @@
+ #include "intl.h"
+ #include "incpath.h"
+ #include "cppdefault.h"
++#include "diagnostic-core.h"
+ 
+ /* Microsoft Windows does not natively support inodes.
+    VMS has non-numeric inodes.  */
+@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+ 	}
+       fprintf (stderr, _("End of search list.\n"));
+     }
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++  if (flag_poison_system_directories)
++    {
++       struct cpp_dir *p;
++
++       for (p = heads[INC_QUOTE]; p; p = p->next)
++         {
++          if ((!strncmp (p->name, "/usr/include", 12))
++              || (!strncmp (p->name, "/usr/local/include", 18))
++              || (!strncmp (p->name, "/usr/X11R6/include", 18))
++              || (!strncmp (p->name, "/sw/include", 11))
++              || (!strncmp (p->name, "/opt/include", 12)))
++            warning (OPT_Wpoison_system_directories,
++                     "include location \"%s\" is unsafe for "
++                     "cross-compilation",
++                     p->name);
++         }
++    }
++#endif
+ }
+ 
+ /* Use given -I paths for #include "..." but not #include <...>, and
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000..916c374
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,73 @@
+From 320352cc741c89f1a9b2ee7929193d255e65f27a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:08:31 +0400
+Subject: [PATCH 03/37] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
+
+Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
+
+This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
+
+Other changes I had to do include:
+
+- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
+
+- passing the right CFLAGS to configure scripts as exported environment variables
+
+I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
+
+Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
+
+Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ configure | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/configure b/configure
+index 8a04eea4c71..3b0eed74847 100755
+--- a/configure
++++ b/configure
+@@ -6863,6 +6863,38 @@ fi
+ 
+ 
+ 
++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
++# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
++# We want to ensure that TARGET libraries (which we know are built with
++# gcc) are built with "-O2 -g", so include those options when setting
++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
++if test "x$CFLAGS_FOR_TARGET" = x; then
++  CFLAGS_FOR_TARGET=$CFLAGS
++  case " $CFLAGS " in
++    *" -O2 "*) ;;
++    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
++  esac
++  case " $CFLAGS " in
++    *" -g "* | *" -g3 "*) ;;
++    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
++  esac
++fi
++
++
++if test "x$CXXFLAGS_FOR_TARGET" = x; then
++  CXXFLAGS_FOR_TARGET=$CXXFLAGS
++  case " $CXXFLAGS " in
++    *" -O2 "*) ;;
++    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
++  esac
++  case " $CXXFLAGS " in
++    *" -g "* | *" -g3 "*) ;;
++    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
++  esac
++fi
++
++
+ # Handle --with-headers=XXX.  If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0004-64-bit-multilib-hack.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0004-64-bit-multilib-hack.patch
new file mode 100644
index 0000000..137261b
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0004-64-bit-multilib-hack.patch
@@ -0,0 +1,119 @@
+From 150d946082b3e21614d1cd0eb4752871495fe519 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:10:06 +0400
+Subject: [PATCH 04/37] 64-bit multilib hack.
+
+GCC has internal multilib handling code but it assumes a very specific rigid directory
+layout. The build system implementation of multilib layout is very generic and allows
+complete customisation of the library directories.
+
+This patch is a partial solution to allow any custom directories to be passed into gcc
+and handled correctly. It forces gcc to use the base_libdir (which is the current
+directory, "."). We need to do this for each multilib that is configured as we don't
+know which compiler options may be being passed into the compiler. Since we have a compiler
+per mulitlib at this point that isn't an issue.
+
+The one problem is the target compiler is only going to work for the default multlilib at
+this point. Ideally we'd figure out which multilibs were being enabled with which paths
+and be able to patch these entries with a complete set of correct paths but this we
+don't have such code at this point. This is something the target gcc recipe should do
+and override these platform defaults in its build config.
+
+Do same for riscv64 and aarch64
+
+RP 15/8/11
+
+Upstream-Status: Inappropriate[OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ gcc/config/aarch64/t-aarch64-linux |  8 ++++----
+ gcc/config/i386/t-linux64          |  6 ++----
+ gcc/config/mips/t-linux64          | 10 +++-------
+ gcc/config/riscv/t-linux           |  6 ++++--
+ gcc/config/rs6000/t-linux64        |  5 ++---
+ 5 files changed, 15 insertions(+), 20 deletions(-)
+
+diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
+index 5ad670ba2ce..e26019e7157 100644
+--- a/gcc/config/aarch64/t-aarch64-linux
++++ b/gcc/config/aarch64/t-aarch64-linux
+@@ -21,8 +21,8 @@
+ LIB1ASMSRC   = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+ 
+-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
++#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+ 
+-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
+index c686ab2f0d2..c82b60dadcd 100644
+--- a/gcc/config/i386/t-linux64
++++ b/gcc/config/i386/t-linux64
+@@ -32,7 +32,5 @@
+ #
+ comma=,
+ MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+-MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
+-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
++MULTILIB_DIRNAMES = . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
+index 3a2ff700d7d..13ef19576b5 100644
+--- a/gcc/config/mips/t-linux64
++++ b/gcc/config/mips/t-linux64
+@@ -17,10 +17,6 @@
+ # <http://www.gnu.org/licenses/>.
+ 
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+-MULTILIB_DIRNAMES = n32 32 64
+-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+-MULTILIB_OSDIRNAMES = \
+-	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+-	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+-	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++MULTILIB_DIRNAMES = . . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
++
+diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
+index 216d2776a18..e4d817621fc 100644
+--- a/gcc/config/riscv/t-linux
++++ b/gcc/config/riscv/t-linux
+@@ -1,3 +1,5 @@
+ # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
+-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
+-MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
++#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
++MULTILIB_DIRNAMES := . .
++#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
+index f3c6e2be1d9..bd0393155fa 100644
+--- a/gcc/config/rs6000/t-linux64
++++ b/gcc/config/rs6000/t-linux64
+@@ -26,10 +26,9 @@
+ # MULTILIB_OSDIRNAMES according to what is found on the target.
+ 
+ MULTILIB_OPTIONS    := m64/m32
+-MULTILIB_DIRNAMES   := 64 32
++MULTILIB_DIRNAMES   := . .
+ MULTILIB_EXTRA_OPTS := 
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+ 
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ 	$(COMPILE) $<
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0005-optional-libstdc.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0005-optional-libstdc.patch
new file mode 100644
index 0000000..d8e970a
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0005-optional-libstdc.patch
@@ -0,0 +1,125 @@
+From a3323ea74f0793b35af4a4cdbe5e99fe21e4816b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:12:56 +0400
+Subject: [PATCH 05/37] optional libstdc
+
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
+will not run correctly since by default the linker will try to link against libstdc++
+which shouldn't exist yet. We need an option to disable -lstdc++
+option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
+driver. This patch adds such an option which only disables the -lstdc++.
+
+A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
+do this officially, the likely answer is don't build libstdc++ separately.
+
+RP 29/6/10
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ gcc/c-family/c.opt  |  4 ++++
+ gcc/cp/g++spec.c    |  1 +
+ gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++-
+ gcc/gcc.c           |  1 +
+ 4 files changed, 37 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 88c72c51c21..a7029592aa3 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1948,6 +1948,10 @@ nostdinc++
+ C++ ObjC++
+ Do not search standard system include directories for C++.
+ 
++nostdlib++
++Driver
++Do not link standard C++ runtime library
++
+ o
+ C ObjC C++ ObjC++ Joined Separate
+ ; Documented in common.opt
+diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
+index 6c4574a837d..0e2657f00ee 100644
+--- a/gcc/cp/g++spec.c
++++ b/gcc/cp/g++spec.c
+@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
+       switch (decoded_options[i].opt_index)
+ 	{
+ 	case OPT_nostdlib:
++	case OPT_nostdlib__:
+ 	case OPT_nodefaultlibs:
+ 	  library = -1;
+ 	  break;
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 001868e1509..4186c2616ab 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -226,6 +226,9 @@ in the following sections.
+ -fno-weak  -nostdinc++ @gol
+ -fvisibility-inlines-hidden @gol
+ -fvisibility-ms-compat @gol
++-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
++-fvtv-counts -fvtv-debug @gol
++-nostdlib++ @gol
+ -fext-numeric-literals @gol
+ -Wabi=@var{n}  -Wabi-tag  -Wconversion-null  -Wctor-dtor-privacy @gol
+ -Wdelete-non-virtual-dtor  -Wdeprecated-copy  -Wdeprecated-copy-dtor @gol
+@@ -536,7 +539,7 @@ Objective-C and Objective-C++ Dialects}.
+ -pie  -pthread  -r  -rdynamic @gol
+ -s  -static  -static-pie  -static-libgcc  -static-libstdc++ @gol
+ -static-libasan  -static-libtsan  -static-liblsan  -static-libubsan @gol
+--shared  -shared-libgcc  -symbolic @gol
++-shared  -shared-libgcc  -symbolic -nostdlib++ @gol
+ -T @var{script}  -Wl,@var{option}  -Xlinker @var{option} @gol
+ -u @var{symbol}  -z @var{keyword}}
+ 
+@@ -13259,6 +13262,33 @@ Specify that the program entry point is @var{entry}.  The argument is
+ interpreted by the linker; the GNU linker accepts either a symbol name
+ or an address.
+ 
++@item -nostdlib++
++@opindex nostdlib++
++Do not use the standard system C++ runtime libraries when linking.
++Only the libraries you specify will be passed to the linker.
++
++@cindex @option{-lgcc}, use with @option{-nostdlib}
++@cindex @option{-nostdlib} and unresolved references
++@cindex unresolved references and @option{-nostdlib}
++@cindex @option{-lgcc}, use with @option{-nodefaultlibs}
++@cindex @option{-nodefaultlibs} and unresolved references
++@cindex unresolved references and @option{-nodefaultlibs}
++One of the standard libraries bypassed by @option{-nostdlib} and
++@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
++which GCC uses to overcome shortcomings of particular machines, or special
++needs for some languages.
++(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
++Collection (GCC) Internals},
++for more discussion of @file{libgcc.a}.)
++In most cases, you need @file{libgcc.a} even when you want to avoid
++other standard libraries.  In other words, when you specify @option{-nostdlib}
++or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
++This ensures that you have no unresolved references to internal GCC
++library subroutines.
++(An example of such an internal subroutine is @code{__main}, used to ensure C++
++constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
++GNU Compiler Collection (GCC) Internals}.)
++
+ @item -pie
+ @opindex pie
+ Produce a dynamically linked position independent executable on targets
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 79c38d858d1..308872aef5f 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1052,6 +1052,7 @@ proper position among the other output files.  */
+     %(mflib) " STACK_SPLIT_SPEC "\
+     %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
+     %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\
++    %{!nostdlib++:}\
+     %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*}  \n%(post_link) }}}}}}"
+ #endif
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
new file mode 100644
index 0000000..4a552d5
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
@@ -0,0 +1,59 @@
+From ca3b3ac12d9b6e1065333dec89e7be2c733509d9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:14:20 +0400
+Subject: [PATCH 06/37] gcc: disable MASK_RELAX_PIC_CALLS bit
+
+The new feature added after 4.3.3
+"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
+will cause cc1plus eat up all the system memory when build webkit-gtk.
+The function mips_get_pic_call_symbol keeps on recursively calling itself.
+Disable this feature to walk aside the bug.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure    | 7 -------
+ gcc/configure.ac | 7 -------
+ 2 files changed, 14 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 2e08396622e..d36cb51bc2c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -27509,13 +27509,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
+         rm -f conftest.*
+       fi
+     fi
+-    if test $gcc_cv_as_ld_jalr_reloc = yes; then
+-      if test x$target_cpu_default = x; then
+-        target_cpu_default=MASK_RELAX_PIC_CALLS
+-      else
+-        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
+-      fi
+-    fi
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
+ $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
+ 
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 7d34911573e..dfa88c35f3f 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4816,13 +4816,6 @@ x:
+         rm -f conftest.*
+       fi
+     fi
+-    if test $gcc_cv_as_ld_jalr_reloc = yes; then
+-      if test x$target_cpu_default = x; then
+-        target_cpu_default=MASK_RELAX_PIC_CALLS
+-      else
+-        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
+-      fi
+-    fi
+     AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
+ 
+     AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0007-COLLECT_GCC_OPTIONS.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0007-COLLECT_GCC_OPTIONS.patch
new file mode 100644
index 0000000..a522ada
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0007-COLLECT_GCC_OPTIONS.patch
@@ -0,0 +1,38 @@
+From c7b8c2a6e81daaa50047c336c8ee90086aa4d4d5 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 07/37] 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 308872aef5f..30845e5b125 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -4804,6 +4804,15 @@ set_collect_gcc_options (void)
+ 		sizeof ("COLLECT_GCC_OPTIONS=") - 1);
+ 
+   first_time = TRUE;
++#ifdef HAVE_LD_SYSROOT
++  if (target_system_root_changed && target_system_root)
++    {
++      obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
++      obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
++      obstack_grow (&collect_obstack, "'", 1);
++      first_time = FALSE;
++    }
++#endif
+   for (i = 0; (int) i < n_switches; i++)
+     {
+       const char *const *args;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
new file mode 100644
index 0000000..2ef94a0
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -0,0 +1,96 @@
+From 2f65b8bbf9c7c4bc0b94bb7ba9f6a8eb8675c9ab Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:17:25 +0400
+Subject: [PATCH 08/37] Use the defaults.h in ${B} instead of ${S}, and t-oe in
+ ${B}
+
+Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
+the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+While compiling gcc-crosssdk-initial-x86_64 on some host, there is
+occasionally failure that test the existance of default.h doesn't
+work, the reason is tm_include_list='** defaults.h' rather than
+tm_include_list='** ./defaults.h'
+
+So we add the test condition for this situation.
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/Makefile.in  | 2 +-
+ gcc/configure    | 4 ++--
+ gcc/configure.ac | 4 ++--
+ gcc/mkconfig.sh  | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 508c674cbdc..3ccff1614bb 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -540,7 +540,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
+ 
+ xmake_file=@xmake_file@
+-tmake_file=@tmake_file@
++tmake_file=@tmake_file@ ./t-oe
+ TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
+ TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
+ TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
+diff --git a/gcc/configure b/gcc/configure
+index d36cb51bc2c..7acc7e487b0 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12341,8 +12341,8 @@ for f in $tm_file; do
+        tm_include_list="${tm_include_list} $f"
+        ;;
+     defaults.h )
+-       tm_file_list="${tm_file_list} \$(srcdir)/$f"
+-       tm_include_list="${tm_include_list} $f"
++       tm_file_list="${tm_file_list} ./$f"
++       tm_include_list="${tm_include_list} ./$f"
+        ;;
+     * )
+        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index dfa88c35f3f..f5d5e5c16a8 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1968,8 +1968,8 @@ for f in $tm_file; do
+        tm_include_list="${tm_include_list} $f"
+        ;;
+     defaults.h )
+-       tm_file_list="${tm_file_list} \$(srcdir)/$f"
+-       tm_include_list="${tm_include_list} $f"
++       tm_file_list="${tm_file_list} ./$f"
++       tm_include_list="${tm_include_list} ./$f"
+        ;;
+     * )
+        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
+index 308b87d0cc1..19068cbc24a 100644
+--- a/gcc/mkconfig.sh
++++ b/gcc/mkconfig.sh
+@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
+     if [ $# -ge 1 ]; then
+ 	echo '#ifdef IN_GCC' >> ${output}T
+ 	for file in "$@"; do
+-	    if test x"$file" = x"defaults.h"; then
++	    if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
+ 		postpone_defaults_h="yes"
+ 	    else
+ 		echo "# include \"$file\"" >> ${output}T
+@@ -106,7 +106,7 @@ esac
+ 
+ # If we postponed including defaults.h, add the #include now.
+ if test x"$postpone_defaults_h" = x"yes"; then
+-    echo "# include \"defaults.h\"" >> ${output}T
++    echo "# include \"./defaults.h\"" >> ${output}T
+ fi
+ 
+ # Add multiple inclusion protection guard, part two.
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0009-fortran-cross-compile-hack.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0009-fortran-cross-compile-hack.patch
new file mode 100644
index 0000000..7959714
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0009-fortran-cross-compile-hack.patch
@@ -0,0 +1,46 @@
+From eda94df7d2389b6c36428e5687d5f0722d3375c3 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 09/37] 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 487d8c090e2..a02b49293ac 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -13056,7 +13056,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 c06db7b1a78..5b4b1b7f1f2 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -250,7 +250,7 @@ AC_SUBST(enable_static)
+ 
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+ 
+ # extra LD Flags which are required for targets
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0010-cpp-honor-sysroot.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0010-cpp-honor-sysroot.patch
new file mode 100644
index 0000000..b680e6f
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0010-cpp-honor-sysroot.patch
@@ -0,0 +1,54 @@
+From c2ec131f19d656fd916c45f51186633c789db6e9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:22:00 +0400
+Subject: [PATCH 10/37] cpp: honor sysroot.
+
+Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
+preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
+rather than the --sysroot option specified on the commandline. If access to that directory is
+permission denied (unreadable), gcc will error.
+
+This happens when ccache is in use due to the fact it uses preprocessed source files.
+
+The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
+-isystem, -isysroot happen and the correct sysroot is used.
+
+[YOCTO #2074]
+
+RP 2012/04/13
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/cp/lang-specs.h | 2 +-
+ gcc/gcc.c           | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
+index c6e42eda283..e1ddf066467 100644
+--- a/gcc/cp/lang-specs.h
++++ b/gcc/cp/lang-specs.h
+@@ -66,5 +66,5 @@ along with GCC; see the file COPYING3.  If not see
+   {".ii", "@c++-cpp-output", 0, 0, 0},
+   {"@c++-cpp-output",
+       "%{!E:%{!M:%{!MM:"
+-      "  cc1plus -fpreprocessed %i %(cc1_options) %2"
++      "  cc1plus -fpreprocessed %i %I %(cc1_options) %2"
+       "  %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 30845e5b125..cef26c454d7 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1349,7 +1349,7 @@ static const struct compiler default_compilers[] =
+ 					   %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
+   {".i", "@cpp-output", 0, 0, 0},
+   {"@cpp-output",
+-   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
++   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+   {".s", "@assembler", 0, 0, 0},
+   {"@assembler",
+    "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0011-MIPS64-Default-to-N64-ABI.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0011-MIPS64-Default-to-N64-ABI.patch
new file mode 100644
index 0000000..d59a31b
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0011-MIPS64-Default-to-N64-ABI.patch
@@ -0,0 +1,57 @@
+From 52b915732de89d8676868641af462df81211bb39 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 11/37] 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 a189cb19f63..293ed8d585d 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2267,29 +2267,29 @@ mips*-*-linux*)				# Linux MIPS, either endian.
+ 			default_mips_arch=mips32
+ 			;;
+ 		mips64el-st-linux-gnu)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			tm_file="${tm_file} mips/st.h"
+ 			tmake_file="${tmake_file} mips/t-st"
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mips64octeon*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
+ 			target_cpu_default=MASK_SOFT_FLOAT_ABI
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mipsisa64r6*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			default_mips_arch=mips64r6
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mipsisa64r2*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			default_mips_arch=mips64r2
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mips64*-*-linux* | mipsisa64*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 	esac
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
new file mode 100644
index 0000000..f23a314
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -0,0 +1,232 @@
+From 492f008dce784749e39e1c396aeea6fa1d977374 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:24:50 +0400
+Subject: [PATCH 12/37] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+ relative to SYSTEMLIBS_DIR
+
+This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+relative to SYSTEMLIBS_DIR which can be set in generated headers
+This breaks the assumption of hardcoded multilib in gcc
+Change is only for the supported architectures in OE including
+SH, sparc, alpha for possible future support (if any)
+
+Removes the do_headerfix task in metadata
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE configuration]
+---
+ gcc/config/alpha/linux-elf.h |  4 ++--
+ gcc/config/arm/linux-eabi.h  |  4 ++--
+ gcc/config/arm/linux-elf.h   |  2 +-
+ gcc/config/i386/linux.h      |  2 +-
+ gcc/config/i386/linux64.h    |  6 +++---
+ gcc/config/linux.h           |  8 ++++----
+ gcc/config/mips/linux.h      | 12 ++++++------
+ gcc/config/rs6000/linux64.h  | 15 +++++----------
+ gcc/config/sh/linux.h        |  2 +-
+ gcc/config/sparc/linux.h     |  2 +-
+ gcc/config/sparc/linux64.h   |  4 ++--
+ 11 files changed, 28 insertions(+), 33 deletions(-)
+
+diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
+index 824861befec..6afacce3292 100644
+--- a/gcc/config/alpha/linux-elf.h
++++ b/gcc/config/alpha/linux-elf.h
+@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3.  If not see
+ #define EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+ 
+-#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER	SYSTEMLIBS_DIR "ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 66ec0ea3980..e4ade2e2ab0 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -65,8 +65,8 @@
+    GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
+ 
+ #undef  GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
+ #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+ 
+ #define GLIBC_DYNAMIC_LINKER \
+diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
+index 9a360defd21..98f6e960b64 100644
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -60,7 +60,7 @@
+ 
+ #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #define LINUX_TARGET_LINK_SPEC  "%{h*} \
+    %{static:-Bstatic} \
+diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
+index 9a6e2d99896..31efbb73016 100644
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
+diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+index c08221c4210..dbb474d792b 100644
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
+ 
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index c3c4a219e67..4b05d8e93d1 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+    supporting both 32-bit and 64-bit compilation.  */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
+index 6f79ac9c01a..25de96f9561 100644
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3.  If not see
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+ 
+ #define GLIBC_DYNAMIC_LINKER32 \
+-  "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKER64 \
+-  "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKERN32 \
+-  "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ 
+ #undef UCLIBC_DYNAMIC_LINKER32
+ #define UCLIBC_DYNAMIC_LINKER32 \
+-  "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+ #undef UCLIBC_DYNAMIC_LINKER64
+ #define UCLIBC_DYNAMIC_LINKER64 \
+-  "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
+ #define UCLIBC_DYNAMIC_LINKERN32 \
+-  "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+ 
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 \
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index bcc540b5ff2..982ca274621 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -428,24 +428,19 @@ extern int dot_symbols;
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
+-
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
+ #ifdef LINUX64_DEFAULT_ABI_ELFv2
+-#define GLIBC_DYNAMIC_LINKER64 \
+-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
+-":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
+ #else
+-#define GLIBC_DYNAMIC_LINKER64 \
+-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
+-":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
+ #endif
+ 
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 \
+-  "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
++  SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
+ #undef MUSL_DYNAMIC_LINKER64
+ #define MUSL_DYNAMIC_LINKER64 \
+-  "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
++  SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
+ 
+ #undef  DEFAULT_ASM_ENDIAN
+ #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
+diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
+index c9897b7aca5..82f275319cc 100644
+--- a/gcc/config/sh/linux.h
++++ b/gcc/config/sh/linux.h
+@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3.  If not see
+   "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
+   "%{mfdpic:-fdpic}.so.1"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
+diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
+index 2db9ea2172e..1979cfff5d3 100644
+--- a/gcc/config/sparc/linux.h
++++ b/gcc/config/sparc/linux.h
+@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
+index 21e13001951..d39c38a531f 100644
+--- a/gcc/config/sparc/linux64.h
++++ b/gcc/config/sparc/linux64.h
+@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3.  If not see
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #ifdef SPARC_BI_ARCH
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0013-gcc-Fix-argument-list-too-long-error.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0013-gcc-Fix-argument-list-too-long-error.patch
new file mode 100644
index 0000000..f853ff9
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0013-gcc-Fix-argument-list-too-long-error.patch
@@ -0,0 +1,40 @@
+From d8a24eca2d7a222d4910c8a508d75d0d1418e201 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:26:37 +0400
+Subject: [PATCH 13/37] gcc: Fix argument list too long error.
+
+There would be an "Argument list too long" error when the
+build directory is longer than 200, this is caused by:
+
+headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
+
+The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
+it, use the $(sort list) of GNU make which can handle the too long list
+would fix the problem, the header would be short enough after sorted.
+The "tr ' ' '\012'" was used for translating the space to "\n", the
+$(sort list) doesn't need this.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 3ccff1614bb..88b1aec732b 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3538,7 +3538,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+ # We keep the directory structure for files in config or c-family and .def
+ # files. All other files are flattened to a single directory.
+ 	$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
+-	headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
++	headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
+ 	srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
+ 	for file in $$headers; do \
+ 	  if [ -f $$file ] ; then \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0014-Disable-sdt.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0014-Disable-sdt.patch
new file mode 100644
index 0000000..945cf8f
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0014-Disable-sdt.patch
@@ -0,0 +1,113 @@
+From d5e52580314ef6056ca701fcc030c7c884cb1d7f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:28:10 +0400
+Subject: [PATCH 14/37] Disable sdt.
+
+We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
+It may or may not exist from preivous builds though. To be determinstic, disable
+sdt.h usage always. This avoids build failures if the header is removed after configure
+but before libgcc is compiled for example.
+
+RP 2012/8/7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Disable sdt for libstdc++-v3.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Inappropriate [hack]
+---
+ gcc/configure             | 12 ++++++------
+ gcc/configure.ac          | 18 +++++++++---------
+ libstdc++-v3/configure    |  6 +++---
+ libstdc++-v3/configure.ac |  2 +-
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 7acc7e487b0..6a87ab693ea 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -29292,12 +29292,12 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
+ $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
+ have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+-  have_sys_sdt_h=yes
+-
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+-
+-fi
++#if test -f $target_header_dir/sys/sdt.h; then
++#  have_sys_sdt_h=yes
++#
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#
++#fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
+ $as_echo "$have_sys_sdt_h" >&6; }
+ 
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index f5d5e5c16a8..a50765171be 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5985,15 +5985,15 @@ fi
+ AC_SUBST([enable_default_ssp])
+ 
+ # Test for <sys/sdt.h> on the target.
+-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+-AC_MSG_CHECKING(sys/sdt.h in the target C library)
+-have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+-  have_sys_sdt_h=yes
+-  AC_DEFINE(HAVE_SYS_SDT_H, 1,
+-            [Define if your target C library provides sys/sdt.h])
+-fi
+-AC_MSG_RESULT($have_sys_sdt_h)
++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
++#AC_MSG_CHECKING(sys/sdt.h in the target C library)
++#have_sys_sdt_h=no
++#if test -f $target_header_dir/sys/sdt.h; then
++#  have_sys_sdt_h=yes
++#  AC_DEFINE(HAVE_SYS_SDT_H, 1,
++#            [Define if your target C library provides sys/sdt.h])
++#fi
++#AC_MSG_RESULT($have_sys_sdt_h)
+ 
+ # Check if TFmode long double should be used by default or not.
+ # Some glibc targets used DFmode long double, but with glibc 2.4
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 15848e364ab..8d3da1cc526 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -22084,11 +22084,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+-  if test $glibcxx_cv_sys_sdt_h = yes; then
++#  if test $glibcxx_cv_sys_sdt_h = yes; then
+ 
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+ 
+-  fi
++#  fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
+ $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
+ 
+diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
+index ad5b4117cfd..2341645ba6f 100644
+--- a/libstdc++-v3/configure.ac
++++ b/libstdc++-v3/configure.ac
+@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
+ GLIBCXX_CHECK_SC_NPROC_ONLN
+ GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
+ GLIBCXX_CHECK_SYSCTL_HW_NCPU
+-GLIBCXX_CHECK_SDT_H
++#GLIBCXX_CHECK_SDT_H
+ 
+ # Check for available headers.
+ AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0015-libtool.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0015-libtool.patch
new file mode 100644
index 0000000..764460b
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0015-libtool.patch
@@ -0,0 +1,42 @@
+From d7c605d92094c75dc2717d9dd830e525b2c8b0ff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:29:11 +0400
+Subject: [PATCH 15/37] libtool
+
+libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
+when running on am x86_64 build host.
+
+This patch stops this speading to libdir in the libstdc++.la file within libtool.
+Arguably, it shouldn't be passing this into libtool in the first place but
+for now this resolves the nastiest problems this causes.
+
+func_normal_abspath would resolve an empty path to `pwd` so we need
+to filter the zero case.
+
+RP 2012/8/24
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ ltmain.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 79f9ba89af5..8e222f7c16b 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6359,6 +6359,10 @@ func_mode_link ()
+ 	func_warning "ignoring multiple \`-rpath's for a libtool library"
+ 
+       install_libdir="$1"
++      if test -n "$install_libdir"; then
++	func_normal_abspath "$install_libdir"
++	install_libdir=$func_normal_abspath_result
++      fi
+ 
+       oldlibs=
+       if test -z "$rpath"; then
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
new file mode 100644
index 0000000..398074b
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -0,0 +1,43 @@
+From c3addf8bc41190d46d98eb7690ff4583eebd5943 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:30:32 +0400
+Subject: [PATCH 16/37] gcc: armv4: pass fix-v4bx to linker to support EABI.
+
+The LINK_SPEC for linux gets overwritten by linux-eabi.h which
+means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
+the option is not passed to linker when chosing march=armv4
+This patch redefines this in linux-eabi.h and reinserts it
+for eabi defaulting toolchains.
+
+We might want to send it upstream.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/arm/linux-eabi.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index e4ade2e2ab0..108863f69d2 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -91,10 +91,14 @@
+ #define MUSL_DYNAMIC_LINKER \
+   "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
+ 
++/* For armv4 we pass --fix-v4bx to linker to support EABI */
++#undef TARGET_FIX_V4BX_SPEC
++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+ #undef  LINK_SPEC
+-#define LINK_SPEC EABI_LINK_SPEC					\
++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC			\
+   LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC,				\
+ 		       LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch
new file mode 100644
index 0000000..7d5c94a
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -0,0 +1,102 @@
+From e1071f4e749586fcb3edcacf43d4dd44081d16ec Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:33:04 +0400
+Subject: [PATCH 17/37] Use the multilib config files from ${B} instead of
+ using the ones from ${S}
+
+Use the multilib config files from ${B} instead of using the ones from ${S}
+so that the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure    | 22 ++++++++++++++++++----
+ gcc/configure.ac | 22 ++++++++++++++++++----
+ 2 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 6a87ab693ea..2e822caf66d 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12321,10 +12321,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+-	if test -f ${srcdir}/config/$f
+-	then
+-		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+-	fi
++  case $f in
++    */t-linux64 )
++       if test -f ./config/$f
++       then
++         tmake_file_="${tmake_file_} ./config/$f"
++       fi
++       ;;
++    * )
++       if test -f ${srcdir}/config/$f
++       then
++         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++       fi
++       ;;
++  esac
+ done
+ tmake_file="${tmake_file_}"
+ 
+@@ -12335,6 +12345,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+   case $f in
++    */linux64.h )
++       tm_file_list="${tm_file_list} ./config/$f"
++       tm_include_list="${tm_include_list} ./config/$f"
++       ;;
+     ./* )
+        f=`echo $f | sed 's/^..//'`
+        tm_file_list="${tm_file_list} $f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index a50765171be..70e7bac78c4 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1948,10 +1948,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+-	if test -f ${srcdir}/config/$f
+-	then
+-		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+-	fi
++  case $f in
++    */t-linux64 )
++       if test -f ./config/$f
++       then
++         tmake_file_="${tmake_file_} ./config/$f"
++       fi
++       ;;
++    * )
++       if test -f ${srcdir}/config/$f
++       then
++         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++       fi
++       ;;
++  esac
+ done
+ tmake_file="${tmake_file_}"
+ 
+@@ -1962,6 +1972,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+   case $f in
++    */linux64.h )
++       tm_file_list="${tm_file_list} ./config/$f"
++       tm_include_list="${tm_include_list} ./config/$f"
++       ;;
+     ./* )
+        f=`echo $f | sed 's/^..//'`
+        tm_file_list="${tm_file_list} $f"
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
new file mode 100644
index 0000000..596337b
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -0,0 +1,31 @@
+From 1ffbbb39c9848aa7a04da18fb79b1f0bd7731e00 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:39:38 +0000
+Subject: [PATCH 18/37] Avoid using libdir from .la which usually points to a
+ host path
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 8e222f7c16b..0a93b4e5c3b 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -5628,6 +5628,9 @@ func_mode_link ()
+ 	    absdir="$abs_ladir"
+ 	    libdir="$abs_ladir"
+ 	  else
++	    # Instead of using libdir from .la which usually points to a host path,
++	    # use the path the .la is contained in.
++	    libdir="$abs_ladir"
+ 	    dir="$libdir"
+ 	    absdir="$libdir"
+ 	  fi
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0019-export-CPP.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0019-export-CPP.patch
new file mode 100644
index 0000000..50d17dd
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0019-export-CPP.patch
@@ -0,0 +1,53 @@
+From 5ece023b88eaba16d8744f8f2ff72345ec3b7f92 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:40:59 +0000
+Subject: [PATCH 19/37] export CPP
+
+The OE environment sets and exports CPP as being the target gcc. When
+building gcc-cross-canadian for a mingw targetted sdk, the following can be found
+in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
+
+configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
+configure:3666: gcc  -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe  conftest.c >&5
+configure:3666: $? = 0
+configure:3698: result: no
+configure:3786: checking how to run the C preprocessor
+configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
+configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
+configure:3876: $? = 0
+
+Note this is a *build* target (in build-x86_64-linux) so it should be
+using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
+headers are very different, using the wrong cpp is a real problem. It is leaking
+into configure through the CPP variable. Ultimately this leads to build
+failures related to not being able to include a process.h file for pem-unix.c.
+
+The fix is to ensure we export a sane CPP value into the build
+environment when using build targets. We could define a CPP_FOR_BUILD value which may be
+the version which needs to be upstreamed but for now, this fix is good enough to
+avoid the problem.
+
+RP 22/08/2013
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index 28539a45372..b21e0791f55 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
+ 	AR="$(AR_FOR_BUILD)"; export AR; \
+ 	AS="$(AS_FOR_BUILD)"; export AS; \
+ 	CC="$(CC_FOR_BUILD)"; export CC; \
++	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0020-Ensure-target-gcc-headers-can-be-included.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0020-Ensure-target-gcc-headers-can-be-included.patch
new file mode 100644
index 0000000..f37c6f3
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0020-Ensure-target-gcc-headers-can-be-included.patch
@@ -0,0 +1,98 @@
+From 89f7a8e5c55b31bff011cd7466d78cd84d1eb307 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 10:25:11 +0000
+Subject: [PATCH 20/37] Ensure target gcc headers can be included
+
+There are a few headers installed as part of the OpenEmbedded
+gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
+built for the target architecture, these are within the target
+sysroot and not cross/nativesdk; thus they weren't able to be
+found by gcc with the existing search paths. Add support for
+picking up these headers under the sysroot supplied on the gcc
+command line in order to resolve this.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/Makefile.in  | 2 ++
+ gcc/cppdefault.c | 4 ++++
+ gcc/defaults.h   | 9 +++++++++
+ gcc/gcc.c        | 7 -------
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 88b1aec732b..eb1dc304de2 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -618,6 +618,7 @@ libexecdir = @libexecdir@
+ 
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
+ # Directory in which all plugin resources are installed
+@@ -2867,6 +2868,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
+ 
+ PREPROCESSOR_DEFINES = \
+   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
++  -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
+   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
+   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
+diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
+index c4796385643..980e2bd47a7 100644
+--- a/gcc/cppdefault.c
++++ b/gcc/cppdefault.c
+@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
+     /* This is the dir for gcc's private headers.  */
+     { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
+ #endif
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++    /* This is the dir for gcc's private headers under the specified sysroot.  */
++    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++#endif
+ #ifdef LOCAL_INCLUDE_DIR
+     /* /usr/local/include comes before the fixincluded header files.  */
+     { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+diff --git a/gcc/defaults.h b/gcc/defaults.h
+index b7534256119..41ca579b267 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1459,4 +1459,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
+ #endif
+ 
++/* Default prefixes to attach to command names.  */
++
++#ifndef STANDARD_STARTFILE_PREFIX_1
++#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
++#endif
++#ifndef STANDARD_STARTFILE_PREFIX_2
++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
++#endif
++
+ #endif  /* ! GCC_DEFAULTS_H */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index cef26c454d7..14b1a6e8c44 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1470,13 +1470,6 @@ static const char *gcc_libexec_prefix;
+ 
+ /* Default prefixes to attach to command names.  */
+ 
+-#ifndef STANDARD_STARTFILE_PREFIX_1
+-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+-#endif
+-#ifndef STANDARD_STARTFILE_PREFIX_2
+-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+-#endif
+-
+ #ifdef CROSS_DIRECTORY_STRUCTURE  /* Don't use these prefixes for a cross compiler.  */
+ #undef MD_EXEC_PREFIX
+ #undef MD_STARTFILE_PREFIX
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0021-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0021-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
new file mode 100644
index 0000000..ef98572
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0021-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
@@ -0,0 +1,54 @@
+From 2a1895aca3d9020d0d5ac74975221727384ef8a6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 11:17:19 +0000
+Subject: [PATCH 21/37] gcc 4.8+ won't build with --disable-dependency-tracking
+
+since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
+
+This patch ensures we only use those compiler options when its enabled.
+
+Upstream-Status: Submitted
+
+(Problem was already reported upstream, attached this patch there
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
+
+RP
+2012/09/22
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libatomic/Makefile.am | 3 ++-
+ libatomic/Makefile.in | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
+index c1b7c73934a..ef43d62c07a 100644
+--- a/libatomic/Makefile.am
++++ b/libatomic/Makefile.am
+@@ -101,7 +101,8 @@ PAT_S		= $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF	= -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT	= $(word $(PAT_S),$(IFUNC_OPTIONS))
+ 
+-M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS		=
+ M_SIZE		= -DN=$(PAT_N)
+ M_IFUNC		= $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE		= $(PAT_BASE)_n.c
+diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
+index 29324e3e0ac..d5cdb4259ef 100644
+--- a/libatomic/Makefile.in
++++ b/libatomic/Makefile.in
+@@ -414,7 +414,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
+ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS =
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0022-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0022-Don-t-search-host-directory-during-relink-if-inst_pr.patch
new file mode 100644
index 0000000..8316c4d
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0022-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -0,0 +1,38 @@
+From 4b9f8cfbfb48a1a9781b7c3a9b867732ef37b7c5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 3 Mar 2015 08:21:19 +0000
+Subject: [PATCH 22/37] Don't search host directory during "relink" if
+ $inst_prefix is provided
+
+http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
+
+Upstream-Status: Submitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 0a93b4e5c3b..6de6ed2f9a0 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6004,12 +6004,13 @@ func_mode_link ()
+ 	      fi
+ 	    else
+ 	      # We cannot seem to hardcode it, guess we'll fake it.
++	      # Default if $libdir is not relative to the prefix:
+ 	      add_dir="-L$libdir"
+-	      # Try looking first in the location we're being installed to.
++
+ 	      if test -n "$inst_prefix_dir"; then
+ 		case $libdir in
+ 		  [\\/]*)
+-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
++		    add_dir="-L$inst_prefix_dir$libdir"
+ 		    ;;
+ 		esac
+ 	      fi
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0023-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0023-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
new file mode 100644
index 0000000..fdea599
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0023-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
@@ -0,0 +1,29 @@
+From 3a554b321250f6ddf1277e5559890ee977e78cb0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:15:27 -0700
+Subject: [PATCH 23/37] Use SYSTEMLIBS_DIR replacement instead of hardcoding
+ base_libdir
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 9d0292d64f2..51661995fc7 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -21,7 +21,7 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+ 
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0024-aarch64-Add-support-for-musl-ldso.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0024-aarch64-Add-support-for-musl-ldso.patch
new file mode 100644
index 0000000..f53c994
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0024-aarch64-Add-support-for-musl-ldso.patch
@@ -0,0 +1,28 @@
+From b7001034f35e7e5090fa95cb9a622469300cd45d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:18:39 -0700
+Subject: [PATCH 24/37] aarch64: Add support for musl ldso
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 51661995fc7..db687f753f6 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -24,7 +24,7 @@
+ #define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+ 
+ #undef MUSL_DYNAMIC_LINKER
+-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define MUSL_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+ 
+ #undef  ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0025-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0025-libcc1-fix-libcc1-s-install-path-and-rpath.patch
new file mode 100644
index 0000000..7b80655
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0025-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -0,0 +1,54 @@
+From 4d05ea7a12d1ba4515220c5c16f71ac650219db6 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 5 Jul 2015 20:25:18 -0700
+Subject: [PATCH 25/37] libcc1: fix libcc1's install path and rpath
+
+* Install libcc1.so and libcc1plugin.so into
+  $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
+  had done to lto-plugin.
+* Fix bad RPATH iussue:
+  gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
+ /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
+ [rpaths]
+
+Upstream-Status: Inappropriate [OE configuration]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ libcc1/Makefile.am | 4 ++--
+ libcc1/Makefile.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
+index 72c6aead475..42a87740b31 100644
+--- a/libcc1/Makefile.am
++++ b/libcc1/Makefile.am
+@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ 	    $(Wc)$(libiberty_normal)))
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+ 
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+ 
+ if ENABLE_PLUGIN
+ plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
+diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
+index 7104b649026..2103c477468 100644
+--- a/libcc1/Makefile.in
++++ b/libcc1/Makefile.in
+@@ -393,8 +393,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ 	    $(Wc)$(libiberty_normal)))
+ 
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+ @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
+ @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
+ shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0026-handle-sysroot-support-for-nativesdk-gcc.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0026-handle-sysroot-support-for-nativesdk-gcc.patch
new file mode 100644
index 0000000..7062c03
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0026-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -0,0 +1,213 @@
+From fe175ac845f1ac6965ede0240e9b763ae520614d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:39:54 +0000
+Subject: [PATCH 26/37] handle sysroot support for nativesdk-gcc
+
+Being able to build a nativesdk gcc is useful, particularly in cases
+where the host compiler may be of an incompatible version (or a 32
+bit compiler is needed).
+
+Sadly, building nativesdk-gcc is not straight forward. We install
+nativesdk-gcc into a relocatable location and this means that its
+library locations can change. "Normal" sysroot support doesn't help
+in this case since the values of paths like "libdir" change, not just
+base root directory of the system.
+
+In order to handle this we do two things:
+
+a) Add %r into spec file markup which can be used for injected paths
+   such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
+b) Add other paths which need relocation into a .gccrelocprefix section
+   which the relocation code will notice and adjust automatically.
+
+Upstream-Status: Inappropriate
+RP 2015/7/28
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++-------------
+ gcc/cppdefault.h |  3 ++-
+ gcc/gcc.c        | 20 +++++++++++++------
+ 3 files changed, 53 insertions(+), 20 deletions(-)
+
+diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
+index 980e2bd47a7..39b6059efdc 100644
+--- a/gcc/cppdefault.c
++++ b/gcc/cppdefault.c
+@@ -35,6 +35,30 @@
+ # undef CROSS_INCLUDE_DIR
+ #endif
+ 
++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
++static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
++#ifdef LOCAL_INCLUDE_DIR
++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
++#endif
++#ifdef PREFIX_INCLUDE_DIR
++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
++#endif
++#ifdef FIXED_INCLUDE_DIR
++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
++#endif
++#ifdef CROSS_INCLUDE_DIR
++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
++#endif
++#ifdef TOOL_INCLUDE_DIR
++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
++#endif
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
++#endif
++
+ const struct default_include cpp_include_defaults[]
+ #ifdef INCLUDE_DEFAULTS
+ = INCLUDE_DEFAULTS;
+@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
+ = {
+ #ifdef GPLUSPLUS_INCLUDE_DIR
+     /* Pick up GNU C++ generic include files.  */
+-    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
++    { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
+       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
+     /* Pick up GNU C++ target-dependent include files.  */
+-    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
++    { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
+       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
+ #endif
+ #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
+     /* Pick up GNU C++ backward and deprecated include files.  */
+-    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
++    { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
+       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_DIR
+     /* This is the dir for gcc's private headers.  */
+-    { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++    { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_SUBDIR_TARGET
+     /* This is the dir for gcc's private headers under the specified sysroot.  */
+-    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++    { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
+ #endif
+ #ifdef LOCAL_INCLUDE_DIR
+     /* /usr/local/include comes before the fixincluded header files.  */
+-    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+-    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
++    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
+ #endif
+ #ifdef PREFIX_INCLUDE_DIR
+-    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
++    { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
+ #endif
+ #ifdef FIXED_INCLUDE_DIR
+     /* This is the dir for fixincludes.  */
+-    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
++    { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
+       /* A multilib suffix needs adding if different multilibs use
+ 	 different headers.  */
+ #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
+@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
+ #endif
+ #ifdef CROSS_INCLUDE_DIR
+     /* One place the target system's headers might be.  */
+-    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++    { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef TOOL_INCLUDE_DIR
+     /* Another place the target system's headers might be.  */
+-    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
++    { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
+ #endif
+ #ifdef NATIVE_SYSTEM_HEADER_DIR
+     /* /usr/include comes dead last.  */
+-    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
+-    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
++    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
++    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
+ #endif
+     { 0, 0, 0, 0, 0, 0 }
+   };
+diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
+index e2d96f1e760..29fa5f815c8 100644
+--- a/gcc/cppdefault.h
++++ b/gcc/cppdefault.h
+@@ -33,7 +33,8 @@
+ 
+ struct default_include
+ {
+-  const char *const fname;	/* The name of the directory.  */
++  const char *fname;     /* The name of the directory.  */
++
+   const char *const component;	/* The component containing the directory
+ 				   (see update_path in prefix.c) */
+   const char cplusplus;		/* Only look here if we're compiling C++.  */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 14b1a6e8c44..857310092d9 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -253,6 +253,8 @@ FILE *report_times_to_file = NULL;
+ #endif
+ static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
+ 
++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
++
+ /* Nonzero means pass the updated target_system_root to the compiler.  */
+ 
+ static int target_system_root_changed;
+@@ -527,6 +529,7 @@ or with constant text in a single argument.
+  %G     process LIBGCC_SPEC as a spec.
+  %R     Output the concatenation of target_system_root and
+         target_sysroot_suffix.
++ %r     Output the base path target_relocatable_prefix
+  %S     process STARTFILE_SPEC as a spec.  A capital S is actually used here.
+  %E     process ENDFILE_SPEC as a spec.  A capital E is actually used here.
+  %C     process CPP_SPEC as a spec.
+@@ -1493,10 +1496,10 @@ static const char *gcc_libexec_prefix;
+    gcc_exec_prefix is set because, in that case, we know where the
+    compiler has been installed, and use paths relative to that
+    location instead.  */
+-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
+-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
+-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
+-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+ 
+ /* For native compilers, these are well-known paths containing
+    components that may be provided by the system.  For cross
+@@ -1504,9 +1507,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+ static const char *md_exec_prefix = MD_EXEC_PREFIX;
+ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
+ static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_1
++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
+   = STANDARD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_2
++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
+   = STANDARD_STARTFILE_PREFIX_2;
+ 
+ /* A relative path to be used in finding the location of tools
+@@ -5915,6 +5918,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
+ 	      }
+ 	    break;
+ 
++          case 'r':
++              obstack_grow (&obstack, target_relocatable_prefix,
++		      strlen (target_relocatable_prefix));
++            break;
++
+ 	  case 'S':
+ 	    value = do_spec_1 (startfile_spec, 0, NULL);
+ 	    if (value != 0)
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0027-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0027-Search-target-sysroot-gcc-version-specific-dirs-with.patch
new file mode 100644
index 0000000..e3ec943
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0027-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -0,0 +1,102 @@
+From bf07530706382c90fb89f7d8a727eb9aeb29a56a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:41:45 +0000
+Subject: [PATCH 27/37] Search target sysroot gcc version specific dirs with
+ multilib.
+
+We install the gcc libraries (such as crtbegin.p) into
+<sysroot><libdir>/<target-sys>/5.2.0/
+which is a default search path for GCC (aka multi_suffix in the
+code below). <target-sys> is 'machine' in gcc's terminology. We use
+these directories so that multiple gcc versions could in theory
+co-exist on target.
+
+We only want to build one gcc-cross-canadian per arch and have this work
+for all multilibs. <target-sys> can be handled by mapping the multilib
+<target-sys> to the one used by gcc-cross-canadian, e.g.
+mips64-polkmllib32-linux
+is symlinked to by mips64-poky-linux.
+
+The default gcc search path in the target sysroot for a "lib64" mutlilib
+is:
+
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+which means that the lib32 crtbegin.o will be found and the lib64 ones
+will not which leads to compiler failures.
+
+This patch injects a multilib version of that path first so the lib64
+binaries can be found first. With this change the search path becomes:
+
+<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+Upstream-Status: Pending
+RP 2015/7/31
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
+ 1 file changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 857310092d9..6363e63b8ff 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -2610,7 +2610,7 @@ for_each_path (const struct path_prefix *paths,
+       if (path == NULL)
+ 	{
+ 	  len = paths->max_len + extra_space + 1;
+-	  len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
++	  len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
+ 	  path = XNEWVEC (char, len);
+ 	}
+ 
+@@ -2622,6 +2622,33 @@ for_each_path (const struct path_prefix *paths,
+ 	  /* Look first in MACHINE/VERSION subdirectory.  */
+ 	  if (!skip_multi_dir)
+ 	    {
++	      if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
++	        {
++	          const char *this_multi;
++	          size_t this_multi_len;
++
++	          if (pl->os_multilib)
++		    {
++		      this_multi = multi_os_dir;
++		      this_multi_len = multi_os_dir_len;
++		    }
++	          else
++		    {
++		      this_multi = multi_dir;
++		      this_multi_len = multi_dir_len;
++		    }
++
++	          /* Look in multilib MACHINE/VERSION subdirectory first */
++	          if (this_multi_len)
++	            {
++		      memcpy (path + len, this_multi, this_multi_len + 1);
++	              memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
++	              ret = callback (path, callback_info);
++	                if (ret)
++		          break;
++	            }
++	        }
++
+ 	      memcpy (path + len, multi_suffix, suffix_len + 1);
+ 	      ret = callback (path, callback_info);
+ 	      if (ret)
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0028-Fix-various-_FOR_BUILD-and-related-variables.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0028-Fix-various-_FOR_BUILD-and-related-variables.patch
new file mode 100644
index 0000000..bdcbd32
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0028-Fix-various-_FOR_BUILD-and-related-variables.patch
@@ -0,0 +1,137 @@
+From 16ab14b7221b3491cd43ab745f57b60ca83089df Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:42:45 +0000
+Subject: [PATCH 28/37] Fix various _FOR_BUILD and related variables
+
+When doing a FOR_BUILD thing, you have to override CFLAGS with
+CFLAGS_FOR_BUILD. And if you use C++, you also have to override
+CXXFLAGS with CXXFLAGS_FOR_BUILD.
+Without this, when building for mingw, you end up trying to use
+the mingw headers for a host build.
+
+The same goes for other variables as well, such as CPPFLAGS,
+CPP, and GMPINC.
+
+Upstream-Status: Pending
+
+Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in      | 6 ++++++
+ Makefile.tpl     | 5 +++++
+ gcc/Makefile.in  | 2 +-
+ gcc/configure    | 2 +-
+ gcc/configure.ac | 2 +-
+ 5 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index b21e0791f55..0e573791202 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
+ 	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ 	GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+@@ -171,6 +172,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
++	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++	CPP="$(CC_FOR_BUILD) -E" \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+ 
+ # This is the list of directories to built for the host system.
+@@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ 	$(BASE_EXPORTS) \
+ 	CC="$(CC)"; export CC; \
++	CPP="$(CC) -E"; export CPP; \
+ 	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+@@ -775,6 +780,7 @@ BASE_FLAGS_TO_PASS = \
+ 	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ 	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ 	"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
++	"CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
+ 	"EXPECT=$(EXPECT)" \
+ 	"FLEX=$(FLEX)" \
+ 	"INSTALL=$(INSTALL)" \
+diff --git a/Makefile.tpl b/Makefile.tpl
+index 126296fb49a..15fb236bcc0 100644
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
+ 	CC="$(CC_FOR_BUILD)"; export CC; \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ 	GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+@@ -173,6 +174,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
++	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++	CPP="$(CC_FOR_BUILD) -E" \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+ 
+ # This is the list of directories to built for the host system.
+@@ -190,6 +194,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ 	$(BASE_EXPORTS) \
+ 	CC="$(CC)"; export CC; \
++	CPP="$(CC) -E"; export CPP; \
+ 	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index eb1dc304de2..93a43146846 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -805,7 +805,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
+ BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
+ BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
+ BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
+-		-I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
++		-I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
+ 
+ # Actual name to use when installing a native compiler.
+ GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
+diff --git a/gcc/configure b/gcc/configure
+index 2e822caf66d..2c50676a2bf 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11965,7 +11965,7 @@ else
+ 	CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ 	CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ 	LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+-	GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++	GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ 	${realsrcdir}/configure \
+ 		--enable-languages=${enable_languages-all} \
+ 		--target=$target_alias --host=$build_alias --build=$build_alias
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 70e7bac78c4..d29eb580429 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1743,7 +1743,7 @@ else
+ 	CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ 	CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ 	LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+-	GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++	GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ 	${realsrcdir}/configure \
+ 		--enable-languages=${enable_languages-all} \
+ 		--target=$target_alias --host=$build_alias --build=$build_alias
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0029-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0029-nios2-Define-MUSL_DYNAMIC_LINKER.patch
new file mode 100644
index 0000000..08da1ab
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0029-nios2-Define-MUSL_DYNAMIC_LINKER.patch
@@ -0,0 +1,28 @@
+From e293df9a5734b43cb60cc47a3f5ff9af50fee3aa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 2 Feb 2016 10:26:10 -0800
+Subject: [PATCH 29/37] nios2: Define MUSL_DYNAMIC_LINKER
+
+Upstream-Status: Pending
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/nios2/linux.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
+index 698734add35..eeee60ecfea 100644
+--- a/gcc/config/nios2/linux.h
++++ b/gcc/config/nios2/linux.h
+@@ -30,6 +30,7 @@
+ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+ 
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
++#define MUSL_DYNAMIC_LINKER  "/lib/ld-musl-nios2.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC LINK_SPEC_ENDIAN \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0030-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0030-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
new file mode 100644
index 0000000..792e852
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0030-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
@@ -0,0 +1,87 @@
+From 6232013df7fd65c994869789fa4b93c8d2303d1c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 18:10:54 -0700
+Subject: [PATCH 30/37] Add ssp_nonshared to link commandline for musl targets
+
+when -fstack-protector options are enabled we need to
+link with ssp_shared on musl since it does not provide
+the __stack_chk_fail_local() so essentially it provides
+libssp but not libssp_nonshared something like
+TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED
+ where-as for glibc the needed symbols
+are already present in libc_nonshared library therefore
+we do not need any library helper on glibc based systems
+but musl needs the libssp_noshared from gcc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/linux.h          |  7 +++++++
+ gcc/config/rs6000/linux.h   | 10 ++++++++++
+ gcc/config/rs6000/linux64.h | 10 ++++++++++
+ 3 files changed, 27 insertions(+)
+
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index 4b05d8e93d1..0ca117e2ed4 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -195,6 +195,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+     { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },		\
+     { 0, 0, 0, 0, 0, 0 }				\
+   }
++#ifdef TARGET_LIBC_PROVIDES_SSP
++#undef LINK_SSP_SPEC
++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
++		       "|fstack-protector-strong|fstack-protector-explicit" \
++		       ":-lssp_nonshared}"
++#endif
++
+ #endif
+ 
+ #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
+diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
+index 96b97877989..0bbde54c844 100644
+--- a/gcc/config/rs6000/linux.h
++++ b/gcc/config/rs6000/linux.h
+@@ -107,6 +107,16 @@
+ 					 " -m elf32ppclinux")
+ #endif
+ 
++/* link libssp_nonshared.a with musl */
++#if DEFAULT_LIBC == LIBC_MUSL
++#ifdef TARGET_LIBC_PROVIDES_SSP
++#undef LINK_SSP_SPEC
++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
++		       "|fstack-protector-strong|fstack-protector-explicit" \
++		       ":-lssp_nonshared}"
++#endif
++#endif
++
+ #undef LINK_OS_LINUX_SPEC
+ #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
+   %{!static-pie: \
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index 982ca274621..83c07b275da 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -461,6 +461,16 @@ extern int dot_symbols;
+ 					   " -m elf64ppc")
+ #endif
+ 
++/* link libssp_nonshared.a with musl */
++#if DEFAULT_LIBC == LIBC_MUSL
++#ifdef TARGET_LIBC_PROVIDES_SSP
++#undef LINK_SSP_SPEC
++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
++		       "|fstack-protector-strong|fstack-protector-explicit" \
++		       ":-lssp_nonshared}"
++#endif
++#endif
++
+ #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
+   %{!static-pie: \
+     %{rdynamic:-export-dynamic} \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0031-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0031-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
new file mode 100644
index 0000000..efa40be
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0031-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
@@ -0,0 +1,125 @@
+From 1877b2ee5835a3716e6544706fbccd8c656e0a32 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Apr 2016 20:03:28 +0000
+Subject: [PATCH 31/37] libgcc: Add knob to use ldbl-128 on ppc
+
+musl does not support ldbl 128 so we can not assume
+that linux as a whole supports ldbl-128 bits, instead
+act upon configure option passed to gcc and assume no
+on musl and yes otherwise if no option is passed since
+default behaviour is to assume ldbl128 it does not
+change the defaults
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libgcc/Makefile.in           |  1 +
+ libgcc/config/rs6000/t-linux |  5 ++++-
+ libgcc/configure             | 18 ++++++++++++++++++
+ libgcc/configure.ac          | 12 ++++++++++++
+ 4 files changed, 35 insertions(+), 1 deletion(-)
+ mode change 100644 => 100755 libgcc/configure
+
+diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
+index ea390a5bbea..114c7876304 100644
+--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in
+@@ -50,6 +50,7 @@ unwind_header = @unwind_header@
+ md_unwind_header = @md_unwind_header@
+ sfp_machine_header = @sfp_machine_header@
+ thread_header = @thread_header@
++with_ldbl128 = @with_ldbl128@
+ 
+ host_noncanonical = @host_noncanonical@
+ real_host_noncanonical = @real_host_noncanonical@
+diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
+index 4f6d4c4a4d2..c50dd94a2da 100644
+--- a/libgcc/config/rs6000/t-linux
++++ b/libgcc/config/rs6000/t-linux
+@@ -1,3 +1,6 @@
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
+ 
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
++ifeq ($(with_ldbl128),yes)
++HOST_LIBGCC2_CFLAGS += -mlong-double-128
++endif
++HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
+diff --git a/libgcc/configure b/libgcc/configure
+old mode 100644
+new mode 100755
+index 36dbbc1f699..b5dd5c34e2a
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -651,6 +651,7 @@ build_vendor
+ build_cpu
+ build
+ with_aix_soname
++with_ldbl128
+ enable_vtable_verify
+ enable_gcov
+ enable_shared
+@@ -702,6 +703,7 @@ with_ld
+ enable_shared
+ enable_gcov
+ enable_vtable_verify
++with_long_double_128
+ with_aix_soname
+ enable_version_specific_runtime_libs
+ with_slibdir
+@@ -1363,6 +1365,7 @@ Optional Packages:
+   --with-target-subdir=SUBDIR      Configuring in a subdirectory for target
+   --with-cross-host=HOST           Configuring with a cross compiler
+   --with-ld               arrange to use the specified ld (full pathname)
++  --with-long-double-128  use 128-bit long double by default
+   --with-aix-soname=aix|svr4|both
+                           shared library versioning (aka "SONAME") variant to
+                           provide on AIX
+@@ -2268,6 +2271,21 @@ fi
+ 
+ 
+ 
++# Check whether --with-long-double-128 was given.
++if test "${with_long_double_128+set}" = set; then :
++  withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
++else
++  case "${host}" in
++ power*-*-musl*)
++   with_ldbl128="no";;
++ *) with_ldbl128="yes";;
++ esac
++
++fi
++
++
++
++
+ # Check whether --with-aix-soname was given.
+ if test "${with_aix_soname+set}" = set; then :
+   withval=$with_aix_soname; case "${host}:${enable_shared}" in
+diff --git a/libgcc/configure.ac b/libgcc/configure.ac
+index 8e96cafdf8b..9247856bf24 100644
+--- a/libgcc/configure.ac
++++ b/libgcc/configure.ac
+@@ -82,6 +82,18 @@ AC_ARG_ENABLE(vtable-verify,
+ [enable_vtable_verify=no])
+ AC_SUBST(enable_vtable_verify)
+ 
++AC_ARG_WITH(long-double-128,
++[AS_HELP_STRING([--with-long-double-128],
++    [use 128-bit long double by default])],
++      with_ldbl128="$with_long_double_128",
++[case "${host}" in
++ power*-*-musl*)
++   with_ldbl128="no";;
++ *) with_ldbl128="yes";;
++ esac
++])
++AC_SUBST(with_ldbl128)
++
+ AC_ARG_WITH(aix-soname,
+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+     [shared library versioning (aka "SONAME") variant to provide on AIX])],
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0032-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0032-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
new file mode 100644
index 0000000..3de8345
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0032-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
@@ -0,0 +1,29 @@
+From 9d76a765a12677597134953352b25dc16dea721e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 4 May 2016 21:11:34 -0700
+Subject: [PATCH 32/37] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libgcc/config/t-slibgcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
+index 099bf23e62f..436b277a79f 100644
+--- a/libgcc/config/t-slibgcc
++++ b/libgcc/config/t-slibgcc
+@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
+ 	$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+ 
+ SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+-	$(SHLIB_LDFLAGS) \
++	$(LDFLAGS) $(SHLIB_LDFLAGS) \
+ 	-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+ 	$(SHLIB_OBJS) $(SHLIB_LC) && \
+ 	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0033-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0033-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
new file mode 100644
index 0000000..d8cc643
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0033-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -0,0 +1,86 @@
+From 6c001e08bcd0568367a4aa2f991ab7d85b43a43d Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 24 Oct 2015 20:09:53 +0000
+Subject: [PATCH 33/37] libgcc_s: Use alias for __cpu_indicator_init instead of
+ symver
+
+Adapter from
+
+https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
+
+This fix was debated but hasnt been applied gcc upstream since
+they expect musl to support '@' in symbol versioning which is
+a sun/gnu versioning extention. This patch however avoids the
+need for the '@' symbols at all
+
+libgcc/Changelog:
+
+2015-05-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
+	(__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
+
+	* config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
+
+gcc/Changelog:
+
+2015-05-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
+	call __cpu_indicator_init_local instead of __cpu_indicator_init.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/i386/i386.c       | 4 ++--
+ libgcc/config/i386/cpuinfo.c | 6 +++---
+ libgcc/config/i386/t-linux   | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 88557f26c44..839308e2799 100644
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -36577,10 +36577,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+     {
+     case IX86_BUILTIN_CPU_INIT:
+       {
+-	/* Make it call __cpu_indicator_init in libgcc. */
++	/* Make it call __cpu_indicator_init_local in libgcc.a. */
+ 	tree call_expr, fndecl, type;
+         type = build_function_type_list (integer_type_node, NULL_TREE); 
+-	fndecl = build_fn_decl ("__cpu_indicator_init", type);
++	fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
+ 	call_expr = build_call_expr (fndecl, 0); 
+ 	return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
+       }
+diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
+index d6cb2de6265..ce04ef78205 100644
+--- a/libgcc/config/i386/cpuinfo.c
++++ b/libgcc/config/i386/cpuinfo.c
+@@ -504,7 +504,7 @@ __cpu_indicator_init (void)
+   return 0;
+ }
+ 
+-#if defined SHARED && defined USE_ELF_SYMVER
+-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
+-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
++#ifndef SHARED
++int __cpu_indicator_init_local (void)
++  __attribute__ ((weak, alias ("__cpu_indicator_init")));
+ #endif
+diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
+index 8506a635790..564296f788e 100644
+--- a/libgcc/config/i386/t-linux
++++ b/libgcc/config/i386/t-linux
+@@ -3,5 +3,5 @@
+ # t-slibgcc-elf-ver and t-linux
+ SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
+ 
+-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
++HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
+ CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0034-sync-gcc-stddef.h-with-musl.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0034-sync-gcc-stddef.h-with-musl.patch
new file mode 100644
index 0000000..a2c35ab
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0034-sync-gcc-stddef.h-with-musl.patch
@@ -0,0 +1,91 @@
+From 83ba95929c5908ae0f51ce148a30f85b085a178a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 3 Feb 2017 12:56:00 -0800
+Subject: [PATCH 34/37] sync gcc stddef.h with musl
+
+musl defines ptrdiff_t size_t and wchar_t
+so dont define them here if musl is definining them
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/ginclude/stddef.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
+index da692e1c01a..9a00c261adb 100644
+--- a/gcc/ginclude/stddef.h
++++ b/gcc/ginclude/stddef.h
+@@ -128,6 +128,7 @@ _TYPE_wchar_t;
+ #ifndef ___int_ptrdiff_t_h
+ #ifndef _GCC_PTRDIFF_T
+ #ifndef _PTRDIFF_T_DECLARED /* DragonFly */
++#ifndef __DEFINED_ptrdiff_t /* musl */
+ #define _PTRDIFF_T
+ #define _T_PTRDIFF_
+ #define _T_PTRDIFF
+@@ -137,10 +138,12 @@ _TYPE_wchar_t;
+ #define ___int_ptrdiff_t_h
+ #define _GCC_PTRDIFF_T
+ #define _PTRDIFF_T_DECLARED
++#define __DEFINED_ptrdiff_t /* musl */
+ #ifndef __PTRDIFF_TYPE__
+ #define __PTRDIFF_TYPE__ long int
+ #endif
+ typedef __PTRDIFF_TYPE__ ptrdiff_t;
++#endif /* __DEFINED_ptrdiff_t */
+ #endif /* _PTRDIFF_T_DECLARED */
+ #endif /* _GCC_PTRDIFF_T */
+ #endif /* ___int_ptrdiff_t_h */
+@@ -178,6 +181,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #ifndef _GCC_SIZE_T
+ #ifndef _SIZET_
+ #ifndef __size_t
++#ifndef __DEFINED_size_t /* musl */
+ #define __size_t__	/* BeOS */
+ #define __SIZE_T__	/* Cray Unicos/Mk */
+ #define _SIZE_T
+@@ -194,6 +198,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #define ___int_size_t_h
+ #define _GCC_SIZE_T
+ #define _SIZET_
++#define __DEFINED_size_t /* musl */
+ #if defined (__FreeBSD__) \
+   || defined(__DragonFly__) \
+   || defined(__FreeBSD_kernel__) \
+@@ -228,6 +233,7 @@ typedef long ssize_t;
+ #endif /* _SIZE_T */
+ #endif /* __SIZE_T__ */
+ #endif /* __size_t__ */
++#endif /* __DEFINED_size_t */
+ #undef	__need_size_t
+ #endif /* _STDDEF_H or __need_size_t.  */
+ 
+@@ -257,6 +263,7 @@ typedef long ssize_t;
+ #ifndef ___int_wchar_t_h
+ #ifndef __INT_WCHAR_T_H
+ #ifndef _GCC_WCHAR_T
++#ifndef __DEFINED_wchar_t /* musl */
+ #define __wchar_t__	/* BeOS */
+ #define __WCHAR_T__	/* Cray Unicos/Mk */
+ #define _WCHAR_T
+@@ -272,6 +279,7 @@ typedef long ssize_t;
+ #define __INT_WCHAR_T_H
+ #define _GCC_WCHAR_T
+ #define _WCHAR_T_DECLARED
++#define __DEFINED_wchar_t /* musl */
+ 
+ /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
+    instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
+@@ -337,6 +345,7 @@ typedef __WCHAR_TYPE__ wchar_t;
+ #endif
+ #endif /* __WCHAR_T__ */
+ #endif /* __wchar_t__ */
++#endif /* __DEFINED_wchar_t musl */
+ #undef	__need_wchar_t
+ #endif /* _STDDEF_H or __need_wchar_t.  */
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0035-fix-segmentation-fault-in-precompiled-header-generat.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0035-fix-segmentation-fault-in-precompiled-header-generat.patch
new file mode 100644
index 0000000..ad1f6e7
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0035-fix-segmentation-fault-in-precompiled-header-generat.patch
@@ -0,0 +1,60 @@
+From c4f89e62c56975fee99304c9cbbe5be6e8bc9ed6 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 35/37] 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 eedfcbb3146..15040a1b1f0 100644
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -3280,11 +3280,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;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0036-Fix-for-testsuite-failure.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0036-Fix-for-testsuite-failure.patch
new file mode 100644
index 0000000..4fb0698
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0036-Fix-for-testsuite-failure.patch
@@ -0,0 +1,258 @@
+From 8d773b5ba6cf396ca76611963127ba2b516272b3 Mon Sep 17 00:00:00 2001
+From: RAGHUNATH LOLUR <raghunath.lolur@kpit.com>
+Date: Wed, 6 Dec 2017 22:52:26 -0800
+Subject: [PATCH 36/37] Fix for testsuite failure
+
+2017-11-16  Raghunath Lolur  <raghunath.lolur@kpit.com>
+
+	* gcc.dg/pr56275.c: If SSE is disabled, ensure that
+	"-mfpmath" is not set to use SSE. Set "-mfpmath=387".
+	* gcc.dg/pr68306.c: Likewise
+	* gcc.dg/pr68306-2.c: Likewise
+	* gcc.dg/pr68306-3.c: Likewise
+	* gcc.dg/pr69634.c: Likewise
+	* gcc.target/i386/amd64-abi-1.c: Likewise
+	* gcc.target/i386/funcspec-6.c: Likewise
+	* gcc.target/i386/interrupt-387-err-1.c: Likewise
+	* gcc.target/i386/isa-14.c: Likewise
+	* gcc.target/i386/pr44948-2b.c: Likewise
+	* gcc.target/i386/pr53425-1.c: Likewise
+	* gcc.target/i386/pr53425-2.c: Likewise
+	* gcc.target/i386/pr55247.c: Likewise
+	* gcc.target/i386/pr59644.c: Likewise
+	* gcc.target/i386/pr62120.c: Likewise
+	* gcc.target/i386/pr70467-1.c: Likewise
+	* gcc.target/i386/warn-vect-op-1.c: Likewise
+
+If -Wall, -Werror are used during compilation various test cases fail
+to compile.
+
+If SSE is disabled, be sure to -mfpmath=387 to resolve this.
+
+This patch removes the changes to Changelog from the original patch.
+This will help us avoid conflicts.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ gcc/testsuite/gcc.dg/pr56275.c                      | 2 +-
+ gcc/testsuite/gcc.dg/pr68306-2.c                    | 2 +-
+ gcc/testsuite/gcc.dg/pr68306-3.c                    | 2 +-
+ gcc/testsuite/gcc.dg/pr68306.c                      | 2 +-
+ gcc/testsuite/gcc.dg/pr69634.c                      | 2 +-
+ gcc/testsuite/gcc.target/i386/amd64-abi-1.c         | 2 +-
+ gcc/testsuite/gcc.target/i386/funcspec-6.c          | 1 +
+ gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c | 2 +-
+ gcc/testsuite/gcc.target/i386/isa-14.c              | 2 +-
+ gcc/testsuite/gcc.target/i386/pr44948-2b.c          | 2 +-
+ gcc/testsuite/gcc.target/i386/pr53425-1.c           | 2 +-
+ gcc/testsuite/gcc.target/i386/pr53425-2.c           | 2 +-
+ gcc/testsuite/gcc.target/i386/pr55247.c             | 2 +-
+ gcc/testsuite/gcc.target/i386/pr59644.c             | 2 +-
+ gcc/testsuite/gcc.target/i386/pr62120.c             | 2 +-
+ gcc/testsuite/gcc.target/i386/pr70467-1.c           | 2 +-
+ gcc/testsuite/gcc.target/i386/warn-vect-op-1.c      | 2 +-
+ 17 files changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c
+index b901bb2b199..a4f6c95e1a1 100644
+--- a/gcc/testsuite/gcc.dg/pr56275.c
++++ b/gcc/testsuite/gcc.dg/pr56275.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+-/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
++/* { dg-additional-options "-mno-sse -mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */
+ 
+ typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long))));
+ 
+diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c
+index 4672ebe7987..2a368c484b6 100644
+--- a/gcc/testsuite/gcc.dg/pr68306-2.c
++++ b/gcc/testsuite/gcc.dg/pr68306-2.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O3" } */
+-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+ 
+ struct {
+     int tz_minuteswest;
+diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c
+index f5a8c102cf8..df3390c64c2 100644
+--- a/gcc/testsuite/gcc.dg/pr68306-3.c
++++ b/gcc/testsuite/gcc.dg/pr68306-3.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O3" } */
+-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+ /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */
+ 
+ extern void fn2();
+diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c
+index 54e5b40f221..0813389e2c1 100644
+--- a/gcc/testsuite/gcc.dg/pr68306.c
++++ b/gcc/testsuite/gcc.dg/pr68306.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O3" } */
+-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+ 
+ enum powerpc_pmc_type { PPC_PMC_IBM };
+ struct {
+diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c
+index 60a56149463..bcc23f9ccd6 100644
+--- a/gcc/testsuite/gcc.dg/pr69634.c
++++ b/gcc/testsuite/gcc.dg/pr69634.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp -fcompare-debug -Wno-psabi" } */
+-/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */
++/* { dg-additional-options "-mno-sse -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
+ /* { dg-require-effective-target scheduling } */
+ 
+ typedef unsigned short u16;
+diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
+index 69fde57bf06..7f1f1c03edf 100644
+--- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
++++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! ia32 } } } */
+-/* { dg-options "-mno-sse" } */
++/* { dg-options "-mno-sse -mfpmath=387" } */
+ /* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */
+ 
+ double foo(void) { return 0; }	/* { dg-error "SSE disabled" } */
+diff --git a/gcc/testsuite/gcc.target/i386/funcspec-6.c b/gcc/testsuite/gcc.target/i386/funcspec-6.c
+index ea896b7ebfd..bf15569b826 100644
+--- a/gcc/testsuite/gcc.target/i386/funcspec-6.c
++++ b/gcc/testsuite/gcc.target/i386/funcspec-6.c
+@@ -1,6 +1,7 @@
+ /* Test whether all of the 64-bit function specific options are accepted
+    without error.  */
+ /* { dg-do compile { target { ! ia32 } } } */
++/* { dg-additional-options "-mfpmath=387" } */
+ 
+ #include "funcspec-56.inc"
+ 
+diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
+index 3fbdc881dda..6b4d9d1252a 100644
+--- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
++++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387" } */
++/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387 -mfpmath=387" } */
+ 
+ typedef unsigned int uword_t __attribute__ ((mode (__word__)));
+ 
+diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c
+index 5d49e6e77fe..1de2db92bdd 100644
+--- a/gcc/testsuite/gcc.target/i386/isa-14.c
++++ b/gcc/testsuite/gcc.target/i386/isa-14.c
+@@ -1,5 +1,5 @@
+ /* { dg-do run } */
+-/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse" } */
++/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse -mfpmath=387" } */
+ 
+ extern void abort (void);
+ 
+diff --git a/gcc/testsuite/gcc.target/i386/pr44948-2b.c b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
+index fa1769b62fb..f79fb12726f 100644
+--- a/gcc/testsuite/gcc.target/i386/pr44948-2b.c
++++ b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic" } */
++/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic -mfpmath=387" } */
+ 
+ struct A
+ { 
+diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c
+index 2e89ff7d81d..6339bf6b736 100644
+--- a/gcc/testsuite/gcc.target/i386/pr53425-1.c
++++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c
+@@ -1,6 +1,6 @@
+ /* PR target/53425 */
+ /* { dg-do compile { target { ! ia32 } } } */
+-/* { dg-options "-O2 -mno-sse" } */
++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
+ /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
+ 
+ typedef double __v2df __attribute__ ((__vector_size__ (16)));
+diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c
+index 61f6283dbe9..2c5a55f0ac3 100644
+--- a/gcc/testsuite/gcc.target/i386/pr53425-2.c
++++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c
+@@ -1,6 +1,6 @@
+ /* PR target/53425 */
+ /* { dg-do compile { target { ! ia32 } } } */
+-/* { dg-options "-O2 -mno-sse" } */
++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
+ /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
+ 
+ typedef float __v2sf __attribute__ ((__vector_size__ (8)));
+diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c
+index 23366d0909d..9810e3abb76 100644
+--- a/gcc/testsuite/gcc.target/i386/pr55247.c
++++ b/gcc/testsuite/gcc.target/i386/pr55247.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile { target { ! ia32 } } } */
+ /* { dg-require-effective-target maybe_x32 } */
+-/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */
++/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long -mfpmath=387" } */
+ 
+ typedef unsigned int uint32_t;
+ typedef uint32_t Elf32_Word;
+diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c
+index 96006b3e338..4287e4538bf 100644
+--- a/gcc/testsuite/gcc.target/i386/pr59644.c
++++ b/gcc/testsuite/gcc.target/i386/pr59644.c
+@@ -1,6 +1,6 @@
+ /* PR target/59644 */
+ /* { dg-do run { target lp64 } } */
+-/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */
++/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone -mfpmath=387" } */
+ 
+ /* This test uses __builtin_trap () instead of e.g. abort,
+    because due to -mpreferred-stack-boundary=3 it should not call
+diff --git a/gcc/testsuite/gcc.target/i386/pr62120.c b/gcc/testsuite/gcc.target/i386/pr62120.c
+index bfb8c4703eb..ed04cf181f3 100644
+--- a/gcc/testsuite/gcc.target/i386/pr62120.c
++++ b/gcc/testsuite/gcc.target/i386/pr62120.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-mno-sse" } */
++/* { dg-options "-mno-sse -mfpmath=387" } */
+ 
+ void foo ()
+ {
+diff --git a/gcc/testsuite/gcc.target/i386/pr70467-1.c b/gcc/testsuite/gcc.target/i386/pr70467-1.c
+index 4e112c88d07..bcfb396a68d 100644
+--- a/gcc/testsuite/gcc.target/i386/pr70467-1.c
++++ b/gcc/testsuite/gcc.target/i386/pr70467-1.c
+@@ -1,6 +1,6 @@
+ /* PR rtl-optimization/70467 */
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mno-sse" } */
++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
+ 
+ void foo (unsigned long long *);
+ 
+diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
+index 6cda1534311..26e37f5b8ba 100644
+--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
++++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! ia32 } } }  */
+-/* { dg-options "-mno-sse -Wvector-operation-performance" }  */
++/* { dg-options "-mno-sse -Wvector-operation-performance -mfpmath=387" }  */
+ #define vector(elcount, type)  \
+ __attribute__((vector_size((elcount)*sizeof(type)))) type
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0037-Re-introduce-spe-commandline-options.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0037-Re-introduce-spe-commandline-options.patch
new file mode 100644
index 0000000..251097e
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0037-Re-introduce-spe-commandline-options.patch
@@ -0,0 +1,41 @@
+From 49d3dbe240226206d09ff646499cd398cb60bd12 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Jun 2018 12:10:22 -0700
+Subject: [PATCH 37/37] Re-introduce spe commandline options
+
+This should ensure that we keep accepting
+spe options
+
+Upstream-Status: Inappropriate [SPE port is removed from rs600 port]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/rs6000/rs6000.opt | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
+index 2e90bf37747..ebd297da46b 100644
+--- a/gcc/config/rs6000/rs6000.opt
++++ b/gcc/config/rs6000/rs6000.opt
+@@ -345,6 +345,18 @@ mdebug=
+ Target RejectNegative Joined
+ -mdebug=	Enable debug output.
+ 
++mspe
++Target Var(rs6000_spe) Save
++Generate SPE SIMD instructions on E500.
++
++mabi=spe
++Target RejectNegative Var(rs6000_spe_abi) Save
++Use the SPE ABI extensions.
++
++mabi=no-spe
++Target RejectNegative Var(rs6000_spe_abi, 0)
++Do not use the SPE ABI extensions.
++
+ mabi=altivec
+ Target RejectNegative Var(rs6000_altivec_abi) Save
+ Use the AltiVec ABI extensions.
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 375c5e9..b6f2ca5 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -5,15 +5,9 @@
 #
 # These can be overridden by the version specific .inc file.
 
-# Java (gcj doesn't work on all architectures)
-JAVA ?= ",java"
-JAVA_arm ?= ""
-JAVA_armeb ?= ""
-JAVA_mipsel ?= ""
-JAVA_sh3 ?= ""
 # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
 FORTRAN ?= ",f77"
-LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
+LANGUAGES ?= "c,c++${FORTRAN}"
 
 EXTRA_OECONF_BASE ?= ""
 EXTRA_OECONF_PATHS ?= ""
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index e7c08d3..807e47e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -159,10 +159,9 @@
 SYSTEMLIBS1 = "${target_libdir}/"
 
 EXTRA_OECONF += "--enable-poison-system-directories"
-
-EXTRA_OECONF_append_libc-baremetal = " --without-headers"
-EXTRA_OECONF_remove_libc-baremetal = "--with-sysroot=/not/exist"
-EXTRA_OECONF_remove_libc-baremetal = "--with-build-sysroot=${STAGING_DIR_TARGET}"
-
+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-cross-canadian_9.1.bb b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_9.1.bb
new file mode 100644
index 0000000..bf53c5c
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_9.1.bb
@@ -0,0 +1,5 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-cross-canadian.inc
+
+
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross_9.1.bb b/poky/meta/recipes-devtools/gcc/gcc-cross_9.1.bb
new file mode 100644
index 0000000..b43cca0
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross_9.1.bb
@@ -0,0 +1,3 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-cross.inc
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-crosssdk_9.1.bb b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_9.1.bb
new file mode 100644
index 0000000..40a6c4f
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_9.1.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-cross_${PV}.bb
+require gcc-crosssdk.inc
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb b/poky/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb
new file mode 100644
index 0000000..a1c7a76
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb
@@ -0,0 +1,12 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-runtime.inc
+
+# Disable ifuncs for libatomic on arm conflicts -march/-mcpu
+EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "
+
+FILES_libgomp-dev += "\
+    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
+"
+
+# Building with thumb enabled on armv6t fails
+ARM_INSTRUCTION_SET_armv6 = "arm"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index e5e8452..8b1d1c9 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -45,6 +45,9 @@
 ALLOW_EMPTY_${PN} = "1"
 DEPENDS = "gcc-runtime virtual/${TARGET_PREFIX}gcc"
 
+# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+DEBUG_OPTIMIZATION_append = " -Wno-error"
+
 BBCLASSEXTEND = "nativesdk"
 
 PACKAGES = "${PN} ${PN}-dbg"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers_9.1.bb b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_9.1.bb
new file mode 100644
index 0000000..f3c7058
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_9.1.bb
@@ -0,0 +1,7 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
+
+# Building with thumb enabled on armv4t armv5t fails with
+# sanitizer_linux.s:5749: Error: lo register required -- `ldr ip,[sp],#8'
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-source_9.1.bb b/poky/meta/recipes-devtools/gcc/gcc-source_9.1.bb
new file mode 100644
index 0000000..b890fa3
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-source_9.1.bb
@@ -0,0 +1,4 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require recipes-devtools/gcc/gcc-source.inc
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-target.inc b/poky/meta/recipes-devtools/gcc/gcc-target.inc
index 6270059..bdc6ff6 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-target.inc
@@ -2,9 +2,7 @@
 require gcc-configure-common.inc
 
 EXTRA_OECONF_PATHS = "\
-    --with-sysroot=/ \
     --with-build-sysroot=${STAGING_DIR_TARGET} \
-    --with-gxx-include-dir=${includedir}/c++/${BINV} \
 "
 
 EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
diff --git a/poky/meta/recipes-devtools/gcc/gcc_9.1.bb b/poky/meta/recipes-devtools/gcc/gcc_9.1.bb
new file mode 100644
index 0000000..7d93590
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc_9.1.bb
@@ -0,0 +1,14 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-target.inc
+
+# Building with thumb enabled on armv4t armv5t fails with
+# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
+# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+ARMFPARCHEXT_armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+ARMFPARCHEXT_armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+ARMFPARCHEXT_armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/poky/meta/recipes-devtools/gcc/libgcc-initial_9.1.bb b/poky/meta/recipes-devtools/gcc/libgcc-initial_9.1.bb
new file mode 100644
index 0000000..0c698c2
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/libgcc-initial_9.1.bb
@@ -0,0 +1,5 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require libgcc-initial.inc
+
+# Building with thumb enabled on armv6t fails
+ARM_INSTRUCTION_SET_armv6 = "arm"
diff --git a/poky/meta/recipes-devtools/gcc/libgcc_9.1.bb b/poky/meta/recipes-devtools/gcc/libgcc_9.1.bb
new file mode 100644
index 0000000..ea210a1
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/libgcc_9.1.bb
@@ -0,0 +1,5 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require libgcc.inc
+
+# Building with thumb enabled on armv6t fails
+ARM_INSTRUCTION_SET_armv6 = "arm"
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran.inc b/poky/meta/recipes-devtools/gcc/libgfortran.inc
index 4b7b7b2..7543585 100644
--- a/poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -66,6 +66,7 @@
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \
+    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ \
 "
 FILES_${PN}-staticdev = "${libdir}/libgfortran.a"
 
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran_9.1.bb b/poky/meta/recipes-devtools/gcc/libgfortran_9.1.bb
new file mode 100644
index 0000000..71dd8b4
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/libgfortran_9.1.bb
@@ -0,0 +1,3 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require libgfortran.inc
+
diff --git a/poky/meta/recipes-devtools/gdb/gdb-8.2.1.inc b/poky/meta/recipes-devtools/gdb/gdb-8.2.1.inc
index 1fc1ec0..f28b574 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-8.2.1.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-8.2.1.inc
@@ -17,6 +17,8 @@
            file://0011-Fix-invalid-sigprocmask-call.patch \
            file://gdbserver-ctrl-c-handling.patch \
            file://0001-Fix-build-with-latest-GCC-9.0-tree.patch \
+           file://CVE-2017-9778.patch \
+           file://0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch \
 "
 SRC_URI[md5sum] = "f8b2562e830a4098dd5b5ea9e9296c70"
 SRC_URI[sha256sum] = "0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202"
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch b/poky/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch
new file mode 100644
index 0000000..f35033c
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch
@@ -0,0 +1,52 @@
+From cbbf1a8ba7f037ba3b83f090829edcbab542c285 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <szabolcs.nagy@arm.com>
+Date: Thu, 13 Dec 2018 17:47:17 +0000
+Subject: [PATCH] AArch64: Fix the gdb build with musl libc
+
+Including asm/sigcontext.h together with libc headers is not valid. In
+general linux headers may not work with libc headers, so mixing them
+should be avoided, especially when the linux header defines types that
+are also exposed in libc headers.
+
+In case of asm/sigcontext.h glibc happens to work because glibc signal.h
+directly includes it, but e.g. in musl libc signal.h replicates the
+sigcontext.h definitions in an abi compatible way which are in conflict
+with the linux definitions when both headers are included.
+
+Since old linux headers or old libc headers may not have the necessary
+definitions, gdb has to replicate the definitions it relies on anyway.
+Which is fine since all definitions must be ABI stable. For linux apis
+that are not available via libc headers, replicating the definitions in
+gdb is the most reliable way to use them.
+
+Note: asm/ptrace.h includes asm/sigcontext.h in some versions of linux
+headers, which is just as problematic and should be fixed in linux.
+
+gdb/ChangeLog:
+
+	* nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
+	asm/sigcontext.h.
+
+[ChangeLog entry stripped so that patch applies cleanly]
+Upstream-Status: Backport
+Signed-off-by: Paul Barker <paul@betafive.co.uk>
+---
+ gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h
+index 029e753ffe..172ae39432 100644
+--- a/gdb/nat/aarch64-sve-linux-ptrace.h
++++ b/gdb/nat/aarch64-sve-linux-ptrace.h
+@@ -20,7 +20,7 @@
+ #ifndef AARCH64_SVE_LINUX_PTRACE_H
+ #define AARCH64_SVE_LINUX_PTRACE_H
+ 
+-#include <asm/sigcontext.h>
++#include <signal.h>
+ #include <sys/utsname.h>
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch b/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch
new file mode 100644
index 0000000..935f266
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch
@@ -0,0 +1,99 @@
+From a608b79f30ab3f670095e14ba3d3b5b24a19fe68 Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Thu, 25 Apr 2019 07:27:02 -0700
+Subject: [PATCH] Detect invalid length field in debug frame FDE header.
+
+GDB was failing to catch cases where a corrupt ELF or core file
+contained an invalid length value in a Dwarf debug frame FDE header.
+It was checking for buffer overflow but not cases where the length was
+negative or caused pointer wrap-around.
+
+In addition to the additional validity check, this patch cleans up the
+multiple signed/unsigned conversions on the length field so that an
+unsigned representation is used consistently throughout.
+
+This patch fixes CVE-2017-9778 and PR gdb/21600.
+
+2019-04-25  Sandra Loosemore  <sandra@codesourcery.com>
+	    Kang Li <kanglictf@gmail.com>
+
+	PR gdb/21600
+
+	* dwarf2-frame.c (read_initial_length): Be consistent about using
+	unsigned representation of length.
+	(decode_frame_entry_1): Likewise.  Check for wraparound of
+	end pointer as well as buffer overflow.
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=723adb650a31859d7cc45832cb8adca0206455ed]
+CVE: CVE-2017-9778
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ gdb/ChangeLog      | 11 +++++++++++
+ gdb/dwarf2-frame.c | 14 +++++++-------
+ 2 files changed, 18 insertions(+), 7 deletions(-)
+
+diff --git a/gdb/ChangeLog b/gdb/ChangeLog
+index 3711dc7..0a9720b 100644
+--- a/gdb/ChangeLog
++++ b/gdb/ChangeLog
+@@ -1,3 +1,14 @@
++2019-04-25  Sandra Loosemore  <sandra@codesourcery.com>
++	    Kang Li <kanglictf@gmail.com>
++
++	PR gdb/21600
++
++	* dwarf2-frame.c (read_initial_length): Be consistent about using
++	unsigned representation of length.
++	(decode_frame_entry_1): Likewise.  Check for wraparound of
++	end pointer as well as buffer overflow.
++
++
+ 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
+ 
+ 	* version.in: Set GDB version number to 8.2.1.
+diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
+index 91e16cf..a7b99fd 100644
+--- a/gdb/dwarf2-frame.c
++++ b/gdb/dwarf2-frame.c
+@@ -1477,7 +1477,7 @@ static ULONGEST
+ read_initial_length (bfd *abfd, const gdb_byte *buf,
+ 		     unsigned int *bytes_read_ptr)
+ {
+-  LONGEST result;
++  ULONGEST result;
+ 
+   result = bfd_get_32 (abfd, buf);
+   if (result == 0xffffffff)
+@@ -1780,7 +1780,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start,
+ {
+   struct gdbarch *gdbarch = get_objfile_arch (unit->objfile);
+   const gdb_byte *buf, *end;
+-  LONGEST length;
++  ULONGEST length;
+   unsigned int bytes_read;
+   int dwarf64_p;
+   ULONGEST cie_id;
+@@ -1791,15 +1791,15 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start,
+   buf = start;
+   length = read_initial_length (unit->abfd, buf, &bytes_read);
+   buf += bytes_read;
+-  end = buf + length;
+-
+-  /* Are we still within the section?  */
+-  if (end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
+-    return NULL;
++  end = buf + (size_t) length;
+ 
+   if (length == 0)
+     return end;
+ 
++  /* Are we still within the section?  */
++  if (end <= buf || end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
++    return NULL;
++
+   /* Distinguish between 32 and 64-bit encoded frame info.  */
+   dwarf64_p = (bytes_read == 12);
+ 
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/git/git_2.20.1.bb b/poky/meta/recipes-devtools/git/git_2.20.1.bb
deleted file mode 100644
index 877fb05..0000000
--- a/poky/meta/recipes-devtools/git/git_2.20.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
-                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
-                 "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.md5sum] = "7a7769e5c957364ed0aed89e6e67c254"
-SRC_URI[tarball.sha256sum] = "edc3bc1495b69179ba4e272e97eff93334a20decb1d8db6ec3c19c16417738fd"
-SRC_URI[manpages.md5sum] = "78c6e54a61a167dab5e8ae07036293ab"
-SRC_URI[manpages.sha256sum] = "e9c123463abd05e142defe44a8060ce6e9853dfd8c83b2542e38b7deac4e6d4c"
diff --git a/poky/meta/recipes-devtools/git/git_2.21.0.bb b/poky/meta/recipes-devtools/git/git_2.21.0.bb
new file mode 100644
index 0000000..434ff8f
--- /dev/null
+++ b/poky/meta/recipes-devtools/git/git_2.21.0.bb
@@ -0,0 +1,11 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+                 "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.md5sum] = "b8e00c2997774c5d4aaf26fd9d9aaf64"
+SRC_URI[tarball.sha256sum] = "85eca51c7404da75e353eba587f87fea9481ba41e162206a6f70ad8118147bee"
+SRC_URI[manpages.md5sum] = "8a168697b99a9a3f04f29f7d4bacd70b"
+SRC_URI[manpages.sha256sum] = "14c76ebb4e31f9e55cf5338a04fd3a13bced0323cd51794ccf45fc74bd0c1080"
diff --git a/poky/meta/recipes-devtools/help2man/help2man-native_1.47.6.bb b/poky/meta/recipes-devtools/help2man/help2man-native_1.47.10.bb
similarity index 79%
rename from poky/meta/recipes-devtools/help2man/help2man-native_1.47.6.bb
rename to poky/meta/recipes-devtools/help2man/help2man-native_1.47.10.bb
index 794d308..5feaeea 100644
--- a/poky/meta/recipes-devtools/help2man/help2man-native_1.47.6.bb
+++ b/poky/meta/recipes-devtools/help2man/help2man-native_1.47.10.bb
@@ -5,9 +5,8 @@
 DEPENDS = "autoconf-native automake-native"
 
 SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "7424901e6eca8af372d2ad62be5cf659"
-SRC_URI[sha256sum] = "d91b0295b72a638e4a564f643e4e6d1928779131f628c00f356c13bf336de46f"
+SRC_URI[md5sum] = "0d70833650a552e0af742882ba84f2ee"
+SRC_URI[sha256sum] = "f371cbfd63f879065422b58fa6b81e21870cd791ef6e11d4528608204aa4dcfb"
 
 inherit autotools native
 
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch b/poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
deleted file mode 100644
index dc3d976..0000000
--- a/poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b1f61296e2f16c2b9a39c5501e4538628ff01ab4 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Dec 2016 18:26:00 +0200
-Subject: [PATCH 2/2] Set library installation path correctly
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/libcomps/pull/32]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- libcomps/src/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libcomps/src/CMakeLists.txt b/libcomps/src/CMakeLists.txt
-index e553d77..e2eef9c 100644
---- a/libcomps/src/CMakeLists.txt
-+++ b/libcomps/src/CMakeLists.txt
-@@ -52,7 +52,7 @@ add_dependencies(libcomps src-copy)
- IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
-     SET (LIB_SUFFIX "64")
- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
--set (LIB_INST_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
-+set (LIB_INST_DIR ${CMAKE_INSTALL_LIBDIR})
- 
- 
- install (FILES ${libcomps_HEADERS} DESTINATION include/libcomps)
--- 
-2.11.0
-
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps_git.bb b/poky/meta/recipes-devtools/libcomps/libcomps_git.bb
index ff68208..372c3c3 100644
--- a/poky/meta/recipes-devtools/libcomps/libcomps_git.bb
+++ b/poky/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -4,13 +4,12 @@
 
 SRC_URI = "git://github.com/rpm-software-management/libcomps.git \
            file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
-           file://0002-Set-library-installation-path-correctly.patch \
            file://0001-Make-__comps_objmrtree_all-static-inline.patch \
            file://0001-Add-crc32.c-to-sources-list.patch \
            "
 
-PV = "0.1.10"
-SRCREV = "86a82fcd155c27092340d15a34f5c75c4da88243"
+PV = "0.1.11"
+SRCREV = "d868a79b76fb980d1371c28124ae07f00d2b63a9"
 
 S = "${WORKDIR}/git"
 
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 7c8131b..3c87d4d 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
@@ -1,4 +1,4 @@
-From 0d0155c4dd6c0b3305ea2ab0e10b0f84d024a6e1 Mon Sep 17 00:00:00 2001
+From e5a50db749b2b02e9e0cff9f7b639020e8ac76da Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 6 Nov 2018 13:54:43 +0100
 Subject: [PATCH] Add WITH_TESTS option
@@ -14,36 +14,36 @@
  2 files changed, 5 insertions(+)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b73a03d7..a9e0200f 100644
+index ce88b9e3..7a99320a 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -36,6 +36,7 @@ OPTION(WITH_MAN "Enables hawkey man page generation" ON)
- OPTION(WITH_HTML "Enables hawkey HTML generation" ON)
+@@ -32,6 +32,7 @@ option(WITH_HTML "Enables hawkey HTML generation" ON)
+ option(WITH_MAN "Enables hawkey man page generation" ON)
+ option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF)
+ option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF)
++option(WITH_TESTS "Enables unit tests" ON)
  
- OPTION(WITH_BINDINGS "Enables python/SWIG bindings" ON)
-+OPTION(WITH_TESTS "Enables unit tests" ON)
  
- OPTION (ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF)
- option (ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF)
-@@ -122,8 +123,10 @@ IF (WITH_BINDINGS)
- # ADD_SUBDIRECTORY (bindings/perl)
- ADD_SUBDIRECTORY (bindings/python)
- ENDIF()
+ # load pkg-config first; it's required by other modules
+@@ -158,8 +159,10 @@ endif()
+ 
+ 
+ # build tests
 +IF (WITH_TESTS)
- ENABLE_TESTING()
- ADD_SUBDIRECTORY (tests)
+ enable_testing()
+ add_subdirectory(tests)
 +ENDIF()
- IF (WITH_BINDINGS)
- ADD_SUBDIRECTORY (python/hawkey)
- ADD_SUBDIRECTORY (docs/hawkey)
+ if(WITH_BINDINGS)
+     add_subdirectory(python/hawkey)
+ endif()
 diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt
-index 3c0b3c0c..31466ed9 100644
+index d9645346..84d17204 100644
 --- a/python/hawkey/CMakeLists.txt
 +++ b/python/hawkey/CMakeLists.txt
-@@ -49,4 +49,6 @@ TARGET_LINK_LIBRARIES(_hawkeymodule ${PYTHON_LIBRARY})
- INSTALL(FILES __init__.py DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
- INSTALL(TARGETS _hawkeymodule LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
+@@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY})
+ install(FILES __init__.py DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
+ install(TARGETS _hawkeymodule LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
  
 +IF (WITH_TESTS)
- ADD_SUBDIRECTORY(tests)
+ add_subdirectory(tests)
 +ENDIF()
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
index 246db34..10450de 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
+++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -1,4 +1,4 @@
-From c139a6c929cff93dbb9b8279e97263fc9e055727 Mon Sep 17 00:00:00 2001
+From 9294cd19e5e3121fb8d37b44ee82dd7c4b3ab2c7 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 7 Feb 2017 12:16:03 +0200
 Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is
@@ -13,15 +13,15 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index cd91f08..6422534 100644
+index b722d4fb..ce88b9e3 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -46,7 +46,7 @@ endif(APPLE)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
- pkg_check_modules(SMARTCOLS REQUIRED smartcols)
- FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
+@@ -45,7 +45,7 @@ endif()
+ 
+ # build dependencies
+ find_package(Gpgme REQUIRED)
 -PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
 +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
  set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
- if (ENABLE_RHSM_SUPPORT)
-     pkg_check_modules (RHSM REQUIRED librhsm>=0.0.3)
+ find_package(OpenSSL REQUIRED)
+ 
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-missing-string-and-errno.h-headers.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-missing-string-and-errno.h-headers.patch
deleted file mode 100644
index 62de784..0000000
--- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-include-missing-string-and-errno.h-headers.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From ccc89ff0c1f8e55a4a22444d051925408f265df1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 30 Jan 2019 10:32:11 -0800
-Subject: [PATCH] include missing <string> and errno.h headers
-
-This is unearthed when compiling with clang/libc++
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/677]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libdnf/conf/ConfigParser.hpp             | 1 +
- libdnf/module/modulemd/ModuleProfile.hpp | 1 +
- libdnf/sack/changelog.hpp                | 1 +
- libdnf/utils/smartcols/Cell.hpp          | 1 +
- 4 files changed, 4 insertions(+)
-
-diff --git a/libdnf/conf/ConfigParser.hpp b/libdnf/conf/ConfigParser.hpp
-index 97f25500..2a3851fa 100644
---- a/libdnf/conf/ConfigParser.hpp
-+++ b/libdnf/conf/ConfigParser.hpp
-@@ -23,6 +23,7 @@
- 
- #include <map>
- #include <stdexcept>
-+#include <string>
- #include <utility>
- 
- namespace libdnf {
-diff --git a/libdnf/module/modulemd/ModuleProfile.hpp b/libdnf/module/modulemd/ModuleProfile.hpp
-index ab018deb..8d996ff4 100644
---- a/libdnf/module/modulemd/ModuleProfile.hpp
-+++ b/libdnf/module/modulemd/ModuleProfile.hpp
-@@ -23,6 +23,7 @@
- 
- 
- #include <memory>
-+#include <string>
- #include <vector>
- 
- #include <modulemd/modulemd.h>
-diff --git a/libdnf/sack/changelog.hpp b/libdnf/sack/changelog.hpp
-index a3d3fc44..d830c414 100644
---- a/libdnf/sack/changelog.hpp
-+++ b/libdnf/sack/changelog.hpp
-@@ -23,6 +23,7 @@
- #define __CHANGELOG_HPP
- 
- #include <ctime>
-+#include <string>
- 
- namespace libdnf {
- 
-diff --git a/libdnf/utils/smartcols/Cell.hpp b/libdnf/utils/smartcols/Cell.hpp
-index 2e811dee..b90f0050 100644
---- a/libdnf/utils/smartcols/Cell.hpp
-+++ b/libdnf/utils/smartcols/Cell.hpp
-@@ -22,6 +22,7 @@
- #define LIBDNF_CELL_HPP
- 
- #include <libsmartcols/libsmartcols.h>
-+#include <cerrno>
- #include <string>
- #include <stdexcept>
- 
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
index 80b1ed7..475c8f1 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
+++ b/poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -1,4 +1,4 @@
-From 2bcd0b9f6310bacdc554e077e85319a5e90e5ce0 Mon Sep 17 00:00:00 2001
+From 18c2c06017784cd641cc8a3deee5fc472008f7f4 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 30 Dec 2016 18:24:50 +0200
 Subject: [PATCH] Set libsolv variables with pkg-config (cmake's own module
@@ -13,16 +13,16 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0b405cb..cd91f08 100644
+index 16b63308..b722d4fb 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -46,7 +46,8 @@ endif(APPLE)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
- pkg_check_modules(SMARTCOLS REQUIRED smartcols)
- FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
--find_package (LibSolv 0.6.30 REQUIRED COMPONENTS ext)
+@@ -45,7 +45,8 @@ endif()
+ 
+ # build dependencies
+ find_package(Gpgme REQUIRED)
+-find_package(LibSolv 0.6.30 REQUIRED COMPONENTS ext)
 +PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
 +set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
- if (ENABLE_RHSM_SUPPORT)
-     pkg_check_modules (RHSM REQUIRED librhsm>=0.0.3)
-     include_directories (${RHSM_INCLUDE_DIRS})
+ find_package(OpenSSL REQUIRED)
+ 
+ 
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf_0.26.0.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
similarity index 89%
rename from poky/meta/recipes-devtools/libdnf/libdnf_0.26.0.bb
rename to poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
index 9c2247c..4ff294c 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf_0.26.0.bb
+++ b/poky/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
@@ -7,10 +7,9 @@
            file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
            file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
            file://0001-Add-WITH_TESTS-option.patch \
-           file://0001-include-missing-string-and-errno.h-headers.patch \
            "
 
-SRCREV = "bd23204aa83d10e3d293a9f2d496cba6070f6a4d"
+SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
index 87e9211..40715c0 100644
--- a/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
+++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
@@ -7,8 +7,8 @@
            file://0002-modulemd-v1-meson.build-do-not-generate-gir-or-gtkdo.patch \
            "
 
-PV = "2.1.0"
-SRCREV = "072e6ee791fe7822a6d423bdac7e4a5cbb118bce"
+PV = "2.2.3"
+SRCREV = "4c75c6f8b39ee57aebe8fd36ef84808e893048c0"
 
 S = "${WORKDIR}/git"
 
@@ -20,11 +20,6 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-GI_ENABLE_FLAG = "-Dskip_introspection=false"
-GI_DISABLE_FLAG = "-Dskip_introspection=true"
-
-EXTRA_OEMESON_append_class-nativesdk = " ${GI_DISABLE_FLAG}"
-EXTRA_OEMESON_append_class-native = " ${GI_DISABLE_FLAG}"
-
-EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \
-                                                                                       '${GI_DISABLE_FLAG}', d)} "
+GIR_MESON_OPTION = 'skip_introspection'
+GIR_MESON_ENABLE_FLAG = 'false'
+GIR_MESON_DISABLE_FLAG = 'true'
diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.9.4.bb b/poky/meta/recipes-devtools/librepo/librepo_1.9.6.bb
similarity index 93%
rename from poky/meta/recipes-devtools/librepo/librepo_1.9.4.bb
rename to poky/meta/recipes-devtools/librepo/librepo_1.9.6.bb
index c4d6c16..fecedc9 100644
--- a/poky/meta/recipes-devtools/librepo/librepo_1.9.4.bb
+++ b/poky/meta/recipes-devtools/librepo/librepo_1.9.6.bb
@@ -7,7 +7,7 @@
            file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
            "
 
-SRCREV = "928c2d9c66f0d10477b8c9d1192785b88e2b1155"
+SRCREV = "7d8acd45eb09809a5ab729c312744da4b2fe92bb"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
index a6cef6f..f433b3f 100644
--- a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -4,15 +4,18 @@
 compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
 GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
 
-inherit autotools texinfo
+inherit autotools texinfo ptest
 
 SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
            file://ac_config_links.patch \
            file://remove-gets.patch \
            file://m4-1.4.18-glibc-change-work-around.patch \
            "
-
-SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+                                file://run-ptest \
+                                file://serial-tests-config.patch \
+                                file://0001-test-getopt-posix-fix.patch \
+                              "
 
 SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
 SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
@@ -28,3 +31,31 @@
 EXTRA_OECONF += "--without-libsigsegv-prefix"
 
 EXTRA_OEMAKE += "'infodir=${infodir}'"
+
+do_compile_ptest() {
+	cd ${B}/tests
+	sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile
+	oe_runmake buildtest-TESTS
+}
+
+do_install_ptest() {
+                cp -r ${B}/tests                        ${D}${PTEST_PATH}
+                cp -r ${S}/tests/*                      ${D}${PTEST_PATH}/tests/
+                sed -i '/^Makefile:/c Makefile:'        ${D}${PTEST_PATH}/tests/Makefile
+                sed -i -e  "s;LOCALE_FR='fr_FR';LOCALE_FR='fr_FR.iso88591';g" \
+                       -e  "s;LOCALE_FR_UTF8='none';LOCALE_FR_UTF8='fr_FR.utf8';g" ${D}${PTEST_PATH}/tests/Makefile
+                find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
+                cp ${S}/build-aux/update-copyright  ${D}${PTEST_PATH}/tests/
+                sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh
+                chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh  ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
+                     ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \
+                     ${D}${PTEST_PATH}/tests/test-xalloc-die
+}
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = "\
+     locale-base-fr-fr.iso-8859-1 \
+"
+
+INSANE_SKIP_${PN}-ptest += "ldflags"
+INSANE_SKIP_${PN}-ptest += "rpaths"
+
diff --git a/poky/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch b/poky/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch
new file mode 100644
index 0000000..11508ee
--- /dev/null
+++ b/poky/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch
@@ -0,0 +1,41 @@
+From 75bea7c72a919859674f493548653de88f96c798 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 22 Apr 2019 10:36:13 +0800
+Subject: [PATCH] test-getopt-posix fix
+
+fix below problem:
+test-getopt.h:754: assertion 'strcmp (argv[1], "donald") == 0' failed
+
+get this patch from  
+https://github.com/habitat-sh/core-plans/blob/master/m4/fix-test-getopt-posix-with-glibc-2.26.patch
+
+Upstream-Status: Pending
+
+have report this bug to m4-discuss@gnu.org
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ tests/test-getopt-posix.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/test-getopt-posix.c b/tests/test-getopt-posix.c
+index 5532271..2a3d511 100644
+--- a/tests/test-getopt-posix.c
++++ b/tests/test-getopt-posix.c
+@@ -22,6 +22,13 @@
+    ftell link warning if we are not using the gnulib ftell module.  */
+ #define _GL_NO_LARGE_FILES
+ 
++/*
++ * Glibc 2.26 does hard include bits/getopt_posix.h which causes the system
++ * to use glibc's getopt but the tests expect gnulib behavior. Until a better
++ * fix is available this avoids that mis-resolution.
++ */
++#include <getopt.h>
++
+ /* POSIX and glibc provide the getopt() function in <unistd.h>, see
+    http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+    https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch b/poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
index 72e7ae2..c10bcbf 100644
--- a/poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
+++ b/poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
@@ -3,8 +3,9 @@
 see
 https://src.fedoraproject.org/rpms/m4/c/814d592134fad36df757f9a61422d164ea2c6c9b?branch=master
 
-Upstream-Status: Pending
+Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a718]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 Index: m4-1.4.18/lib/fflush.c
 ===================================================================
 --- m4-1.4.18.orig/lib/fflush.c
diff --git a/poky/meta/recipes-devtools/m4/m4/run-ptest b/poky/meta/recipes-devtools/m4/m4/run-ptest
new file mode 100644
index 0000000..5c0fe93
--- /dev/null
+++ b/poky/meta/recipes-devtools/m4/m4/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+#This script is used to run m4 test suites
+cd tests 
+make -k runtest-TESTS top_srcdir=.. srcdir=.
diff --git a/poky/meta/recipes-devtools/m4/m4/serial-tests-config.patch b/poky/meta/recipes-devtools/m4/m4/serial-tests-config.patch
new file mode 100644
index 0000000..34e6ad8
--- /dev/null
+++ b/poky/meta/recipes-devtools/m4/m4/serial-tests-config.patch
@@ -0,0 +1,30 @@
+From ab8491111b4578db5b735c6466187775e1855f18 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 23 Apr 2019 15:35:00 +0800
+Subject: [PATCH] add a patch to use serial-tests config needed by ptest
+
+Add serial-tests support, ptest need it.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 78b8788..931fa6f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,7 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+   [bug-m4@gnu.org])
+ AC_CONFIG_AUX_DIR([build-aux])
+ 
+-AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests
++AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests serial-tests
+ silent-rules subdir-objects gnu])
+ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
+ 
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/meson/meson.inc b/poky/meta/recipes-devtools/meson/meson.inc
index 2d18f72..6a72368 100644
--- a/poky/meta/recipes-devtools/meson/meson.inc
+++ b/poky/meta/recipes-devtools/meson/meson.inc
@@ -7,18 +7,19 @@
 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://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
-           file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
            file://0003-native_bindir.patch \
            file://0001-python-module-do-not-manipulate-the-environment-when.patch \
            file://disable-rpath-handling.patch \
-           file://0001-modules-windows-split-WINDRES-env-variable.patch \
-           file://0002-environment.py-detect-windows-also-if-the-system-str.patch \
            file://cross-prop-default.patch \
-           file://many-cross.patch \
-           file://cross-libdir.patch \
+           file://load-configs-generalise-search-path.patch \
+           file://0007-mesonbuild-allow-multiple-cross-file-options.patch \
+           file://0001-environment.py-detect-windows-also-if-the-system-str.patch \
+           file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \
+           file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \
+           file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
            "
-SRC_URI[sha256sum] = "ef9f14326ec1e30d3ba1a26df0f92826ede5a79255ad723af78a2691c37109fd"
-SRC_URI[md5sum] = "0267b0871266056184c484792572c682"
+SRC_URI[sha256sum] = "f68f56d60c80a77df8fc08fa1016bc5831605d4717b622c96212573271e14ecc"
+SRC_URI[md5sum] = "24a6527796115828d2ebc75880e18d62"
 
 SRC_URI_append_class-native = " \
     file://0001-Make-CPU-family-warnings-fatal.patch \
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch b/poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
deleted file mode 100644
index 97778c3..0000000
--- a/poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 4676224dbdff0f7107e8cbdbe0eab19c855f1454 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 17 Nov 2017 13:18:28 +0200
-Subject: [PATCH] Linker rules: move {cross_args} in front of {output_args}
-
-The previous order was found to break linking in some cases
-(e.g. when -no-pic -fno-PIC was present in {cross_args}.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- mesonbuild/backend/ninjabackend.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
-index bb281e1..969b70e 100644
---- a/mesonbuild/backend/ninjabackend.py
-+++ b/mesonbuild/backend/ninjabackend.py
-@@ -1501,7 +1501,7 @@ int dummy;
-  rspfile_content = $ARGS  {output_args} $in $LINK_ARGS {cross_args} $aliasing
- '''
-                 else:
--                    command_template = ' command = {executable} $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing\n'
-+                    command_template = ' command = {executable} $ARGS {cross_args} {output_args} $in $LINK_ARGS $aliasing\n'
-                 command = command_template.format(
-                     executable=' '.join(compiler.get_linker_exelist()),
-                     cross_args=' '.join(cross_args),
--- 
-2.15.0
-
diff --git a/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 fbc3f5a..adde1e2 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -1,4 +1,4 @@
-From 2db829d865bb6464ac15dbb4a58c9a675e296866 Mon Sep 17 00:00:00 2001
+From 4b4b3d4932d928f05dbd74d730a3c8a5ac371e1d Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Tue, 3 Jul 2018 13:59:09 +0100
 Subject: [PATCH] Make CPU family warnings fatal
@@ -7,15 +7,29 @@
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
 ---
- mesonbuild/environment.py | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
+ mesonbuild/envconfig.py   | 2 +-
+ mesonbuild/environment.py | 4 +---
+ 2 files changed, 2 insertions(+), 4 deletions(-)
 
+diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
+index 5309ef4..3f0a399 100644
+--- a/mesonbuild/envconfig.py
++++ b/mesonbuild/envconfig.py
+@@ -178,7 +178,7 @@ class MachineInfo:
+ 
+         cpu_family = literal['cpu_family']
+         if cpu_family not in known_cpu_families:
+-            mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % cpu_family)
++            raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % cpu_family)
+ 
+         endian = literal['endian']
+         if endian not in ('little', 'big'):
 diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 2ccd31e..5fcf9df 100644
+index 3031a82..ecd18d0 100644
 --- a/mesonbuild/environment.py
 +++ b/mesonbuild/environment.py
-@@ -265,9 +265,7 @@ def detect_cpu_family(compilers):
-     # below.
+@@ -242,9 +242,7 @@ def detect_cpu_family(compilers):
+         trial = 'parisc'
  
      if trial not in known_cpu_families:
 -        mlog.warning('Unknown CPU family {!r}, please report this at '
@@ -25,12 +39,3 @@
  
      return trial
  
-@@ -1232,7 +1230,7 @@ class MachineInfo:
- 
-         cpu_family = literal['cpu_family']
-         if cpu_family not in known_cpu_families:
--            mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % cpu_family)
-+            raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % cpu_family)
- 
-         endian = literal['endian']
-         if endian not in ('little', 'big'):
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-environment.py-detect-windows-also-if-the-system-str.patch b/poky/meta/recipes-devtools/meson/meson/0001-environment.py-detect-windows-also-if-the-system-str.patch
new file mode 100644
index 0000000..f604319
--- /dev/null
+++ b/poky/meta/recipes-devtools/meson/meson/0001-environment.py-detect-windows-also-if-the-system-str.patch
@@ -0,0 +1,25 @@
+From 63b78b7990c5d60f7bc674a26f655caa0bec3c49 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 25 Mar 2019 17:17:06 +0100
+Subject: [PATCH] environment.py: detect windows also if the system string
+ contains 'mingw'
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/envconfig.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
+index f2510c1..5309ef4 100644
+--- a/mesonbuild/envconfig.py
++++ b/mesonbuild/envconfig.py
+@@ -194,7 +194,7 @@ class MachineInfo:
+         """
+         Machine is windows?
+         """
+-        return self.system == 'windows'
++        return self.system == 'windows' or 'mingw' in self.system
+ 
+     def is_cygwin(self):
+         """
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
index 11fd9ed..7c3238b 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -27,7 +27,7 @@
                  '--mode=' + mode]
          if namespace:
              args.append('--namespace=' + namespace)
-+        gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None)
++        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)
 +
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch b/poky/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch
new file mode 100644
index 0000000..fadb273
--- /dev/null
+++ b/poky/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch
@@ -0,0 +1,28 @@
+From 63e79329b5dd00882f0cea56a6d907a831b94171 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 25 Mar 2019 18:52:48 +0100
+Subject: [PATCH] mesonbuild/environment.py: check environment for various
+ binaries
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/environment.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index 6e5d689..bbfd87d 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -398,7 +398,7 @@ class Environment:
+             config = MesonConfigFile.from_config_parser(
+                 coredata.load_configs(self.coredata.cross_files, 'cross'))
+             self.properties.host = Properties(config.get('properties', {}), False)
+-            self.binaries.host = BinaryTable(config.get('binaries', {}), False)
++            self.binaries.host = BinaryTable(config.get('binaries', {}), True)
+             if 'host_machine' in config:
+                 self.machines.host = MachineInfo.from_literal(config['host_machine'])
+             if 'target_machine' in config:
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch b/poky/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch
new file mode 100644
index 0000000..8334714
--- /dev/null
+++ b/poky/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch
@@ -0,0 +1,28 @@
+From d9da5e7a16a9397e22a8900fac4b60b40d7f00de Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 25 Mar 2019 18:18:33 +0100
+Subject: [PATCH] mesonbuild/environment.py: do not determine whether a build
+ is cross by comparing architectures
+
+This can, and does, go wrong when our host architecture is same as the target one(e.g. x86_64).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/environment.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index d4f0630..c584fa4 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -483,7 +483,7 @@ class Environment:
+         self.first_invocation = True
+ 
+     def is_cross_build(self):
+-        return self.coredata.cross_file is not None
++        return self.need_exe_wrapper()
+ 
+     def dump_coredata(self):
+         return coredata.save(self.coredata, self.get_build_dir())
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch b/poky/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch
new file mode 100644
index 0000000..a25c392
--- /dev/null
+++ b/poky/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch
@@ -0,0 +1,44 @@
+From 1d178fb2928d325e339b15972890ceced863d3ec Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 18 Apr 2019 17:36:11 +0200
+Subject: [PATCH] modules/python.py: do not substitute python's install prefix
+ with meson's
+
+Not sure why this is being done, but it
+a) relies on Python's internal variable substitution which may break in the future
+b) shouldn't be necessary as Python's prefix ought to be correct in the first place
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/modules/python.py | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
+index 6e2c63b..f5a37ac 100644
+--- a/mesonbuild/modules/python.py
++++ b/mesonbuild/modules/python.py
+@@ -254,7 +254,7 @@ import sysconfig
+ import json
+ import sys
+ 
+-install_paths = sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', 'platbase': '', 'installed_base': ''})
++install_paths = sysconfig.get_paths(scheme='posix_prefix')
+ 
+ def links_against_libpython():
+     from distutils.core import Distribution, Extension
+@@ -279,12 +279,11 @@ class PythonInstallation(ExternalProgramHolder):
+         ExternalProgramHolder.__init__(self, python)
+         self.interpreter = interpreter
+         self.subproject = self.interpreter.subproject
+-        prefix = self.interpreter.environment.coredata.get_builtin_option('prefix')
+         self.variables = info['variables']
+         self.paths = info['paths']
+         install_paths = info['install_paths']
+-        self.platlib_install_path = os.path.join(prefix, install_paths['platlib'][1:])
+-        self.purelib_install_path = os.path.join(prefix, install_paths['purelib'][1:])
++        self.platlib_install_path = install_paths['platlib']
++        self.purelib_install_path = install_paths['purelib']
+         self.version = info['version']
+         self.platform = info['platform']
+         self.is_pypy = info['is_pypy']
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-modules-windows-split-WINDRES-env-variable.patch b/poky/meta/recipes-devtools/meson/meson/0001-modules-windows-split-WINDRES-env-variable.patch
deleted file mode 100644
index c334e6d..0000000
--- a/poky/meta/recipes-devtools/meson/meson/0001-modules-windows-split-WINDRES-env-variable.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 5293d0f5067b2aeefe9ce3c175c972de367589bc Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 13 Feb 2019 17:43:54 +0100
-Subject: [PATCH] modules/windows: split WINDRES env variable
-
-As it may contain not just the binary, but also the arguments to it.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- mesonbuild/modules/windows.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
-index d185d89..dbaeb9b 100644
---- a/mesonbuild/modules/windows.py
-+++ b/mesonbuild/modules/windows.py
-@@ -56,7 +56,7 @@ class WindowsModule(ExtensionModule):
-             if 'WINDRES' in os.environ:
-                 # Pick-up env var WINDRES if set. This is often used for
-                 # specifying an arch-specific windres.
--                rescomp = ExternalProgram('windres', command=os.environ.get('WINDRES'), silent=True)
-+                rescomp = ExternalProgram('windres', command=os.environ.get('WINDRES').split(), silent=True)
- 
-         if not rescomp or not rescomp.found():
-             # Take windres from the config file after the environment, which is
diff --git a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
index 81548cd..e47e555 100644
--- a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
@@ -1,4 +1,4 @@
-From f8419d5f279f1fb9b5e7eead4f1579bce7cb0e4e Mon Sep 17 00:00:00 2001
+From 2164655328ec4e47335fc9033813274365491ad8 Mon Sep 17 00:00:00 2001
 From: Peter Kjellerstedt <pkj@axis.com>
 Date: Thu, 26 Jul 2018 16:32:49 +0200
 Subject: [PATCH] Support building allarch recipes again
@@ -9,15 +9,15 @@
 Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
 
 ---
- mesonbuild/environment.py | 1 +
+ mesonbuild/envconfig.py | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 5fcf9df..b4fc0dc 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -72,6 +72,7 @@ from .compilers import (
- build_filename = 'meson.build'
+diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
+index 3f0a399..4509e09 100644
+--- a/mesonbuild/envconfig.py
++++ b/mesonbuild/envconfig.py
+@@ -34,6 +34,7 @@ from . import mlog
+ 
  
  known_cpu_families = (
 +    'allarch',
diff --git a/poky/meta/recipes-devtools/meson/meson/0002-environment.py-detect-windows-also-if-the-system-str.patch b/poky/meta/recipes-devtools/meson/meson/0002-environment.py-detect-windows-also-if-the-system-str.patch
deleted file mode 100644
index 1be5d66..0000000
--- a/poky/meta/recipes-devtools/meson/meson/0002-environment.py-detect-windows-also-if-the-system-str.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 7bf4c2c02eb7fe1bf24b23e3ba2d7df36495e0aa Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 13 Feb 2019 17:45:09 +0100
-Subject: [PATCH] environment.py: detect windows also if the system string
- contains 'mingw'
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- mesonbuild/environment.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index b4fc0dc..845077e 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -1247,7 +1247,7 @@ class MachineInfo:
-         """
-         Machine is windows?
-         """
--        return self.system == 'windows'
-+        return self.system == 'windows' or 'mingw' in self.system
- 
-     def is_cygwin(self):
-         """
diff --git a/poky/meta/recipes-devtools/meson/meson/0007-mesonbuild-allow-multiple-cross-file-options.patch b/poky/meta/recipes-devtools/meson/meson/0007-mesonbuild-allow-multiple-cross-file-options.patch
new file mode 100644
index 0000000..6c2949c
--- /dev/null
+++ b/poky/meta/recipes-devtools/meson/meson/0007-mesonbuild-allow-multiple-cross-file-options.patch
@@ -0,0 +1,185 @@
+From 07ae4f949b8402cff178dd12c210d9a726ffe2da Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 18 Mar 2019 17:27:57 +0000
+Subject: [PATCH] mesonbuild: allow multiple --cross-file options
+
+Just like --native-file, allow multiple --cross-file options.  This is mostly
+unifying the logic between cross_files and config_files.
+
+Upstream-Status: Backport [will be in 0.50.1]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ .../markdown/snippets/multiple-cross-files.md |  3 ++
+ mesonbuild/backend/backends.py                |  3 +-
+ mesonbuild/coredata.py                        | 52 +++----------------
+ mesonbuild/environment.py                     |  5 +-
+ mesonbuild/msetup.py                          |  4 +-
+ mesonbuild/munstable_coredata.py              |  5 +-
+ 6 files changed, 20 insertions(+), 52 deletions(-)
+ create mode 100644 docs/markdown/snippets/multiple-cross-files.md
+
+diff --git a/docs/markdown/snippets/multiple-cross-files.md b/docs/markdown/snippets/multiple-cross-files.md
+new file mode 100644
+index 0000000..de229be
+--- /dev/null
++++ b/docs/markdown/snippets/multiple-cross-files.md
+@@ -0,0 +1,3 @@
++## Multipe cross files can be specified
++
++`--cross-file` can be passed multiple times, with the configuration files overlaying the same way as `--native-file`.
+diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
+index 4d35d22..5b270d3 100644
+--- a/mesonbuild/backend/backends.py
++++ b/mesonbuild/backend/backends.py
+@@ -788,8 +788,7 @@ class Backend:
+         deps = [os.path.join(self.build_to_src, df)
+                 for df in self.interpreter.get_build_def_files()]
+         if self.environment.is_cross_build():
+-            deps.append(os.path.join(self.build_to_src,
+-                                     self.environment.coredata.cross_file))
++            deps.extend(self.environment.coredata.cross_files)
+         deps.append('meson-private/coredata.dat')
+         if os.path.exists(os.path.join(self.environment.get_source_dir(), 'meson_options.txt')):
+             deps.append(os.path.join(self.build_to_src, 'meson_options.txt'))
+diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
+index 066ad30..d80e9a0 100644
+--- a/mesonbuild/coredata.py
++++ b/mesonbuild/coredata.py
+@@ -265,7 +265,7 @@ class CoreData:
+         self.compiler_options = PerMachine({}, {}, {})
+         self.base_options = {}
+         self.external_preprocess_args = PerMachine({}, {}, {}) # CPPFLAGS only
+-        self.cross_file = self.__load_cross_file(options.cross_file)
++        self.cross_files = self.__load_config_files(options.cross_file)
+         self.compilers = OrderedDict()
+         self.cross_compilers = OrderedDict()
+         self.deps = OrderedDict()
+@@ -276,57 +276,19 @@ class CoreData:
+ 
+     @staticmethod
+     def __load_config_files(filenames):
++        # Need to try and make the passed filenames absolute because when the
++        # files are parsed later we'll have chdir()d.
+         if not filenames:
+             return []
+         filenames = [os.path.abspath(os.path.expanduser(os.path.expanduser(f)))
+                      for f in filenames]
+         return filenames
+ 
+-    @staticmethod
+-    def __load_cross_file(filename):
+-        """Try to load the cross file.
+-
+-        If the filename is None return None. If the filename is an absolute
+-        (after resolving variables and ~), return that absolute path. Next,
+-        check if the file is relative to the current source dir. If the path
+-        still isn't resolved do the following:
+-            Windows:
+-                - Error
+-            *:
+-                - $XDG_DATA_HOME/meson/cross (or ~/.local/share/meson/cross if
+-                  undefined)
+-                - $XDG_DATA_DIRS/meson/cross (or
+-                  /usr/local/share/meson/cross:/usr/share/meson/cross if undefined)
+-                - Error
+-
+-        Non-Windows follows the Linux path and will honor XDG_* if set. This
+-        simplifies the implementation somewhat.
+-        """
+-        if filename is None:
+-            return None
+-        filename = os.path.expanduser(os.path.expandvars(filename))
+-        if os.path.isabs(filename):
+-            return filename
+-        path_to_try = os.path.abspath(filename)
+-        if os.path.isfile(path_to_try):
+-            return path_to_try
+-        if sys.platform != 'win32':
+-            paths = [
+-                os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')),
+-            ] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':')
+-            for path in paths:
+-                path_to_try = os.path.join(path, 'meson', 'cross', filename)
+-                if os.path.isfile(path_to_try):
+-                    return path_to_try
+-            raise MesonException('Cannot find specified cross file: ' + filename)
+-
+-        raise MesonException('Cannot find specified cross file: ' + filename)
+-
+     def libdir_cross_fixup(self):
+         # By default set libdir to "lib" when cross compiling since
+         # getting the "system default" is always wrong on multiarch
+         # platforms as it gets a value like lib/x86_64-linux-gnu.
+-        if self.cross_file is not None:
++        if self.cross_files:
+             self.builtins['libdir'].value = 'lib'
+ 
+     def sanitize_prefix(self, prefix):
+@@ -642,8 +604,8 @@ def read_cmd_line_file(build_dir, options):
+     options.cmd_line_options = d
+ 
+     properties = config['properties']
+-    if options.cross_file is None:
+-        options.cross_file = properties.get('cross_file', None)
++    if not options.cross_file:
++        options.cross_file = ast.literal_eval(properties.get('cross_file', '[]'))
+     if not options.native_file:
+         # This will be a string in the form: "['first', 'second', ...]", use
+         # literal_eval to get it into the list of strings.
+@@ -654,7 +616,7 @@ def write_cmd_line_file(build_dir, options):
+     config = CmdLineFileParser()
+ 
+     properties = {}
+-    if options.cross_file is not None:
++    if options.cross_file:
+         properties['cross_file'] = options.cross_file
+     if options.native_file:
+         properties['native_file'] = options.native_file
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index c25ef33..4c1c5ac 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -394,8 +394,9 @@ class Environment:
+             self.binaries.build = BinaryTable(config.get('binaries', {}))
+             self.paths.build = Directories(**config.get('paths', {}))
+ 
+-        if self.coredata.cross_file is not None:
+-            config = MesonConfigFile.parse_datafile(self.coredata.cross_file)
++        if self.coredata.cross_files:
++            config = MesonConfigFile.from_config_parser(
++                coredata.load_configs(self.coredata.cross_files, 'cross'))
+             self.properties.host = Properties(config.get('properties', {}), False)
+             self.binaries.host = BinaryTable(config.get('binaries', {}), False)
+             if 'host_machine' in config:
+diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py
+index 023afdb..6e8ca83 100644
+--- a/mesonbuild/msetup.py
++++ b/mesonbuild/msetup.py
+@@ -29,7 +29,9 @@ from .mesonlib import MesonException
+ 
+ def add_arguments(parser):
+     coredata.register_builtin_arguments(parser)
+-    parser.add_argument('--cross-file', default=None,
++    parser.add_argument('--cross-file',
++                        default=[],
++                        action='append',
+                         help='File describing cross compilation environment.')
+     parser.add_argument('--native-file',
+                         default=[],
+diff --git a/mesonbuild/munstable_coredata.py b/mesonbuild/munstable_coredata.py
+index 78f3f34..913f942 100644
+--- a/mesonbuild/munstable_coredata.py
++++ b/mesonbuild/munstable_coredata.py
+@@ -81,8 +81,9 @@ def run(options):
+             print('Last seen PKGCONFIG enviroment variable value: ' + v)
+         elif k == 'version':
+             print('Meson version: ' + v)
+-        elif k == 'cross_file':
+-            print('Cross File: ' + (v or 'None'))
++        elif k == 'cross_files':
++            if v:
++                print('Cross File: ' + ' '.join(v))
+         elif k == 'config_files':
+             if v:
+                 print('Native File: ' + ' '.join(v))
diff --git a/poky/meta/recipes-devtools/meson/meson/cross-libdir.patch b/poky/meta/recipes-devtools/meson/meson/cross-libdir.patch
deleted file mode 100644
index 7395fdb..0000000
--- a/poky/meta/recipes-devtools/meson/meson/cross-libdir.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From ce24f0d6a9be22ba61d80cd254e0409de2eaffd7 Mon Sep 17 00:00:00 2001
-From: Jussi Pakkanen <jpakkane@gmail.com>
-Date: Thu, 27 Dec 2018 23:43:35 +0200
-Subject: [PATCH] Default libdir is "lib" when cross compiling. Closes #2535.
-
----
-diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
-index ff810683..9ee23a69 100644
---- a/mesonbuild/coredata.py
-+++ b/mesonbuild/coredata.py
-@@ -298,6 +298,7 @@ class CoreData:
-         # Only to print a warning if it changes between Meson invocations.
-         self.pkgconf_envvar = os.environ.get('PKG_CONFIG_PATH', '')
-         self.config_files = self.__load_config_files(options.native_file)
-+        self.libdir_cross_fixup()
- 
-     @staticmethod
-     def __load_config_files(filenames):
-@@ -309,6 +310,13 @@ class CoreData:
-                      for f in filenames]
-         return filenames
- 
-+    def libdir_cross_fixup(self):
-+        # By default set libdir to "lib" when cross compiling since
-+        # getting the "system default" is always wrong on multiarch
-+        # platforms as it gets a value like lib/x86_64-linux-gnu.
-+        if self.cross_files:
-+            self.builtins['libdir'].value = 'lib'
-+
-     def sanitize_prefix(self, prefix):
-         if not os.path.isabs(prefix):
-             raise MesonException('prefix value {!r} must be an absolute path'
diff --git a/poky/meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch b/poky/meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch
new file mode 100644
index 0000000..2056763
--- /dev/null
+++ b/poky/meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch
@@ -0,0 +1,53 @@
+From d57dd1092e84e08ee15d7063b6c56bd6d864f2e1 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 18 Mar 2019 16:16:56 +0000
+Subject: [PATCH] load_configs: generalise the search path
+
+Instead of hard-coding the fact that load_configs() searches for files under
+meson/native, pass in the subdirectory allowing the cross-file code to use the
+same logic.
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/coredata.py    | 6 +++---
+ mesonbuild/environment.py | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
+index fba90fa369..6e60917d10 100644
+--- a/mesonbuild/coredata.py
++++ b/mesonbuild/coredata.py
+@@ -211,8 +211,8 @@ def is_auto(self):
+         return self.value == 'auto'
+ 
+ 
+-def load_configs(filenames):
+-    """Load native files."""
++def load_configs(filenames, subdir):
++    """Load configuration files from a named subdirectory."""
+     def gen():
+         for f in filenames:
+             f = os.path.expanduser(os.path.expandvars(f))
+@@ -225,7 +225,7 @@ def gen():
+                     os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')),
+                 ] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':')
+                 for path in paths:
+-                    path_to_try = os.path.join(path, 'meson', 'native', f)
++                    path_to_try = os.path.join(path, 'meson', subdir, f)
+                     if os.path.isfile(path_to_try):
+                         yield path_to_try
+                         break
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index 58adb06960..92a00dd7bf 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -408,7 +408,7 @@ def __init__(self, source_dir, build_dir, options):
+ 
+         if self.coredata.config_files is not None:
+             config = MesonConfigFile.from_config_parser(
+-                coredata.load_configs(self.coredata.config_files))
++                coredata.load_configs(self.coredata.config_files, 'native'))
+             self.binaries.build = BinaryTable(config.get('binaries', {}))
+             self.paths.build = Directories(**config.get('paths', {}))
+ 
diff --git a/poky/meta/recipes-devtools/meson/meson/many-cross.patch b/poky/meta/recipes-devtools/meson/meson/many-cross.patch
deleted file mode 100644
index d04c28b..0000000
--- a/poky/meta/recipes-devtools/meson/meson/many-cross.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-mesonbuild: allow multiple --cross-file options
-
-Just like --native-file, allow multiple --cross-file options.  This is mostly
-unifying the logic between cross_files and config_files.
-
-Upstream-Status: Backport [will be in 0.50.1]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
-index 40402513..4b9bcb59 100644
---- a/mesonbuild/backend/backends.py
-+++ b/mesonbuild/backend/backends.py
-@@ -726,8 +726,7 @@ class Backend:
-         deps = [os.path.join(self.build_to_src, df)
-                 for df in self.interpreter.get_build_def_files()]
-         if self.environment.is_cross_build():
--            deps.append(os.path.join(self.build_to_src,
--                                     self.environment.coredata.cross_file))
-+            deps.extend(self.environment.coredata.cross_files)
-         deps.append('meson-private/coredata.dat')
-         if os.path.exists(os.path.join(self.environment.get_source_dir(), 'meson_options.txt')):
-             deps.append(os.path.join(self.build_to_src, 'meson_options.txt'))
-diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
-index c3f5a745..ff810683 100644
---- a/mesonbuild/coredata.py
-+++ b/mesonbuild/coredata.py
-@@ -201,8 +201,8 @@ class UserFeatureOption(UserComboOption):
-         return self.value == 'auto'
- 
- 
--def load_configs(filenames):
--    """Load native files."""
-+def load_configs(filenames, subdir):
-+    """Load configuration files from a named subdirectory."""
-     def gen():
-         for f in filenames:
-             f = os.path.expanduser(os.path.expandvars(f))
-@@ -215,7 +215,7 @@ def load_configs(filenames):
-                     os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')),
-                 ] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':')
-                 for path in paths:
--                    path_to_try = os.path.join(path, 'meson', 'native', f)
-+                    path_to_try = os.path.join(path, 'meson', subdir, f)
-                     if os.path.isfile(path_to_try):
-                         yield path_to_try
-                         break
-@@ -291,7 +291,7 @@ class CoreData:
-         self.compiler_options = {}
-         self.base_options = {}
-         self.external_preprocess_args = {} # CPPFLAGS only
--        self.cross_file = self.__load_cross_file(options.cross_file)
-+        self.cross_files = self.__load_config_files(options.cross_file)
-         self.compilers = OrderedDict()
-         self.cross_compilers = OrderedDict()
-         self.deps = OrderedDict()
-@@ -301,52 +301,14 @@ class CoreData:
- 
-     @staticmethod
-     def __load_config_files(filenames):
-+        # Need to try and make the passed filenames absolute because when the
-+        # files are parsed later we'll have chdir()d.
-         if not filenames:
-             return []
-         filenames = [os.path.abspath(os.path.expanduser(os.path.expanduser(f)))
-                      for f in filenames]
-         return filenames
- 
--    @staticmethod
--    def __load_cross_file(filename):
--        """Try to load the cross file.
--
--        If the filename is None return None. If the filename is an absolute
--        (after resolving variables and ~), return that absolute path. Next,
--        check if the file is relative to the current source dir. If the path
--        still isn't resolved do the following:
--            Windows:
--                - Error
--            *:
--                - $XDG_DATA_HOME/meson/cross (or ~/.local/share/meson/cross if
--                  undefined)
--                - $XDG_DATA_DIRS/meson/cross (or
--                  /usr/local/share/meson/cross:/usr/share/meson/cross if undefined)
--                - Error
--
--        Non-Windows follows the Linux path and will honor XDG_* if set. This
--        simplifies the implementation somewhat.
--        """
--        if filename is None:
--            return None
--        filename = os.path.expanduser(os.path.expandvars(filename))
--        if os.path.isabs(filename):
--            return filename
--        path_to_try = os.path.abspath(filename)
--        if os.path.isfile(path_to_try):
--            return path_to_try
--        if sys.platform != 'win32':
--            paths = [
--                os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')),
--            ] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':')
--            for path in paths:
--                path_to_try = os.path.join(path, 'meson', 'cross', filename)
--                if os.path.isfile(path_to_try):
--                    return path_to_try
--            raise MesonException('Cannot find specified cross file: ' + filename)
--
--        raise MesonException('Cannot find specified cross file: ' + filename)
--
-     def sanitize_prefix(self, prefix):
-         if not os.path.isabs(prefix):
-             raise MesonException('prefix value {!r} must be an absolute path'
-@@ -558,8 +520,8 @@ def read_cmd_line_file(build_dir, options):
-     options.cmd_line_options = d
- 
-     properties = config['properties']
--    if options.cross_file is None:
--        options.cross_file = properties.get('cross_file', None)
-+    if not options.cross_file:
-+        options.cross_file = ast.literal_eval(properties.get('cross_file', '[]'))
-     if not options.native_file:
-         # This will be a string in the form: "['first', 'second', ...]", use
-         # literal_eval to get it into the list of strings.
-@@ -570,7 +532,7 @@ def write_cmd_line_file(build_dir, options):
-     config = CmdLineFileParser()
- 
-     properties = {}
--    if options.cross_file is not None:
-+    if options.cross_file:
-         properties['cross_file'] = options.cross_file
-     if options.native_file:
-         properties['native_file'] = options.native_file
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 6d86daf9..406ab8b8 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -355,8 +355,8 @@ class Environment:
-         self.machines = MachineInfos()
-         # Will be fully initialized later using compilers later.
-         self.machines.detect_build()
--        if self.coredata.cross_file:
--            self.cross_info = CrossBuildInfo(self.coredata.cross_file)
-+        if self.coredata.cross_files:
-+            self.cross_info = CrossBuildInfo(self.coredata.cross_files)
-             if 'exe_wrapper' in self.cross_info.config['binaries']:
-                 from .dependencies import ExternalProgram
-                 self.exe_wrapper = ExternalProgram.from_bin_list(
-@@ -373,7 +373,7 @@ class Environment:
- 
-         if self.coredata.config_files:
-             self.config_info = coredata.ConfigData(
--                coredata.load_configs(self.coredata.config_files))
-+                coredata.load_configs(self.coredata.config_files, 'native'))
-         else:
-             self.config_info = coredata.ConfigData()
- 
-@@ -1113,13 +1113,8 @@ class CrossBuildInfo:
-     def ok_type(self, i):
-         return isinstance(i, (str, int, bool))
- 
--    def parse_datafile(self, filename):
--        config = configparser.ConfigParser()
--        try:
--            with open(filename, 'r') as f:
--                config.read_file(f, filename)
--        except FileNotFoundError:
--            raise EnvironmentException('File not found: %s.' % filename)
-+    def parse_datafile(self, filenames):
-+        config = coredata.load_configs(filenames, 'cross')
-         # This is a bit hackish at the moment.
-         for s in config.sections():
-             self.config[s] = {}
-diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py
-index 56a0e9a7..f0a1ae19 100644
---- a/mesonbuild/msetup.py
-+++ b/mesonbuild/msetup.py
-@@ -27,7 +27,9 @@ from .mesonlib import MesonException
- 
- def add_arguments(parser):
-     coredata.register_builtin_arguments(parser)
--    parser.add_argument('--cross-file', default=None,
-+    parser.add_argument('--cross-file',
-+                        default=[],
-+                        action='append',
-                         help='File describing cross compilation environment.')
-     parser.add_argument('--native-file',
-                         default=[],
-diff --git a/run_unittests.py b/run_unittests.py
-index e6874b25..1d247291 100755
---- a/run_unittests.py
-+++ b/run_unittests.py
-@@ -529,7 +529,7 @@ class InternalTests(unittest.TestCase):
-         config.write(configfile)
-         configfile.flush()
-         configfile.close()
--        detected_value = mesonbuild.environment.CrossBuildInfo(configfile.name).need_exe_wrapper()
-+        detected_value = mesonbuild.environment.CrossBuildInfo((configfile.name,)).need_exe_wrapper()
-         os.unlink(configfilename)
- 
-         desired_value = not detected_value
-@@ -541,7 +541,7 @@ class InternalTests(unittest.TestCase):
-         configfilename = configfile.name
-         config.write(configfile)
-         configfile.close()
--        forced_value = mesonbuild.environment.CrossBuildInfo(configfile.name).need_exe_wrapper()
-+        forced_value = mesonbuild.environment.CrossBuildInfo((configfile.name,)).need_exe_wrapper()
-         os.unlink(configfilename)
- 
-         self.assertEqual(forced_value, desired_value)
diff --git a/poky/meta/recipes-devtools/meson/meson_0.49.2.bb b/poky/meta/recipes-devtools/meson/meson_0.50.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/meson/meson_0.49.2.bb
rename to poky/meta/recipes-devtools/meson/meson_0.50.1.bb
diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.49.2.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/meson/nativesdk-meson_0.49.2.bb
rename to poky/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb
diff --git a/poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch b/poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
deleted file mode 100644
index 62e25fd..0000000
--- a/poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 175ac0f362bf6121c3537e2f1760ad41c8f81367 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 29 Mar 2018 01:04:57 -0700
-Subject: [PATCH] lsmmc: replace strncpy with memmove on overlapping memory
- copy
-
-here source and destination addresses are overlapping so using memmove is
-going to be more efficient.
-
-Additionally, the bounded size for copy is overflowing for first copy
-
-In function 'strncpy',
-    inlined from 'read_file' at lsmmc.c:356:3:
-/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/mmc-utils/0.1-r0/recipe-sysroot/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' accessing 4096 bytes at offsets 0 and 1 overlaps 4095 bytes at offset 1 [-Werror=restrict]
-   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
-          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10314723/]
- lsmmc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lsmmc.c b/lsmmc.c
-index c4faa00..bcb854d 100644
---- a/lsmmc.c
-+++ b/lsmmc.c
-@@ -353,7 +353,7 @@ char *read_file(char *name)
- 		line[strlen(line) - 1] = '\0';
- 
- 	while (isspace(line[0]))
--		strncpy(&line[0], &line[1], sizeof(line));
-+		memmove(&line[0], &line[1], sizeof(line)-1);
- 
- 	return strdup(line);
- }
diff --git a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 37a4755..f3a7234 100644
--- a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,12 +4,11 @@
 LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
 
 SRCBRANCH ?= "master"
-SRCREV = "b4fe0c8c0e57a74c01755fa9362703b60d7ee49d"
+SRCREV = "aef913e31b659462fe6b9320d241676cba97f67b"
 
-PV = "0.1"
+PV = "0.1+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
-           file://0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch \
            "
 UPSTREAM_CHECK_COMMITS = "1"
 
diff --git a/poky/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch b/poky/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch
deleted file mode 100644
index 1f8f835..0000000
--- a/poky/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 5cc8d1f96ab6d3459e13631d8356f87381562352 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 2 Jun 2016 09:49:44 +0300
-Subject: [PATCH] Continue even if fs size is not divisible by
- sectors-per-track
-
-Filesystem with a size that is not divisible by sectors-per-track is
-not broken or invalid: it might be unoptimized on media where
-heads and cylinders actually matter but that should be it.
-
-Preserve the warning but make mtools continue even if fs size is not
-divisible by sectors-per-track.
-
-Upstream-Status: Submitted [info-mtools@gnu.org]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- init.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/init.c b/init.c
-index c9152e0..4e16a01 100644
---- a/init.c
-+++ b/init.c
-@@ -338,7 +338,6 @@ Stream_t *fs_init(char drive, int mode, int *isRop)
- 		fprintf(stderr,
- 			"Add mtools_skip_check=1 to your .mtoolsrc file "
- 			"to skip this test\n");
--		exit(1);
- 	}
- 
- 	/* full cylinder buffering */
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/mtools/mtools/0001-remove-LOCK_NB-to-use-blocking-request.patch b/poky/meta/recipes-devtools/mtools/mtools/0001-remove-LOCK_NB-to-use-blocking-request.patch
deleted file mode 100644
index 47385a5..0000000
--- a/poky/meta/recipes-devtools/mtools/mtools/0001-remove-LOCK_NB-to-use-blocking-request.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 5bdbfe0a63fed48104b17412854b26ee2275869a Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 22 Aug 2018 16:54:39 +0800
-Subject: [PATCH] remove LOCK_NB to use blocking request
-
-While invoking mtools frequently, the unblocking request
-caused race issue. Here is an example of syslinux
-[snip]
-dd if=/dev/zero of=floppy.img bs=1024 count=144
-losetup /dev/loop1 floppy.img
-mkdosfs /dev/loop1
-syslinux -i /dev/loop1
-|plain floppy: device "/proc/6351/fd/3" busy (Resource temporarily unavailable):
-|Cannot initialize 'S:'
-|Bad target s:/ldlinux.sys
-[snip]
-
-The idea is from:
-https://bugzilla.redhat.com/show_bug.cgi?id=1235016
-https://groups.google.com/a/chromium.org/forum/#!msg/chromium-os-dev/bRPUCFHoBTQ/ZjB8kjjx1vUJ
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- lockdev.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lockdev.h b/lockdev.h
-index 4467bc2..5a135ad 100644
---- a/lockdev.h
-+++ b/lockdev.h
-@@ -43,7 +43,7 @@ int lock_dev(int fd, int mode, struct device *dev)
- 		return 0;
- 
- #if (defined(HAVE_FLOCK) && defined (LOCK_EX) && defined(LOCK_NB))
--	if (flock(fd, (mode ? LOCK_EX : LOCK_SH)|LOCK_NB) < 0)
-+	if (flock(fd, (mode ? LOCK_EX : LOCK_SH)) < 0)
- #else /* FLOCK */
- 
- #if (defined(HAVE_LOCKF) && defined(F_TLOCK))
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/mtools/mtools_4.0.19.bb b/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb
similarity index 82%
rename from poky/meta/recipes-devtools/mtools/mtools_4.0.19.bb
rename to poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb
index 7d59d93..2ae6979 100644
--- a/poky/meta/recipes-devtools/mtools/mtools_4.0.19.bb
+++ b/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb
@@ -24,14 +24,12 @@
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-SRC_URI[md5sum] = "f750246a65ee6f9d2e82d10b03a0aaaf"
-SRC_URI[sha256sum] = "1bc197199ea1c2c317f597879486eeb817f3199b526d94cc6841624768d910df"
+SRC_URI[md5sum] = "1d17b58c53a46b29c7f521d4a55ccef1"
+SRC_URI[sha256sum] = "f188db26751aeb5692a79b2380b440ecc05fd1848a52f869d7ca1193f2ef8ee3"
 
 SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
            file://mtools-makeinfo.patch \
            file://no-x11.gplv3.patch \
-           file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
-           file://0001-remove-LOCK_NB-to-use-blocking-request.patch \
            file://clang_UNUSED.patch \
            "
 
diff --git a/poky/meta/recipes-devtools/ninja/ninja/fix-musl.patch b/poky/meta/recipes-devtools/ninja/ninja/fix-musl.patch
index 543d4f1..7fd7791 100644
--- a/poky/meta/recipes-devtools/ninja/ninja/fix-musl.patch
+++ b/poky/meta/recipes-devtools/ninja/ninja/fix-musl.patch
@@ -1,18 +1,22 @@
-2ff54ad7478a90bd75c91e434236a Mon Sep 17 00:00:00 2001
+From e92a915183f8bff268f74c8cd00d986301a2bbf8 Mon Sep 17 00:00:00 2001
 From: makepost <makepost@firemail.cc>
 Date: Mon, 24 Dec 2018 03:13:16 +0200
 Subject: [PATCH] Use st_mtim if st_mtime is macro, fix #1510
 
 In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward
 compatibility macro. Should help avoid hardcoding platform detection.
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+
+Upstream-Status: Pending
 ---
  src/disk_interface.cc | 14 ++++----------
  1 file changed, 4 insertions(+), 10 deletions(-)
 
 diff --git a/src/disk_interface.cc b/src/disk_interface.cc
-index d4c2fb087..dc297c449 100644
---- src/disk_interface.cc
-+++ /src/disk_interface.cc
+index d4c2fb0..dc297c4 100644
+--- a/src/disk_interface.cc
++++ b/src/disk_interface.cc
 @@ -202,19 +202,13 @@ TimeStamp RealDiskInterface::Stat(const string& path, string* err) const {
    // that it doesn't exist.
    if (st.st_mtime == 0)
@@ -37,3 +41,6 @@
  #else
    return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
  #endif
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch b/poky/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch
new file mode 100644
index 0000000..951c186
--- /dev/null
+++ b/poky/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch
@@ -0,0 +1,43 @@
+From 8fb0364bd0e19f35c20616dd1ab10aa00e08fa8f Mon Sep 17 00:00:00 2001
+From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Date: Wed, 10 Apr 2019 14:49:43 -0500
+Subject: [PATCH] opkg: add target for testsuite installation
+
+- Add target to install testsuite
+- Add override of opkg binary used during test via OPKG_PATH environment
+variable.
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+Upstream-Status: Submitted
+
+ Makefile.am  | 5 +++++
+ tests/cfg.py | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 90cfcae..1f6a784 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -18,3 +18,8 @@ run-tests:
+ 	$(MAKE) -C tests DATADIR=@datadir@ SYSCONFDIR=@sysconfdir@ VARDIR=@localstatedir@
+ 
+ check: run-tests
++
++install-ptest:
++	cp -r $(srcdir)/tests $(DESTDIR)
++	cp Makefile $(DESTDIR)
++	sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile
+diff --git a/tests/cfg.py b/tests/cfg.py
+index 4efaff6..ca59d03 100644
+--- a/tests/cfg.py
++++ b/tests/cfg.py
+@@ -2,4 +2,4 @@ import os
+ 
+ opkdir = "/tmp/opk"
+ offline_root = "/tmp/opkg"
+-opkgcl = os.path.realpath("../src/opkg")
++opkgcl = os.getenv('OPKG_PATH', os.path.realpath("../src/opkg"))
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch b/poky/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
new file mode 100644
index 0000000..75ecb5f
--- /dev/null
+++ b/poky/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
@@ -0,0 +1,31 @@
+From 5f005830eea7d03c02107a3a3fc58907b0a037bf Mon Sep 17 00:00:00 2001
+From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Date: Mon, 8 Apr 2019 11:14:56 -0500
+Subject: [PATCH] regress/issue72.py: resolve paths before comparision
+
+In systems that have a volatile /tmp, the test incorrectly fails since
+it doesn't resolve the real path in all cases.
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+Upstream-Status: Submitted
+
+ tests/regress/issue72.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/regress/issue72.py b/tests/regress/issue72.py
+index 1626877..2f24dec 100755
+--- a/tests/regress/issue72.py
++++ b/tests/regress/issue72.py
+@@ -56,7 +56,7 @@ if not os.path.lexists("{}/{}".format(cfg.offline_root, long_filename2)):
+ 				"not created.")
+ 
+ linky = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename2))
+-linky_dst = "{}/{}".format(cfg.offline_root, long_filename)
++linky_dst = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename))
+ if linky != linky_dst:
+ 	opk.fail("symlink path truncated.")
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/opkg/opkg/run-ptest b/poky/meta/recipes-devtools/opkg/opkg/run-ptest
new file mode 100644
index 0000000..5fb7077
--- /dev/null
+++ b/poky/meta/recipes-devtools/opkg/opkg/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+OPKG_PATH=$(which opkg)
+
+make OPKG_PATH=$OPKG_PATH run-tests
diff --git a/poky/meta/recipes-devtools/opkg/opkg_0.4.0.bb b/poky/meta/recipes-devtools/opkg/opkg_0.4.0.bb
index a2329d3..e2305d0 100644
--- a/poky/meta/recipes-devtools/opkg/opkg_0.4.0.bb
+++ b/poky/meta/recipes-devtools/opkg/opkg_0.4.0.bb
@@ -15,12 +15,20 @@
            file://opkg.conf \
            file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
            file://0001-libopkg-add-add-ignore-recommends-option.patch \
+           file://0001-regress-issue72.py-resolve-paths-before-comparision.patch \
+           file://0001-opkg-add-target-for-testsuite-installation.patch \
+           file://run-ptest \
 "
 
 SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5"
 SRC_URI[sha256sum] = "f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe"
 
-inherit autotools pkgconfig systemd
+# This needs to be before ptest inherit, otherwise all ptest files end packaged
+# in libopkg package if OPKGLIBDIR == libdir, because default
+# PTEST_PATH ?= "${libdir}/${BPN}/ptest"
+PACKAGES =+ "libopkg"
+
+inherit autotools pkgconfig systemd ptest
 
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR = "${target_localstatedir}/lib"
@@ -49,12 +57,11 @@
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
+RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression"
 RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
 RCONFLICTS_${PN} = "opkg-collateral"
 RPROVIDES_${PN} = "opkg-collateral"
 
-PACKAGES =+ "libopkg"
-
 FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/orc/orc_0.4.28.bb b/poky/meta/recipes-devtools/orc/orc_0.4.29.bb
similarity index 84%
rename from poky/meta/recipes-devtools/orc/orc_0.4.28.bb
rename to poky/meta/recipes-devtools/orc/orc_0.4.29.bb
index 03cddad..8313576 100644
--- a/poky/meta/recipes-devtools/orc/orc_0.4.28.bb
+++ b/poky/meta/recipes-devtools/orc/orc_0.4.29.bb
@@ -4,9 +4,8 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
 
 SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "6b582ec4b3275c5efd51e3ae6406d445"
-SRC_URI[sha256sum] = "bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce"
+SRC_URI[md5sum] = "25799917c7d31a891d5e32b83ad08f6d"
+SRC_URI[sha256sum] = "4f8901f9144b5ec17dffdb33548b5f4c7f8049b0d1023be3462cdd64ec5a3ab2"
 
 inherit autotools pkgconfig gtk-doc
 
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch b/poky/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch
deleted file mode 100644
index 49050a1..0000000
--- a/poky/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e3658740ec100e4c8cf83295460b032979e1a99a Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Fri, 9 Sep 2016 18:21:32 -0300
-Subject: [PATCH] Increase maxSize to 64MB
-Organization: O.S. Systems Software LTDA.
-
-Fix error:
-
-/
-|ERROR: qemu-native-2.5.0-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
-|'--set-interpreter', '../build/tmp/sysroots-uninative/x86_64-linux/lib/
-|ld-linux-x86-64.so.2', '../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
-|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64')'
-|failed with exit code 1 and the following output:
-|warning: working around a Linux kernel bug by creating a hole of 36032512
-|bytes in ‘../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
-|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64’
-|maximum file size exceeded
-\
-
-Similar issue is discussed here:
-https://github.com/NixOS/patchelf/issues/47
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- src/patchelf.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/patchelf.cc b/src/patchelf.cc
-index a59c12d..0fd7355 100644
---- a/src/patchelf.cc
-+++ b/src/patchelf.cc
-@@ -279,7 +279,7 @@ static void readFile(string fileName)
-     struct stat st;
-     if (stat(fileName.c_str(), &st) != 0) error("stat");
-     fileSize = st.st_size;
--    maxSize = fileSize + 32 * 1024 * 1024;
-+    maxSize = fileSize + 64 * 1024 * 1024;
- 
-     contents = (unsigned char *) malloc(fileSize + maxSize);
-     if (!contents) abort();
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch b/poky/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch
deleted file mode 100644
index 9ee8a55..0000000
--- a/poky/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 73526cb546ae6b00ea6169e40b01fb7b5f0dbb50 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Thu, 28 Jul 2016 11:05:06 -0300
-Subject: [PATCH] Skip empty section (fixes #66)
-Organization: O.S. Systems Software LTDA.
-
-Upstream-Status: Pending
-
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- src/patchelf.cc | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/patchelf.cc b/src/patchelf.cc
-index 136098f..2677a26 100644
---- a/src/patchelf.cc
-+++ b/src/patchelf.cc
-@@ -684,6 +684,9 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsExecutable()
-     for (unsigned int i = 1; i <= lastReplaced; ++i) {
-         Elf_Shdr & shdr(shdrs[i]);
-         string sectionName = getSectionName(shdr);
-+        if (sectionName == "") {
-+            continue;
-+        }
-         debug("looking at section `%s'\n", sectionName.c_str());
-         /* !!! Why do we stop after a .dynstr section? I can't
-            remember! */
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch b/poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch
deleted file mode 100644
index 0b45c39..0000000
--- a/poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-Different types of binaries create challenges for patchelf. In order to extend 
-sections they need to be moved within the binary. The current approach to 
-handling ET_DYN binaries is to move the INTERP section to the end of the file.
-This means changing PT_PHDR to add an extra PT_LOAD section so that the new section
-is mmaped into memory by the elf loader in the kernel. In order to extend PHDR,
-this means moving it to the end of the file.
-
-Its documented in patchelf there is a kernel 'bug' which means that if you have holes
-in memory between the base load address and the PT_LOAD segment that contains PHDR,
-it will pass an incorrect PHDR address to ld.so and fail to load the binary, segfaulting.
-
-To avoid this, the code currently inserts space into the binary to ensure that when 
-loaded into memory there are no holes between the PT_LOAD sections. This inflates the 
-binaries by many MBs in some cases. Whilst we could make them sparse, there is a second
-issue which is that strip can fail to process these binaries:
-
-$ strip fixincl
-Not enough room for program headers, try linking with -N
-[.note.ABI-tag]: Bad value
-
-This turns out to be due to libbfd not liking the relocated PHDR section either 
-(https://github.com/NixOS/patchelf/issues/10).
-
-Instead this patch implements a different approach, leaving PHDR where it is but extending
-it in place to allow addition of a new PT_LOAD section. This overwrites sections in the 
-binary but those get moved to the end of the file in the new PT_LOAD section.
-
-This is based on patches linked from the above github issue, however whilst the idea
-was good, the implementation wasn't correct and they've been rewritten here.
-
-RP
-2017/3/7
-
-Upstream-Status: Accepted
-
-Index: patchelf-0.9/src/patchelf.cc
-===================================================================
---- patchelf-0.9.orig/src/patchelf.cc
-+++ patchelf-0.9/src/patchelf.cc
-@@ -146,6 +146,8 @@ private:
-     string & replaceSection(const SectionName & sectionName,
-         unsigned int size);
- 
-+    bool haveReplacedSection(const SectionName & sectionName);
-+
-     void writeReplacedSections(Elf_Off & curOff,
-         Elf_Addr startAddr, Elf_Off startOffset);
- 
-@@ -497,6 +499,16 @@ unsigned int ElfFile<ElfFileParamNames>:
-     return 0;
- }
- 
-+template<ElfFileParams>
-+bool ElfFile<ElfFileParamNames>::haveReplacedSection(const SectionName & sectionName)
-+{
-+    ReplacedSections::iterator i = replacedSections.find(sectionName);
-+
-+    if (i != replacedSections.end())
-+        return true;
-+    return false;
-+}
-+
- 
- template<ElfFileParams>
- string & ElfFile<ElfFileParamNames>::replaceSection(const SectionName & sectionName,
-@@ -595,52 +607,52 @@ void ElfFile<ElfFileParamNames>::rewrite
- 
-     debug("last page is 0x%llx\n", (unsigned long long) startPage);
- 
-+    /* Because we're adding a new section header, we're necessarily increasing
-+       the size of the program header table.  This can cause the first section
-+       to overlap the program header table in memory; we need to shift the first
-+       few segments to someplace else. */
-+    /* Some sections may already be replaced so account for that */
-+    unsigned int i = 1;
-+    Elf_Addr pht_size = sizeof(Elf_Ehdr) + (phdrs.size() + 1)*sizeof(Elf_Phdr);
-+    while( shdrs[i].sh_addr <= pht_size && i < rdi(hdr->e_shnum) ) {
-+        if (not haveReplacedSection(getSectionName(shdrs[i])))
-+            replaceSection(getSectionName(shdrs[i]), shdrs[i].sh_size);
-+        i++;
-+    }
- 
--    /* Compute the total space needed for the replaced sections and
--       the program headers. */
--    off_t neededSpace = (phdrs.size() + 1) * sizeof(Elf_Phdr);
-+    /* Compute the total space needed for the replaced sections */
-+    off_t neededSpace = 0;
-     for (ReplacedSections::iterator i = replacedSections.begin();
-          i != replacedSections.end(); ++i)
-         neededSpace += roundUp(i->second.size(), sectionAlignment);
-     debug("needed space is %d\n", neededSpace);
- 
--
-     size_t startOffset = roundUp(fileSize, getPageSize());
- 
-     growFile(startOffset + neededSpace);
- 
--
-     /* Even though this file is of type ET_DYN, it could actually be
-        an executable.  For instance, Gold produces executables marked
--       ET_DYN.  In that case we can still hit the kernel bug that
--       necessitated rewriteSectionsExecutable().  However, such
--       executables also tend to start at virtual address 0, so
-+       ET_DYN as does LD when linking with pie. If we move PT_PHDR, it
-+       has to stay in the first PT_LOAD segment or any subsequent ones
-+       if they're continuous in memory due to linux kernel constraints
-+       (see BUGS). Since the end of the file would be after bss, we can't 
-+       move PHDR there, we therefore choose to leave PT_PHDR where it is but
-+       move enough following sections such that we can add the extra PT_LOAD
-+       section to it. This PT_LOAD segment ensures the sections at the end of
-+       the file are mapped into memory for ld.so to process.
-+       We can't use the approach in rewriteSectionsExecutable()
-+       since DYN executables tend to start at virtual address 0, so
-        rewriteSectionsExecutable() won't work because it doesn't have
--       any virtual address space to grow downwards into.  As a
--       workaround, make sure that the virtual address of our new
--       PT_LOAD segment relative to the first PT_LOAD segment is equal
--       to its offset; otherwise we hit the kernel bug.  This may
--       require creating a hole in the executable.  The bigger the size
--       of the uninitialised data segment, the bigger the hole. */
-+       any virtual address space to grow downwards into. */
-     if (isExecutable) {
-         if (startOffset >= startPage) {
-             debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage);
--        } else {
--            size_t hole = startPage - startOffset;
--            /* Print a warning, because the hole could be very big. */
--            fprintf(stderr, "warning: working around a Linux kernel bug by creating a hole of %zu bytes in ‘%s’\n", hole, fileName.c_str());
--            assert(hole % getPageSize() == 0);
--            /* !!! We could create an actual hole in the file here,
--               but it's probably not worth the effort. */
--            growFile(fileSize + hole);
--            startOffset += hole;
-         }
-         startPage = startOffset;
-     }
- 
--
--    /* Add a segment that maps the replaced sections and program
--       headers into memory. */
-+    /* Add a segment that maps the replaced sections into memory. */
-     phdrs.resize(rdi(hdr->e_phnum) + 1);
-     wri(hdr->e_phnum, rdi(hdr->e_phnum) + 1);
-     Elf_Phdr & phdr = phdrs[rdi(hdr->e_phnum) - 1];
-@@ -653,15 +665,12 @@ void ElfFile<ElfFileParamNames>::rewrite
- 
- 
-     /* Write out the replaced sections. */
--    Elf_Off curOff = startOffset + phdrs.size() * sizeof(Elf_Phdr);
-+    Elf_Off curOff = startOffset;
-     writeReplacedSections(curOff, startPage, startOffset);
-     assert(curOff == startOffset + neededSpace);
- 
--
--    /* Move the program header to the start of the new area. */
--    wri(hdr->e_phoff, startOffset);
--
--    rewriteHeaders(startPage);
-+    /* Write out the updated program and section headers */
-+    rewriteHeaders(hdr->e_phoff);
- }
- 
- 
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch b/poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch
index f64cbed..a098842 100644
--- a/poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch
+++ b/poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch
@@ -1,6 +1,9 @@
+From 1630d3f846c7721b1e7cd3b005bb2b34816e1d0f Mon Sep 17 00:00:00 2001
+From: Ed Bartosh <ed.bartosh@linux.intel.com>
+Date: Fri, 21 Jul 2017 12:33:53 +0300
+Subject: [PATCH] patchelf: fix segfault for binaries linked by gold
+
 commit 1cc234fea5600190d872329aca60e2365cefc39e
-Author: Ed Bartosh <ed.bartosh@linux.intel.com>
-Date:   Fri Jul 21 12:33:53 2017 +0300
 
 fix adjusting startPage
 
@@ -19,11 +22,15 @@
 
 Upstream-Status: Submitted
 
+---
+ src/patchelf.cc | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
 diff --git a/src/patchelf.cc b/src/patchelf.cc
-index cbd36c0..e9d7ea5 100644
+index a63e3a11c61f..2483d25d78f1 100644
 --- a/src/patchelf.cc
 +++ b/src/patchelf.cc
-@@ -720,10 +720,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
+@@ -756,10 +756,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
         since DYN executables tend to start at virtual address 0, so
         rewriteSectionsExecutable() won't work because it doesn't have
         any virtual address space to grow downwards into. */
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 9fafec4..03b0d18 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
@@ -1,26 +1,26 @@
-From 2a603acb65993698c21f1c6eb7664f93ad830d52 Mon Sep 17 00:00:00 2001
+From 7f1fd10cfebd5ea2f3e1938abe1bd1c4828164a7 Mon Sep 17 00:00:00 2001
 From: Fabio Berton <fabio.berton@ossystems.com.br>
 Date: Fri, 9 Sep 2016 16:00:42 -0300
 Subject: [PATCH] handle read-only files
-Organization: O.S. Systems Software LTDA.
 
 Patch from:
 https://github.com/darealshinji/patchelf/commit/40e66392bc4b96e9b4eda496827d26348a503509
 
-Upstream-Status: Pending
+Upstream-Status: Denied [https://github.com/NixOS/patchelf/pull/89]
 
 Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+
 ---
  src/patchelf.cc | 16 +++++++++++++++-
  1 file changed, 15 insertions(+), 1 deletion(-)
 
 diff --git a/src/patchelf.cc b/src/patchelf.cc
-index 136098f..aea360e 100644
+index 0b4965adff83..b5db2aef0e8a 100644
 --- a/src/patchelf.cc
 +++ b/src/patchelf.cc
-@@ -388,7 +388,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
+@@ -497,7 +497,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
  
- static void writeFile(string fileName)
+ static void writeFile(std::string fileName, FileContents contents)
  {
 -    int fd = open(fileName.c_str(), O_TRUNC | O_WRONLY);
 +    struct stat st;
@@ -37,7 +37,7 @@
      if (fd == -1)
          error("open");
  
-@@ -397,6 +407,10 @@ static void writeFile(string fileName)
+@@ -511,6 +521,10 @@ static void writeFile(std::string fileName, FileContents contents)
  
      if (close(fd) != 0)
          error("close");
@@ -48,6 +48,3 @@
  }
  
  
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf_0.10.bb b/poky/meta/recipes-devtools/patchelf/patchelf_0.10.bb
new file mode 100644
index 0000000..580108e
--- /dev/null
+++ b/poky/meta/recipes-devtools/patchelf/patchelf_0.10.bb
@@ -0,0 +1,16 @@
+SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
+           file://handle-read-only-files.patch \
+           file://fix-adjusting-startPage.patch \
+           "
+
+LICENSE = "GPLv3"
+SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
+
+SRC_URI[md5sum] = "6c3f3a06a95705870d129494a6880106"
+SRC_URI[sha256sum] = "f670cd462ac7161588c28f45349bc20fb9bd842805e3f71387a320e7a9ddfcf3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb b/poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb
deleted file mode 100644
index d703039..0000000
--- a/poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
-           file://Skip-empty-section-fixes-66.patch \
-           file://handle-read-only-files.patch \
-           file://Increase-maxSize-to-64MB.patch \
-           file://avoidholes.patch \
-           file://fix-adjusting-startPage.patch \
-"
-
-LICENSE = "GPLv3"
-SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
-
-SRC_URI[md5sum] = "d02687629c7e1698a486a93a0d607947"
-SRC_URI[sha256sum] = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-inherit autotools
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb b/poky/meta/recipes-devtools/perl-sanity/perl_5.28.2.bb
similarity index 97%
rename from poky/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
rename to poky/meta/recipes-devtools/perl-sanity/perl_5.28.2.bb
index f3948a5..12b220a 100644
--- a/poky/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
+++ b/poky/meta/recipes-devtools/perl-sanity/perl_5.28.2.bb
@@ -8,7 +8,7 @@
 
 
 SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
-           https://github.com/arsv/perl-cross/releases/download/1.2.2/perl-cross-1.2.2.tar.gz;name=perl-cross \
+           https://github.com/arsv/perl-cross/releases/download/1.2.3/perl-cross-1.2.3.tar.gz;name=perl-cross \
            file://perl-rdepends.txt \
            file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
            file://0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch \
@@ -23,10 +23,10 @@
            file://perl-configpm-switch.patch \
 "
 
-SRC_URI[perl.md5sum] = "838198c43d4f39d7af797e2f59c2bee5"
-SRC_URI[perl.sha256sum] = "3ebf85fe65df2ee165b22596540b7d5d42f84d4b72d84834f74e2e0b8956c347"
-SRC_URI[perl-cross.md5sum] = "9a6c05497bdde9a3106e3be9246f4da1"
-SRC_URI[perl-cross.sha256sum] = "e6987838f27d8cd3368ea68fc56a68cc52371505950927b8b7c5cb76e3a94caa"
+SRC_URI[perl.md5sum] = "1323e7581fbedf3791d2843f4ccaec4b"
+SRC_URI[perl.sha256sum] = "aa95456dddb3eb1cc5475fed4e08f91876bea71fb636fba6399054dfbabed6c7"
+SRC_URI[perl-cross.md5sum] = "03d9eafd71161eb5d1f80434e8b49dbc"
+SRC_URI[perl-cross.sha256sum] = "84583a1bb5f3a2c64d13d031386c114382e5c62955c6f84a27cec8318536627c"
 
 PR = "r1"
 
diff --git a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb
index 79e0b6b..51db84c 100644
--- a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -8,7 +8,7 @@
            file://toomanyfiles.patch \
            "
 
-SRCREV = "6294b344e5140f5467e6860f45a174440015304e"
+SRCREV = "3fa7c853e0bcd6fe23f7524c2a3c9e3af90901c3"
 S = "${WORKDIR}/git"
 PV = "1.9.0+git${SRCPV}"
 
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-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index 516ccd7..8fe0d1a 100644
--- 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-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -1,7 +1,8 @@
-From c8c6649b29a08f82e1d6761a6d62ce5f632313c5 Mon Sep 17 00:00:00 2001
+From c14554c7e2fff8dd559dfb41e7dd11392c6f85e3 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 10 Dec 2015 13:20:30 +0200
-Subject: [PATCH 1/3] Don't search /usr and so on for libraries by default to
+Subject: [PATCH] Don't search /usr and so on for libraries by default to
+
  avoid host contamination.
 
 Upstream-Status: Inappropriate (As the code stands, this is a hack)
@@ -9,16 +10,16 @@
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
- numpy/distutils/system_info.py | 50 +++++-------------------------------------
+ numpy/distutils/system_info.py | 50 ++++------------------------------
  1 file changed, 6 insertions(+), 44 deletions(-)
 
 diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
-index bea120c..544e056 100644
+index 2424943..bf56a6d 100644
 --- a/numpy/distutils/system_info.py
 +++ b/numpy/distutils/system_info.py
-@@ -262,51 +262,13 @@ if sys.platform == 'win32':
+@@ -274,51 +274,13 @@ if sys.platform == 'win32':
              add_system_root(os.path.join(conda_dir, 'Library'))
-                         
+ 
  else:
 -    default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
 -                                 '/opt/local/lib', '/sw/lib'], platform_bits)
@@ -74,6 +75,3 @@
  
  if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
      default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
--- 
-2.16.1
-
diff --git a/poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch b/poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
index 4f5c4f5..4decfe6 100644
--- a/poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
+++ b/poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
@@ -1,21 +1,20 @@
-From 30fb1bf9244bb0789c02ec7c98a923acc7200206 Mon Sep 17 00:00:00 2001
+From 629891f67601275c9c4de0bb01afcf1a8c44fa3f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 16 Mar 2018 19:55:21 -0700
 Subject: [PATCH] npy_cpu: Add riscv support
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
 Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/10761]
-
+---
  numpy/core/include/numpy/npy_cpu.h | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
-index 84653ea18..9e88db873 100644
+index 5edd8f4..e1e4796 100644
 --- a/numpy/core/include/numpy/npy_cpu.h
 +++ b/numpy/core/include/numpy/npy_cpu.h
-@@ -78,6 +78,8 @@
-     #define NPY_CPU_AARCH64
+@@ -96,6 +96,8 @@
+     #define NPY_CPU_OR1K
  #elif defined(__mc68000__)
      #define NPY_CPU_M68K
 +#elif defined(__riscv)
@@ -23,6 +22,3 @@
  #elif defined(__arc__) && defined(__LITTLE_ENDIAN__)
      #define NPY_CPU_ARCEL
  #elif defined(__arc__) && defined(__BIG_ENDIAN__)
--- 
-2.16.2
-
diff --git a/poky/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch b/poky/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch
deleted file mode 100644
index 8be6e4d..0000000
--- a/poky/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Avoids using python from the HOSTs native sysroot for f2py,
-uses TARGET env python instead.
-
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: numpy-1.11.0/numpy/f2py/setup.py
-===================================================================
---- numpy-1.11.0.orig/numpy/f2py/setup.py
-+++ numpy-1.11.0/numpy/f2py/setup.py
-@@ -37,10 +37,13 @@ def _get_f2py_shebang():
-     should be ``#!python`` rather than ``#!`` followed by the contents of
-     ``sys.executable``.
-     """
--    if set(('bdist_wheel', 'bdist_egg', 'bdist_wininst',
--            'bdist_rpm')).intersection(sys.argv):
--        return '#!python'
--    return '#!' + sys.executable
-+    #if set(('bdist_wheel', 'bdist_egg', 'bdist_wininst',
-+    #        'bdist_rpm')).intersection(sys.argv):
-+    #    return '#!python'
-+    #return '#!' + sys.executable
-+    
-+    # On OE, we need to avoid using the HOSTs python-native, we return env python instead
-+    return '#!/usr/bin/env python'
- 
- 
- def configuration(parent_package='', top_path=None):
diff --git a/poky/meta/recipes-devtools/python-numpy/python-numpy.inc b/poky/meta/recipes-devtools/python-numpy/python-numpy.inc
index 1b51f7b..43c3053 100644
--- a/poky/meta/recipes-devtools/python-numpy/python-numpy.inc
+++ b/poky/meta/recipes-devtools/python-numpy/python-numpy.inc
@@ -1,17 +1,17 @@
 SUMMARY = "A sophisticated Numeric Processing Package for Python"
 SECTION = "devel/python"
 LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fc53b33304171d132128ebe82ea4a645"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d26bde5432613cce2334b93985576231"
 
 SRCNAME = "numpy"
 
 SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
            file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
-           file://fix_shebang_f2py.patch \
            file://0001-npy_cpu-Add-riscv-support.patch \
-           ${CONFIGFILESURI} "
-SRC_URI[md5sum] = "e3189ee851c3a0e2e6e4c6e80a711ec8"
-SRC_URI[sha256sum] = "1b4a02758fb68a65ea986d808867f1d6383219c234aef553a8741818e795b529"
+           ${CONFIGFILESURI} \
+           "
+SRC_URI[md5sum] = "0886e5b5017f08f2b7a624c0b5931e61"
+SRC_URI[sha256sum] = "adf063a3f87ab89393f5eea0eb903293b112fa0a308e8c594a75ffa585d81d4f"
 
 UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.5.bb b/poky/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.5.bb
rename to poky/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb
diff --git a/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.5.bb b/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.16.3.bb
similarity index 97%
rename from poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.5.bb
rename to poky/meta/recipes-devtools/python-numpy/python3-numpy_1.16.3.bb
index 915e6f8..d388e88 100644
--- a/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.5.bb
+++ b/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.16.3.bb
@@ -1,2 +1,3 @@
 inherit setuptools3
 require python-numpy.inc
+
diff --git a/poky/meta/recipes-devtools/python/python-mako.inc b/poky/meta/recipes-devtools/python/python-mako.inc
index e265bde..97c624b 100644
--- a/poky/meta/recipes-devtools/python/python-mako.inc
+++ b/poky/meta/recipes-devtools/python/python-mako.inc
@@ -8,8 +8,8 @@
 
 inherit pypi
 
-SRC_URI[md5sum] = "5836cc997b1b773ef389bf6629c30e65"
-SRC_URI[sha256sum] = "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae"
+SRC_URI[md5sum] = "d739720f3f0d6a1cb6a96ea7a4760c3e"
+SRC_URI[sha256sum] = "0728c404877cd4ca72c409c0ea372dc5f3b53fa1ad2bb434e1d216c0444ff1fd"
 
 RDEPENDS_${PN} = "${PYTHON_PN}-html \
                   ${PYTHON_PN}-netclient \
diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.15.bb b/poky/meta/recipes-devtools/python/python-native_2.7.16.bb
similarity index 96%
rename from poky/meta/recipes-devtools/python/python-native_2.7.15.bb
rename to poky/meta/recipes-devtools/python/python-native_2.7.16.bb
index 26d67df..b744280 100644
--- a/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
+++ b/poky/meta/recipes-devtools/python/python-native_2.7.16.bb
@@ -1,7 +1,6 @@
 require python.inc
 EXTRANATIVEPATH += "bzip2-native"
 DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
-PR = "${INC_PR}.1"
 
 SRC_URI += "\
             file://05-enable-ctypes-cross-build.patch \
@@ -17,7 +16,6 @@
             file://parallel-makeinst-create-bindir.patch \
             file://revert_use_of_sysconfigdata.patch \
             file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \
-            file://0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch \
            "
 
 S = "${WORKDIR}/Python-${PV}"
diff --git a/poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb b/poky/meta/recipes-devtools/python/python-scons-native_3.0.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
rename to poky/meta/recipes-devtools/python/python-scons-native_3.0.5.bb
diff --git a/poky/meta/recipes-devtools/python/python-scons_3.0.1.bb b/poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
deleted file mode 100644
index d5084b2..0000000
--- a/poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=46ddf66004e5be5566367cb525a66fc6"
-
-SRC_URI[md5sum] = "b6a292e251b34b82c203b56cfa3968b3"
-SRC_URI[sha256sum] = "24475e38d39c19683bc88054524df018fe6949d70fbd4c69e298d39a0269f173"
-
-UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit pypi setuptools
-
-RDEPENDS_${PN} = "\
-  python-fcntl \
-  python-io \
-  python-json \
-  python-subprocess \
-  python-shell \
-  python-pprint \
-  "
diff --git a/poky/meta/recipes-devtools/python/python-scons_3.0.5.bb b/poky/meta/recipes-devtools/python/python-scons_3.0.5.bb
new file mode 100644
index 0000000..939c15b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python-scons_3.0.5.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=37bb53a08e6beaea0c90e7821d731284"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
+SRC_URI[md5sum] = "9f9c163e8bd48cf8cd92f03e85ca6395"
+SRC_URI[sha256sum] = "df676f23dc6d4bfa384fc389d95dcd21ab907e6349d4c848958ba4befb73c73e"
+
+S = "${WORKDIR}/scons-${PV}"
+
+UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "\
+  python-fcntl \
+  python-io \
+  python-json \
+  python-subprocess \
+  python-shell \
+  python-pprint \
+  "
diff --git a/poky/meta/recipes-devtools/python/python-setuptools.inc b/poky/meta/recipes-devtools/python/python-setuptools.inc
index 9092d7a..357aa07 100644
--- a/poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -10,8 +10,8 @@
 
 SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
 
-SRC_URI[md5sum] = "712697a5bc975cf479d487cd68206c20"
-SRC_URI[sha256sum] = "6e4eec90337e849ade7103723b9a99631c1f0d19990d6e8412dc42f5ae8b304d"
+SRC_URI[md5sum] = "6404ca798bb9a9073aff3b91b2df35c8"
+SRC_URI[sha256sum] = "a222d126f5471598053c9a77f4b5d4f26eaa1f150ad6e01dcf1a42e185d05613"
 
 DEPENDS += "${PYTHON_PN}"
 
diff --git a/poky/meta/recipes-devtools/python/python-setuptools_40.8.0.bb b/poky/meta/recipes-devtools/python/python-setuptools_41.0.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python/python-setuptools_40.8.0.bb
rename to poky/meta/recipes-devtools/python/python-setuptools_41.0.1.bb
diff --git a/poky/meta/recipes-devtools/python/python.inc b/poky/meta/recipes-devtools/python/python.inc
index 6692367..779df53 100644
--- a/poky/meta/recipes-devtools/python/python.inc
+++ b/poky/meta/recipes-devtools/python/python.inc
@@ -5,18 +5,13 @@
 # bump this on every change in contrib/python/generate-manifest-2.7.py
 INC_PR = "r1"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f257cc14f81685691652a3d3e1b5d754"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-           file://0001-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976-.patch \
-           file://0002-bpo-34818-Add-missing-closing-wrapper-in-test_tls1_3.patch \
-           file://0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch \
-           file://0004-bpo-34836-fix-test_default_ecdh_curve-needs-no-tlsv1.patch \
-           file://0001-bpo-33354-Fix-test_ssl-when-a-filename-cannot-be-enc.patch \
            "
 
-SRC_URI[md5sum] = "a80ae3cc478460b922242f43a1b4094d"
-SRC_URI[sha256sum] = "22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574"
+SRC_URI[md5sum] = "30157d85a2c0479c09ea2cbe61f2aaf5"
+SRC_URI[sha256sum] = "f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7"
 
 # python recipe is actually python 2.x
 # also, exclude pre-releases for both python 2.x and 3.x
diff --git a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch b/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch
deleted file mode 100644
index 3c0d662..0000000
--- a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 3ffc80959f01f9fde548f1632694b9f950c2dd7c Mon Sep 17 00:00:00 2001
-From: Christian Heimes <christian@python.org>
-Date: Tue, 18 Sep 2018 15:13:09 +0200
-Subject: [PATCH] [2.7] bpo-34623: Use XML_SetHashSalt in _elementtree
- (GH-9146) (GH-9394)
-
-The C accelerated _elementtree module now initializes hash randomization
-salt from _Py_HashSecret instead of libexpat's default CPRNG.
-
-Signed-off-by: Christian Heimes <christian@python.org>
-
-https://bugs.python.org/issue34623.
-(cherry picked from commit cb5778f00ce48631c7140f33ba242496aaf7102b)
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-
-https://bugs.python.org/issue34623
-
-Upstream-Status: Backport
-CVE: CVE-2018-14647
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- Include/pyexpat.h                                                  | 4 +++-
- Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst | 2 ++
- Modules/_elementtree.c                                             | 5 +++++
- Modules/pyexpat.c                                                  | 5 +++++
- 4 files changed, 15 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-
-diff --git a/Include/pyexpat.h b/Include/pyexpat.h
-index 5340ef5..3fc5fa5 100644
---- a/Include/pyexpat.h
-+++ b/Include/pyexpat.h
-@@ -3,7 +3,7 @@
- 
- /* note: you must import expat.h before importing this module! */
- 
--#define PyExpat_CAPI_MAGIC  "pyexpat.expat_CAPI 1.0"
-+#define PyExpat_CAPI_MAGIC  "pyexpat.expat_CAPI 1.1"
- #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
- 
- struct PyExpat_CAPI 
-@@ -43,6 +43,8 @@ struct PyExpat_CAPI
-         XML_Parser parser, XML_UnknownEncodingHandler handler,
-         void *encodingHandlerData);
-     void (*SetUserData)(XML_Parser parser, void *userData);
-+    /* might be none for expat < 2.1.0 */
-+    int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
-     /* always add new stuff to the end! */
- };
- 
-diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-new file mode 100644
-index 0000000..31ad92e
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-@@ -0,0 +1,2 @@
-+The C accelerated _elementtree module now initializes hash randomization
-+salt from _Py_HashSecret instead of libexpat's default CSPRNG.
-diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
-index 1d316a1..a19cbf7 100644
---- a/Modules/_elementtree.c
-+++ b/Modules/_elementtree.c
-@@ -2574,6 +2574,11 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw)
-         PyErr_NoMemory();
-         return NULL;
-     }
-+    /* expat < 2.1.0 has no XML_SetHashSalt() */
-+    if (EXPAT(SetHashSalt) != NULL) {
-+        EXPAT(SetHashSalt)(self->parser,
-+                           (unsigned long)_Py_HashSecret.prefix);
-+    }
- 
-     ALLOC(sizeof(XMLParserObject), "create expatparser");
- 
-diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
-index 2b4d312..1f8c0d7 100644
---- a/Modules/pyexpat.c
-+++ b/Modules/pyexpat.c
-@@ -2042,6 +2042,11 @@ MODULE_INITFUNC(void)
-     capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
-     capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
-     capi.SetUserData = XML_SetUserData;
-+#if XML_COMBINED_VERSION >= 20100
-+    capi.SetHashSalt = XML_SetHashSalt;
-+#else
-+    capi.SetHashSalt = NULL;
-+#endif
- 
-     /* export using capsule */
-     capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL);
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/python/python/0001-bpo-33354-Fix-test_ssl-when-a-filename-cannot-be-enc.patch b/poky/meta/recipes-devtools/python/python/0001-bpo-33354-Fix-test_ssl-when-a-filename-cannot-be-enc.patch
deleted file mode 100644
index 4c0b357..0000000
--- a/poky/meta/recipes-devtools/python/python/0001-bpo-33354-Fix-test_ssl-when-a-filename-cannot-be-enc.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 19f6bd06af3c7fc0db5f96878aaa68f5589ff13e Mon Sep 17 00:00:00 2001
-From: Pablo Galindo <Pablogsal@gmail.com>
-Date: Thu, 24 May 2018 23:20:44 +0100
-Subject: [PATCH] bpo-33354: Fix test_ssl when a filename cannot be encoded
- (GH-6613)
-
-Skip test_load_dh_params() of test_ssl when Python filesystem encoding
-cannot encode the provided path.
-
-Upstream-Status: Backport [https://github.com/python/cpython/commit/19f6bd06af3c7fc0db5f96878aaa68f5589ff13e]
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- Lib/test/test_ssl.py                                     | 9 ++++++++-
- .../next/Tests/2018-04-26-22-39-17.bpo-33354.g35-44.rst  | 2 ++
- 2 files changed, 10 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Tests/2018-04-26-22-39-17.bpo-33354.g35-44.rst
-
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index b59fe73f04..7ced90fdf6 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -989,6 +989,13 @@ class ContextTests(unittest.TestCase):
- 
- 
-     def test_load_dh_params(self):
-+        filename = u'dhpäräm.pem'
-+        fs_encoding = sys.getfilesystemencoding()
-+        try:
-+            filename.encode(fs_encoding)
-+        except UnicodeEncodeError:
-+            self.skipTest("filename %r cannot be encoded to the filesystem encoding %r" % (filename, fs_encoding))
-+
-         ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
-         ctx.load_dh_params(DHFILE)
-         if os.name != 'nt':
-@@ -1001,7 +1008,7 @@ class ContextTests(unittest.TestCase):
-         with self.assertRaises(ssl.SSLError) as cm:
-             ctx.load_dh_params(CERTFILE)
-         with support.temp_dir() as d:
--            fname = os.path.join(d, u'dhpäräm.pem')
-+            fname = os.path.join(d, filename)
-             shutil.copy(DHFILE, fname)
-             ctx.load_dh_params(fname)
- 
-diff --git a/Misc/NEWS.d/next/Tests/2018-04-26-22-39-17.bpo-33354.g35-44.rst b/Misc/NEWS.d/next/Tests/2018-04-26-22-39-17.bpo-33354.g35-44.rst
-new file mode 100644
-index 0000000000..c66cecac32
---- /dev/null
-+++ b/Misc/NEWS.d/next/Tests/2018-04-26-22-39-17.bpo-33354.g35-44.rst
-@@ -0,0 +1,2 @@
-+Skip ``test_ssl.test_load_dh_params`` when Python filesystem encoding cannot encode the
-+provided path.
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python/0001-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976-.patch b/poky/meta/recipes-devtools/python/python/0001-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976-.patch
deleted file mode 100644
index 1f70562..0000000
--- a/poky/meta/recipes-devtools/python/python/0001-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976-.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From a333351592f097220fc862911b34d3a300f0985e Mon Sep 17 00:00:00 2001
-From: Christian Heimes <christian@python.org>
-Date: Wed, 15 Aug 2018 09:07:28 +0200
-Subject: [PATCH 1/4] bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976)
- (GH-8760)
-
-Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
-1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by
-default.
-
-Also update multissltests to test with latest OpenSSL.
-
-Signed-off-by: Christian Heimes <christian@python.org>.
-(cherry picked from commit 3e630c541b35c96bfe5619165255e559f577ee71)
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-Upstream-Status: Accepted [https://github.com/python/cpython/pull/8771]
-
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- Doc/library/ssl.rst                           |  8 ++--
- Lib/test/test_ssl.py                          | 37 +++++++++++--------
- .../2018-05-18-21-50-47.bpo-33570.7CZy4t.rst  |  3 ++
- 3 files changed, 27 insertions(+), 21 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Library/2018-05-18-21-50-47.bpo-33570.7CZy4t.rst
-
-diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
-index 0421031772..7c7c85b833 100644
---- a/Doc/library/ssl.rst
-+++ b/Doc/library/ssl.rst
-@@ -294,11 +294,6 @@ purposes.
- 
-      3DES was dropped from the default cipher string.
- 
--   .. versionchanged:: 2.7.15
--
--     TLS 1.3 cipher suites TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384,
--     and TLS_CHACHA20_POLY1305_SHA256 were added to the default cipher string.
--
- .. function:: _https_verify_certificates(enable=True)
- 
-    Specifies whether or not server certificates are verified when creating
-@@ -1179,6 +1174,9 @@ to speed up repeated connections from the same clients.
-       when connected, the :meth:`SSLSocket.cipher` method of SSL sockets will
-       give the currently selected cipher.
- 
-+      OpenSSL 1.1.1 has TLS 1.3 cipher suites enabled by default. The suites
-+      cannot be disabled with :meth:`~SSLContext.set_ciphers`.
-+
- .. method:: SSLContext.set_alpn_protocols(protocols)
- 
-    Specify which protocols the socket should advertise during the SSL/TLS
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index dc14e22ad1..f51572e319 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -2772,19 +2772,24 @@ else:
-                     sock.do_handshake()
-                 self.assertEqual(cm.exception.errno, errno.ENOTCONN)
- 
--        def test_default_ciphers(self):
--            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
--            try:
--                # Force a set of weak ciphers on our client context
--                context.set_ciphers("DES")
--            except ssl.SSLError:
--                self.skipTest("no DES cipher available")
--            with ThreadedEchoServer(CERTFILE,
--                                    ssl_version=ssl.PROTOCOL_SSLv23,
--                                    chatty=False) as server:
--                with closing(context.wrap_socket(socket.socket())) as s:
--                    with self.assertRaises(ssl.SSLError):
--                        s.connect((HOST, server.port))
-+        def test_no_shared_ciphers(self):
-+            server_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
-+            server_context.load_cert_chain(SIGNED_CERTFILE)
-+            client_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
-+            client_context.verify_mode = ssl.CERT_REQUIRED
-+            client_context.check_hostname = True
-+
-+            # OpenSSL enables all TLS 1.3 ciphers, enforce TLS 1.2 for test
-+            client_context.options |= ssl.OP_NO_TLSv1_3
-+            # Force different suites on client and master
-+            client_context.set_ciphers("AES128")
-+            server_context.set_ciphers("AES256")
-+            with ThreadedEchoServer(context=server_context) as server:
-+                s = client_context.wrap_socket(
-+                        socket.socket(),
-+                        server_hostname="localhost")
-+                with self.assertRaises(ssl.SSLError):
-+                    s.connect((HOST, server.port))
-             self.assertIn("no shared cipher", str(server.conn_errors[0]))
- 
-         def test_version_basic(self):
-@@ -2815,9 +2820,9 @@ else:
-                 with context.wrap_socket(socket.socket()) as s:
-                     s.connect((HOST, server.port))
-                     self.assertIn(s.cipher()[0], [
--                        'TLS13-AES-256-GCM-SHA384',
--                        'TLS13-CHACHA20-POLY1305-SHA256',
--                        'TLS13-AES-128-GCM-SHA256',
-+                        'TLS_AES_256_GCM_SHA384',
-+                        'TLS_CHACHA20_POLY1305_SHA256',
-+                        'TLS_AES_128_GCM_SHA256',
-                     ])
- 
-         @unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")
-diff --git a/Misc/NEWS.d/next/Library/2018-05-18-21-50-47.bpo-33570.7CZy4t.rst b/Misc/NEWS.d/next/Library/2018-05-18-21-50-47.bpo-33570.7CZy4t.rst
-new file mode 100644
-index 0000000000..bd719a47e8
---- /dev/null
-+++ b/Misc/NEWS.d/next/Library/2018-05-18-21-50-47.bpo-33570.7CZy4t.rst
-@@ -0,0 +1,3 @@
-+Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
-+1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by
-+default.
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python/0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch b/poky/meta/recipes-devtools/python/python/0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch
deleted file mode 100644
index 125db85..0000000
--- a/poky/meta/recipes-devtools/python/python/0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From c7e692c61dc091d07dee573f5f424b6b427ff056 Mon Sep 17 00:00:00 2001
-From: Benjamin Peterson <benjamin@python.org>
-Date: Wed, 29 Aug 2018 21:59:21 -0700
-Subject: [PATCH] closes bpo-34540: Convert shutil._call_external_zip to use
- subprocess rather than distutils.spawn. (GH-8985)
-
-Upstream-Status: Backport
-CVE: CVE-2018-1000802
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- Lib/shutil.py                                            | 16 ++++++++++------
- .../Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst    |  3 +++
- 2 files changed, 13 insertions(+), 6 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
-
-diff --git a/Lib/shutil.py b/Lib/shutil.py
-index 3462f7c..0ab1a06 100644
---- a/Lib/shutil.py
-+++ b/Lib/shutil.py
-@@ -413,17 +413,21 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
- 
-     return archive_name
- 
--def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
-+def _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger):
-     # XXX see if we want to keep an external call here
-     if verbose:
-         zipoptions = "-r"
-     else:
-         zipoptions = "-rq"
--    from distutils.errors import DistutilsExecError
--    from distutils.spawn import spawn
-+    cmd = ["zip", zipoptions, zip_filename, base_dir]
-+    if logger is not None:
-+        logger.info(' '.join(cmd))
-+    if dry_run:
-+        return
-+    import subprocess
-     try:
--        spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
--    except DistutilsExecError:
-+        subprocess.check_call(cmd)
-+    except subprocess.CalledProcessError:
-         # XXX really should distinguish between "couldn't find
-         # external 'zip' command" and "zip failed".
-         raise ExecError, \
-@@ -458,7 +462,7 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
-         zipfile = None
- 
-     if zipfile is None:
--        _call_external_zip(base_dir, zip_filename, verbose, dry_run)
-+        _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger)
-     else:
-         if logger is not None:
-             logger.info("creating '%s' and adding '%s' to it",
-diff --git a/Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst b/Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
-new file mode 100644
-index 0000000..4f68696
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
-@@ -0,0 +1,3 @@
-+When ``shutil.make_archive`` falls back to the external ``zip`` problem, it
-+uses :mod:`subprocess` to invoke it rather than :mod:`distutils.spawn`. This
-+closes a possible shell injection vector.
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/python/python/0002-bpo-34818-Add-missing-closing-wrapper-in-test_tls1_3.patch b/poky/meta/recipes-devtools/python/python/0002-bpo-34818-Add-missing-closing-wrapper-in-test_tls1_3.patch
deleted file mode 100644
index 9688271..0000000
--- a/poky/meta/recipes-devtools/python/python/0002-bpo-34818-Add-missing-closing-wrapper-in-test_tls1_3.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0e1f3856a7e1511fb64d99646c54ddf3897cd444 Mon Sep 17 00:00:00 2001
-From: Dimitri John Ledkov <xnox@ubuntu.com>
-Date: Fri, 28 Sep 2018 14:15:52 +0100
-Subject: [PATCH 2/4] bpo-34818: Add missing closing() wrapper in test_tls1_3.
-
-Python 2.7 socket classes do not implement context manager protocol,
-hence closing() is required around it. Resolves testcase error
-traceback.
-
-Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
-
-https://bugs.python.org/issue34818
-
-Patch taken from Ubuntu.
-
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/9622]
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- Lib/test/test_ssl.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index f51572e319..7a14053cee 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -2817,7 +2817,7 @@ else:
-                 ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2
-             )
-             with ThreadedEchoServer(context=context) as server:
--                with context.wrap_socket(socket.socket()) as s:
-+                with closing(context.wrap_socket(socket.socket())) as s:
-                     s.connect((HOST, server.port))
-                     self.assertIn(s.cipher()[0], [
-                         'TLS_AES_256_GCM_SHA384',
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch b/poky/meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch
deleted file mode 100644
index 77016cb..0000000
--- a/poky/meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 8b06d56d26eee289fec22b9b72ab4c7cc3d6c482 Mon Sep 17 00:00:00 2001
-From: Dimitri John Ledkov <xnox@ubuntu.com>
-Date: Fri, 28 Sep 2018 16:34:16 +0100
-Subject: [PATCH 3/4] bpo-34834: Fix test_ssl.test_options to account for
- OP_ENABLE_MIDDLEBOX_COMPAT.
-
-Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
-
-https://bugs.python.org/issue34834
-
-Patch taken from Ubuntu.
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/9624]
-
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- Lib/test/test_ssl.py | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index 7a14053cee..efc906a5ba 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -777,6 +777,11 @@ class ContextTests(unittest.TestCase):
-         default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
-         if not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0):
-             default |= ssl.OP_NO_COMPRESSION
-+        if not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 1):
-+            # define MIDDLEBOX constant, as python2.7 does not know about it
-+            # but it is used by default.
-+            OP_ENABLE_MIDDLEBOX_COMPAT = 1048576L
-+            default |= OP_ENABLE_MIDDLEBOX_COMPAT
-         self.assertEqual(default, ctx.options)
-         ctx.options |= ssl.OP_NO_TLSv1
-         self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python/0004-bpo-34836-fix-test_default_ecdh_curve-needs-no-tlsv1.patch b/poky/meta/recipes-devtools/python/python/0004-bpo-34836-fix-test_default_ecdh_curve-needs-no-tlsv1.patch
deleted file mode 100644
index 39e1bcf..0000000
--- a/poky/meta/recipes-devtools/python/python/0004-bpo-34836-fix-test_default_ecdh_curve-needs-no-tlsv1.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 946a7969345c6697697effd226ec396d3fea05b7 Mon Sep 17 00:00:00 2001
-From: Dimitri John Ledkov <xnox@ubuntu.com>
-Date: Fri, 28 Sep 2018 17:30:19 +0100
-Subject: [PATCH 4/4] bpo-34836: fix test_default_ecdh_curve, needs no tlsv1.3.
-
-Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
-
-https://bugs.python.org/issue34836
-
-Patch taken from Ubuntu.
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/9626]
-
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- Lib/test/test_ssl.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index efc906a5ba..4a3286cd5f 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -2836,6 +2836,9 @@ else:
-             # should be enabled by default on SSL contexts.
-             context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
-             context.load_cert_chain(CERTFILE)
-+            # TLSv1.3 defaults to PFS key agreement and no longer has KEA in
-+            # cipher name.
-+            context.options |= ssl.OP_NO_TLSv1_3
-             # Prior to OpenSSL 1.0.0, ECDH ciphers have to be enabled
-             # explicitly using the 'ECCdraft' cipher alias.  Otherwise,
-             # our default cipher list should prefer ECDH-based ciphers
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb b/poky/meta/recipes-devtools/python/python3-mako_1.0.9.bb
similarity index 97%
rename from poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
rename to poky/meta/recipes-devtools/python/python3-mako_1.0.9.bb
index 22ceeeb..17803f1 100644
--- a/poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
+++ b/poky/meta/recipes-devtools/python/python3-mako_1.0.9.bb
@@ -1,2 +1,3 @@
 inherit setuptools3
 require python-mako.inc
+
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.1.2.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.1.2.bb
deleted file mode 100644
index 7ba1d03..0000000
--- a/poky/meta/recipes-devtools/python/python3-pbr_5.1.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools3
-require python-pbr.inc
-SRC_URI[md5sum] = "bea55678345bd77b4ff5b2ebb729fd6d"
-SRC_URI[sha256sum] = "d717573351cfe09f49df61906cd272abaa759b3e91744396b804965ff7bff38b"
-
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.1.3.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.1.3.bb
new file mode 100644
index 0000000..d9b6ce7
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pbr_5.1.3.bb
@@ -0,0 +1,5 @@
+inherit setuptools3
+require python-pbr.inc
+SRC_URI[md5sum] = "08972dca5fd2a959f27842090973edd6"
+SRC_URI[sha256sum] = "8c361cc353d988e4f5b998555c88098b9d5964c2e11acf7b0d21925a66bb5824"
+
diff --git a/poky/meta/recipes-devtools/python/python3-pip_19.0.2.bb b/poky/meta/recipes-devtools/python/python3-pip_19.0.3.bb
similarity index 81%
rename from poky/meta/recipes-devtools/python/python3-pip_19.0.2.bb
rename to poky/meta/recipes-devtools/python/python3-pip_19.0.3.bb
index d81a60c..4fdc7ee 100644
--- a/poky/meta/recipes-devtools/python/python3-pip_19.0.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-pip_19.0.3.bb
@@ -6,8 +6,8 @@
 
 DEPENDS += "python3 python3-setuptools-native"
 
-SRC_URI[md5sum] = "526fd9ec1e6ea956b3571ebfb42cf83c"
-SRC_URI[sha256sum] = "f851133f8b58283fa50d8c78675eb88d4ff4cde29b6c41205cd938b06338e0e5"
+SRC_URI[md5sum] = "1c5edb0924a0d7d79f3a2e3df05009b4"
+SRC_URI[sha256sum] = "6e6f197a1abfb45118dbb878b5c859a0edbdd33fd250100bc015b67fded4b9f2"
 
 inherit pypi distutils3
 
diff --git a/poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb b/poky/meta/recipes-devtools/python/python3-pycairo_1.18.1.bb
similarity index 63%
rename from poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
rename to poky/meta/recipes-devtools/python/python3-pycairo_1.18.1.bb
index 5c3e1e6..5aaa01a 100644
--- a/poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
+++ b/poky/meta/recipes-devtools/python/python3-pycairo_1.18.1.bb
@@ -8,24 +8,20 @@
                     file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
 
 # cairo >= 1.14
-DEPENDS = "cairo"
+DEPENDS = "cairo python3"
 
 SRC_URI = "https://github.com/pygobject/pycairo/releases/download/v${PV}/pycairo-${PV}.tar.gz"
 UPSTREAM_CHECK_URI = "https://github.com/pygobject/pycairo/releases/"
 
-SRC_URI[md5sum] = "3ff210c34e7b052590e15fd0fb147766"
-SRC_URI[sha256sum] = "ad150ea637860836b66705e0513b8e59494538f0b80497ad3462051368755016"
+SRC_URI[md5sum] = "7610da8a40a7bed548991aa3416431d1"
+SRC_URI[sha256sum] = "70172e58b6bad7572a3518c26729b074acdde15e6fee6cbab6d3528ad552b786"
 
 S = "${WORKDIR}/pycairo-${PV}"
 
-inherit setuptools3 pkgconfig
+inherit meson pkgconfig
 
 CFLAGS += "-fPIC"
 
 BBCLASSEXTEND = "native"
 
-do_install_append() {
-    install -d ${D}${includedir}/pycairo/
-    install -m 0644 ${D}${datadir}/include/pycairo/py3cairo.h ${D}${includedir}/pycairo/
-}
-FILES_${PN} += "${datadir}/include/pycairo/py3cairo.h"
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
diff --git a/poky/meta/recipes-devtools/python/python3-pygobject/0001-Do-not-build-tests.patch b/poky/meta/recipes-devtools/python/python3-pygobject/0001-Do-not-build-tests.patch
new file mode 100644
index 0000000..0f2465b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pygobject/0001-Do-not-build-tests.patch
@@ -0,0 +1,30 @@
+From c125a806de951359ab7e302b0584f7c92fa451ad Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 12 Apr 2019 16:25:58 +0200
+Subject: [PATCH] Do not build tests
+
+They require installing tests from g-i, which we do not do.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 278fa16f..aacbd4a2 100644
+--- a/meson.build
++++ b/meson.build
+@@ -175,6 +175,6 @@ configure_file(input : 'PKG-INFO.in',
+ subdir('gi')
+ subdir('pygtkcompat')
+ with_tests = get_option('tests')
+-if with_tests
+-subdir('tests')
+-endif
++#if with_tests
++#subdir('tests')
++#endif
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.28.3.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.32.1.bb
similarity index 68%
rename from poky/meta/recipes-devtools/python/python3-pygobject_3.28.3.bb
rename to poky/meta/recipes-devtools/python/python3-pygobject_3.32.1.bb
index 313af22..8eda06e 100644
--- a/poky/meta/recipes-devtools/python/python3-pygobject_3.28.3.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.32.1.bb
@@ -3,6 +3,7 @@
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
 
+GNOMEBASEBUILDCLASS = "meson"
 inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even
 
 DEPENDS += "python3 glib-2.0"
@@ -10,10 +11,13 @@
 SRCNAME="pygobject"
 SRC_URI = " \
     http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
+    file://0001-Do-not-build-tests.patch \
 "
 
-SRC_URI[md5sum] = "3bac63c86bb963aa401f97859464aa90"
-SRC_URI[sha256sum] = "3dd3e21015d06e00482ea665fc1733b77e754a6ab656a5db5d7f7bfaf31ad0b0"
+UNKNOWN_CONFIGURE_WHITELIST = "introspection"
+
+SRC_URI[md5sum] = "9d5dbca10162dd9b0d03fed0c6cf865d"
+SRC_URI[sha256sum] = "32c99def94b8dea5ce9e4bc99576ef87591ea779b4db77cfdca7af81b76d04d8"
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
@@ -21,7 +25,7 @@
 
 # python3-pycairo is checked on configuration -> DEPENDS
 # we don't link against python3-pycairo -> RDEPENDS
-PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo"
+PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo"
 
 RDEPENDS_${PN} += "python3-setuptools"
 
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools_40.8.0.bb b/poky/meta/recipes-devtools/python/python3-setuptools_41.0.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python/python3-setuptools_40.8.0.bb
rename to poky/meta/recipes-devtools/python/python3-setuptools_41.0.1.bb
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch b/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch
new file mode 100644
index 0000000..b975836
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch
@@ -0,0 +1,31 @@
+From a21f4f8fa5e5c0601898740b4ac08ec84f41e190 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 18 Apr 2019 17:11:06 +0200
+Subject: [PATCH] Lib/sysconfig.py: fix another place where 'lib' is hardcoded
+ as the library path
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Lib/sysconfig.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index d15cec8..87fa5e6 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -20,10 +20,10 @@ __all__ = [
+ 
+ _INSTALL_SCHEMES = {
+     'posix_prefix': {
+-        'stdlib': '{installed_base}/lib/python{py_version_short}',
+-        'platstdlib': '{platbase}/lib/python{py_version_short}',
+-        'purelib': '{base}/lib/python{py_version_short}/site-packages',
+-        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++        'stdlib': '{LIBDEST}',
++        'platstdlib': '{LIBDEST}',
++        'purelib': '{LIBDEST}/site-packages',
++        'platlib': '{LIBDEST}/site-packages',
+         'include':
+             '{installed_base}/include/python{py_version_short}{abiflags}',
+         'platinclude':
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch b/poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
new file mode 100644
index 0000000..237645b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
@@ -0,0 +1,34 @@
+From 840fda32c82550259d02a7a56a78a9c05162b1a1 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 8 May 2019 16:10:29 +0800
+Subject: [PATCH] Makefile: fix Issue36464 (parallel build race problem)
+
+When using make -j with the 'install' target, it's possible for altbininstall
+(which normally creates BINDIR) and libainstall (which doesn't, though it
+installs python-config there) to race, resulting in a failure due to
+attempting to install python-config into a nonexistent BINDIR. Ensure it also
+exists in the libainstall target.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/13186]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ Makefile.pre.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 15f3687..7e9f173 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1456,7 +1456,7 @@ LIBPL=		@LIBPL@
+ LIBPC=		$(LIBDIR)/pkgconfig
+ 
+ libainstall:	@DEF_MAKE_RULE@ python-config
+-	@for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
++	@for i in $(LIBDIR) $(LIBPL) $(LIBPC) $(BINDIR); \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+ 			echo "Creating directory $$i"; \
+-- 
+2.7.4
+
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 8083345..1741f57 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 4865615a2bc2b78c739e4c33f536712c7f9af061 Mon Sep 17 00:00:00 2001
+From 17796e353acf08acd604610f34840a4a9d2f4b54 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
diff --git a/poky/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch b/poky/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
new file mode 100644
index 0000000..a0ed7cc
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
@@ -0,0 +1,49 @@
+From ffe7797637f08cd6ee4c82e2d67462c5e194d30a Mon Sep 17 00:00:00 2001
+From: Jaewon Lee <jaewon.lee@xilinx.com>
+Date: Thu, 25 Apr 2019 15:34:26 -0700
+Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME
+
+There is one variable PYTHONHOME to determine where libraries are coming
+from for both python2 and python3. This becomes an issue if only one has
+libraries in the specified PYTHONHOME path, but they are using the same
+PYTHONHOME. Creating another variable OEPYTHON3HOME to allow for a way
+to set a different path for python3
+
+Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
+
+Upstream-Status: Inappropriate [OE specific configuration]
+---
+ Modules/main.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/Modules/main.c b/Modules/main.c
+index a745381..b553e30 100644
+--- a/Modules/main.c
++++ b/Modules/main.c
+@@ -1855,10 +1855,19 @@ config_init_home(_PyCoreConfig *config)
+         }
+         return _Py_INIT_OK();
+     }
+-
+-    int res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
+-    if (res < 0) {
+-        return DECODE_LOCALE_ERR("PYTHONHOME", res);
++    int res;
++    const char *oepython3home = config_get_env_var("OEPYTHON3HOME");
++    if (oepython3home) {
++        res = config_get_env_var_dup(&home, L"OEPYTHON3HOME", "OEPYTHON3HOME");
++        if (res < 0) {
++            return DECODE_LOCALE_ERR("OEPYTHON3HOME", res);
++        }
++    }
++    else {
++        res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
++        if (res < 0) {
++            return DECODE_LOCALE_ERR("PYTHONHOME", res);
++        }
+     }
+     config->home = home;
+     return _Py_INIT_OK();
+-- 
+2.7.4
+
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 dcc0932..3521317 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 1397979ee445ff6826aa5469511e003539f77bb2 Mon Sep 17 00:00:00 2001
+From 12900d498bb77bcc990868a80eaf0ab257b88fff 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
diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
index 0a4ab2c..0803ac0 100644
--- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -281,6 +281,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/linecache.py",
             "${libdir}/python${PYTHON_MAJMIN}/locale.py",
             "${libdir}/python${PYTHON_MAJMIN}/new.py",
+            "${libdir}/python${PYTHON_MAJMIN}/ntpath.py",
             "${libdir}/python${PYTHON_MAJMIN}/opcode.py",
             "${libdir}/python${PYTHON_MAJMIN}/operator.py",
             "${libdir}/python${PYTHON_MAJMIN}/optparse.py",
diff --git a/poky/meta/recipes-devtools/python/python3/run-ptest b/poky/meta/recipes-devtools/python/python3/run-ptest
index 50f9291..3e45d39 100644
--- a/poky/meta/recipes-devtools/python/python3/run-ptest
+++ b/poky/meta/recipes-devtools/python/python3/run-ptest
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python3 -m test -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python3 -m test -v | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/poky/meta/recipes-devtools/python/python3_3.7.2.bb b/poky/meta/recipes-devtools/python/python3_3.7.3.bb
similarity index 92%
rename from poky/meta/recipes-devtools/python/python3_3.7.2.bb
rename to poky/meta/recipes-devtools/python/python3_3.7.3.bb
index 28f128d..413d35a 100644
--- a/poky/meta/recipes-devtools/python/python3_3.7.2.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.7.3.bb
@@ -3,7 +3,7 @@
 LICENSE = "PSFv2"
 SECTION = "devel/python"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f257cc14f81685691652a3d3e1b5d754"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://run-ptest \
@@ -21,15 +21,20 @@
            file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
            file://0002-Don-t-do-runtime-test-to-get-float-byte-order.patch \
            file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
+           file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
+           file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
            "
 
 SRC_URI_append_class-native = " \
            file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \
            file://12-distutils-prefix-is-inside-staging-area.patch \
            "
+SRC_URI_append_class-nativesdk = " \
+           file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \
+           "
 
-SRC_URI[md5sum] = "df6ec36011808205beda239c72f947cb"
-SRC_URI[sha256sum] = "d83fe8ce51b1bb48bbcf0550fd265b9a75cdfdfa93f916f9e700aef8444bf1bb"
+SRC_URI[md5sum] = "93df27aec0cd18d6d42173e601ffbbfd"
+SRC_URI[sha256sum] = "da60b54064d4cfcd9c26576f6df2690e62085123826cff2e667e72a91952d318"
 
 # exclude pre-releases for both python 2.x and 3.x
 UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
@@ -130,6 +135,10 @@
                 ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
 }
 
+do_install_append_class-nativesdk () {
+    create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} OEPYTHON3HOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
+}
+
 SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py"
 PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
 
@@ -285,6 +294,7 @@
 FILES_${PN}-man = "${datadir}/man"
 
 RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
 RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk', '', d)}"
 RDEPENDS_${PN}-dev = ""
 
diff --git a/poky/meta/recipes-devtools/python/python_2.7.15.bb b/poky/meta/recipes-devtools/python/python_2.7.16.bb
similarity index 86%
rename from poky/meta/recipes-devtools/python/python_2.7.15.bb
rename to poky/meta/recipes-devtools/python/python_2.7.16.bb
index 62051a2..0e7dd2b 100644
--- a/poky/meta/recipes-devtools/python/python_2.7.15.bb
+++ b/poky/meta/recipes-devtools/python/python_2.7.16.bb
@@ -3,38 +3,34 @@
 DEPENDS = "python-native libffi bzip2 gdbm openssl \
            readline sqlite3 zlib virtual/crypt"
 
-PR = "${INC_PR}"
-
 DISTRO_SRC_URI ?= "file://sitecustomize.py"
 DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI += "\
-  file://01-use-proper-tools-for-cross-build.patch \
-  file://03-fix-tkinter-detection.patch \
-  file://06-avoid_usr_lib_termcap_path_in_linking.patch \
-  ${DISTRO_SRC_URI} \
-  file://multilib.patch \
-  file://cgi_py.patch \
-  file://setup_py_skip_cross_import_check.patch \
-  file://add-md5module-support.patch \
-  file://host_include_contamination.patch \
-  file://fix_for_using_different_libdir.patch \
-  file://setuptweaks.patch \
-  file://check-if-target-is-64b-not-host.patch \
-  file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
-  ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
-  file://avoid_warning_for_sunos_specific_module.patch \
-  file://python-2.7.3-remove-bsdb-rpath.patch \
-  file://run-ptest \
-  file://parallel-makeinst-create-bindir.patch \
-  file://use_sysroot_ncurses_instead_of_host.patch \
-  file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
-  file://pass-missing-libraries-to-Extension-for-mul.patch \
-  file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
-  file://float-endian.patch \
-  file://0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch \
-  file://0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch \
-  file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
-"
+SRC_URI += " \
+           file://01-use-proper-tools-for-cross-build.patch \
+           file://03-fix-tkinter-detection.patch \
+           file://06-avoid_usr_lib_termcap_path_in_linking.patch \
+           ${DISTRO_SRC_URI} \
+           file://multilib.patch \
+           file://cgi_py.patch \
+           file://setup_py_skip_cross_import_check.patch \
+           file://add-md5module-support.patch \
+           file://host_include_contamination.patch \
+           file://fix_for_using_different_libdir.patch \
+           file://setuptweaks.patch \
+           file://check-if-target-is-64b-not-host.patch \
+           file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
+           ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
+           file://avoid_warning_for_sunos_specific_module.patch \
+           file://python-2.7.3-remove-bsdb-rpath.patch \
+           file://run-ptest \
+           file://parallel-makeinst-create-bindir.patch \
+           file://use_sysroot_ncurses_instead_of_host.patch \
+           file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+           file://pass-missing-libraries-to-Extension-for-mul.patch \
+           file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
+           file://float-endian.patch \
+           file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
+           "
 
 S = "${WORKDIR}/Python-${PV}"
 
diff --git a/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb b/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
index cdc2f51..ca1ad96 100644
--- a/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
+++ b/poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
@@ -7,7 +7,7 @@
 PR = "r9"
 
 LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999 \
-                    file://${COREBASE}/scripts/runqemu;endline=19;md5=a8ad1905c709a2deaa057608ebaf705a"
+                    file://${COREBASE}/scripts/runqemu;beginline=5;endline=10;md5=ac2b489a58739c7628a2604698db5e7f"
 
 
 SRC_URI = "file://${COREBASE}/scripts/runqemu \
diff --git a/poky/meta/recipes-devtools/qemu/qemu-native.inc b/poky/meta/recipes-devtools/qemu/qemu-native.inc
index 4373ad9..34ab8e6 100644
--- a/poky/meta/recipes-devtools/qemu/qemu-native.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu-native.inc
@@ -3,8 +3,8 @@
 require qemu.inc
 
 SRC_URI_append = " \
-            file://0012-fix-libcap-header-issue-on-some-distro.patch \
-            file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \
+            file://0011-fix-libcap-header-issue-on-some-distro.patch \
+            file://0012-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \
             "
 EXTRA_OECONF_append = " --python=python2.7"
 
diff --git a/poky/meta/recipes-devtools/qemu/qemu-native_3.1.0.bb b/poky/meta/recipes-devtools/qemu/qemu-native_4.0.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/qemu/qemu-native_3.1.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu-native_4.0.0.bb
diff --git a/poky/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb b/poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb
similarity index 95%
rename from poky/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb
index 5bf528b..820883d 100644
--- a/poky/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb
@@ -20,4 +20,5 @@
     # The following is also installed by qemu-native
     rm -f ${D}${datadir}/qemu/trace-events-all
     rm -rf ${D}${datadir}/qemu/keymaps
+    rm -rf ${D}${datadir}/icons/
 }
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index e503aa8..f7b4141 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -5,36 +5,27 @@
 RDEPENDS_${PN}-ptest = "bash make"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
-                    file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
+                    file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
 
 SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://powerpc_rom.bin \
-           file://0001-sdl.c-allow-user-to-disable-pointer-grabs.patch \
-           file://0002-qemu-Add-missing-wacom-HID-descriptor.patch \
-           file://0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \
            file://run-ptest \
-           file://0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
-           file://0005-qemu-disable-Valgrind.patch \
-           file://0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch \
-           file://0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch \
-           file://0008-chardev-connect-socket-to-a-spawned-command.patch \
-           file://0009-apic-fixup-fallthrough-to-PIC.patch \
-           file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
-           file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
-           file://0001-Add-a-missing-X11-include.patch \
-           file://0001-egl-headless-add-egl_create_context.patch \
-           file://0014-fix-CVE-2018-16872.patch \
-           file://0015-fix-CVE-2018-20124.patch \
-           file://0016-fix-CVE-2018-20125.patch \
-           file://0017-fix-CVE-2018-20126.patch \
-           file://0018-fix-CVE-2018-20191.patch \
-           file://0019-fix-CVE-2018-20216.patch \
-           file://CVE-2019-3812.patch \
+           file://0001-qemu-Add-missing-wacom-HID-descriptor.patch \
+           file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \
+           file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
+           file://0004-qemu-disable-Valgrind.patch \
+           file://0005-qemu-Limit-paths-searched-during-user-mode-emulation.patch \
+           file://0006-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch \
+           file://0007-chardev-connect-socket-to-a-spawned-command.patch \
+           file://0008-apic-fixup-fallthrough-to-PIC.patch \
+           file://0009-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
+           file://0010-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
+           file://0013-Revert-target-arm-Use-vector-operations-for-saturati.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
-SRC_URI[md5sum] = "fb687ce0b02d3bf4327e36d3b99427a8"
-SRC_URI[sha256sum] = "6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc"
+SRC_URI[md5sum] = "0afeca336fd57ae3d3086ec07f59d708"
+SRC_URI[sha256sum] = "13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469"
 
 COMPATIBLE_HOST_mipsarchn32 = "null"
 COMPATIBLE_HOST_mipsarchn64 = "null"
@@ -133,7 +124,7 @@
 PACKAGECONFIG_remove_darwin = "kvm virglrenderer glx gtk+"
 PACKAGECONFIG_remove_mingw32 = "kvm virglrenderer glx gtk+"
 
-PACKAGECONFIG[sdl] = "--enable-sdl --with-sdlabi=2.0,--disable-sdl,libsdl2"
+PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2"
 PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
 PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
 PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
@@ -144,7 +135,8 @@
 PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
 PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
 PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
-PACKAGECONFIG[gtk+] = "--enable-gtk --enable-vte,--disable-gtk --disable-vte,gtk+3 vte gettext-native"
+PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native"
+PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native"
 PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
 PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
 PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
@@ -165,5 +157,8 @@
 PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"
 # usbredir will be in meta-networking layer
 PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir"
+PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy"
 
 INSANE_SKIP_${PN} = "arch"
+
+FILES_${PN} += "${datadir}/icons"
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-Add-a-missing-X11-include.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-Add-a-missing-X11-include.patch
deleted file mode 100644
index 192936e..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-Add-a-missing-X11-include.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From eb1a215a4f86dde4493c3e22ad9f6d698850915e Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 20 Dec 2018 18:06:29 +0100
-Subject: [PATCH] egl-helpers.h: do not depend on X11 Window type, use
- EGLNativeWindowType
-
-It was assumed that mesa provides the necessary X11 includes,
-but it is not always the case, as it can be configured without x11 support.
-
-Upstream-Status: Submitted [http://lists.nongnu.org/archive/html/qemu-devel/2019-01/msg03706.html]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- include/ui/egl-helpers.h | 2 +-
- ui/egl-helpers.c         | 4 ++--
- ui/gtk-egl.c             | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h
-index 9db7293b..3fc656a7 100644
---- a/include/ui/egl-helpers.h
-+++ b/include/ui/egl-helpers.h
-@@ -43,7 +43,7 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf);
- 
- #endif
- 
--EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
-+EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win);
- 
- int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy, DisplayGLMode mode);
- int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode);
-diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
-index 4f475142..5e115b3f 100644
---- a/ui/egl-helpers.c
-+++ b/ui/egl-helpers.c
-@@ -273,14 +273,14 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf)
- 
- /* ---------------------------------------------------------------------- */
- 
--EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win)
-+EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType win)
- {
-     EGLSurface esurface;
-     EGLBoolean b;
- 
-     esurface = eglCreateWindowSurface(qemu_egl_display,
-                                       qemu_egl_config,
--                                      (EGLNativeWindowType)win, NULL);
-+                                      win, NULL);
-     if (esurface == EGL_NO_SURFACE) {
-         error_report("egl: eglCreateWindowSurface failed");
-         return NULL;
-diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
-index 5420c236..1f941162 100644
---- a/ui/gtk-egl.c
-+++ b/ui/gtk-egl.c
-@@ -54,7 +54,7 @@ void gd_egl_init(VirtualConsole *vc)
-     }
- 
-     vc->gfx.ectx = qemu_egl_init_ctx();
--    vc->gfx.esurface = qemu_egl_init_surface_x11(vc->gfx.ectx, x11_window);
-+    vc->gfx.esurface = qemu_egl_init_surface_x11(vc->gfx.ectx, (EGLNativeWindowType)x11_window);
- 
-     assert(vc->gfx.esurface);
- }
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch
deleted file mode 100644
index d9326c0..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 952e5d584f5aabe41298c278065fe628f3f7aa7a Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Thu, 29 Nov 2018 13:35:02 +0100
-Subject: [PATCH] egl-headless: add egl_create_context
-
-We must set the correct context (via eglMakeCurrent) before
-calling qemu_egl_create_context, so we need a thin wrapper and can't
-hook qemu_egl_create_context directly as ->dpy_gl_ctx_create callback.
-
-Reported-by: Frederik Carlier <frederik.carlier@quamotion.mobi>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-id: 20181129123502.30129-1-kraxel@redhat.com
-
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=952e5d584f5aabe41298c278065fe628f3f7aa7a]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- ui/egl-headless.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/ui/egl-headless.c b/ui/egl-headless.c
-index 4cf3bbc0e4..519e7bad32 100644
---- a/ui/egl-headless.c
-+++ b/ui/egl-headless.c
-@@ -38,6 +38,14 @@ static void egl_gfx_switch(DisplayChangeListener *dcl,
-     edpy->ds = new_surface;
- }
- 
-+static QEMUGLContext egl_create_context(DisplayChangeListener *dcl,
-+                                        QEMUGLParams *params)
-+{
-+    eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
-+                   qemu_egl_rn_ctx);
-+    return qemu_egl_create_context(dcl, params);
-+}
-+
- static void egl_scanout_disable(DisplayChangeListener *dcl)
- {
-     egl_dpy *edpy = container_of(dcl, egl_dpy, dcl);
-@@ -150,7 +158,7 @@ static const DisplayChangeListenerOps egl_ops = {
-     .dpy_gfx_update          = egl_gfx_update,
-     .dpy_gfx_switch          = egl_gfx_switch,
- 
--    .dpy_gl_ctx_create       = qemu_egl_create_context,
-+    .dpy_gl_ctx_create       = egl_create_context,
-     .dpy_gl_ctx_destroy      = qemu_egl_destroy_context,
-     .dpy_gl_ctx_make_current = qemu_egl_make_context_current,
-     .dpy_gl_ctx_get_current  = qemu_egl_get_current_context,
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0002-qemu-Add-missing-wacom-HID-descriptor.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
similarity index 98%
rename from poky/meta/recipes-devtools/qemu/qemu/0002-qemu-Add-missing-wacom-HID-descriptor.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
index 4de2688..5373915 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0002-qemu-Add-missing-wacom-HID-descriptor.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
@@ -1,4 +1,4 @@
-From 7ac3c84f28866491c58cc0f52a25a706949c8ef3 Mon Sep 17 00:00:00 2001
+From 1cb804cf0e47116202011f3386b4739af668224a Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Thu, 27 Nov 2014 14:04:29 +0000
 Subject: [PATCH] qemu: Add missing wacom HID descriptor
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-sdl.c-allow-user-to-disable-pointer-grabs.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-sdl.c-allow-user-to-disable-pointer-grabs.patch
deleted file mode 100644
index 5b9a1f9..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-sdl.c-allow-user-to-disable-pointer-grabs.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From c53ddb5acbee56db6423f369b9f9a9b62501b4af Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 18 Sep 2013 14:04:54 +0100
-Subject: [PATCH] sdl.c: allow user to disable pointer grabs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls
-XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already
-a pointer grab (screen is locked, a menu is open) then qemu will hang until the
-grab can be taken.  In the specific case of a headless X server on an autobuilder, once
-the screensaver has kicked in any qemu instance that appears underneath the
-pointer will hang.
-
-I'm not entirely sure why pointer grabs are required (the documentation
-explicitly says it doesn't do grabs when using a tablet, which we are) so wrap
-them in a conditional that can be set by the autobuilder environment, preserving
-the current grabbing behaviour for everyone else.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Signed-off-by: Eric Bénard <eric@eukrea.com>
-
----
- ui/sdl.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/ui/sdl.c b/ui/sdl.c
-index 190b16f5..aa89471d 100644
---- a/ui/sdl.c
-+++ b/ui/sdl.c
-@@ -69,6 +69,11 @@ static int idle_counter;
- static const guint16 *keycode_map;
- static size_t keycode_maplen;
- 
-+#ifndef True
-+#define True 1
-+#endif
-+static doing_grabs = True;
-+
- #define SDL_REFRESH_INTERVAL_BUSY 10
- #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
-                             / SDL_REFRESH_INTERVAL_BUSY + 1)
-@@ -399,14 +404,16 @@ static void sdl_grab_start(void)
-         }
-     } else
-         sdl_hide_cursor();
--    SDL_WM_GrabInput(SDL_GRAB_ON);
-+    if (doing_grabs)
-+      SDL_WM_GrabInput(SDL_GRAB_ON);
-     gui_grab = 1;
-     sdl_update_caption();
- }
- 
- static void sdl_grab_end(void)
- {
--    SDL_WM_GrabInput(SDL_GRAB_OFF);
-+    if (doing_grabs)
-+      SDL_WM_GrabInput(SDL_GRAB_OFF);
-     gui_grab = 0;
-     sdl_show_cursor();
-     sdl_update_caption();
-@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds, DisplayOptions *o)
-      * This requires SDL >= 1.2.14. */
-     setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
- 
-+    doing_grabs = (getenv("QEMU_DONT_GRAB") == NULL);
-+
-     flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
-     if (SDL_Init (flags)) {
-         fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch b/poky/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
similarity index 83%
rename from poky/meta/recipes-devtools/qemu/qemu/0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
index 668fc46..7b7c5d7 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
@@ -1,4 +1,4 @@
-From aac8834bfd5b79e724f2593895847b50968a1223 Mon Sep 17 00:00:00 2001
+From 281116b31981b0b9e174bda8abe00f4eaa33c2ae Mon Sep 17 00:00:00 2001
 From: Juro Bystricky <juro.bystricky@intel.com>
 Date: Thu, 31 Aug 2017 11:06:56 -0700
 Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for
@@ -15,10 +15,10 @@
  1 file changed, 8 insertions(+)
 
 diff --git a/tests/Makefile.include b/tests/Makefile.include
-index fb0b449c..afedabd4 100644
+index 36fc73fe..01fecd4d 100644
 --- a/tests/Makefile.include
 +++ b/tests/Makefile.include
-@@ -967,4 +967,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+@@ -1184,4 +1184,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
  -include $(wildcard tests/*.d)
  -include $(wildcard tests/libqos/*.d)
  
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
similarity index 89%
rename from poky/meta/recipes-devtools/qemu/qemu/0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index b4d4c58..9a18ca1 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -1,4 +1,4 @@
-From 3de7a5635093c31dcb960ce9dff27da629b85d4d Mon Sep 17 00:00:00 2001
+From bf04acef9ec31ddcc18ddbb4ac5b7b1e7368bf7d Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Fri, 28 Mar 2014 17:42:43 +0800
 Subject: [PATCH] qemu: Add addition environment space to boot loader
@@ -19,10 +19,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
-index c1cf0fe1..decffd2f 100644
+index 439665ab..285c78ef 100644
 --- a/hw/mips/mips_malta.c
 +++ b/hw/mips/mips_malta.c
-@@ -62,7 +62,7 @@
+@@ -60,7 +60,7 @@
  
  #define ENVP_ADDR		0x80002000l
  #define ENVP_NB_ENTRIES	 	16
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-disable-Valgrind.patch b/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
similarity index 85%
rename from poky/meta/recipes-devtools/qemu/qemu/0005-qemu-disable-Valgrind.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
index f0cf814..9e32608 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-disable-Valgrind.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
@@ -1,4 +1,4 @@
-From 32e8a94b6ae664d9b5689e19d495e304c0f41954 Mon Sep 17 00:00:00 2001
+From e40f797548bc3ff06c71b6cbe042a46406894d18 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Tue, 20 Oct 2015 22:19:08 +0100
 Subject: [PATCH] qemu: disable Valgrind
@@ -13,10 +13,10 @@
  1 file changed, 9 deletions(-)
 
 diff --git a/configure b/configure
-index 0a3c6a72..069e0daa 100755
+index 1c563a70..eaf9bb5e 100755
 --- a/configure
 +++ b/configure
-@@ -5044,15 +5044,6 @@ fi
+@@ -5311,15 +5311,6 @@ fi
  # check if we have valgrind/valgrind.h
  
  valgrind_h=no
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch b/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-Limit-paths-searched-during-user-mode-emulation.patch
similarity index 98%
rename from poky/meta/recipes-devtools/qemu/qemu/0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0005-qemu-Limit-paths-searched-during-user-mode-emulation.patch
index 4b2f013..819720a 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-Limit-paths-searched-during-user-mode-emulation.patch
@@ -1,4 +1,4 @@
-From 02f80ee81681b6307a8032128a07686183662270 Mon Sep 17 00:00:00 2001
+From 547c3710a1493d2fd6bb56b819cf162db433756a Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Wed, 9 Mar 2016 22:49:02 +0000
 Subject: [PATCH] qemu: Limit paths searched during user mode emulation
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch b/poky/meta/recipes-devtools/qemu/qemu/0006-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
similarity index 83%
rename from poky/meta/recipes-devtools/qemu/qemu/0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0006-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
index 4163e51..b62a588 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0006-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
@@ -1,4 +1,4 @@
-From 74bce35b71f4733c13e96f96e25956ff943fae20 Mon Sep 17 00:00:00 2001
+From 107fd860529a3c1319d54c3c225758457b0d9394 Mon Sep 17 00:00:00 2001
 From: Stephen Arnold <sarnold@vctlabs.com>
 Date: Sun, 12 Jun 2016 18:09:56 -0700
 Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment
@@ -10,10 +10,10 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/configure b/configure
-index 069e0daa..5b97f3c1 100755
+index eaf9bb5e..de2933d1 100755
 --- a/configure
 +++ b/configure
-@@ -5622,10 +5622,6 @@ write_c_skeleton
+@@ -5928,10 +5928,6 @@ write_c_skeleton
  if test "$gcov" = "yes" ; then
    CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
    LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0008-chardev-connect-socket-to-a-spawned-command.patch b/poky/meta/recipes-devtools/qemu/qemu/0007-chardev-connect-socket-to-a-spawned-command.patch
similarity index 80%
rename from poky/meta/recipes-devtools/qemu/qemu/0008-chardev-connect-socket-to-a-spawned-command.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0007-chardev-connect-socket-to-a-spawned-command.patch
index e5a2d4a..f3f3dc3 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0008-chardev-connect-socket-to-a-spawned-command.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0007-chardev-connect-socket-to-a-spawned-command.patch
@@ -1,4 +1,4 @@
-From 9c1e976290e87a83ab1bfe38eb7ff3521ff0d684 Mon Sep 17 00:00:00 2001
+From 136e159482a1bc8676cbe6e767055d0c3fb20065 Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair.francis@xilinx.com>
 Date: Thu, 21 Dec 2017 11:35:16 -0800
 Subject: [PATCH] chardev: connect socket to a spawned command
@@ -46,17 +46,17 @@
 Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
 
 ---
- chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
+ chardev/char-socket.c | 101 ++++++++++++++++++++++++++++++++++++++++++
  chardev/char.c        |   3 ++
  qapi/char.json        |   5 +++
- 3 files changed, 110 insertions(+)
+ 3 files changed, 109 insertions(+)
 
 diff --git a/chardev/char-socket.c b/chardev/char-socket.c
-index eaa8e8b6..959ed183 100644
+index 3916505d..a8e9dce8 100644
 --- a/chardev/char-socket.c
 +++ b/chardev/char-socket.c
-@@ -987,6 +987,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
-     return false;
+@@ -1273,6 +1273,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
+     return true;
  }
  
 +#ifndef _WIN32
@@ -120,11 +120,10 @@
 +    }
 +}
 +#endif
-+
+ 
  static void qmp_chardev_open_socket(Chardev *chr,
                                      ChardevBackend *backend,
-                                     bool *be_opened,
-@@ -994,6 +1056,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
+@@ -1281,6 +1342,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
  {
      SocketChardev *s = SOCKET_CHARDEV(chr);
      ChardevSocket *sock = backend->u.socket.data;
@@ -134,9 +133,9 @@
      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;
-@@ -1072,6 +1137,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
-         s->reconnect_time = reconnect;
-     }
+@@ -1346,6 +1410,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
+ 
+     update_disconnected_filename(s);
  
 +#ifndef _WIN32
 +    if (cmd) {
@@ -146,13 +145,13 @@
 +        *be_opened = true;
 +    } else
 +#endif
-     if (s->reconnect_time) {
-         tcp_chr_connect_async(chr);
-     } else {
-@@ -1131,9 +1204,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
+     if (s->is_listen) {
+         if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
+                                            is_waitconnect, errp) < 0) {
+@@ -1365,9 +1437,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
+     const char *host = qemu_opt_get(opts, "host");
      const char *port = qemu_opt_get(opts, "port");
      const char *fd = qemu_opt_get(opts, "fd");
-     const char *tls_creds = qemu_opt_get(opts, "tls-creds");
 +#ifndef _WIN32
 +    const char *cmd = qemu_opt_get(opts, "cmd");
 +#endif
@@ -166,7 +165,7 @@
 +         * spawning a command, otherwise unmodified code that doesn't know about
 +         * command spawning (like socket_reconnect_timeout()) might get called.
 +         */
-+        if (path || is_listen || is_telnet || is_tn3270 || reconnect || host || port || tls_creds) {
++        if (path || sock->server || sock->has_telnet || sock->has_tn3270 || sock->reconnect || host || port || sock->tls_creds) {
 +            error_setg(errp, "chardev: socket: cmd does not support any additional options");
 +            return;
 +        }
@@ -176,14 +175,14 @@
      if ((!!path + !!fd + !!host) != 1) {
          error_setg(errp,
                     "Exactly one of 'path', 'fd' or 'host' required");
-@@ -1180,12 +1270,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
-     sock->reconnect = reconnect;
-     sock->tls_creds = g_strdup(tls_creds);
+@@ -1410,12 +1499,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
+     sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
+     sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
  
 +#ifndef _WIN32
 +    sock->cmd = g_strdup(cmd);
 +#endif
-+ 
++
      addr = g_new0(SocketAddressLegacy, 1);
 +#ifndef _WIN32
 +    if (path || cmd) {
@@ -202,10 +201,10 @@
          addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
          addr->u.inet.data = g_new(InetSocketAddress, 1);
 diff --git a/chardev/char.c b/chardev/char.c
-index 152dde53..62d5b578 100644
+index 514cd6b0..36a40d67 100644
 --- a/chardev/char.c
 +++ b/chardev/char.c
-@@ -818,6 +818,9 @@ QemuOptsList qemu_chardev_opts = {
+@@ -835,6 +835,9 @@ QemuOptsList qemu_chardev_opts = {
          },{
              .name = "path",
              .type = QEMU_OPT_STRING,
@@ -216,10 +215,10 @@
              .name = "host",
              .type = QEMU_OPT_STRING,
 diff --git a/qapi/char.json b/qapi/char.json
-index 79bac598..97bd161a 100644
+index a6e81ac7..517962c6 100644
 --- a/qapi/char.json
 +++ b/qapi/char.json
-@@ -242,6 +242,10 @@
+@@ -247,6 +247,10 @@
  #
  # @addr: socket address to listen on (server=true)
  #        or connect to (server=false)
@@ -228,13 +227,13 @@
 +#       is used by the chardev. Either an addr or a cmd can
 +#       be specified, but not both.
  # @tls-creds: the ID of the TLS credentials object (since 2.6)
- # @server: create server socket (default: true)
- # @wait: wait for incoming connection on server
-@@ -261,6 +265,7 @@
- # Since: 1.4
+ # @tls-authz: the ID of the QAuthZ authorization object against which
+ #             the client's x509 distinguished name will be validated. This
+@@ -272,6 +276,7 @@
  ##
- { 'struct': 'ChardevSocket', 'data': { 'addr'       : 'SocketAddressLegacy',
-+                                     '*cmd'       : 'str',
-                                      '*tls-creds'  : 'str',
-                                      '*server'    : 'bool',
-                                      '*wait'      : 'bool',
+ { 'struct': 'ChardevSocket',
+   'data': { 'addr': 'SocketAddressLegacy',
++            '*cmd': 'str',
+             '*tls-creds': 'str',
+             '*tls-authz'  : 'str',
+             '*server': 'bool',
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch b/poky/meta/recipes-devtools/qemu/qemu/0008-apic-fixup-fallthrough-to-PIC.patch
similarity index 90%
rename from poky/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0008-apic-fixup-fallthrough-to-PIC.patch
index 1d3a2b5..13037f3 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0008-apic-fixup-fallthrough-to-PIC.patch
@@ -1,4 +1,4 @@
-From 4829da131996548dc86775b8b97a29c436f3d130 Mon Sep 17 00:00:00 2001
+From 1b3f264e2ba18caf658fae27293c426c8366c6a3 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Tue, 26 Feb 2013 11:43:28 -0500
 Subject: [PATCH] apic: fixup fallthrough to PIC
@@ -30,10 +30,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index 97ffdd82..ef23430e 100644
+index 6ea619c3..f892811e 100644
 --- a/hw/intc/apic.c
 +++ b/hw/intc/apic.c
-@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
+@@ -604,7 +604,7 @@ int apic_accept_pic_intr(DeviceState *dev)
      APICCommonState *s = APIC(dev);
      uint32_t lvt0;
  
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/poky/meta/recipes-devtools/qemu/qemu/0009-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
similarity index 93%
rename from poky/meta/recipes-devtools/qemu/qemu/0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0009-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
index c0d7914..c572ff9 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0009-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -1,4 +1,4 @@
-From bce25c9cda73569963615ffd31ed949cbe3a3781 Mon Sep 17 00:00:00 2001
+From a33ae91504ea4d254b5ace64a84791d3c96c9773 Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair.francis@xilinx.com>
 Date: Wed, 17 Jan 2018 10:51:49 -0800
 Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
@@ -19,7 +19,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/linux-user/main.c b/linux-user/main.c
-index 923cbb75..fe0b9ff4 100644
+index a0aba9cb..34c54924 100644
 --- a/linux-user/main.c
 +++ b/linux-user/main.c
 @@ -69,7 +69,7 @@ int have_guest_base;
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch b/poky/meta/recipes-devtools/qemu/qemu/0010-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch
similarity index 90%
rename from poky/meta/recipes-devtools/qemu/qemu/0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0010-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch
index 066ea78..3418eb7 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0010-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch
@@ -1,4 +1,4 @@
-From 496231774f8bc17ecfaf543a6603e3cad3f3f74e Mon Sep 17 00:00:00 2001
+From 2a66bd95c856de6950fbd802c5b99075207c1d76 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <martin.jansa@lge.com>
 Date: Fri, 1 Jun 2018 08:41:07 +0000
 Subject: [PATCH] Revert "linux-user: fix mmap/munmap/mprotect/mremap/shmat"
@@ -23,7 +23,7 @@
  4 files changed, 15 insertions(+), 29 deletions(-)
 
 diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
-index 117d2fbb..90558c14 100644
+index b16c9ec5..612db6a0 100644
 --- a/include/exec/cpu-all.h
 +++ b/include/exec/cpu-all.h
 @@ -163,12 +163,8 @@ extern unsigned long guest_base;
@@ -41,7 +41,7 @@
  
  #include "exec/hwaddr.h"
 diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
-index 95906849..ed17b3f6 100644
+index d78041d7..845639f7 100644
 --- a/include/exec/cpu_ldst.h
 +++ b/include/exec/cpu_ldst.h
 @@ -62,13 +62,15 @@ typedef uint64_t abi_ptr;
@@ -68,7 +68,7 @@
  #define h2g_nocheck(x) ({ \
      unsigned long __ret = (unsigned long)(x) - guest_base; \
 diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index 41e0983c..d0ee1c53 100644
+index e0249efe..cfe34b35 100644
 --- a/linux-user/mmap.c
 +++ b/linux-user/mmap.c
 @@ -79,7 +79,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
@@ -81,9 +81,9 @@
      }
      prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
 @@ -490,8 +490,8 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
- 	 * It can fail only on 64-bit host with 32-bit target.
- 	 * On any other target/host host mmap() handles this error correctly.
- 	 */
+          * It can fail only on 64-bit host with 32-bit target.
+          * On any other target/host host mmap() handles this error correctly.
+          */
 -        if (!guest_range_valid(start, len)) {
 -            errno = ENOMEM;
 +        if ((unsigned long)start + len - 1 > (abi_ulong) -1) {
@@ -118,10 +118,10 @@
  
      if (flags & MREMAP_FIXED) {
 diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index 280137da..efdd0006 100644
+index 96cd4bf8..e6754772 100644
 --- a/linux-user/syscall.c
 +++ b/linux-user/syscall.c
-@@ -3818,9 +3818,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env,
+@@ -3860,9 +3860,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env,
              return -TARGET_EINVAL;
          }
      }
@@ -131,7 +131,7 @@
  
      mmap_lock();
  
-@@ -6582,7 +6579,7 @@ static int open_self_maps(void *cpu_env, int fd)
+@@ -6633,7 +6630,7 @@ static int open_self_maps(void *cpu_env, int fd)
          }
          if (h2g_valid(min)) {
              int flags = page_get_flags(h2g(min));
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch b/poky/meta/recipes-devtools/qemu/qemu/0011-fix-libcap-header-issue-on-some-distro.patch
similarity index 97%
rename from poky/meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0011-fix-libcap-header-issue-on-some-distro.patch
index 9cbe838..3a7d7bb 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0011-fix-libcap-header-issue-on-some-distro.patch
@@ -1,4 +1,4 @@
-From d3e0b8dac7c2eb20d7fcff747bc98b981f4398ef Mon Sep 17 00:00:00 2001
+From 9125afb733d8c96416bb83c5adad39bb8d0803a1 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Tue, 12 Mar 2013 09:54:06 +0800
 Subject: [PATCH] fix libcap header issue on some distro
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch b/poky/meta/recipes-devtools/qemu/qemu/0012-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
similarity index 87%
rename from poky/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
rename to poky/meta/recipes-devtools/qemu/qemu/0012-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
index 27e508c..0466419 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0012-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
@@ -1,4 +1,4 @@
-From 861c522df7791d7e93743d5641f3ef2a5a3c4632 Mon Sep 17 00:00:00 2001
+From 0a53e906510cce1f32bc04a11e81ea40f834dac4 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
 Date: Wed, 12 Aug 2015 15:11:30 -0500
 Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails.
@@ -20,10 +20,10 @@
  create mode 100644 custom_debug.h
 
 diff --git a/cpus.c b/cpus.c
-index 0ddeeefc..4f3a5624 100644
+index e83f72b4..e6e2576e 100644
 --- a/cpus.c
 +++ b/cpus.c
-@@ -1768,6 +1768,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
+@@ -1769,6 +1769,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
      return NULL;
  }
  
@@ -32,9 +32,9 @@
  static void qemu_cpu_kick_thread(CPUState *cpu)
  {
  #ifndef _WIN32
-@@ -1780,6 +1782,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
+@@ -1781,6 +1783,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
      err = pthread_kill(cpu->thread->thread, SIG_IPI);
-     if (err) {
+     if (err && err != ESRCH) {
          fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
 +        fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
 +        cpu_dump_state(cpu, stderr, fprintf, 0);
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0013-Revert-target-arm-Use-vector-operations-for-saturati.patch b/poky/meta/recipes-devtools/qemu/qemu/0013-Revert-target-arm-Use-vector-operations-for-saturati.patch
new file mode 100644
index 0000000..3d018a7
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0013-Revert-target-arm-Use-vector-operations-for-saturati.patch
@@ -0,0 +1,493 @@
+From b46cdcdeb762c1f0eef68dc4a7d90f8176152e07 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Wed, 1 May 2019 19:51:27 -0700
+Subject: [PATCH] Revert "target/arm: Use vector operations for saturation"
+
+This reverts commit 89e68b575e138d0af1435f11a8ffcd8779c237bd.
+
+This fixes QEMU aborts when running the qemuarm machine.
+
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+Upstream-Status: Pending
+---
+ target/arm/helper.h        |  33 -------
+ target/arm/translate-a64.c |  36 ++++----
+ target/arm/translate.c     | 172 ++++++-------------------------------
+ target/arm/translate.h     |   4 -
+ target/arm/vec_helper.c    | 130 ----------------------------
+ 5 files changed, 44 insertions(+), 331 deletions(-)
+
+diff --git a/target/arm/helper.h b/target/arm/helper.h
+index 50cb036378..b2669f140f 100644
+--- a/target/arm/helper.h
++++ b/target/arm/helper.h
+@@ -646,39 +646,6 @@ DEF_HELPER_FLAGS_6(gvec_fmla_idx_s, TCG_CALL_NO_RWG,
+ DEF_HELPER_FLAGS_6(gvec_fmla_idx_d, TCG_CALL_NO_RWG,
+                    void, ptr, ptr, ptr, ptr, ptr, i32)
+ 
+-DEF_HELPER_FLAGS_5(gvec_uqadd_b, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_uqadd_h, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_uqadd_s, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_uqadd_d, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqadd_b, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqadd_h, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqadd_s, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqadd_d, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_uqsub_b, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_uqsub_h, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_uqsub_s, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_uqsub_d, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqsub_b, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqsub_h, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqsub_s, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-DEF_HELPER_FLAGS_5(gvec_sqsub_d, TCG_CALL_NO_RWG,
+-                   void, ptr, ptr, ptr, ptr, i32)
+-
+ DEF_HELPER_FLAGS_5(gvec_fmlal_a32, TCG_CALL_NO_RWG,
+                    void, ptr, ptr, ptr, ptr, i32)
+ DEF_HELPER_FLAGS_5(gvec_fmlal_a64, TCG_CALL_NO_RWG,
+diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
+index 9dcc5ff3a3..428211f92f 100644
+--- a/target/arm/translate-a64.c
++++ b/target/arm/translate-a64.c
+@@ -11230,22 +11230,6 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
+     }
+ 
+     switch (opcode) {
+-    case 0x01: /* SQADD, UQADD */
+-        tcg_gen_gvec_4(vec_full_reg_offset(s, rd),
+-                       offsetof(CPUARMState, vfp.qc),
+-                       vec_full_reg_offset(s, rn),
+-                       vec_full_reg_offset(s, rm),
+-                       is_q ? 16 : 8, vec_full_reg_size(s),
+-                       (u ? uqadd_op : sqadd_op) + size);
+-        return;
+-    case 0x05: /* SQSUB, UQSUB */
+-        tcg_gen_gvec_4(vec_full_reg_offset(s, rd),
+-                       offsetof(CPUARMState, vfp.qc),
+-                       vec_full_reg_offset(s, rn),
+-                       vec_full_reg_offset(s, rm),
+-                       is_q ? 16 : 8, vec_full_reg_size(s),
+-                       (u ? uqsub_op : sqsub_op) + size);
+-        return;
+     case 0x0c: /* SMAX, UMAX */
+         if (u) {
+             gen_gvec_fn3(s, is_q, rd, rn, rm, tcg_gen_gvec_umax, size);
+@@ -11341,6 +11325,16 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
+                 genfn = fns[size][u];
+                 break;
+             }
++            case 0x1: /* SQADD, UQADD */
++            {
++                static NeonGenTwoOpEnvFn * const fns[3][2] = {
++                    { gen_helper_neon_qadd_s8, gen_helper_neon_qadd_u8 },
++                    { gen_helper_neon_qadd_s16, gen_helper_neon_qadd_u16 },
++                    { gen_helper_neon_qadd_s32, gen_helper_neon_qadd_u32 },
++                };
++                genenvfn = fns[size][u];
++                break;
++            }
+             case 0x2: /* SRHADD, URHADD */
+             {
+                 static NeonGenTwoOpFn * const fns[3][2] = {
+@@ -11361,6 +11355,16 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
+                 genfn = fns[size][u];
+                 break;
+             }
++            case 0x5: /* SQSUB, UQSUB */
++            {
++                static NeonGenTwoOpEnvFn * const fns[3][2] = {
++                    { gen_helper_neon_qsub_s8, gen_helper_neon_qsub_u8 },
++                    { gen_helper_neon_qsub_s16, gen_helper_neon_qsub_u16 },
++                    { gen_helper_neon_qsub_s32, gen_helper_neon_qsub_u32 },
++                };
++                genenvfn = fns[size][u];
++                break;
++            }
+             case 0x8: /* SSHL, USHL */
+             {
+                 static NeonGenTwoOpFn * const fns[3][2] = {
+diff --git a/target/arm/translate.c b/target/arm/translate.c
+index 10bc53f91c..cf675cef3f 100644
+--- a/target/arm/translate.c
++++ b/target/arm/translate.c
+@@ -6242,142 +6242,6 @@ const GVecGen3 cmtst_op[4] = {
+       .vece = MO_64 },
+ };
+ 
+-static void gen_uqadd_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
+-                          TCGv_vec a, TCGv_vec b)
+-{
+-    TCGv_vec x = tcg_temp_new_vec_matching(t);
+-    tcg_gen_add_vec(vece, x, a, b);
+-    tcg_gen_usadd_vec(vece, t, a, b);
+-    tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
+-    tcg_gen_or_vec(vece, sat, sat, x);
+-    tcg_temp_free_vec(x);
+-}
+-
+-const GVecGen4 uqadd_op[4] = {
+-    { .fniv = gen_uqadd_vec,
+-      .fno = gen_helper_gvec_uqadd_b,
+-      .opc = INDEX_op_usadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_8 },
+-    { .fniv = gen_uqadd_vec,
+-      .fno = gen_helper_gvec_uqadd_h,
+-      .opc = INDEX_op_usadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_16 },
+-    { .fniv = gen_uqadd_vec,
+-      .fno = gen_helper_gvec_uqadd_s,
+-      .opc = INDEX_op_usadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_32 },
+-    { .fniv = gen_uqadd_vec,
+-      .fno = gen_helper_gvec_uqadd_d,
+-      .opc = INDEX_op_usadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_64 },
+-};
+-
+-static void gen_sqadd_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
+-                          TCGv_vec a, TCGv_vec b)
+-{
+-    TCGv_vec x = tcg_temp_new_vec_matching(t);
+-    tcg_gen_add_vec(vece, x, a, b);
+-    tcg_gen_ssadd_vec(vece, t, a, b);
+-    tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
+-    tcg_gen_or_vec(vece, sat, sat, x);
+-    tcg_temp_free_vec(x);
+-}
+-
+-const GVecGen4 sqadd_op[4] = {
+-    { .fniv = gen_sqadd_vec,
+-      .fno = gen_helper_gvec_sqadd_b,
+-      .opc = INDEX_op_ssadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_8 },
+-    { .fniv = gen_sqadd_vec,
+-      .fno = gen_helper_gvec_sqadd_h,
+-      .opc = INDEX_op_ssadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_16 },
+-    { .fniv = gen_sqadd_vec,
+-      .fno = gen_helper_gvec_sqadd_s,
+-      .opc = INDEX_op_ssadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_32 },
+-    { .fniv = gen_sqadd_vec,
+-      .fno = gen_helper_gvec_sqadd_d,
+-      .opc = INDEX_op_ssadd_vec,
+-      .write_aofs = true,
+-      .vece = MO_64 },
+-};
+-
+-static void gen_uqsub_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
+-                          TCGv_vec a, TCGv_vec b)
+-{
+-    TCGv_vec x = tcg_temp_new_vec_matching(t);
+-    tcg_gen_sub_vec(vece, x, a, b);
+-    tcg_gen_ussub_vec(vece, t, a, b);
+-    tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
+-    tcg_gen_or_vec(vece, sat, sat, x);
+-    tcg_temp_free_vec(x);
+-}
+-
+-const GVecGen4 uqsub_op[4] = {
+-    { .fniv = gen_uqsub_vec,
+-      .fno = gen_helper_gvec_uqsub_b,
+-      .opc = INDEX_op_ussub_vec,
+-      .write_aofs = true,
+-      .vece = MO_8 },
+-    { .fniv = gen_uqsub_vec,
+-      .fno = gen_helper_gvec_uqsub_h,
+-      .opc = INDEX_op_ussub_vec,
+-      .write_aofs = true,
+-      .vece = MO_16 },
+-    { .fniv = gen_uqsub_vec,
+-      .fno = gen_helper_gvec_uqsub_s,
+-      .opc = INDEX_op_ussub_vec,
+-      .write_aofs = true,
+-      .vece = MO_32 },
+-    { .fniv = gen_uqsub_vec,
+-      .fno = gen_helper_gvec_uqsub_d,
+-      .opc = INDEX_op_ussub_vec,
+-      .write_aofs = true,
+-      .vece = MO_64 },
+-};
+-
+-static void gen_sqsub_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
+-                          TCGv_vec a, TCGv_vec b)
+-{
+-    TCGv_vec x = tcg_temp_new_vec_matching(t);
+-    tcg_gen_sub_vec(vece, x, a, b);
+-    tcg_gen_sssub_vec(vece, t, a, b);
+-    tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
+-    tcg_gen_or_vec(vece, sat, sat, x);
+-    tcg_temp_free_vec(x);
+-}
+-
+-const GVecGen4 sqsub_op[4] = {
+-    { .fniv = gen_sqsub_vec,
+-      .fno = gen_helper_gvec_sqsub_b,
+-      .opc = INDEX_op_sssub_vec,
+-      .write_aofs = true,
+-      .vece = MO_8 },
+-    { .fniv = gen_sqsub_vec,
+-      .fno = gen_helper_gvec_sqsub_h,
+-      .opc = INDEX_op_sssub_vec,
+-      .write_aofs = true,
+-      .vece = MO_16 },
+-    { .fniv = gen_sqsub_vec,
+-      .fno = gen_helper_gvec_sqsub_s,
+-      .opc = INDEX_op_sssub_vec,
+-      .write_aofs = true,
+-      .vece = MO_32 },
+-    { .fniv = gen_sqsub_vec,
+-      .fno = gen_helper_gvec_sqsub_d,
+-      .opc = INDEX_op_sssub_vec,
+-      .write_aofs = true,
+-      .vece = MO_64 },
+-};
+-
+ /* Translate a NEON data processing instruction.  Return nonzero if the
+    instruction is invalid.
+    We process data in a mixture of 32-bit and 64-bit chunks.
+@@ -6561,18 +6425,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
+             }
+             return 0;
+ 
+-        case NEON_3R_VQADD:
+-            tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
+-                           rn_ofs, rm_ofs, vec_size, vec_size,
+-                           (u ? uqadd_op : sqadd_op) + size);
+-            break;
+-
+-        case NEON_3R_VQSUB:
+-            tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
+-                           rn_ofs, rm_ofs, vec_size, vec_size,
+-                           (u ? uqsub_op : sqsub_op) + size);
+-            break;
+-
+         case NEON_3R_VMUL: /* VMUL */
+             if (u) {
+                 /* Polynomial case allows only P8 and is handled below.  */
+@@ -6637,6 +6489,24 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
+                 neon_load_reg64(cpu_V0, rn + pass);
+                 neon_load_reg64(cpu_V1, rm + pass);
+                 switch (op) {
++                case NEON_3R_VQADD:
++                    if (u) {
++                        gen_helper_neon_qadd_u64(cpu_V0, cpu_env,
++                                                 cpu_V0, cpu_V1);
++                    } else {
++                        gen_helper_neon_qadd_s64(cpu_V0, cpu_env,
++                                                 cpu_V0, cpu_V1);
++                    }
++                    break;
++                case NEON_3R_VQSUB:
++                    if (u) {
++                        gen_helper_neon_qsub_u64(cpu_V0, cpu_env,
++                                                 cpu_V0, cpu_V1);
++                    } else {
++                        gen_helper_neon_qsub_s64(cpu_V0, cpu_env,
++                                                 cpu_V0, cpu_V1);
++                    }
++                    break;
+                 case NEON_3R_VSHL:
+                     if (u) {
+                         gen_helper_neon_shl_u64(cpu_V0, cpu_V1, cpu_V0);
+@@ -6752,12 +6622,18 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
+         case NEON_3R_VHADD:
+             GEN_NEON_INTEGER_OP(hadd);
+             break;
++        case NEON_3R_VQADD:
++            GEN_NEON_INTEGER_OP_ENV(qadd);
++            break;
+         case NEON_3R_VRHADD:
+             GEN_NEON_INTEGER_OP(rhadd);
+             break;
+         case NEON_3R_VHSUB:
+             GEN_NEON_INTEGER_OP(hsub);
+             break;
++        case NEON_3R_VQSUB:
++            GEN_NEON_INTEGER_OP_ENV(qsub);
++            break;
+         case NEON_3R_VSHL:
+             GEN_NEON_INTEGER_OP(shl);
+             break;
+diff --git a/target/arm/translate.h b/target/arm/translate.h
+index c2348def0d..07055c9449 100644
+--- a/target/arm/translate.h
++++ b/target/arm/translate.h
+@@ -248,10 +248,6 @@ extern const GVecGen2i ssra_op[4];
+ extern const GVecGen2i usra_op[4];
+ extern const GVecGen2i sri_op[4];
+ extern const GVecGen2i sli_op[4];
+-extern const GVecGen4 uqadd_op[4];
+-extern const GVecGen4 sqadd_op[4];
+-extern const GVecGen4 uqsub_op[4];
+-extern const GVecGen4 sqsub_op[4];
+ void gen_cmtst_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b);
+ 
+ /*
+diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c
+index dedef62403..be3271659f 100644
+--- a/target/arm/vec_helper.c
++++ b/target/arm/vec_helper.c
+@@ -769,136 +769,6 @@ DO_FMLA_IDX(gvec_fmla_idx_d, float64, )
+ 
+ #undef DO_FMLA_IDX
+ 
+-#define DO_SAT(NAME, WTYPE, TYPEN, TYPEM, OP, MIN, MAX) \
+-void HELPER(NAME)(void *vd, void *vq, void *vn, void *vm, uint32_t desc)   \
+-{                                                                          \
+-    intptr_t i, oprsz = simd_oprsz(desc);                                  \
+-    TYPEN *d = vd, *n = vn; TYPEM *m = vm;                                 \
+-    bool q = false;                                                        \
+-    for (i = 0; i < oprsz / sizeof(TYPEN); i++) {                          \
+-        WTYPE dd = (WTYPE)n[i] OP m[i];                                    \
+-        if (dd < MIN) {                                                    \
+-            dd = MIN;                                                      \
+-            q = true;                                                      \
+-        } else if (dd > MAX) {                                             \
+-            dd = MAX;                                                      \
+-            q = true;                                                      \
+-        }                                                                  \
+-        d[i] = dd;                                                         \
+-    }                                                                      \
+-    if (q) {                                                               \
+-        uint32_t *qc = vq;                                                 \
+-        qc[0] = 1;                                                         \
+-    }                                                                      \
+-    clear_tail(d, oprsz, simd_maxsz(desc));                                \
+-}
+-
+-DO_SAT(gvec_uqadd_b, int, uint8_t, uint8_t, +, 0, UINT8_MAX)
+-DO_SAT(gvec_uqadd_h, int, uint16_t, uint16_t, +, 0, UINT16_MAX)
+-DO_SAT(gvec_uqadd_s, int64_t, uint32_t, uint32_t, +, 0, UINT32_MAX)
+-
+-DO_SAT(gvec_sqadd_b, int, int8_t, int8_t, +, INT8_MIN, INT8_MAX)
+-DO_SAT(gvec_sqadd_h, int, int16_t, int16_t, +, INT16_MIN, INT16_MAX)
+-DO_SAT(gvec_sqadd_s, int64_t, int32_t, int32_t, +, INT32_MIN, INT32_MAX)
+-
+-DO_SAT(gvec_uqsub_b, int, uint8_t, uint8_t, -, 0, UINT8_MAX)
+-DO_SAT(gvec_uqsub_h, int, uint16_t, uint16_t, -, 0, UINT16_MAX)
+-DO_SAT(gvec_uqsub_s, int64_t, uint32_t, uint32_t, -, 0, UINT32_MAX)
+-
+-DO_SAT(gvec_sqsub_b, int, int8_t, int8_t, -, INT8_MIN, INT8_MAX)
+-DO_SAT(gvec_sqsub_h, int, int16_t, int16_t, -, INT16_MIN, INT16_MAX)
+-DO_SAT(gvec_sqsub_s, int64_t, int32_t, int32_t, -, INT32_MIN, INT32_MAX)
+-
+-#undef DO_SAT
+-
+-void HELPER(gvec_uqadd_d)(void *vd, void *vq, void *vn,
+-                          void *vm, uint32_t desc)
+-{
+-    intptr_t i, oprsz = simd_oprsz(desc);
+-    uint64_t *d = vd, *n = vn, *m = vm;
+-    bool q = false;
+-
+-    for (i = 0; i < oprsz / 8; i++) {
+-        uint64_t nn = n[i], mm = m[i], dd = nn + mm;
+-        if (dd < nn) {
+-            dd = UINT64_MAX;
+-            q = true;
+-        }
+-        d[i] = dd;
+-    }
+-    if (q) {
+-        uint32_t *qc = vq;
+-        qc[0] = 1;
+-    }
+-    clear_tail(d, oprsz, simd_maxsz(desc));
+-}
+-
+-void HELPER(gvec_uqsub_d)(void *vd, void *vq, void *vn,
+-                          void *vm, uint32_t desc)
+-{
+-    intptr_t i, oprsz = simd_oprsz(desc);
+-    uint64_t *d = vd, *n = vn, *m = vm;
+-    bool q = false;
+-
+-    for (i = 0; i < oprsz / 8; i++) {
+-        uint64_t nn = n[i], mm = m[i], dd = nn - mm;
+-        if (nn < mm) {
+-            dd = 0;
+-            q = true;
+-        }
+-        d[i] = dd;
+-    }
+-    if (q) {
+-        uint32_t *qc = vq;
+-        qc[0] = 1;
+-    }
+-    clear_tail(d, oprsz, simd_maxsz(desc));
+-}
+-
+-void HELPER(gvec_sqadd_d)(void *vd, void *vq, void *vn,
+-                          void *vm, uint32_t desc)
+-{
+-    intptr_t i, oprsz = simd_oprsz(desc);
+-    int64_t *d = vd, *n = vn, *m = vm;
+-    bool q = false;
+-
+-    for (i = 0; i < oprsz / 8; i++) {
+-        int64_t nn = n[i], mm = m[i], dd = nn + mm;
+-        if (((dd ^ nn) & ~(nn ^ mm)) & INT64_MIN) {
+-            dd = (nn >> 63) ^ ~INT64_MIN;
+-            q = true;
+-        }
+-        d[i] = dd;
+-    }
+-    if (q) {
+-        uint32_t *qc = vq;
+-        qc[0] = 1;
+-    }
+-    clear_tail(d, oprsz, simd_maxsz(desc));
+-}
+-
+-void HELPER(gvec_sqsub_d)(void *vd, void *vq, void *vn,
+-                          void *vm, uint32_t desc)
+-{
+-    intptr_t i, oprsz = simd_oprsz(desc);
+-    int64_t *d = vd, *n = vn, *m = vm;
+-    bool q = false;
+-
+-    for (i = 0; i < oprsz / 8; i++) {
+-        int64_t nn = n[i], mm = m[i], dd = nn - mm;
+-        if (((dd ^ nn) & (nn ^ mm)) & INT64_MIN) {
+-            dd = (nn >> 63) ^ ~INT64_MIN;
+-            q = true;
+-        }
+-        d[i] = dd;
+-    }
+-    if (q) {
+-        uint32_t *qc = vq;
+-        qc[0] = 1;
+-    }
+-    clear_tail(d, oprsz, simd_maxsz(desc));
+-}
+-
+ /*
+  * Convert float16 to float32, raising no exceptions and
+  * preserving exceptional values, including SNaN.
+-- 
+2.21.0
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0014-fix-CVE-2018-16872.patch b/poky/meta/recipes-devtools/qemu/qemu/0014-fix-CVE-2018-16872.patch
deleted file mode 100644
index 412aa16..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0014-fix-CVE-2018-16872.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-CVE: CVE-2018-16872
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=bab9df35]
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From bab9df35ce73d1c8e19a37e2737717ea1c984dc1 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Thu, 13 Dec 2018 13:25:11 +0100
-Subject: [PATCH] usb-mtp: use O_NOFOLLOW and O_CLOEXEC.
-
-Open files and directories with O_NOFOLLOW to avoid symlinks attacks.
-While being at it also add O_CLOEXEC.
-
-usb-mtp only handles regular files and directories and ignores
-everything else, so users should not see a difference.
-
-Because qemu ignores symlinks, carrying out a successful symlink attack
-requires swapping an existing file or directory below rootdir for a
-symlink and winning the race against the inotify notification to qemu.
-
-Fixes: CVE-2018-16872
-Cc: Prasad J Pandit <ppandit@redhat.com>
-Cc: Bandan Das <bsd@redhat.com>
-Reported-by: Michael Hanselmann <public@hansmi.ch>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Reviewed-by: Michael Hanselmann <public@hansmi.ch>
-Message-id: 20181213122511.13853-1-kraxel@redhat.com
----
- hw/usb/dev-mtp.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
-index 100b7171f4..36c43b8c20 100644
---- a/hw/usb/dev-mtp.c
-+++ b/hw/usb/dev-mtp.c
-@@ -653,13 +653,18 @@ static void usb_mtp_object_readdir(MTPState *s, MTPObject *o)
- {
-     struct dirent *entry;
-     DIR *dir;
-+    int fd;
- 
-     if (o->have_children) {
-         return;
-     }
-     o->have_children = true;
- 
--    dir = opendir(o->path);
-+    fd = open(o->path, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
-+    if (fd < 0) {
-+        return;
-+    }
-+    dir = fdopendir(fd);
-     if (!dir) {
-         return;
-     }
-@@ -1007,7 +1012,7 @@ static MTPData *usb_mtp_get_object(MTPState *s, MTPControl *c,
- 
-     trace_usb_mtp_op_get_object(s->dev.addr, o->handle, o->path);
- 
--    d->fd = open(o->path, O_RDONLY);
-+    d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
-     if (d->fd == -1) {
-         usb_mtp_data_free(d);
-         return NULL;
-@@ -1031,7 +1036,7 @@ static MTPData *usb_mtp_get_partial_object(MTPState *s, MTPControl *c,
-                                         c->argv[1], c->argv[2]);
- 
-     d = usb_mtp_data_alloc(c);
--    d->fd = open(o->path, O_RDONLY);
-+    d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
-     if (d->fd == -1) {
-         usb_mtp_data_free(d);
-         return NULL;
-@@ -1658,7 +1663,7 @@ static void usb_mtp_write_data(MTPState *s)
-                                  0, 0, 0, 0);
-             goto done;
-         }
--        d->fd = open(path, O_CREAT | O_WRONLY, mask);
-+        d->fd = open(path, O_CREAT | O_WRONLY | O_CLOEXEC | O_NOFOLLOW, mask);
-         if (d->fd == -1) {
-             usb_mtp_queue_result(s, RES_STORE_FULL, d->trans,
-                                  0, 0, 0, 0);
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0015-fix-CVE-2018-20124.patch b/poky/meta/recipes-devtools/qemu/qemu/0015-fix-CVE-2018-20124.patch
deleted file mode 100644
index 985b819..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0015-fix-CVE-2018-20124.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-CVE: CVE-2018-20124
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=0e68373]
-
-Backport patch to fix CVE-2018-20124. Update context and stay with current
-function comp_handler() which has been replaced with complete_work() in latest
-git repo.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From 0e68373cc2b3a063ce067bc0cc3edaf370752890 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 13 Dec 2018 01:00:34 +0530
-Subject: [PATCH] rdma: check num_sge does not exceed MAX_SGE
-
-rdma back-end has scatter/gather array ibv_sge[MAX_SGE=4] set
-to have 4 elements. A guest could send a 'PvrdmaSqWqe' ring element
-with 'num_sge' set to > MAX_SGE, which may lead to OOB access issue.
-Add check to avoid it.
-
-Reported-by: Saar Amar <saaramar5@gmail.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
-Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
----
- hw/rdma/rdma_backend.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
-index d7a4bbd9..7f8028f8 100644
---- a/hw/rdma/rdma_backend.c
-+++ b/hw/rdma/rdma_backend.c
-@@ -311,9 +311,9 @@ void rdma_backend_post_send(RdmaBackendDev *backend_dev,
-     }
- 
-     pr_dbg("num_sge=%d\n", num_sge);
--    if (!num_sge) {
--        pr_dbg("num_sge=0\n");
--        comp_handler(IBV_WC_GENERAL_ERR, VENDOR_ERR_NO_SGE, ctx);
-+    if (!num_sge || num_sge > MAX_SGE) {
-+        pr_dbg("invalid num_sge=%d\n", num_sge);
-+        comp_handler(IBV_WC_GENERAL_ERR, VENDOR_ERR_NO_SGE, ctx);
-         return;
-     }
- 
-@@ -390,9 +390,9 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev,
-     }
- 
-     pr_dbg("num_sge=%d\n", num_sge);
--    if (!num_sge) {
--        pr_dbg("num_sge=0\n");
--        comp_handler(IBV_WC_GENERAL_ERR, VENDOR_ERR_NO_SGE, ctx);
-+    if (!num_sge || num_sge > MAX_SGE) {
-+        pr_dbg("invalid num_sge=%d\n", num_sge);
-+        comp_handler(IBV_WC_GENERAL_ERR, VENDOR_ERR_NO_SGE, ctx);
-         return;
-     }
- 
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0016-fix-CVE-2018-20125.patch b/poky/meta/recipes-devtools/qemu/qemu/0016-fix-CVE-2018-20125.patch
deleted file mode 100644
index 56559c8..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0016-fix-CVE-2018-20125.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-CVE: CVE-2018-20125
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=2c858ce]
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From 2c858ce5da8ae6689c75182b73bc455a291cad41 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 13 Dec 2018 01:00:36 +0530
-Subject: [PATCH] pvrdma: check number of pages when creating rings
-
-When creating CQ/QP rings, an object can have up to
-PVRDMA_MAX_FAST_REG_PAGES 8 pages. Check 'npages' parameter
-to avoid excessive memory allocation or a null dereference.
-
-Reported-by: Li Qiang <liq3ea@163.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
-Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
----
- hw/rdma/vmw/pvrdma_cmd.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
-index 3b94545761..f236ac4795 100644
---- a/hw/rdma/vmw/pvrdma_cmd.c
-+++ b/hw/rdma/vmw/pvrdma_cmd.c
-@@ -259,6 +259,11 @@ static int create_cq_ring(PCIDevice *pci_dev , PvrdmaRing **ring,
-     int rc = -EINVAL;
-     char ring_name[MAX_RING_NAME_SZ];
- 
-+    if (!nchunks || nchunks > PVRDMA_MAX_FAST_REG_PAGES) {
-+        pr_dbg("invalid nchunks: %d\n", nchunks);
-+        return rc;
-+    }
-+
-     pr_dbg("pdir_dma=0x%llx\n", (long long unsigned int)pdir_dma);
-     dir = rdma_pci_dma_map(pci_dev, pdir_dma, TARGET_PAGE_SIZE);
-     if (!dir) {
-@@ -372,6 +377,12 @@ static int create_qp_rings(PCIDevice *pci_dev, uint64_t pdir_dma,
-     char ring_name[MAX_RING_NAME_SZ];
-     uint32_t wqe_sz;
- 
-+    if (!spages || spages > PVRDMA_MAX_FAST_REG_PAGES
-+        || !rpages || rpages > PVRDMA_MAX_FAST_REG_PAGES) {
-+        pr_dbg("invalid pages: %d, %d\n", spages, rpages);
-+        return rc;
-+    }
-+
-     pr_dbg("pdir_dma=0x%llx\n", (long long unsigned int)pdir_dma);
-     dir = rdma_pci_dma_map(pci_dev, pdir_dma, TARGET_PAGE_SIZE);
-     if (!dir) {
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0017-fix-CVE-2018-20126.patch b/poky/meta/recipes-devtools/qemu/qemu/0017-fix-CVE-2018-20126.patch
deleted file mode 100644
index 8329f2c..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0017-fix-CVE-2018-20126.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-CVE: CVE-2018-20126
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=509f57c]
-
-Backport and rebase patch to fix CVE-2018-20126.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From 509f57c98e7536905bb4902363d0cba66ce7e089 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 13 Dec 2018 01:00:37 +0530
-Subject: [PATCH] pvrdma: release ring object in case of an error
-
-create_cq and create_qp routines allocate ring object, but it's
-not released in case of an error, leading to memory leakage.
-
-Reported-by: Li Qiang <liq3ea@163.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
-Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
----
- hw/rdma/vmw/pvrdma_cmd.c | 41 ++++++++++++++++++++++++++++++-----------
- 1 file changed, 30 insertions(+), 11 deletions(-)
-
-diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
-index 4faeb21..9b6796f 100644
---- a/hw/rdma/vmw/pvrdma_cmd.c
-+++ b/hw/rdma/vmw/pvrdma_cmd.c
-@@ -310,6 +310,14 @@ out:
-     return rc;
- }
- 
-+static void destroy_cq_ring(PvrdmaRing *ring)
-+{
-+    pvrdma_ring_free(ring);
-+    /* ring_state was in slot 1, not 0 so need to jump back */
-+    rdma_pci_dma_unmap(ring->dev, --ring->ring_state, TARGET_PAGE_SIZE);
-+    g_free(ring);
-+}
-+
- static int create_cq(PVRDMADev *dev, union pvrdma_cmd_req *req,
-                      union pvrdma_cmd_resp *rsp)
- {
-@@ -333,6 +341,10 @@ static int create_cq(PVRDMADev *dev, union pvrdma_cmd_req *req,
- 
-     resp->hdr.err = rdma_rm_alloc_cq(&dev->rdma_dev_res, &dev->backend_dev,
-                                      cmd->cqe, &resp->cq_handle, ring);
-+    if (resp->hdr.err) {
-+        destroy_cq_ring(ring);
-+    }
-+
-     resp->cqe = cmd->cqe;
- 
- out:
-@@ -356,10 +368,7 @@ static int destroy_cq(PVRDMADev *dev, union pvrdma_cmd_req *req,
-     }
- 
-     ring = (PvrdmaRing *)cq->opaque;
--    pvrdma_ring_free(ring);
--    /* ring_state was in slot 1, not 0 so need to jump back */
--    rdma_pci_dma_unmap(PCI_DEVICE(dev), --ring->ring_state, TARGET_PAGE_SIZE);
--    g_free(ring);
-+    destroy_cq_ring(ring);
- 
-     rdma_rm_dealloc_cq(&dev->rdma_dev_res, cmd->cq_handle);
- 
-@@ -451,6 +460,17 @@ out:
-     return rc;
- }
- 
-+static void destroy_qp_rings(PvrdmaRing *ring)
-+{
-+    pr_dbg("sring=%p\n", &ring[0]);
-+    pvrdma_ring_free(&ring[0]);
-+    pr_dbg("rring=%p\n", &ring[1]);
-+    pvrdma_ring_free(&ring[1]);
-+
-+    rdma_pci_dma_unmap(ring->dev, ring->ring_state, TARGET_PAGE_SIZE);
-+    g_free(ring);
-+}
-+
- static int create_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
-                      union pvrdma_cmd_resp *rsp)
- {
-@@ -482,6 +502,11 @@ static int create_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
-                                      cmd->max_recv_wr, cmd->max_recv_sge,
-                                      cmd->recv_cq_handle, rings, &resp->qpn);
- 
-+    if (resp->hdr.err) {
-+        destroy_qp_rings(rings);
-+        return resp->hdr.err;
-+    }
-+
-     resp->max_send_wr = cmd->max_send_wr;
-     resp->max_recv_wr = cmd->max_recv_wr;
-     resp->max_send_sge = cmd->max_send_sge;
-@@ -555,13 +580,7 @@ static int destroy_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
-     rdma_rm_dealloc_qp(&dev->rdma_dev_res, cmd->qp_handle);
- 
-     ring = (PvrdmaRing *)qp->opaque;
--    pr_dbg("sring=%p\n", &ring[0]);
--    pvrdma_ring_free(&ring[0]);
--    pr_dbg("rring=%p\n", &ring[1]);
--    pvrdma_ring_free(&ring[1]);
--
--    rdma_pci_dma_unmap(PCI_DEVICE(dev), ring->ring_state, TARGET_PAGE_SIZE);
--    g_free(ring);
-+    destroy_qp_rings(ring);
- 
-     return 0;
- }
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0018-fix-CVE-2018-20191.patch b/poky/meta/recipes-devtools/qemu/qemu/0018-fix-CVE-2018-20191.patch
deleted file mode 100644
index 8f8ff05..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0018-fix-CVE-2018-20191.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-CVE: CVE-2018-20191
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=2aa8645]
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From 2aa86456fb938a11f2b7bd57c8643c213218681c Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 13 Dec 2018 01:00:35 +0530
-Subject: [PATCH] pvrdma: add uar_read routine
-
-Define skeleton 'uar_read' routine. Avoid NULL dereference.
-
-Reported-by: Li Qiang <liq3ea@163.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
-Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
----
- hw/rdma/vmw/pvrdma_main.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
-index 64de16fb52..838ad8a949 100644
---- a/hw/rdma/vmw/pvrdma_main.c
-+++ b/hw/rdma/vmw/pvrdma_main.c
-@@ -448,6 +448,11 @@ static const MemoryRegionOps regs_ops = {
-     },
- };
- 
-+static uint64_t uar_read(void *opaque, hwaddr addr, unsigned size)
-+{
-+    return 0xffffffff;
-+}
-+
- static void uar_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
- {
-     PVRDMADev *dev = opaque;
-@@ -489,6 +494,7 @@ static void uar_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
- }
- 
- static const MemoryRegionOps uar_ops = {
-+    .read = uar_read,
-     .write = uar_write,
-     .endianness = DEVICE_LITTLE_ENDIAN,
-     .impl = {
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0019-fix-CVE-2018-20216.patch b/poky/meta/recipes-devtools/qemu/qemu/0019-fix-CVE-2018-20216.patch
deleted file mode 100644
index c02bad3..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0019-fix-CVE-2018-20216.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-CVE: CVE-2018-20216
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=f1e2e38]
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From f1e2e38ee0136b7710a2caa347049818afd57a1b Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 13 Dec 2018 01:00:39 +0530
-Subject: [PATCH] pvrdma: check return value from pvrdma_idx_ring_has_ routines
-
-pvrdma_idx_ring_has_[data/space] routines also return invalid
-index PVRDMA_INVALID_IDX[=-1], if ring has no data/space. Check
-return value from these routines to avoid plausible infinite loops.
-
-Reported-by: Li Qiang <liq3ea@163.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
-Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
----
- hw/rdma/vmw/pvrdma_dev_ring.c | 29 +++++++++++------------------
- 1 file changed, 11 insertions(+), 18 deletions(-)
-
-diff --git a/hw/rdma/vmw/pvrdma_dev_ring.c b/hw/rdma/vmw/pvrdma_dev_ring.c
-index 01247fc041..e8e5b502f6 100644
---- a/hw/rdma/vmw/pvrdma_dev_ring.c
-+++ b/hw/rdma/vmw/pvrdma_dev_ring.c
-@@ -73,23 +73,16 @@ out:
- 
- void *pvrdma_ring_next_elem_read(PvrdmaRing *ring)
- {
-+    int e;
-     unsigned int idx = 0, offset;
- 
--    /*
--    pr_dbg("%s: t=%d, h=%d\n", ring->name, ring->ring_state->prod_tail,
--           ring->ring_state->cons_head);
--    */
--
--    if (!pvrdma_idx_ring_has_data(ring->ring_state, ring->max_elems, &idx)) {
-+    e = pvrdma_idx_ring_has_data(ring->ring_state, ring->max_elems, &idx);
-+    if (e <= 0) {
-         pr_dbg("No more data in ring\n");
-         return NULL;
-     }
- 
-     offset = idx * ring->elem_sz;
--    /*
--    pr_dbg("idx=%d\n", idx);
--    pr_dbg("offset=%d\n", offset);
--    */
-     return ring->pages[offset / TARGET_PAGE_SIZE] + (offset % TARGET_PAGE_SIZE);
- }
- 
-@@ -105,20 +98,20 @@ void pvrdma_ring_read_inc(PvrdmaRing *ring)
- 
- void *pvrdma_ring_next_elem_write(PvrdmaRing *ring)
- {
--    unsigned int idx, offset, tail;
-+    int idx;
-+    unsigned int offset, tail;
- 
--    /*
--    pr_dbg("%s: t=%d, h=%d\n", ring->name, ring->ring_state->prod_tail,
--           ring->ring_state->cons_head);
--    */
--
--    if (!pvrdma_idx_ring_has_space(ring->ring_state, ring->max_elems, &tail)) {
-+    idx = pvrdma_idx_ring_has_space(ring->ring_state, ring->max_elems, &tail);
-+    if (idx <= 0) {
-         pr_dbg("CQ is full\n");
-         return NULL;
-     }
- 
-     idx = pvrdma_idx(&ring->ring_state->prod_tail, ring->max_elems);
--    /* TODO: tail == idx */
-+    if (idx < 0 || tail != idx) {
-+        pr_dbg("invalid idx\n");
-+        return NULL;
-+    }
- 
-     offset = idx * ring->elem_sz;
-     return ring->pages[offset / TARGET_PAGE_SIZE] + (offset % TARGET_PAGE_SIZE);
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-3812.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-3812.patch
deleted file mode 100644
index 7de5882..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-3812.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-QEMU, through version 2.10 and through version 3.1.0, is vulnerable to an
-out-of-bounds read of up to 128 bytes in the hw/i2c/i2c-ddc.c:i2c_ddc()
-function. A local attacker with permission to execute i2c commands could exploit
-this to read stack memory of the qemu process on the host.
-
-CVE: CVE-2019-3812
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From b05b267840515730dbf6753495d5b7bd8b04ad1c Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Tue, 8 Jan 2019 11:23:01 +0100
-Subject: [PATCH] i2c-ddc: fix oob read
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Suggested-by: Michael Hanselmann <public@hansmi.ch>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Reviewed-by: Michael Hanselmann <public@hansmi.ch>
-Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-Message-id: 20190108102301.1957-1-kraxel@redhat.com
----
- hw/i2c/i2c-ddc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/hw/i2c/i2c-ddc.c b/hw/i2c/i2c-ddc.c
-index be34fe072cf..0a0367ff38f 100644
---- a/hw/i2c/i2c-ddc.c
-+++ b/hw/i2c/i2c-ddc.c
-@@ -56,7 +56,7 @@ static int i2c_ddc_rx(I2CSlave *i2c)
-     I2CDDCState *s = I2CDDC(i2c);
- 
-     int value;
--    value = s->edid_blob[s->reg];
-+    value = s->edid_blob[s->reg % sizeof(s->edid_blob)];
-     s->reg++;
-     return value;
- }
diff --git a/poky/meta/recipes-devtools/qemu/qemu_3.1.0.bb b/poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb
similarity index 99%
rename from poky/meta/recipes-devtools/qemu/qemu_3.1.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb
index 04d8bee..247e031 100644
--- a/poky/meta/recipes-devtools/qemu/qemu_3.1.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb
@@ -18,5 +18,3 @@
     ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
 "
 PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
-
-
diff --git a/poky/meta/recipes-devtools/ruby/ruby.inc b/poky/meta/recipes-devtools/ruby/ruby.inc
index eaf5d13..1ecd087 100644
--- a/poky/meta/recipes-devtools/ruby/ruby.inc
+++ b/poky/meta/recipes-devtools/ruby/ruby.inc
@@ -14,7 +14,7 @@
     file://LEGAL;md5=23a79bb4c1a40f6cc9bcb6f4e7c39799 \
 "
 
-DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline"
+DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline libffi"
 DEPENDS_class-native = "openssl-native libyaml-native readline-native"
 
 SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
@@ -24,7 +24,7 @@
            "
 UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
 
-inherit autotools
+inherit autotools ptest
 
 
 # This snippet lets compiled extensions which rely on external libraries,
diff --git a/poky/meta/recipes-devtools/ruby/ruby/run-ptest b/poky/meta/recipes-devtools/ruby/ruby/run-ptest
new file mode 100644
index 0000000..de7c415
--- /dev/null
+++ b/poky/meta/recipes-devtools/ruby/ruby/run-ptest
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+test_fullname=`find test -name test_*.rb` 
+ 
+for i in ${test_fullname}; do 
+	ruby ./test/runner.rb ${i}  2>&1 > /dev/null
+	ret=$? 
+	if [ $ret != 0 ]; then
+		echo "FAIL: ${i}" 
+	else
+		echo "PASS: ${i}"         
+	fi 
+done 
diff --git a/poky/meta/recipes-devtools/ruby/ruby_2.5.3.bb b/poky/meta/recipes-devtools/ruby/ruby_2.5.3.bb
index 3fb427e..519daf2 100644
--- a/poky/meta/recipes-devtools/ruby/ruby_2.5.3.bb
+++ b/poky/meta/recipes-devtools/ruby/ruby_2.5.3.bb
@@ -3,6 +3,7 @@
 SRC_URI += " \
            file://ruby-CVE-2017-9226.patch \
            file://ruby-CVE-2017-9228.patch \
+           file://run-ptest \
            "
 
 SRC_URI[md5sum] = "20c85b67846d49622ef3b24230803fef"
@@ -28,6 +29,7 @@
     --disable-dtrace \
     --enable-shared \
     --enable-load-relative \
+    --with-pkg-config=pkg-config \
 "
 
 do_install() {
@@ -54,6 +56,13 @@
 
 }
 
+do_install_ptest () {
+    cp -rf ${S}/test ${D}${PTEST_PATH}/
+    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"
 
 SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
@@ -66,4 +75,6 @@
 
 FILES_${PN} += "${datadir}/rubygems"
 
+FILES_${PN}-ptest_append_class-target += "${libdir}/ruby/include"
+
 BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 95eff04..f84a7e1 100755
--- a/poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -67,7 +67,7 @@
 		echo "Running postinst $i..."
 		[ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log
 		if [ -x $i ]; then
-			eval sh -c $i $append_log
+			(sh -c $i $append_log)
 			rm $i
 		else
 			echo "ERROR: postinst $i failed."
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 e871f1c..5a8b5f7 100644
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -44,3 +44,5 @@
 ARM_INSTRUCTION_SET_armv6 = "arm"
 
 BBCLASSEXTEND = "native nativesdk"
+
+CVE_PRODUCT = "squashfs"
diff --git a/poky/meta/recipes-devtools/subversion/subversion/disable_macos.patch b/poky/meta/recipes-devtools/subversion/subversion/disable_macos.patch
index ec3be49..8d2d635 100644
--- a/poky/meta/recipes-devtools/subversion/subversion/disable_macos.patch
+++ b/poky/meta/recipes-devtools/subversion/subversion/disable_macos.patch
@@ -1,15 +1,25 @@
-These tests don't work in cross compiling, just disable them for now, we don't
-build subversion on OS-X at this time.
+From 9c350c037ca3489dbeece6ecc2d7e2e5dbb177e9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 15:21:46 +0800
+Subject: [PATCH] These tests don't work in cross compiling, just disable them
+ for now, we don't build subversion on OS-X at this time.
 
 RP 1014/7/16
 
 Upstream-Status: Pending [needs a rewrite to support a cache value]
 
-Index: subversion-1.8.9/build/ac-macros/macosx.m4
-===================================================================
---- subversion-1.8.9.orig/build/ac-macros/macosx.m4	2012-11-26 03:04:27.000000000 +0000
-+++ subversion-1.8.9/build/ac-macros/macosx.m4	2014-07-16 12:28:58.357300403 +0000
-@@ -24,21 +24,7 @@
+Rebase to 1.12.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/ac-macros/macosx.m4 | 31 +------------------------------
+ 1 file changed, 1 insertion(+), 30 deletions(-)
+
+diff --git a/build/ac-macros/macosx.m4 b/build/ac-macros/macosx.m4
+index 92fa58e..a568e1c 100644
+--- a/build/ac-macros/macosx.m4
++++ b/build/ac-macros/macosx.m4
+@@ -24,21 +24,7 @@ dnl Check for _dyld_image_name and _dyld_image_header availability
  AC_DEFUN(SVN_LIB_MACHO_ITERATE,
  [
    AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
@@ -31,7 +41,7 @@
  ])
  
  dnl SVN_LIB_MACOS_PLIST
-@@ -46,34 +32,7 @@
+@@ -46,23 +32,8 @@ dnl Assign variables for Mac OS property list support
  AC_DEFUN(SVN_LIB_MACOS_PLIST,
  [
    AC_MSG_CHECKING([for Mac OS property list utilities])
@@ -44,25 +54,18 @@
 -    #error ProperyList API unavailable.
 -    #endif
 -  ]],[[]])],[
--    dnl ### Hack.  We should only need to pass the -framework options when
--    dnl linking libsvn_subr, since it is the only library that uses Keychain.
--    dnl
--    dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
--    dnl OS X frameworks like it does for normal libraries, so we need to
--    dnl explicitly pass the option to all the users of libsvn_subr to allow
--    dnl static builds to link successfully.
--    dnl
--    dnl This does mean that all executables we link will be linked directly
--    dnl to these frameworks - even when building shared libraries - but that
--    dnl shouldn't cause any problems.
--
--    LIBS="$LIBS -framework CoreFoundation"
+-    SVN_MACOS_PLIST_LIBS="-framework CoreFoundation"
+-    AC_SUBST(SVN_MACOS_PLIST_LIBS)
 -    AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
 -              [Is Mac OS property list API available?])
 -    AC_MSG_RESULT([yes])
 -  ],[
++  AC_SUBST([SVN_MACOS_PLIST_LIBS], [""])
      AC_MSG_RESULT([no])
 -  ])
  ])
  
  dnl SVN_LIB_MACOS_KEYCHAIN
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/subversion/subversion/serfmacro.patch b/poky/meta/recipes-devtools/subversion/subversion/serfmacro.patch
index 9a45cb9..507de0f 100644
--- a/poky/meta/recipes-devtools/subversion/subversion/serfmacro.patch
+++ b/poky/meta/recipes-devtools/subversion/subversion/serfmacro.patch
@@ -1,22 +1,31 @@
-The existing sed expression can match expressions like 
---sysroot=/some/path/xxx-linux/ which clearly isn't intended and 
-injects incorrect paths into LDFLAGS.
+The existing sed expression can match expressions like
+--sysroot=/some/path/xxx-linux/ which clearly isn't intended and injects
+incorrect paths into LDFLAGS.
 
 Fix this in the same way we address the problem in CFLAGS.
 
 RP 2016/12/7
 Upstream-Status: Pending
 
-Index: subversion-1.9.4/build/ac-macros/serf.m4
-===================================================================
---- subversion-1.9.4.orig/build/ac-macros/serf.m4
-+++ subversion-1.9.4/build/ac-macros/serf.m4
+Rebase 1.12.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/ac-macros/serf.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/ac-macros/serf.m4 b/build/ac-macros/serf.m4
+index 0a549b3..3a069ac 100644
+--- a/build/ac-macros/serf.m4
++++ b/build/ac-macros/serf.m4
 @@ -171,7 +171,7 @@ AC_DEFUN(SVN_SERF_PKG_CONFIG,
-           SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/ -D[^ ]*//g' -e 's/^-D[^ ]*//g'`]
-           SVN_SERF_LIBS=`$PKG_CONFIG $serf_pc_arg --libs-only-l` 
+           SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags-only-I`]
+           SVN_SERF_LIBS=[`$PKG_CONFIG $serf_pc_arg --libs-only-l`]
            dnl don't use --libs-only-L because then we might miss some options
 -          LDFLAGS=["$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/-l[^ ]*//g'`"]
 +          LDFLAGS=["$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/ -l[^ ]*//g' -e 's/^-l[^ ]*//g'`"]
            break
          else
            AC_MSG_RESULT([no])
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/subversion/subversion/subversion-1.12.0-apr_1.7.0_fix-1.patch b/poky/meta/recipes-devtools/subversion/subversion/subversion-1.12.0-apr_1.7.0_fix-1.patch
new file mode 100644
index 0000000..f0edd5f
--- /dev/null
+++ b/poky/meta/recipes-devtools/subversion/subversion/subversion-1.12.0-apr_1.7.0_fix-1.patch
@@ -0,0 +1,107 @@
+From b147803553237654f8268e831dee8fed4989ad3b Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 14:46:39 +0800
+Subject: [PATCH] Submitted By: Pierre Labastie (pierre dot labastie at neuf
+ dot fr) Date: 2019-04-17 Initial Package Version: 1.11.1 Origin: Upstream
+ revision 1857391 Upstream Status: Committed Description: Get rid of
+ apr_int64_t format string check in swig py configure.
+
+This check relied on APR implementation details and broke with APR 1.7.0.
+Rather than trying to guess a perfect format string to use, just use the
+largest possible format and cast the argument accordingly.
+
+Should fix build against APR 1.7.0 and later.
+
+Suggested by: brane
+
+* build/ac-macros/swig.m4: Remove code related to SVN_APR_INT64_T_PYCFMT.
+
+* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
+  (svn_swig_py_client_blame_receiver_func): Stop relying on the
+   SVN_APR_INT64_T_PYCFMT constant from configure. Use "L" and
+   acast to PY_LONG_LONG instead.
+
+Upstream-Status: Backport [www.linuxfromscratch.org/patches/blfs/svn/subversion-1.12.0-apr_1.7.0_fix-1.patch]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/ac-macros/swig.m4                            | 35 ----------------------
+ .../swig/python/libsvn_swig_py/swigutil_py.c       |  9 +++---
+ 2 files changed, 4 insertions(+), 40 deletions(-)
+
+diff --git a/build/ac-macros/swig.m4 b/build/ac-macros/swig.m4
+index 55501fb..2963872 100644
+--- a/build/ac-macros/swig.m4
++++ b/build/ac-macros/swig.m4
+@@ -128,41 +128,6 @@ AC_DEFUN(SVN_FIND_SWIG,
+       ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`"
+     ])
+     SWIG_PY_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_python_libs)`"
+-
+-    dnl Sun Forte adds an extra space before substituting APR_INT64_T_FMT
+-    dnl gcc-2.95 adds an extra space after substituting APR_INT64_T_FMT
+-    dnl thus the egrep patterns have a + in them.
+-    SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS"
+-    CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES"
+-    AC_CACHE_CHECK([for apr_int64_t Python/C API format string],
+-                   [svn_cv_pycfmt_apr_int64_t], [
+-      if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
+-        AC_EGREP_CPP([MaTcHtHiS +\"lld\" +EnDeNd],
+-                     [#include <apr.h>
+-                      MaTcHtHiS APR_INT64_T_FMT EnDeNd],
+-                     [svn_cv_pycfmt_apr_int64_t="L"])
+-      fi
+-      if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
+-        AC_EGREP_CPP([MaTcHtHiS +\"ld\" +EnDeNd],r
+-                     [#include <apr.h>
+-                      MaTcHtHiS APR_INT64_T_FMT EnDeNd],
+-                     [svn_cv_pycfmt_apr_int64_t="l"])
+-      fi
+-      if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
+-        AC_EGREP_CPP([MaTcHtHiS +\"d\" +EnDeNd],
+-                     [#include <apr.h>
+-                      MaTcHtHiS APR_INT64_T_FMT EnDeNd],
+-                     [svn_cv_pycfmt_apr_int64_t="i"])
+-      fi
+-    ])
+-    CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS"
+-    if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
+-      AC_MSG_ERROR([failed to recognize APR_INT64_T_FMT on this platform])
+-    fi
+-    AC_DEFINE_UNQUOTED([SVN_APR_INT64_T_PYCFMT],
+-                       ["$svn_cv_pycfmt_apr_int64_t"],
+-                       [Define to the Python/C API format character suitable]
+-                       [ for apr_int64_t])
+   fi
+ 
+   if test "$PERL" != "none"; then
+diff --git a/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c b/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
+index 2c90a6a..abe5a2a 100644
+--- a/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
++++ b/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
+@@ -46,7 +46,7 @@
+ #include "svn_mergeinfo.h"
+ #include "svn_types.h"
+ 
+-#include "svn_private_config.h" /* for SVN_APR_INT64_T_PYCFMT */
++#include "svn_private_config.h"
+ 
+ #include "swig_python_external_runtime.swg"
+ #include "swigutil_py.h"
+@@ -3394,10 +3394,9 @@ svn_error_t *svn_swig_py_client_blame_receiver_func(void *baton,
+   svn_swig_py_acquire_py_lock();
+ 
+   if ((result = PyObject_CallFunction(receiver,
+-                                      (char *)
+-                                      (SVN_APR_INT64_T_PYCFMT "lsssO&"),
+-                                      line_no, revision, author, date, line,
+-                                      make_ob_pool, pool)) == NULL)
++                                      (char *)"LlsssO&",
++                                      (PY_LONG_LONG)line_no, revision, author,
++                                      date, line, make_ob_pool, pool)) == NULL)
+     {
+       err = callback_exception_error();
+     }
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/subversion/subversion_1.11.1.bb b/poky/meta/recipes-devtools/subversion/subversion_1.12.0.bb
similarity index 92%
rename from poky/meta/recipes-devtools/subversion/subversion_1.11.1.bb
rename to poky/meta/recipes-devtools/subversion/subversion_1.12.0.bb
index 8abac74..f059ff9 100644
--- a/poky/meta/recipes-devtools/subversion/subversion_1.11.1.bb
+++ b/poky/meta/recipes-devtools/subversion/subversion_1.12.0.bb
@@ -2,7 +2,7 @@
 HOMEPAGE = "http://subversion.apache.org"
 SECTION = "console/network"
 LICENSE = "Apache-2 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=83206f39819e7a4dfca2ff7c190f6ce0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6487ae7094d359fa90fb9c4096e52e2b"
 
 DEPENDS = "apr-util serf sqlite3 file lz4"
 DEPENDS_append_class-native = " file-replacement-native"
@@ -11,10 +11,11 @@
            file://disable_macos.patch \
            file://0001-Fix-libtool-name-in-configure.ac.patch \
            file://serfmacro.patch \
+           file://subversion-1.12.0-apr_1.7.0_fix-1.patch \
            "
 
-SRC_URI[md5sum] = "5797bf701d2d868fa964c7bbc4931267"
-SRC_URI[sha256sum] = "9efd2750ca4d72ec903431a24b9c732b6cbb84aad9b7563f59dd96dea5be60bb"
+SRC_URI[md5sum] = "be4f5c0b1b38a5d82bd6d16a16ff1346"
+SRC_URI[sha256sum] = "7fae7c73d8a007c107c0ae5eb372bc0bb013dbfe966fcd5c59cd5a195a5e2edf"
 
 inherit autotools pkgconfig gettext
 
diff --git a/poky/meta/recipes-devtools/vala/vala.inc b/poky/meta/recipes-devtools/vala/vala.inc
index f680640..703ed1a 100644
--- a/poky/meta/recipes-devtools/vala/vala.inc
+++ b/poky/meta/recipes-devtools/vala/vala.inc
@@ -37,7 +37,7 @@
         chmod +x ${B}/vapigen-wrapper
 }
 
-EXTRA_OECONF += " --disable-graphviz"
+EXTRA_OECONF += " --disable-valadoc"
 
 # Vapigen wrapper needs to be available system-wide, because it will be used
 # to build vapi files from all other packages with vala support
diff --git a/poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch b/poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
deleted file mode 100644
index 9b27b7f..0000000
--- a/poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b6ca3876e233c724fd460c1579abc4ab63c8d01e Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 4 Oct 2017 15:23:08 +0300
-Subject: [PATCH] Disable valadoc
-
-Valadoc is a documentation generator for Vala sources, which was
-recently merged into the main vala source tree. Unsurprisingly,
-it's broken in cross-compile environment in multiple ways,
-so let's fix it some other time.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Makefile.am | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index e5dc0cc..813b3fc 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -13,8 +13,6 @@ SUBDIRS = \
- 	doc \
- 	gobject-introspection \
- 	vapigen \
--	libvaladoc \
--	valadoc \
- 	$(NULL)
- 
- if ENABLE_UNVERSIONED
--- 
-2.14.1
-
diff --git a/poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch b/poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
deleted file mode 100644
index e521bc8..0000000
--- a/poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-From b2723ff18b70c67c8a7fab5375a7f3c442d49790 Mon Sep 17 00:00:00 2001
-From: Rico Tzschichholz <ricotz@ubuntu.com>
-Date: Wed, 6 Sep 2017 18:52:55 +0200
-Subject: [PATCH] libvaladoc: Allow disabling the graphviz dependency of
-
- valadoc
-
-https://bugzilla.gnome.org/show_bug.cgi?id=787375
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-Upstream-Status: Submitted [bugzilla link above]
-
----
- configure.ac                          | 60 ++++++++++++++-------------
- libvaladoc/Makefile.am                | 25 ++++++++---
- libvaladoc/html/basicdoclet.vala      |  8 ++++
- libvaladoc/html/htmlmarkupwriter.vala |  4 ++
- 4 files changed, 63 insertions(+), 34 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 730c72d..af81986 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -119,34 +119,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
- AC_SUBST(GMODULE_CFLAGS)
- AC_SUBST(GMODULE_LIBS)
- 
--PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
--AC_MSG_CHECKING([for CGRAPH])
--cgraph_tmp_LIBADD="$LIBADD"
--cgraph_tmp_CFLAGS="$CFLAGS"
--LIBADD="$LIBADD $LIBGVC_LIBS"
--CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
--AC_RUN_IFELSE(
--	[AC_LANG_SOURCE([
--		#include <gvc.h>
--
--		int main(void) {
--			#ifdef WITH_CGRAPH
--				return 0;
--			#else
--				return -1;
--			#endif
--		}
--	])], [
--		AC_MSG_RESULT([yes])
--		VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
--		have_cgraph=yes
--	], [
--		AC_MSG_RESULT([no])
--		have_cgraph=no
--	]
--)
--LIBADD="$cgraph_tmp_LIBADD"
--CFLAGS="$cgraph_tmp_CFLAGS"
-+AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
-+if test x$enable_graphviz = xyes; then
-+	PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
-+	AC_MSG_CHECKING([for CGRAPH])
-+	VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
-+	cgraph_tmp_LIBADD="$LIBADD"
-+	cgraph_tmp_CFLAGS="$CFLAGS"
-+	LIBADD="$LIBADD $LIBGVC_LIBS"
-+	CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
-+	AC_RUN_IFELSE(
-+		[AC_LANG_SOURCE([
-+			#include <gvc.h>
-+			int main(void) {
-+				#ifdef WITH_CGRAPH
-+					return 0;
-+				#else
-+					return -1;
-+				#endif
-+			}
-+		])], [
-+			AC_MSG_RESULT([yes])
-+			VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
-+			have_cgraph=yes
-+		], [
-+			AC_MSG_RESULT([no])
-+			have_cgraph=no
-+		]
-+	)
-+	LIBADD="$cgraph_tmp_LIBADD"
-+	CFLAGS="$cgraph_tmp_CFLAGS"
-+fi
-+AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
- AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
- 
- AC_PATH_PROG([XSLTPROC], [xsltproc], :)
-diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
-index f3f790e..3c5dc4c 100644
---- a/libvaladoc/Makefile.am
-+++ b/libvaladoc/Makefile.am
-@@ -128,10 +128,6 @@ libvaladoc_la_VALASOURCES = \
- 	content/tablerow.vala \
- 	content/taglet.vala \
- 	content/text.vala \
--	charts/chart.vala \
--	charts/chartfactory.vala \
--	charts/hierarchychart.vala \
--	charts/simplechartfactory.vala \
- 	parser/manyrule.vala \
- 	parser/oneofrule.vala \
- 	parser/optionalrule.vala \
-@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
- 	highlighter/codetoken.vala \
- 	highlighter/highlighter.vala \
- 	html/basicdoclet.vala \
--	html/htmlchartfactory.vala \
- 	html/linkhelper.vala \
- 	html/cssclassresolver.vala \
- 	html/htmlmarkupwriter.vala \
- 	html/htmlrenderer.vala \
- 	$(NULL)
- 
-+if ENABLE_GRAPHVIZ
-+libvaladoc_la_VALASOURCES += \
-+	charts/chart.vala \
-+	charts/chartfactory.vala \
-+	charts/hierarchychart.vala \
-+	charts/simplechartfactory.vala \
-+	html/htmlchartfactory.vala \
-+	$(NULL)
-+
-+LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
-+endif
-+
- libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
- 	libvaladoc.vala.stamp \
- 	$(libvaladoc_la_VALASOURCES:.vala=.c) \
-@@ -184,11 +191,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
- 		--library valadoc \
- 		--vapi valadoc@PACKAGE_SUFFIX@.vapi \
- 		--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
--		--vapidir $(top_srcdir)/vapi --pkg libgvc \
- 		--vapidir $(top_srcdir)/gee --pkg gee \
- 		--vapidir $(top_srcdir)/vala --pkg vala \
- 		--vapidir $(top_srcdir)/ccode --pkg ccode \
- 		--vapidir $(top_srcdir)/codegen --pkg codegen \
-+		$(LIBGVC_PKG) \
- 		--pkg config \
- 		$(filter %.vala %.c,$^)
- 	touch $@
-@@ -217,6 +224,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
- 
- valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
- 	cp $< $@
-+if !ENABLE_GRAPHVIZ
-+	sed -i "s/libgvc //g" $@
-+endif
- 
- vapidir = $(datadir)/vala/vapi
- dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
-@@ -224,6 +234,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
- 
- valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
- 	cp $< $@
-+if !ENABLE_GRAPHVIZ
-+	sed -i "s/libgvc//g" $@
-+endif
- 
- EXTRA_DIST = \
- 	$(libvaladoc_la_VALASOURCES) \
-diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
-index 192e488..ec09602 100644
---- a/libvaladoc/html/basicdoclet.vala
-+++ b/libvaladoc/html/basicdoclet.vala
-@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
- 	protected HtmlRenderer _renderer;
- 	protected Html.MarkupWriter writer;
- 	protected Html.CssClassResolver cssresolver;
-+#if HAVE_GRAPHVIZ
- 	protected Charts.Factory image_factory;
-+#else
-+	protected void* image_factory;
-+#endif
- 	protected ErrorReporter reporter;
- 	protected string package_list_link = "../index.html";
- 
-@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
- 		this.linker = new LinkHelper ();
- 
- 		_renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
-+#if HAVE_GRAPHVIZ
- 		this.image_factory = new SimpleChartFactory (settings, linker);
-+#endif
- 	}
- 
- 
-@@ -1026,6 +1032,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
- 	}
- 
- 	protected void write_image_block (Api.Node element) {
-+#if HAVE_GRAPHVIZ
- 		if (element is Class || element is Interface || element is Struct) {
- 			unowned string format = (settings.use_svg_images ? "svg" : "png");
- 			var chart = new Charts.Hierarchy (image_factory, element);
-@@ -1045,6 +1052,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
- 									   this.get_img_path_html (element, format)});
- 			writer.add_usemap (chart);
- 		}
-+#endif
- 	}
- 
- 	public void write_namespace_content (Namespace node, Api.Node? parent) {
-diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
-index 5aa4afd..e79b0b8 100644
---- a/libvaladoc/html/htmlmarkupwriter.vala
-+++ b/libvaladoc/html/htmlmarkupwriter.vala
-@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
- 		}
- 	}
- 
-+#if HAVE_GRAPHVIZ
- 	public unowned MarkupWriter add_usemap (Charts.Chart chart) {
- 		string? buf = (string?) chart.write_buffer ("cmapx");
- 		if (buf != null) {
- 			raw_text ("\n");
- 			raw_text ((!) buf);
- 		}
-+#else
-+	public unowned MarkupWriter add_usemap (void* chart) {
-+#endif
- 
- 		return this;
- 	}
diff --git a/poky/meta/recipes-devtools/vala/vala_0.42.5.bb b/poky/meta/recipes-devtools/vala/vala_0.42.5.bb
deleted file mode 100644
index eea1766..0000000
--- a/poky/meta/recipes-devtools/vala/vala_0.42.5.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
-             file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
-	     file://disable-graphviz.patch \
-	     file://0001-Disable-valadoc.patch \
-"
-
-SRC_URI[md5sum] = "d204eb4fa210995e731e2a9a01c8c772"
-SRC_URI[sha256sum] = "8c33b4abc0573d364781bbfe54a1668ed34956902e471191a31cf05dc87c6e12"
diff --git a/poky/meta/recipes-devtools/vala/vala_0.44.3.bb b/poky/meta/recipes-devtools/vala/vala_0.44.3.bb
new file mode 100644
index 0000000..fe6a5fc
--- /dev/null
+++ b/poky/meta/recipes-devtools/vala/vala_0.44.3.bb
@@ -0,0 +1,8 @@
+require ${BPN}.inc
+
+SRC_URI += "file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
+           file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
+           "
+
+SRC_URI[md5sum] = "25f97c1b46ae0b60b5cc49cbc044eca2"
+SRC_URI[sha256sum] = "8553b422484af88be1685d8b47f7b0df36ae4477c3e77e89ab22276ffed1eae9"
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch
deleted file mode 100644
index bedf1c1..0000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 7820fc268fae4353118b6355f1d4b9e1b7eeebec Mon Sep 17 00:00:00 2001
-From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
-Date: Sun, 28 Oct 2018 18:35:11 +0100
-Subject: [PATCH] Fix dependencies between libcoregrind*.a and
- *m_main.o/*m_libcsetjmp.o
-
-The primary and secondary coregrind libraries must be updated
-when m_main.c or m_libcsetjmp.c are changed.
-
-A dependency was missing between libcoregrind*.a and libnolto_coregrind*.a,
-and so tools were not relinked when m_main.c or m_libcsetjmp.c were
-changed.
-
-Upstream-Status: Backport[git://sourceware.org/git/valgrind.git 7820fc268fae4353118b6355f1d4b9e1b7eeebec]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- coregrind/Makefile.am | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
-index 914a270..8de1996 100644
---- a/coregrind/Makefile.am
-+++ b/coregrind/Makefile.am
-@@ -511,6 +511,8 @@ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS += \
- endif
- libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_LIBADD = \
-     $(libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_OBJECTS)
-+libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_DEPENDENCIES = \
-+    libnolto_coregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
- 
- if VGCONF_HAVE_PLATFORM_SEC
- libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
-@@ -531,6 +533,8 @@ libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS += \
- endif
- libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_LIBADD = \
-     $(libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_OBJECTS)
-+libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_DEPENDENCIES = \
-+    libnolto_coregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
- endif
- 
- #----------------------------------------------------------------------------
--- 
-2.10.2
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch
new file mode 100644
index 0000000..e7af5ef
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Return-a-valid-exit_code-from-vg_regtest.patch
@@ -0,0 +1,27 @@
+From 5eebdefd2251803e7d21081745018fcb16b2ba71 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Wed, 8 May 2019 20:16:52 -0400
+Subject: [PATCH] Return a valid exit_code from vg_regtest
+
+Upstream-Status: Pending
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ tests/vg_regtest.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
+index 909af3be8..f2799c4e3 100755
+--- a/tests/vg_regtest.in
++++ b/tests/vg_regtest.in
+@@ -403,6 +403,7 @@ sub mysystem($)
+             exit 1;
+         }
+     }
++    return $exit_code;
+ }
+ # if $keepunfiltered, copies $1 to $1.unfiltered.out
+ # renames $0 tp $1
+-- 
+2.17.0
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
deleted file mode 100644
index 657f803..0000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 8c1ebb564f5eca2baeedc27a703200786d1abb0b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 22 Dec 2018 15:28:40 -0800
-Subject: [PATCH] tests/amd64: Do not clobber %rsp register
-
-This is seen with gcc-9.0 compiler now which is fix that gcc community
-did recently
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
-
-Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=402480]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- none/tests/amd64-linux/bug345887.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/none/tests/amd64-linux/bug345887.c b/none/tests/amd64-linux/bug345887.c
-index 0f9237d..4b07fe1 100644
---- a/none/tests/amd64-linux/bug345887.c
-+++ b/none/tests/amd64-linux/bug345887.c
-@@ -20,13 +20,14 @@ static void inner(void)
-       "movq $0x10d, %%r14\n"
-       "movq $0x10e, %%r15\n"
-       // not %rbp as mdb is then not able to reconstruct stack trace
--      "movq $0x10f, %%rsp\n"
-+      // not %rsp since gcc ignores it and since gcc >= 9.0 errors about it
-+      // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
-       "movq $0x1234, (%%rax)\n"  // should cause SEGV here
-       "ud2"                      // should never get here
-       : // no output registers
-       : // no input registers
-       : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
--        "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "%rsp");
-+        "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15");
- }
- 
- __attribute__((noinline))
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
new file mode 100644
index 0000000..bf0f0de
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-filter_xml_frames-do-not-filter-usr.patch
@@ -0,0 +1,39 @@
+From d1dea3c2bcf1e22baab39e2c0b8ca59db8a5bc37 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Mon, 13 May 2019 17:12:21 -0400
+Subject: [PATCH 1/2] valgrind: filter_xml_frames: do not filter /usr
+
+filter_xml_frames is intended to filter system paths under
+'/usr' that vary from platform to platform. In the ptest case
+for Yocto's valgrind, the ptest executables are placed under:
+   /usr/lib/valgrind/ptest
+and if these frames are filtered out, then the 'drd' tests fail
+the comparision between exepected and actual output.
+
+Changing this filter allows the comparison to succeed without
+any negative impact.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ tests/filter_xml_frames | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/filter_xml_frames b/tests/filter_xml_frames
+index f1fa3f070..04fbc82de 100755
+--- a/tests/filter_xml_frames
++++ b/tests/filter_xml_frames
+@@ -47,7 +47,8 @@ while (my $line = <>)
+         $has_function_name = 1 if ($line =~ /<fn>/);
+ # This may require tweaking; currently  /lib and /usr/lib are matched
+         $has_system_obj = 1 if ($line =~ /<obj>\/lib/);
+-        $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
++# for Yocto, skip /usr since tests are under /usr/lib/...
++#        $has_system_obj = 1 if ($line =~ /<obj>\/usr\/lib/);
+     }
+ }
+ 
+-- 
+2.17.0
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
new file mode 100644
index 0000000..a82972e
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0002-valgrind-adjust-std_list-expected-output.patch
@@ -0,0 +1,32 @@
+From 6e1e9265b03cf51d09c028d657fe826d7156a783 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Mon, 13 May 2019 17:26:26 -0400
+Subject: [PATCH 2/2] valgrind: adjust std_list expected output
+
+The run-ptest script uses a custom --yocto-ptest option
+to change the summary statistics that valgrind issues
+to a format that matches what ptest-runner expects.
+
+Only this std_list test which checks that strcpy() works
+properly on Ubuntu-12.04 and later is affected by this change.
+It's normal output when called with --yocto-ptest is a blank
+line so adjust the expected output.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+---
+ drd/tests/std_list.stderr.exp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drd/tests/std_list.stderr.exp b/drd/tests/std_list.stderr.exp
+index d18786f80..8b1378917 100644
+--- a/drd/tests/std_list.stderr.exp
++++ b/drd/tests/std_list.stderr.exp
+@@ -1,3 +1 @@
+ 
+-
+-ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+-- 
+2.17.0
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
similarity index 79%
rename from poky/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
rename to poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
index db1bd9f..ae3498f 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
@@ -12,7 +12,7 @@
            ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
         "
 
-SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
+SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
            file://fixed-perl-path.patch \
            file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
            file://run-ptest \
@@ -36,11 +36,12 @@
            file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
            file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
            file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
-           file://0001-tests-amd64-Do-not-clobber-rsp-register.patch \
-           file://0001-Fix-dependencies-between-libcoregrind-.a-and-m_main..patch \
+           file://0001-Return-a-valid-exit_code-from-vg_regtest.patch \
+           file://0001-valgrind-filter_xml_frames-do-not-filter-usr.patch \
+           file://0002-valgrind-adjust-std_list-expected-output.patch \
            "
-SRC_URI[md5sum] = "74175426afa280184b62591b58c671b3"
-SRC_URI[sha256sum] = "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5"
+SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975"
+SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
 UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
 
 COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
@@ -109,12 +110,13 @@
 # redirect functions like strlen.
 RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
 
-RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob"
+RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob ${PN}-dbg"
 RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
 
 # One of the tests contains a bogus interpreter path on purpose.
 # Skip file dependency check
 SKIP_FILEDEPS_${PN}-ptest = '1'
+INSANE_SKIP_${PN}-ptest = "debug-deps"
 
 do_compile_ptest() {
     oe_runmake check
@@ -136,7 +138,17 @@
         # exclude shell or the package won't install
         rm -rf none/tests/shell* 2>/dev/null
 
-        subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
+        subdirs=" \
+	   cachegrind/tests \
+	   callgrind/tests \
+	   drd/tests \
+	   gdbserver_tests \
+	   helgrind/tests \
+	   massif/tests \
+	   memcheck/tests \
+	   none/tests \
+	   tests \
+	"
 
         # Get the vg test scripts, filters, and expected files
         for dir in $subdirs ; do
@@ -145,6 +157,8 @@
         cd $saved_dir
     done
 
+    # Hide then restore a.c that is used by ann[12].vgtest in call/cachegrind
+    mv ${D}${PTEST_PATH}/cachegrind/tests/a.c ${D}${PTEST_PATH}/cachegrind/tests/a_c
     # clean out build artifacts before building the rpm
     find ${D}${PTEST_PATH} \
          \( -name "Makefile*" \
@@ -153,6 +167,14 @@
         -o -name "*.S" \
         -o -name "*.h" \) \
         -exec rm {} \;
+    mv ${D}${PTEST_PATH}/cachegrind/tests/a_c ${D}${PTEST_PATH}/cachegrind/tests/a.c
+
+    # find *_annotate in ${bindir} for yocto build
+    sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest
+    sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann2.vgtest
+
+    sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest
+    sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest
 
     # needed by massif tests
     cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print