poky: subtree update:23deb29c1b..c67f57c09e

Adrian Bunk (1):
      librsvg: Upgrade 2.40.20 -> 2.40.21

Alejandro Hernandez (1):
      musl: Upgrade to latest release 1.2.1

Alex Kiernan (8):
      systemd: Upgrade v245.6 -> v246
      systemd: Move musl patches to SRC_URI_MUSL
      systemd: Fix path to modules-load.d et al
      nfs-utils: Drop StandardError=syslog from systemd unit
      openssh: Drop StandardError=syslog from systemd unit
      volatile-binds: Drop StandardOutput=syslog from systemd unit
      systemd: Upgrade v246 -> v246.1
      systemd: Upgrade v246.1 -> v246.2

Alexander Kanavin (16):
      sysvinit: update 2.96 -> 2.97
      kbd: update 2.2.0 -> 2.3.0
      gnu-config: update to latest revision
      go: update 1.14.4 -> 1.14.6
      meson: update 0.54.3 -> 0.55.0
      nasm: update 2.14.02 -> 2.15.03
      glib-2.0: correct build with latest meson
      rsync: update 3.2.1 -> 3.2.2
      vala: update 0.48.6 -> 0.48.7
      logrotate: update 3.16.0 -> 3.17.0
      mesa: update 20.1.2 -> 20.1.4
      libcap: update 2.36 -> 2.41
      net-tools: fix upstream version check
      meson.bbclass: add a cups-config entry
      oeqa: write @OETestTag content into json test reports for each case
      libhandy: upstream has moved to gnome

Alistair Francis (1):
      binutils: Remove RISC-V PIE patch

Andrei Gherzan (2):
      initscripts: Fix various shellcheck warnings in populate-volatile.sh
      initscripts: Fix populate-volatile.sh bug when file/dir exists

Anuj Mittal (4):
      harfbuzz: upgrade 2.6.8 -> 2.7.1
      sqlite3: upgrade 3.32.3 -> 3.33.0
      stress-ng: upgrade 0.11.17 -> 0.11.18
      x264: upgrade to latest revision

Armin Kuster (1):
      glibc: Secruity fix for CVE-2020-6096

Bruce Ashfield (25):
      linux-yocto/5.4: update to v5.4.53
      linux-yocto/5.4: fix perf build with binutils 2.35
      kernel/yocto: allow dangling KERNEL_FEATURES
      linux-yocto/5.4: update to v5.4.54
      systemtap: update to 4.3 latest
      kernel-devsrc: fix x86 (32bit) on target module build
      lttng-modules: update to 2.12.2 (fixes v5.8+ builds)
      yocto-bsps: update reference BSPs to 5.4.54
      kernel-yocto: enhance configuration queue analysis capabilities
      strace: update to 5.8 (fix build against v5.8 uapi headers)
      linux-yocto-rt/5.4: update to rt32
      linux-yocto/5.4: update to v5.4.56
      linux-yocto/5.4: update to v5.4.57
      kernel-yocto: set cwd before querying the meta data dir
      kernel-yocto: make # is not set matching more precise
      kernel-yocto: split meta data gathering into patch and config phases
      make-mod-scripts: add HOSTCXX definitions and gmp-native dependency
      kernel-devsrc: fix on target modules prepare for ARM
      kernel-devsrc: 5.8 + gcc10 require gcc-plugins + libmpc-dev
      linux-yocto/5.4: update to v5.4.58
      linux-yocto/5.4: perf cs-etm: Move definition of 'traceid_list' global variable from header file
      libc-headers: update to v5.8
      linux-yocto: introduce 5.8 reference kernel
      kernel-yocto/5.8: add gmp-native dependency
      linux-yocto/5.8: update to v5.8.1

Chandana kalluri (1):
      qemu.inc: Use virtual/libgl instead of mesa

Changhyeok Bae (2):
      iproute2: upgrade 5.7.0 -> 5.8.0
      ethtool: upgrade 5.7 -> 5.8

Changqing Li (5):
      layer.conf: fix adwaita-icon-theme signature change problem
      gtk-icon-cache.bbclass: add features_check
      gcc-runtime.inc: fix m32 compile fail with x86-64 compiler
      libffi: fix multilib header conflict
      gpgme: fix multilib header conflict

Chen Qi (3):
      grub: set CVE_PRODUCT to grub2
      runqemu: fix permission check of /dev/vhost-net
      fribidi: extend CVE_PRODUCT to include fribidi

Chris Laplante (11):
      lib/oe/log_colorizer.py: add LogColorizerProxyProgressHandler
      bitbake: build: print traceback if progress handler can't be created
      bitbake: build: create_progress_handler: fix calling 'get' on NoneType
      bitbake: progress: modernize syntax, format
      bitbake: progress: fix hypothetical NameError if 'progress' isn't set
      bitbake: progress: filter ANSI escape codes before looking for progress text
      bitbake: tests/color: add test suite for ANSI color code filtering
      bitbake: data: emit filename/lineno information for shell functions
      bitbake: build: print a backtrace when a Bash shell function fails
      bitbake: build: print a backtrace with the original metadata locations of Bash shell funcs
      bitbake: build: make shell traps less chatty when 'bitbake -v' is used

Dan Callaghan (1):
      stress-ng: create a symlink for /usr/bin/stress

Daniel Ammann (1):
      wic: fix typo

Daniel Gomez (1):
      allarch: Add missing allarch ttf-bitstream-vera

Diego Sueiro (1):
      cml1: Add the option to choose the .config root dir

Dmitry Baryshkov (3):
      mesa: enable freedreno Vulkan driver if freedreno is enabled
      arch-armv8-2a.inc: add tune include for armv8.2a
      tune-cortexa55.inc: switch to using armv8.2a include file

Fredrik Gustafsson (13):
      package_manager: Move to package_manager/__init__.py
      rpm: Move manifest to its own subdir
      ipk: Move ipk manifest to its own subdir
      deb: Move deb manifest to its own subdir
      rpm: Move rootfs to its own dir
      ipk: Move rootfs to its own dir
      deb: Move rootfs to its own dir
      rpm: Move sdk to its own dir
      ipk: Move sdk to its own dir
      deb: Move sdk to its own dir
      rpm: Move package manager to its own dir
      ipk: Move package manager to its own dir
      deb: Move package manager to its own dir

Guillaume Champagne (1):
      weston: add missing packageconfigs

Jeremy Puhlman (1):
      gobject-introspection: disable scanner caching in install

Joe Slater (3):
      libdnf: allow reproducible binary builds
      gconf: use python3
      gcr: make sure gcr-oids.h is generated

Jonathan Richardson (1):
      cortex-m0plus.inc: Add tuning for cortex M0 plus

Joshua Watt (3):
      bitbake: bitbake: command: Handle multiconfig in findSigInfo
      lib/oe/reproducible.py: Fix git HEAD check
      perl: Add check for non-arch Storable.pm file

Khasim Mohammed (2):
      wic/bootimg-efi: Add support for IMAGE_BOOT_FILES
      wic/bootimg-efi: Update docs for IMAGE_BOOT_FILES support in bootimg-efi

Khem Raj (23):
      qemumips: Use 34Kf CPU emulation
      libunwind: Backport a fix for -fno-common option to compile
      dhcp: Use -fcommon compiler option
      inetutils: Fix build with -fno-common
      libomxil: Use -fcommon compiler option
      kexec-tools: Fix build with -fno-common
      distcc: Fix build with -fno-common
      libacpi: Fix build with -fno-common
      minicom: Fix build when using -fno-common
      binutils: Upgrade to 2.35 release
      xf86-video-intel: Fix build with -fno-common
      glibc: Upgrade to 2.32 release
      go: Upgrade to 1.14.7
      webkitgtk: Upgrade to 2.28.4
      kexec-tools: Fix additional duplicate symbols on aarch64/x86_64 builds
      gcc: Upgrade to 10.2.0
      buildcpio.py: Apply patch to fix build with -fno-common
      buildgalculator: Patch to fix build with -fno-common
      localedef: Update to include floatn.h fix
      xserver-xorg: Fix build with -fno-common/mips
      binutils: Let crosssdk gold linker generate 4096 btyes long .interp section
      gcc-cross-canadian: Correct the regexp to delete versioned gcc binary
      curl: Upgrade to 7.72.0

Konrad Weihmann (2):
      rootfs-post: remove traling blanks from tasks
      cve-update: handle baseMetricV2 as optional

Lee Chee Yang (4):
      buildhistory: use pid for temporary txt file name
      checklayer: check layer in BBLAYERS before test
      ghostscript: fix CVE-2020-15900
      qemu : fix CVE-2020-15863

Mark Hatle (1):
      package.bbclass: Sort shlib2 output for hash equivalency

Martin Jansa (2):
      net-tools: upgrade to latest revision in upstream repo instead of old debian snapshot
      perf: backport a fix for confusing non-fatal error

Matt Madison (1):
      cogl-1.0: correct X11 dependencies

Matthew (3):
      ltp: remove --with-power-management-testsuite from EXTRA_OECONF
      ltp: remove OOM tests from runtest/mm
      ltp: make copyFrom scp command non-fatal

Mikko Rapeli (2):
      alsa-topology-conf: use ${datadir} in do_install()
      alsa-ucm-conf: use ${datadir} in do_install()

Ming Liu (3):
      conf/machine: set UBOOT_MACHINE for qemumips and qemumips64
      multilib.conf: add u-boot to NON_MULTILIB_RECIPES
      libubootenv: uprev to v0.3

Mingli Yu (2):
      ccache: Upgrade to 3.7.11
      Revert "python3: define a profile directory path"

Naoto Yamaguchi (1):
      patch.py: Change to more strictly fuzz detection

Nathan Rossi (4):
      libexif: Enable native and nativesdk
      cmake.bbclass: Rework compiler program variables for allarch
      python3: Improve handling of python3 manifest generation
      python3-manifest.json: Updates

Oleksandr Kravchuk (9):
      python3-setuptools: update to 49.2.0
      bash-completion: update to 2.11
      python3: update to 3.8.5
      re2c: update to 2.0
      diffoscope: update to 153
      json-c: update to 0.15
      git: update 2.28.0
      libwpe: update to 1.7.1
      python3-setuptools: update to 49.3.1

Richard Purdie (20):
      perl: Avoid race continually rebuilding miniperl
      gcc: Fix mangled patch
      bitbake: server/process: Fix UI first connection tracking
      bitbake: server/process: Account for xmlrpc connections
      Revert "lib/oe/log_colorizer.py: add LogColorizerProxyProgressHandler"
      lib/package_manager: Fix missing imports
      populate_sdk_ext: Ensure buildtools doesn't corrupt OECORE_NATIVE_SYSROOT
      buildtools: Handle generic environment setup injection
      uninative: Handle PREMIRRORS generically
      maintainers: Update entries for Mark Hatle
      gcr: Fix patch Upstream-Status from v2 patch
      bitbake: server/process: Remove pointless process forking
      bitbake: server/process: Simplfy idle callback handler function
      bitbake: server/process: Pass timeout/xmlrpc parameters directly to the server
      bitbake: server/process: Add extra logfile flushing
      packagefeed-stability: Remove as obsolete
      build-compare: Drop recipe
      qemu: Upgrade 5.0.0 -> 5.1.0
      selftest/tinfoil: Increase wait event timeout
      lttng-tools: upgrade 2.12.1 -> 2.12.2

Ross Burton (3):
      popt: upgrade to 1.18
      conf/machine: set UBOOT_MACHINE for qemuarm and qemuarm64
      gcc: backport a fix for out-of-line atomics on aarch64

TeohJayShen (2):
      oeqa/manual/bsp-hw.json : remove shutdown_system test
      oeqa/manual/bsp-hw.json : remove X_server_can_start_up_with_runlevel_5_boot test

Trevor Gamblin (1):
      llvm: upgrade 9.0.1 -> 10.0.1

Tyler Hicks (1):
      kernel-devicetree: Fix intermittent build failures caused by DTB builds

Usama Arif (3):
      kernel-fitimage: build configuration for image tree when dtb is not present
      oeqa/selftest/imagefeatures: Add testcase for fitImage
      ref-manual: Add documentation for kernel-fitimage

Vasyl Vavrychuk (1):
      runqemu: Check gtk or sdl option is passed together with gl or gl-es options.

Yi Zhao (1):
      pbzip2: extend for nativesdk

Zhang Qiang (1):
      kernel.bbclass: Configuration for environment with HOSTCXX

hongxu (1):
      nativesdk-rpm: adjust RPM_CONFIGDIR paths dynamically

zangrc (8):
      libevdev:upgrade 1.9.0 -> 1.9.1
      mpg123:upgrade 1.26.2 -> 1.26.3
      flex: Refresh patch
      stress-ng:upgrade 0.11.15 -> 0.11.17
      sudo:upgrade 1.9.1 -> 1.9.2
      libcap: Upgrade 2.41 -> 2.42
      libinput: Upgrade 1.15.6 -> 1.16.0
      python3-setuptools: Upgrade 49.2.0 -> 49.2.1

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ic7fa1e8484c1c7722a70c75608aa4ab21fa7d755
diff --git a/poky/bitbake/bin/bitbake-selftest b/poky/bitbake/bin/bitbake-selftest
index 041a271..e84d6a5 100755
--- a/poky/bitbake/bin/bitbake-selftest
+++ b/poky/bitbake/bin/bitbake-selftest
@@ -18,6 +18,7 @@
     sys.exit(str(exc))
 
 tests = ["bb.tests.codeparser",
+         "bb.tests.color",
          "bb.tests.cooker",
          "bb.tests.cow",
          "bb.tests.data",
diff --git a/poky/bitbake/lib/bb/build.py b/poky/bitbake/lib/bb/build.py
index 23b6ee4..94f9cb3 100644
--- a/poky/bitbake/lib/bb/build.py
+++ b/poky/bitbake/lib/bb/build.py
@@ -16,7 +16,9 @@
 import sys
 import logging
 import glob
+import itertools
 import time
+import re
 import stat
 import bb
 import bb.msg
@@ -303,20 +305,60 @@
 
 def shell_trap_code():
     return '''#!/bin/sh\n
+__BITBAKE_LAST_LINE=0
+
 # Emit a useful diagnostic if something fails:
-bb_exit_handler() {
+bb_sh_exit_handler() {
     ret=$?
-    case $ret in
-    0)  ;;
-    *)  case $BASH_VERSION in
-        "") echo "WARNING: exit code $ret from a shell command.";;
-        *)  echo "WARNING: ${BASH_SOURCE[0]}:${BASH_LINENO[0]} exit $ret from '$BASH_COMMAND'";;
-        esac
-        exit $ret
-    esac
+    if [ "$ret" != 0 ]; then
+        echo "WARNING: exit code $ret from a shell command."
+    fi
+    exit $ret
 }
-trap 'bb_exit_handler' 0
-set -e
+
+bb_bash_exit_handler() {
+    ret=$?
+    { set +x; } > /dev/null
+    trap "" DEBUG
+    if [ "$ret" != 0 ]; then
+        echo "WARNING: ${BASH_SOURCE[0]}:${__BITBAKE_LAST_LINE} exit $ret from '$1'"
+
+        echo "WARNING: Backtrace (BB generated script): "
+        for i in $(seq 1 $((${#FUNCNAME[@]} - 1))); do
+            if [ "$i" -eq 1 ]; then
+                echo -e "\t#$((i)): ${FUNCNAME[$i]}, ${BASH_SOURCE[$((i-1))]}, line ${__BITBAKE_LAST_LINE}"
+            else
+                echo -e "\t#$((i)): ${FUNCNAME[$i]}, ${BASH_SOURCE[$((i-1))]}, line ${BASH_LINENO[$((i-1))]}"
+            fi
+        done
+    fi
+    exit $ret
+}
+
+bb_bash_debug_handler() {
+    local line=${BASH_LINENO[0]}
+    # For some reason the DEBUG trap trips with lineno=1 when scripts exit; ignore it
+    if [ "$line" -eq 1 ]; then
+        return
+    fi
+
+    # Track the line number of commands as they execute. This is so we can have access to the failing line number
+    # in the EXIT trap. See http://gnu-bash.2382.n7.nabble.com/trap-echo-quot-trap-exit-on-LINENO-quot-EXIT-gt-wrong-linenumber-td3666.html
+    if [ "${FUNCNAME[1]}" != "bb_bash_exit_handler" ]; then
+        __BITBAKE_LAST_LINE=$line
+    fi
+}
+
+case $BASH_VERSION in
+"") trap 'bb_sh_exit_handler' 0
+    set -e
+    ;;
+*)  trap 'bb_bash_exit_handler "$BASH_COMMAND"' 0
+    trap '{ bb_bash_debug_handler; } 2>/dev/null' DEBUG
+    set -e
+    shopt -s extdebug
+    ;;
+esac
 '''
 
 def create_progress_handler(func, progress, logfile, d):
@@ -346,7 +388,7 @@
             cls_obj = functools.reduce(resolve, cls.split("."), bb.utils._context)
             if not cls_obj:
                 # Fall-back on __builtins__
-                cls_obj = functools.reduce(lambda x, y: x.get(y), cls.split("."), __builtins__)
+                cls_obj = functools.reduce(resolve, cls.split("."), __builtins__)
             if cls_obj:
                 return cls_obj(d, outfile=logfile, otherargs=otherargs)
             bb.warn('%s: unknown custom progress handler in task progress varflag value "%s", ignoring' % (func, cls))
@@ -398,7 +440,13 @@
 
     progress = d.getVarFlag(func, 'progress')
     if progress:
-        logfile = create_progress_handler(func, progress, logfile, d)
+        try:
+            logfile = create_progress_handler(func, progress, logfile, d)
+        except:
+            from traceback import format_exc
+            logger.error("Failed to create progress handler")
+            logger.error(format_exc())
+            raise
 
     fifobuffer = bytearray()
     def readfifo(data):
@@ -450,6 +498,62 @@
             bb.debug(2, "Executing shell function %s" % func)
             with open(os.devnull, 'r+') as stdin, logfile:
                 bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
+        except bb.process.ExecutionError as exe:
+            # Find the backtrace that the shell trap generated
+            backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)")
+            stdout_lines = (exe.stdout or "").split("\n")
+            backtrace_start_line = None
+            for i, line in enumerate(reversed(stdout_lines)):
+                if backtrace_marker_regex.search(line):
+                    backtrace_start_line = len(stdout_lines) - i
+                    break
+
+            # Read the backtrace frames, starting at the location we just found
+            backtrace_entry_regex = re.compile(r"#(?P<frameno>\d+): (?P<funcname>[^\s]+), (?P<file>.+?), line ("
+                                               r"?P<lineno>\d+)")
+            backtrace_frames = []
+            if backtrace_start_line:
+                for line in itertools.islice(stdout_lines, backtrace_start_line, None):
+                    match = backtrace_entry_regex.search(line)
+                    if match:
+                        backtrace_frames.append(match.groupdict())
+
+            with open(runfile, "r") as script:
+                script_lines = [line.rstrip() for line in script.readlines()]
+
+            # For each backtrace frame, search backwards in the script (from the line number called out by the frame),
+            # to find the comment that emit_vars injected when it wrote the script. This will give us the metadata
+            # filename (e.g. .bb or .bbclass) and line number where the shell function was originally defined.
+            script_metadata_comment_regex = re.compile(r"# line: (?P<lineno>\d+), file: (?P<file>.+)")
+            better_frames = []
+            # Skip the very last frame since it's just the call to the shell task in the body of the script
+            for frame in backtrace_frames[:-1]:
+                # Check whether the frame corresponds to a function defined in the script vs external script.
+                if os.path.samefile(frame["file"], runfile):
+                    # Search backwards from the frame lineno to locate the comment that BB injected
+                    i = int(frame["lineno"]) - 1
+                    while i >= 0:
+                        match = script_metadata_comment_regex.match(script_lines[i])
+                        if match:
+                            # Calculate the relative line in the function itself
+                            relative_line_in_function = int(frame["lineno"]) - i - 2
+                            # Calculate line in the function as declared in the metadata
+                            metadata_function_line = relative_line_in_function + int(match["lineno"])
+                            better_frames.append("#{frameno}: {funcname}, {file}, line {lineno}".format(
+                                frameno=frame["frameno"],
+                                funcname=frame["funcname"],
+                                file=match["file"],
+                                lineno=metadata_function_line
+                            ))
+                            break
+                        i -= 1
+                else:
+                    better_frames.append("#{frameno}: {funcname}, {file}, line {lineno}".format(**frame))
+
+            if better_frames:
+                better_frames = ("\t{0}".format(frame) for frame in better_frames)
+                exe.extra_message = "\nBacktrace (metadata-relative locations):\n{0}".format("\n".join(better_frames))
+            raise
         finally:
             os.unlink(fifopath)
 
diff --git a/poky/bitbake/lib/bb/command.py b/poky/bitbake/lib/bb/command.py
index 805ed92..4d152ff 100644
--- a/poky/bitbake/lib/bb/command.py
+++ b/poky/bitbake/lib/bb/command.py
@@ -84,7 +84,7 @@
         if command not in CommandsAsync.__dict__:
             return None, "No such command"
         self.currentAsyncCommand = (command, commandline)
-        self.cooker.configuration.server_register_idlecallback(self.cooker.runCommands, self.cooker)
+        self.cooker.idleCallBackRegister(self.cooker.runCommands, self.cooker)
         return True, None
 
     def runAsyncCommand(self):
@@ -723,10 +723,10 @@
         """
         Find signature info files via the signature generator
         """
-        pn = params[0]
+        (mc, pn) = bb.runqueue.split_mc(params[0])
         taskname = params[1]
         sigs = params[2]
-        res = bb.siggen.find_siginfo(pn, taskname, sigs, command.cooker.data)
-        bb.event.fire(bb.event.FindSigInfoResult(res), command.cooker.data)
+        res = bb.siggen.find_siginfo(pn, taskname, sigs, command.cooker.databuilder.mcdata[mc])
+        bb.event.fire(bb.event.FindSigInfoResult(res), command.cooker.databuilder.mcdata[mc])
         command.finishAsyncCommand()
     findSigInfo.needcache = False
diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py
index f6abc63..9123605 100644
--- a/poky/bitbake/lib/bb/cooker.py
+++ b/poky/bitbake/lib/bb/cooker.py
@@ -148,7 +148,7 @@
     Manages one bitbake build run
     """
 
-    def __init__(self, configuration, featureSet=None):
+    def __init__(self, configuration, featureSet=None, idleCallBackRegister=None):
         self.recipecaches = None
         self.skiplist = {}
         self.featureset = CookerFeatures()
@@ -158,6 +158,8 @@
 
         self.configuration = configuration
 
+        self.idleCallBackRegister = idleCallBackRegister
+
         bb.debug(1, "BBCooker starting %s" % time.time())
         sys.stdout.flush()
 
@@ -210,7 +212,7 @@
             cooker.process_inotify_updates()
             return 1.0
 
-        self.configuration.server_register_idlecallback(_process_inotify_updates, self)
+        self.idleCallBackRegister(_process_inotify_updates, self)
 
         # TOSTOP must not be set or our children will hang when they output
         try:
@@ -1423,7 +1425,7 @@
                 return True
             return retval
 
-        self.configuration.server_register_idlecallback(buildFileIdle, rq)
+        self.idleCallBackRegister(buildFileIdle, rq)
 
     def buildTargets(self, targets, task):
         """
@@ -1494,7 +1496,7 @@
         if 'universe' in targets:
             rq.rqdata.warn_multi_bb = True
 
-        self.configuration.server_register_idlecallback(buildTargetsIdle, rq)
+        self.idleCallBackRegister(buildTargetsIdle, rq)
 
 
     def getAllKeysWithFlags(self, flaglist):
diff --git a/poky/bitbake/lib/bb/cookerdata.py b/poky/bitbake/lib/bb/cookerdata.py
index 24bf09c..b86e7d4 100644
--- a/poky/bitbake/lib/bb/cookerdata.py
+++ b/poky/bitbake/lib/bb/cookerdata.py
@@ -143,16 +143,10 @@
                 setattr(self, key, parameters.options.__dict__[key])
         self.env = parameters.environment.copy()
 
-    def setServerRegIdleCallback(self, srcb):
-        self.server_register_idlecallback = srcb
-
     def __getstate__(self):
         state = {}
         for key in self.__dict__.keys():
-            if key == "server_register_idlecallback":
-                state[key] = None
-            else:
-                state[key] = getattr(self, key)
+            state[key] = getattr(self, key)
         return state
 
     def __setstate__(self,state):
diff --git a/poky/bitbake/lib/bb/data.py b/poky/bitbake/lib/bb/data.py
index b0683c5..9702285 100644
--- a/poky/bitbake/lib/bb/data.py
+++ b/poky/bitbake/lib/bb/data.py
@@ -161,6 +161,12 @@
         return True
 
     if func:
+        # Write a comment indicating where the shell function came from (line number and filename) to make it easier
+        # for the user to diagnose task failures. This comment is also used by build.py to determine the metadata
+        # location of shell functions.
+        o.write("# line: {0}, file: {1}\n".format(
+            d.getVarFlag(var, "lineno", False),
+            d.getVarFlag(var, "filename", False)))
         # NOTE: should probably check for unbalanced {} within the var
         val = val.rstrip('\n')
         o.write("%s() {\n%s\n}\n" % (varExpanded, val))
diff --git a/poky/bitbake/lib/bb/process.py b/poky/bitbake/lib/bb/process.py
index 2dc472a..f36c929 100644
--- a/poky/bitbake/lib/bb/process.py
+++ b/poky/bitbake/lib/bb/process.py
@@ -41,6 +41,7 @@
         self.exitcode = exitcode
         self.stdout = stdout
         self.stderr = stderr
+        self.extra_message = None
 
     def __str__(self):
         message = ""
@@ -51,7 +52,7 @@
         if message:
             message = ":\n" + message
         return (CmdError.__str__(self) +
-                " with exit code %s" % self.exitcode + message)
+                " with exit code %s" % self.exitcode + message + (self.extra_message or ""))
 
 class Popen(subprocess.Popen):
     defaults = {
diff --git a/poky/bitbake/lib/bb/progress.py b/poky/bitbake/lib/bb/progress.py
index 9c755b7..d051ba0 100644
--- a/poky/bitbake/lib/bb/progress.py
+++ b/poky/bitbake/lib/bb/progress.py
@@ -14,7 +14,27 @@
 import bb.build
 from bb.build import StdoutNoopContextManager
 
-class ProgressHandler(object):
+
+# from https://stackoverflow.com/a/14693789/221061
+ANSI_ESCAPE_REGEX = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
+
+
+def filter_color(string):
+    """
+    Filter ANSI escape codes out of |string|, return new string
+    """
+    return ANSI_ESCAPE_REGEX.sub('', string)
+
+
+def filter_color_n(string):
+    """
+    Filter ANSI escape codes out of |string|, returns tuple of
+    (new string, # of ANSI codes removed)
+    """
+    return ANSI_ESCAPE_REGEX.subn('', string)
+
+
+class ProgressHandler:
     """
     Base class that can pretend to be a file object well enough to be
     used to build objects to intercept console output and determine the
@@ -55,6 +75,7 @@
             self._lastevent = ts
             self._progress = progress
 
+
 class LineFilterProgressHandler(ProgressHandler):
     """
     A ProgressHandler variant that provides the ability to filter out
@@ -66,7 +87,7 @@
     """
     def __init__(self, d, outfile=None):
         self._linebuffer = ''
-        super(LineFilterProgressHandler, self).__init__(d, outfile)
+        super().__init__(d, outfile)
 
     def write(self, string):
         self._linebuffer += string
@@ -80,41 +101,44 @@
             lbreakpos = line.rfind('\r') + 1
             if lbreakpos:
                 line = line[lbreakpos:]
-            if self.writeline(line):
-                super(LineFilterProgressHandler, self).write(line)
+            if self.writeline(filter_color(line)):
+                super().write(line)
 
     def writeline(self, line):
         return True
 
+
 class BasicProgressHandler(ProgressHandler):
     def __init__(self, d, regex=r'(\d+)%', outfile=None):
-        super(BasicProgressHandler, self).__init__(d, outfile)
+        super().__init__(d, outfile)
         self._regex = re.compile(regex)
         # Send an initial progress event so the bar gets shown
         self._fire_progress(0)
 
     def write(self, string):
-        percs = self._regex.findall(string)
+        percs = self._regex.findall(filter_color(string))
         if percs:
             progress = int(percs[-1])
             self.update(progress)
-        super(BasicProgressHandler, self).write(string)
+        super().write(string)
+
 
 class OutOfProgressHandler(ProgressHandler):
     def __init__(self, d, regex, outfile=None):
-        super(OutOfProgressHandler, self).__init__(d, outfile)
+        super().__init__(d, outfile)
         self._regex = re.compile(regex)
         # Send an initial progress event so the bar gets shown
         self._fire_progress(0)
 
     def write(self, string):
-        nums = self._regex.findall(string)
+        nums = self._regex.findall(filter_color(string))
         if nums:
             progress = (float(nums[-1][0]) / float(nums[-1][1])) * 100
             self.update(progress)
-        super(OutOfProgressHandler, self).write(string)
+        super().write(string)
 
-class MultiStageProgressReporter(object):
+
+class MultiStageProgressReporter:
     """
     Class which allows reporting progress without the caller
     having to know where they are in the overall sequence. Useful
@@ -199,6 +223,7 @@
           value is considered to be out of stage_total, otherwise it should
           be a percentage value from 0 to 100.
         """
+        progress = None
         if self._stage_total:
             stage_progress = (float(stage_progress) / self._stage_total) * 100
         if self._stage < 0:
@@ -207,9 +232,10 @@
             progress = self._base_progress + (stage_progress * self._stage_weights[self._stage])
         else:
             progress = self._base_progress
-        if progress > 100:
-            progress = 100
-        self._fire_progress(progress)
+        if progress:
+            if progress > 100:
+                progress = 100
+            self._fire_progress(progress)
 
     def finish(self):
         if self._finished:
@@ -230,6 +256,7 @@
                     out.append('Up to finish: %d' % stage_weight)
             bb.warn('Stage times:\n  %s' % '\n  '.join(out))
 
+
 class MultiStageProcessProgressReporter(MultiStageProgressReporter):
     """
     Version of MultiStageProgressReporter intended for use with
@@ -238,7 +265,7 @@
     def __init__(self, d, processname, stage_weights, debug=False):
         self._processname = processname
         self._started = False
-        MultiStageProgressReporter.__init__(self, d, stage_weights, debug)
+        super().__init__(d, stage_weights, debug)
 
     def start(self):
         if not self._started:
@@ -255,13 +282,14 @@
         MultiStageProgressReporter.finish(self)
         bb.event.fire(bb.event.ProcessFinished(self._processname), self._data)
 
+
 class DummyMultiStageProcessProgressReporter(MultiStageProgressReporter):
     """
     MultiStageProcessProgressReporter that takes the calls and does nothing
     with them (to avoid a bunch of "if progress_reporter:" checks)
     """
     def __init__(self):
-        MultiStageProcessProgressReporter.__init__(self, "", None, [])
+        super().__init__(None, [])
 
     def _fire_progress(self, taskprogress, rate=None):
         pass
diff --git a/poky/bitbake/lib/bb/server/process.py b/poky/bitbake/lib/bb/server/process.py
index 9ec79f5..65e1eab 100644
--- a/poky/bitbake/lib/bb/server/process.py
+++ b/poky/bitbake/lib/bb/server/process.py
@@ -34,12 +34,11 @@
 class ProcessTimeout(SystemExit):
     pass
 
-class ProcessServer(multiprocessing.Process):
+class ProcessServer():
     profile_filename = "profile.log"
     profile_processed_filename = "profile.log.processed"
 
-    def __init__(self, lock, sock, sockname):
-        multiprocessing.Process.__init__(self)
+    def __init__(self, lock, sock, sockname, server_timeout, xmlrpcinterface):
         self.command_channel = False
         self.command_channel_reply = False
         self.quit = False
@@ -47,6 +46,7 @@
         self.next_heartbeat = time.time()
 
         self.event_handle = None
+        self.hadanyui = False
         self.haveui = False
         self.maxuiwait = 30
         self.xmlrpc = False
@@ -57,6 +57,9 @@
         self.sock = sock
         self.sockname = sockname
 
+        self.server_timeout = server_timeout
+        self.xmlrpcinterface = xmlrpcinterface
+
     def register_idle_function(self, function, data):
         """Register a function to be called while the server is idle"""
         assert hasattr(function, '__call__')
@@ -188,6 +191,7 @@
                     self.command_channel_reply = writer
 
                     self.haveui = True
+                    self.hadanyui = True
 
                 except (EOFError, OSError):
                     disconnect_client(self, fds)
@@ -200,7 +204,7 @@
             # If we don't see a UI connection within maxuiwait, its unlikely we're going to see
             # one. We have had issue with processes hanging indefinitely so timing out UI-less
             # servers is useful.
-            if not self.haveui and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
+            if not self.hadanyui and not self.xmlrpc and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
                 print("No UI connection within max timeout, exiting to avoid infinite loop.")
                 self.quit = True
 
@@ -243,6 +247,10 @@
 
         self.cooker.post_serve()
 
+        # Flush logs before we release the lock
+        sys.stdout.flush()
+        sys.stderr.flush()
+
         # Finally release the lockfile but warn about other processes holding it open
         lock = self.bitbake_lock
         lockfile = lock.name
@@ -465,23 +473,25 @@
         print(self.start_log_format % (os.getpid(), datetime.datetime.now().strftime(self.start_log_datetime_format)))
         sys.stdout.flush()
 
-        server = ProcessServer(self.bitbake_lock, self.sock, self.sockname)
-        self.configuration.setServerRegIdleCallback(server.register_idle_function)
-        os.close(self.readypipe)
-        writer = ConnectionWriter(self.readypipein)
         try:
-            self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
-        except bb.BBHandledException:
-            return None
-        writer.send("r")
-        writer.close()
-        server.cooker = self.cooker
-        server.server_timeout = self.configuration.server_timeout
-        server.xmlrpcinterface = self.configuration.xmlrpcinterface
-        print("Started bitbake server pid %d" % os.getpid())
-        sys.stdout.flush()
+            server = ProcessServer(self.bitbake_lock, self.sock, self.sockname, self.configuration.server_timeout, self.configuration.xmlrpcinterface)
+            os.close(self.readypipe)
+            writer = ConnectionWriter(self.readypipein)
+            try:
+                self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset, server.register_idle_function)
+            except bb.BBHandledException:
+                return None
+            writer.send("r")
+            writer.close()
+            server.cooker = self.cooker
+            print("Started bitbake server pid %d" % os.getpid())
+            sys.stdout.flush()
 
-        server.start()
+            server.run()
+        finally:
+            # Flush any ,essages/errors to the logfile before exit
+            sys.stdout.flush()
+            sys.stderr.flush()
 
 def connectProcessServer(sockname, featureset):
     # Connect to socket
diff --git a/poky/bitbake/lib/bb/tests/color.py b/poky/bitbake/lib/bb/tests/color.py
new file mode 100644
index 0000000..bf03750
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/color.py
@@ -0,0 +1,95 @@
+#
+# BitBake Test for ANSI color code filtering
+#
+# Copyright (C) 2020  Agilent Technologies, Inc.
+# Author: Chris Laplante <chris.laplante@agilent.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+import unittest
+import bb.progress
+import bb.data
+import bb.event
+from bb.progress import filter_color, filter_color_n
+import io
+import re
+
+
+class ProgressWatcher:
+    def __init__(self):
+        self._reports = []
+
+    def handle_event(self, event):
+        self._reports.append((event.progress, event.rate))
+
+    def reports(self):
+        return self._reports
+
+
+class ColorCodeTests(unittest.TestCase):
+    def setUp(self):
+        self.d = bb.data.init()
+        self._progress_watcher = ProgressWatcher()
+        bb.event.register("bb.build.TaskProgress", self._progress_watcher.handle_event)
+
+    def tearDown(self):
+        bb.event.remove("bb.build.TaskProgress", None)
+
+    def test_filter_color(self):
+        input_string = "~~~~~~~~~~~~^~~~~~~~"
+        filtered = filter_color(input_string)
+        self.assertEqual(filtered, "~~~~~~~~~~~~^~~~~~~~")
+
+    def test_filter_color_n(self):
+        input_string = "~~~~~~~~~~~~^~~~~~~~"
+        filtered, code_count = filter_color_n(input_string)
+        self.assertEqual(filtered, "~~~~~~~~~~~~^~~~~~~~")
+        self.assertEqual(code_count, 4)
+
+    def test_LineFilterProgressHandler_color_filtering(self):
+        class CustomProgressHandler(bb.progress.LineFilterProgressHandler):
+            PROGRESS_REGEX = re.compile(r"Progress: (?P<progress>\d+)%")
+
+            def writeline(self, line):
+                match = self.PROGRESS_REGEX.match(line)
+                if match:
+                    self.update(int(match.group("progress")))
+                    return False
+                return True
+
+        buffer = io.StringIO()
+        handler = CustomProgressHandler(self.d, buffer)
+        handler.write("Program output!\n")
+        handler.write("More output!\n")
+        handler.write("Progress: 10%\n") # 10%
+        handler.write("Even more\n")
+        handler.write("Progress: 50%\n") # 50%
+        handler.write("Progress: 60%\n") # 60%
+        handler.write("Progress: 100%\n") # 100%
+
+        expected = [(10, None), (50, None), (60, None), (100, None)]
+        self.assertEqual(self._progress_watcher.reports(), expected)
+
+        self.assertEqual(buffer.getvalue(), "Program output!\nMore output!\nEven more\n")
+
+    def test_BasicProgressHandler_color_filtering(self):
+        buffer = io.StringIO()
+        handler = bb.progress.BasicProgressHandler(self.d, outfile=buffer)
+        handler.write("1%\n") # 1%
+        handler.write("2%\n") # 2%
+        handler.write("10%\n") # 10%
+        handler.write("100%\n") # 100%
+
+        expected = [(0, None), (1, None), (2, None), (10, None), (100, None)]
+        self.assertListEqual(self._progress_watcher.reports(), expected)
+
+    def test_OutOfProgressHandler_color_filtering(self):
+        buffer = io.StringIO()
+        handler = bb.progress.OutOfProgressHandler(self.d, r'(\d+) of (\d+)', outfile=buffer)
+        handler.write("Text text 1 of 5") # 1/5
+        handler.write("Text text 3 of 5") # 3/5
+        handler.write("Text text 5 of 5") # 5/5
+
+        expected = [(0, None), (20.0, None), (60.0, None), (100.0, None)]
+        self.assertListEqual(self._progress_watcher.reports(), expected)
diff --git a/poky/documentation/bsp-guide/bsp.xml b/poky/documentation/bsp-guide/bsp.xml
index 72a077e..f5c3f31 100644
--- a/poky/documentation/bsp-guide/bsp.xml
+++ b/poky/documentation/bsp-guide/bsp.xml
@@ -2158,7 +2158,7 @@
                     <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_BOOT_FILES'><filename>IMAGE_BOOT_FILES</filename></ulink>:
                     Files installed into the device's boot partition
                     when preparing the image using the Wic tool
-                    with the <filename>bootimg-partition</filename>
+                    with the <filename>bootimg-partition</filename> or <filename>bootimg-efi</filename>
                     source plugin.
                     </para></listitem>
             </itemizedlist>
diff --git a/poky/documentation/ref-manual/ref-classes.xml b/poky/documentation/ref-manual/ref-classes.xml
index ab12373..1dcd5fd 100644
--- a/poky/documentation/ref-manual/ref-classes.xml
+++ b/poky/documentation/ref-manual/ref-classes.xml
@@ -1880,8 +1880,82 @@
 
     <para>
         The <filename>kernel-fitimage</filename> class provides support to
-        pack zImages.
+        pack a kernel Image, device trees and a RAM disk into a single
+        FIT image. In theory, a FIT image can support any number of kernels,
+        RAM disks and device-trees.
+        However, <filename>kernel-fitimage</filename> currently only supports
+        limited usescases: just one kernel image, an optional RAM disk, and
+        any number of device tree.
     </para>
+
+    <para>
+        To create a FIT image, it is required that
+        <filename><link linkend='var-KERNEL_CLASSES'>KERNEL_CLASSES</link></filename>
+        is set to "kernel-fitimage" and
+        <filename><link linkend='var-KERNEL_IMAGETYPE'>KERNEL_IMAGETYPE</link></filename>
+        is set to "fitImage".
+    </para>
+
+    <para>
+        The options for the device tree compiler passed to mkimage -D feature
+        when creating the FIT image are specified using the
+        <filename><link linkend='var-UBOOT_MKIMAGE_DTCOPTS'>UBOOT_MKIMAGE_DTCOPTS</link></filename>
+        variable.
+    </para>
+
+    <para>
+        Only a single kernel can be added to the FIT image created by
+        <filename>kernel-fitimage</filename> and the kernel image in FIT is
+        mandatory.
+        The address where the kernel image is to be loaded by U-boot is
+        specified by
+        <filename><link linkend='var-UBOOT_LOADADDRESS'>UBOOT_LOADADDRESS</link></filename>
+        and the entrypoint by
+        <filename><link linkend='var-UBOOT_ENTRYPOINT'>UBOOT_ENTRYPOINT</link></filename>.
+    </para>
+
+    <para>
+        Multiple device trees can be added to the FIT image created by
+        <filename>kernel-fitimage</filename> and the device tree is optional.
+        The address where the device tree is to be loaded by U-boot is
+        specified by
+        <filename><link linkend='var-UBOOT_DTBO_LOADADDRESS'>UBOOT_DTBO_LOADADDRESS</link></filename>
+        for device tree overlays and by
+        <filename><link linkend='var-UBOOT_DTB_LOADADDRESS'>UBOOT_DTB_LOADADDRESS</link></filename>
+        for device tree binaries.
+    </para>
+
+    <para>
+        Only a single RAM disk can be added to the FIT image created by
+        <filename>kernel-fitimage</filename> and the RAM disk in FIT is
+        optional.
+        The address where the RAM disk image is to be loaded by U-boot
+        is specified by
+        <filename><link linkend='var-UBOOT_RD_LOADADDRESS'>UBOOT_RD_LOADADDRESS</link></filename>
+        and the entrypoint by
+        <filename><link linkend='var-UBOOT_RD_ENTRYPOINT'>UBOOT_RD_ENTRYPOINT</link></filename>.
+        The ramdisk is added to FIT image when
+        <filename><link linkend='var-INITRAMFS_IMAGE'>INITRAMFS_IMAGE</link></filename>
+        is specified.
+    </para>
+
+    <para>
+        The FIT image generated by <filename>kernel-fitimage</filename> class
+        is signed when the variables
+        <filename><link linkend='var-UBOOT_SIGN_ENABLE'>UBOOT_SIGN_ENABLE</link></filename>,
+        <filename><link linkend='var-UBOOT_MKIMAGE_DTCOPTS'>UBOOT_MKIMAGE_DTCOPTS</link></filename>,
+        <filename><link linkend='var-UBOOT_SIGN_KEYDIR'>UBOOT_SIGN_KEYDIR</link></filename>
+        and
+        <filename><link linkend='var-UBOOT_SIGN_KEYNAME'>UBOOT_SIGN_KEYNAME</link></filename>
+        are set appropriately.
+        The default values used for
+        <filename><link linkend='var-FIT_HASH_ALG'>FIT_HASH_ALG</link></filename>
+        and
+        <filename><link linkend='var-FIT_SIGN_ALG'>FIT_SIGN_ALG</link></filename>
+        in <filename>kernel-fitimage</filename> are "sha256" and "rsa2048"
+        respectively.
+    </para>
+
 </section>
 
 <section id='ref-classes-kernel-grub'>
diff --git a/poky/documentation/ref-manual/ref-variables.xml b/poky/documentation/ref-manual/ref-variables.xml
index 9fe744a..a506480 100644
--- a/poky/documentation/ref-manual/ref-variables.xml
+++ b/poky/documentation/ref-manual/ref-variables.xml
@@ -4991,6 +4991,30 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-FIT_HASH_ALG'><glossterm>FIT_HASH_ALG</glossterm>
+            <info>
+               FIT_HASH_ALG[doc] = "Specifies the hash algorithm used in creating the FIT Image."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Specifies the hash algorithm used in creating the FIT Image.
+                    For e.g. sha256.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-FIT_SIGN_ALG'><glossterm>FIT_SIGN_ALG</glossterm>
+            <info>
+               FIT_SIGN_ALG[doc] = "Specifies the signature algorithm used in creating the FIT Image."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Specifies the signature algorithm used in creating the FIT Image.
+                    For e.g. rsa2048.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-FONT_EXTRA_RDEPENDS'><glossterm>FONT_EXTRA_RDEPENDS</glossterm>
             <info>
                 FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
@@ -5703,7 +5727,7 @@
                 <para role="glossdeffirst">
                     A space-separated list of files installed into the
                     boot partition when preparing an image using the Wic tool
-                    with the <filename>bootimg-partition</filename> source
+                    with the <filename>bootimg-partition</filename> or <filename>bootimg-efi</filename> source
                     plugin.
                     By default, the files are installed under the same name as
                     the source files.
@@ -15960,6 +15984,38 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-UBOOT_DTB_LOADADDRESS'><glossterm>UBOOT_DTB_LOADADDRESS</glossterm>
+            <info>
+               UBOOT_DTB_LOADADDRESS[doc] = "Specifies the load address for the dtb."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Specifies the load address for the dtb image used by U-boot.
+                    During FIT image creation, the
+                    <filename>UBOOT_DTB_LOADADDRESS</filename> variable is used
+                    in <filename>kernel-fitimage</filename> class to specify the
+                    load address to be used in creating the dtb sections of
+                    Image Tree Source for the FIT image.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-UBOOT_DTBO_LOADADDRESS'><glossterm>UBOOT_DTBO_LOADADDRESS</glossterm>
+            <info>
+               UBOOT_DTBO_LOADADDRESS[doc] = "Specifies the load address for the dtbo."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Specifies the load address for the dtbo image used by U-boot.
+                    During FIT image creation, the
+                    <filename>UBOOT_DTBO_LOADADDRESS</filename> variable is used
+                    in <filename>kernel-fitimage</filename> class to specify the
+                    load address to be used in creating the dtbo sections of
+                    Image Tree Source for the FIT image.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm>UBOOT_ENTRYPOINT</glossterm>
             <info>
                UBOOT_ENTRYPOINT[doc] = "Specifies the entry point for the U-Boot image."
@@ -16045,6 +16101,51 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-UBOOT_MKIMAGE_DTCOPTS'><glossterm>UBOOT_MKIMAGE_DTCOPTS</glossterm>
+            <info>
+               UBOOT_MKIMAGE_DTCOPTS[doc] = "Options for the device tree compiler passed to mkimage '-D' feature."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Options for the device tree compiler passed to mkimage '-D'
+                    feature while creating FIT image in
+                    <filename>kernel-fitimage</filename> class.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-UBOOT_RD_LOADADDRESS'><glossterm>UBOOT_RD_LOADADDRESS</glossterm>
+            <info>
+               UBOOT_RD_LOADADDRESS[doc] = "Specifies the load address for the ramdisk image."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Specifies the load address for the RAM disk image.
+                    During FIT image creation, the
+                    <filename>UBOOT_RD_LOADADDRESS</filename> variable is used
+                    in <filename>kernel-fitimage</filename> class to specify the
+                    load address to be used in creating the Image Tree Source for
+                    the FIT image.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-UBOOT_RD_ENTRYPOINT'><glossterm>UBOOT_RD_ENTRYPOINT</glossterm>
+            <info>
+               UBOOT_RD_ENTRYPOINT[doc] = "Specifies the entrypoint for the ramdisk image."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Specifies the entrypoint for the RAM disk image.
+                    During FIT image creation, the
+                    <filename>UBOOT_RD_ENTRYPOINT</filename> variable is used
+                    in <filename>kernel-fitimage</filename> class to specify the
+                    entrypoint to be used in creating the Image Tree Source for
+                    the FIT image.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-UBOOT_SUFFIX'><glossterm>UBOOT_SUFFIX</glossterm>
             <info>
                UBOOT_SUFFIX[doc] = "Points to the generated U-Boot extension."
@@ -16063,6 +16164,47 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-UBOOT_SIGN_ENABLE'><glossterm>UBOOT_SIGN_ENABLE</glossterm>
+            <info>
+               UBOOT_SIGN_KEYDIR[doc] = "Enable signing of FIT image."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Enable signing of FIT image. The default value is "0".
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-UBOOT_SIGN_KEYDIR'><glossterm>UBOOT_SIGN_KEYDIR</glossterm>
+            <info>
+               UBOOT_SIGN_KEYDIR[doc] = "Location of the directory containing the RSA key and certificate used for signing FIT image."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    Location of the directory containing the RSA key and
+                    certificate used for signing FIT image.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-UBOOT_SIGN_KEYNAME'><glossterm>UBOOT_SIGN_KEYNAME</glossterm>
+            <info>
+               UBOOT_SIGN_KEYNAME[doc] = "The name of keys used for signing U-boot FIT image"
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+                    The name of keys used for signing U-boot FIT image stored in
+                    <filename><link linkend='var-UBOOT_SIGN_KEYDIR'>UBOOT_SIGN_KEYDIR</link></filename>
+                    directory. For e.g. dev.key key and dev.crt certificate
+                    stored in
+                    <filename><link linkend='var-UBOOT_SIGN_KEYDIR'>UBOOT_SIGN_KEYDIR</link></filename>
+                    directory will have
+                    <filename><link linkend='var-UBOOT_SIGN_KEYNAME'>UBOOT_SIGN_KEYNAME</link></filename>
+                    set to "dev".
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-UBOOT_TARGET'><glossterm>UBOOT_TARGET</glossterm>
             <info>
                UBOOT_TARGET[doc] = "Specifies the target used for building U-Boot."
diff --git a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend
index 6267485..2c73eb2 100644
--- a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend
+++ b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend
@@ -7,17 +7,17 @@
 KMACHINE_genericx86-64 ?= "common-pc-64"
 KMACHINE_beaglebone-yocto ?= "beaglebone"
 
-SRCREV_machine_genericx86 ?= "ec485bd4afef57715eb45ba331b04b3f941e43bb"
-SRCREV_machine_genericx86-64 ?= "ec485bd4afef57715eb45ba331b04b3f941e43bb"
-SRCREV_machine_edgerouter ?= "ec485bd4afef57715eb45ba331b04b3f941e43bb"
-SRCREV_machine_beaglebone-yocto ?= "ec485bd4afef57715eb45ba331b04b3f941e43bb"
+SRCREV_machine_genericx86 ?= "9fc2fb2e73466a520ee9a3c48b3ca2f5b21415dc"
+SRCREV_machine_genericx86-64 ?= "9fc2fb2e73466a520ee9a3c48b3ca2f5b21415dc"
+SRCREV_machine_edgerouter ?= "9fc2fb2e73466a520ee9a3c48b3ca2f5b21415dc"
+SRCREV_machine_beaglebone-yocto ?= "9fc2fb2e73466a520ee9a3c48b3ca2f5b21415dc"
 
 COMPATIBLE_MACHINE_genericx86 = "genericx86"
 COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
 COMPATIBLE_MACHINE_edgerouter = "edgerouter"
 COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
 
-LINUX_VERSION_genericx86 = "5.4.49"
-LINUX_VERSION_genericx86-64 = "5.4.49"
-LINUX_VERSION_edgerouter = "5.4.49"
-LINUX_VERSION_beaglebone-yocto = "5.4.49"
+LINUX_VERSION_genericx86 = "5.4.54"
+LINUX_VERSION_genericx86-64 = "5.4.54"
+LINUX_VERSION_edgerouter = "5.4.54"
+LINUX_VERSION_beaglebone-yocto = "5.4.54"
diff --git a/poky/meta/classes/buildhistory.bbclass b/poky/meta/classes/buildhistory.bbclass
index a4288ef..805e976 100644
--- a/poky/meta/classes/buildhistory.bbclass
+++ b/poky/meta/classes/buildhistory.bbclass
@@ -429,8 +429,8 @@
     from oe.sdk import sdk_list_installed_packages
     from oe.utils import format_pkg_list
 
-    process_list = [('file', 'bh_installed_pkgs.txt'),\
-                    ('deps', 'bh_installed_pkgs_deps.txt')]
+    process_list = [('file', 'bh_installed_pkgs_%s.txt' % os.getpid()),\
+                    ('deps', 'bh_installed_pkgs_deps_%s.txt' % os.getpid())]
 
     if rootfs_type == "image":
         pkgs = image_list_installed_packages(d)
@@ -460,9 +460,10 @@
 
 	# Get list of installed packages
 	pkgcache="$1/installed-packages.tmp"
-	cat ${WORKDIR}/bh_installed_pkgs.txt | sort > $pkgcache && rm ${WORKDIR}/bh_installed_pkgs.txt
+	cat ${WORKDIR}/bh_installed_pkgs_${PID}.txt | sort > $pkgcache && rm ${WORKDIR}/bh_installed_pkgs_${PID}.txt
 
 	cat $pkgcache | awk '{ print $1 }' > $1/installed-package-names.txt
+
 	if [ -s $pkgcache ] ; then
 		cat $pkgcache | awk '{ print $2 }' | xargs -n1 basename > $1/installed-packages.txt
 	else
@@ -471,8 +472,8 @@
 
 	# Produce dependency graph
 	# First, quote each name to handle characters that cause issues for dot
-	sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp &&
-		rm ${WORKDIR}/bh_installed_pkgs_deps.txt
+	sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps_${PID}.txt > $1/depends.tmp &&
+		rm ${WORKDIR}/bh_installed_pkgs_deps_${PID}.txt
 	# Remove lines with rpmlib(...) and config(...) dependencies, change the
 	# delimiter from pipe to "->", set the style for recommend lines and
 	# turn versioned dependencies into edge labels.
diff --git a/poky/meta/classes/cmake.bbclass b/poky/meta/classes/cmake.bbclass
index 8243f7c..7c055e8 100644
--- a/poky/meta/classes/cmake.bbclass
+++ b/poky/meta/classes/cmake.bbclass
@@ -21,23 +21,6 @@
         d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+")
     else:
         bb.fatal("Unknown CMake Generator %s" % generator)
-
-    # C/C++ Compiler (without cpu arch/tune arguments)
-    if not d.getVar('OECMAKE_C_COMPILER'):
-        cc_list = d.getVar('CC').split()
-        if cc_list[0] == 'ccache':
-            d.setVar('OECMAKE_C_COMPILER_LAUNCHER', cc_list[0])
-            d.setVar('OECMAKE_C_COMPILER', cc_list[1])
-        else:
-            d.setVar('OECMAKE_C_COMPILER', cc_list[0])
-
-    if not d.getVar('OECMAKE_CXX_COMPILER'):
-        cxx_list = d.getVar('CXX').split()
-        if cxx_list[0] == 'ccache':
-            d.setVar('OECMAKE_CXX_COMPILER_LAUNCHER', cxx_list[0])
-            d.setVar('OECMAKE_CXX_COMPILER', cxx_list[1])
-        else:
-            d.setVar('OECMAKE_CXX_COMPILER', cxx_list[0])
 }
 OECMAKE_AR ?= "${AR}"
 
@@ -51,8 +34,23 @@
 CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
 CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
 
-OECMAKE_C_COMPILER_LAUNCHER ?= ""
-OECMAKE_CXX_COMPILER_LAUNCHER ?= ""
+def oecmake_map_compiler(compiler, d):
+    args = d.getVar(compiler).split()
+    if args[0] == "ccache":
+        return args[1], args[0]
+    return args[0], ""
+
+# C/C++ Compiler (without cpu arch/tune arguments)
+OECMAKE_C_COMPILER ?= "${@oecmake_map_compiler('CC', d)[0]}"
+OECMAKE_C_COMPILER_LAUNCHER ?= "${@oecmake_map_compiler('CC', d)[1]}"
+OECMAKE_CXX_COMPILER ?= "${@oecmake_map_compiler('CXX', d)[0]}"
+OECMAKE_CXX_COMPILER_LAUNCHER ?= "${@oecmake_map_compiler('CXX', d)[1]}"
+
+# clear compiler vars for allarch to avoid sig hash difference
+OECMAKE_C_COMPILER_allarch = ""
+OECMAKE_C_COMPILER_LAUNCHER_allarch = ""
+OECMAKE_CXX_COMPILER_allarch = ""
+OECMAKE_CXX_COMPILER_LAUNCHER_allarch = ""
 
 OECMAKE_RPATH ?= ""
 OECMAKE_PERLNATIVE_DIR ??= ""
diff --git a/poky/meta/classes/cml1.bbclass b/poky/meta/classes/cml1.bbclass
index 8ab2405..9b9866f 100644
--- a/poky/meta/classes/cml1.bbclass
+++ b/poky/meta/classes/cml1.bbclass
@@ -27,12 +27,16 @@
 TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
 
 KCONFIG_CONFIG_COMMAND ??= "menuconfig"
+KCONFIG_CONFIG_ROOTDIR ??= "${B}"
 python do_menuconfig() {
     import shutil
 
+    config = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config")
+    configorig = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config.orig")
+
     try:
-        mtime = os.path.getmtime(".config")
-        shutil.copy(".config", ".config.orig")
+        mtime = os.path.getmtime(config)
+        shutil.copy(config, configorig)
     except OSError:
         mtime = 0
 
@@ -42,7 +46,7 @@
     # FIXME this check can be removed when the minimum bitbake version has been bumped
     if hasattr(bb.build, 'write_taint'):
         try:
-            newmtime = os.path.getmtime(".config")
+            newmtime = os.path.getmtime(config)
         except OSError:
             newmtime = 0
 
@@ -52,7 +56,7 @@
 }
 do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
 do_menuconfig[nostamp] = "1"
-do_menuconfig[dirs] = "${B}"
+do_menuconfig[dirs] = "${KCONFIG_CONFIG_ROOTDIR}"
 addtask menuconfig after do_configure
 
 python do_diffconfig() {
@@ -61,8 +65,8 @@
 
     workdir = d.getVar('WORKDIR')
     fragment = workdir + '/fragment.cfg'
-    configorig = '.config.orig'
-    config = '.config'
+    configorig = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config.orig")
+    config = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config")
 
     try:
         md5newconfig = bb.utils.md5_file(configorig)
@@ -85,5 +89,5 @@
 }
 
 do_diffconfig[nostamp] = "1"
-do_diffconfig[dirs] = "${B}"
+do_diffconfig[dirs] = "${KCONFIG_CONFIG_ROOTDIR}"
 addtask diffconfig
diff --git a/poky/meta/classes/gtk-icon-cache.bbclass b/poky/meta/classes/gtk-icon-cache.bbclass
index dd394af2..340a283 100644
--- a/poky/meta/classes/gtk-icon-cache.bbclass
+++ b/poky/meta/classes/gtk-icon-cache.bbclass
@@ -1,5 +1,10 @@
 FILES_${PN} += "${datadir}/icons/hicolor"
 
+#gtk+3 reqiure GTK3DISTROFEATURES, DEPENDS on it make all the
+#recipes inherit this class require GTK3DISTROFEATURES
+inherit features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
 DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} \
             ${@['gdk-pixbuf', '']['${BPN}' == 'gdk-pixbuf']} \
             ${@['gtk+3', '']['${BPN}' == 'gtk+3']} \
diff --git a/poky/meta/classes/kernel-devicetree.bbclass b/poky/meta/classes/kernel-devicetree.bbclass
index 522c465..81dda80 100644
--- a/poky/meta/classes/kernel-devicetree.bbclass
+++ b/poky/meta/classes/kernel-devicetree.bbclass
@@ -52,7 +52,7 @@
 do_compile_append() {
 	for dtbf in ${KERNEL_DEVICETREE}; do
 		dtb=`normalize_dtb "$dtbf"`
-		oe_runmake $dtb
+		oe_runmake $dtb CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
 	done
 }
 
diff --git a/poky/meta/classes/kernel-fitimage.bbclass b/poky/meta/classes/kernel-fitimage.bbclass
index 72b05ff..fa4ea6f 100644
--- a/poky/meta/classes/kernel-fitimage.bbclass
+++ b/poky/meta/classes/kernel-fitimage.bbclass
@@ -257,12 +257,21 @@
 	# Test if we have any DTBs at all
 	sep=""
 	conf_desc=""
+	conf_node="conf@"
 	kernel_line=""
 	fdt_line=""
 	ramdisk_line=""
 	setup_line=""
 	default_line=""
 
+	# conf node name is selected based on dtb ID if it is present,
+	# otherwise its selected based on kernel ID
+	if [ -n "${3}" ]; then
+		conf_node=$conf_node${3}
+	else
+		conf_node=$conf_node${2}
+	fi
+
 	if [ -n "${2}" ]; then
 		conf_desc="Linux kernel"
 		sep=", "
@@ -287,12 +296,18 @@
 	fi
 
 	if [ "${6}" = "1" ]; then
-		default_line="default = \"conf@${3}\";"
+		# default node is selected based on dtb ID if it is present,
+		# otherwise its selected based on kernel ID
+		if [ -n "${3}" ]; then
+			default_line="default = \"conf@${3}\";"
+		else
+			default_line="default = \"conf@${2}\";"
+		fi
 	fi
 
 	cat << EOF >> ${1}
                 ${default_line}
-                conf@${3} {
+                $conf_node {
 			description = "${6} ${conf_desc}";
 			${kernel_line}
 			${fdt_line}
@@ -434,6 +449,13 @@
 	#
 	fitimage_emit_section_maint ${1} confstart
 
+	# kernel-fitimage.bbclass currently only supports a single kernel (no less or
+	# more) to be added to the FIT image along with 0 or more device trees and
+	# 0 or 1 ramdisk.
+	# If a device tree is to be part of the FIT image, then select
+	# the default configuration to be used is based on the dtbcount. If there is
+	# no dtb present than select the default configuation to be based on
+	# the kernelcount.
 	if [ -n "${DTBS}" ]; then
 		i=1
 		for DTB in ${DTBS}; do
@@ -445,6 +467,9 @@
 			fi
 			i=`expr ${i} + 1`
 		done
+	else
+		defaultconfigcount=1
+		fitimage_emit_section_config ${1} "${kernelcount}" "" "${ramdiskcount}" "${setupcount}" "${defaultconfigcount}"
 	fi
 
 	fitimage_emit_section_maint ${1} sectend
diff --git a/poky/meta/classes/kernel-yocto.bbclass b/poky/meta/classes/kernel-yocto.bbclass
index 3311f6e..96ea612 100644
--- a/poky/meta/classes/kernel-yocto.bbclass
+++ b/poky/meta/classes/kernel-yocto.bbclass
@@ -87,6 +87,13 @@
 
 do_kernel_metadata() {
 	set +e
+
+	if [ -n "$1" ]; then
+		mode="$1"
+	else
+		mode="patch"
+	fi
+
 	cd ${S}
 	export KMETA=${KMETA}
 
@@ -120,14 +127,13 @@
 	if [ -n "${KBUILD_DEFCONFIG}" ]; then
 		if [ -f "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" ]; then
 			if [ -f "${WORKDIR}/defconfig" ]; then
-				# If the two defconfig's are different, warn that we didn't overwrite the
-				# one already placed in WORKDIR by the fetcher.
+				# If the two defconfig's are different, warn that we overwrote the
+				# one already placed in WORKDIR
 				cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}"
 				if [ $? -ne 0 ]; then
-					bbwarn "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
-				else
-					cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
+					bbdebug 1 "detected SRC_URI or unpatched defconfig in WORKDIR. ${KBUILD_DEFCONFIG} copied over it"
 				fi
+				cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
 			else
 				cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
 			fi
@@ -137,17 +143,19 @@
 		fi
 	fi
 
-	# was anyone trying to patch the kernel meta data ?, we need to do
-	# this here, since the scc commands migrate the .cfg fragments to the
-	# kernel source tree, where they'll be used later.
-	check_git_config
-	patches="${@" ".join(find_patches(d,'kernel-meta'))}"
-	for p in $patches; do
-	    (
-		cd ${WORKDIR}/kernel-meta
-		git am -s $p
-	    )
-	done
+	if [ "$mode" = "patch" ]; then
+		# was anyone trying to patch the kernel meta data ?, we need to do
+		# this here, since the scc commands migrate the .cfg fragments to the
+		# kernel source tree, where they'll be used later.
+		check_git_config
+		patches="${@" ".join(find_patches(d,'kernel-meta'))}"
+		for p in $patches; do
+		    (
+			cd ${WORKDIR}/kernel-meta
+			git am -s $p
+		    )
+		done
+	fi
 
 	sccs_from_src_uri="${@" ".join(find_sccs(d))}"
 	patches="${@" ".join(find_patches(d,''))}"
@@ -212,13 +220,40 @@
 	fi
 	meta_dir=$(kgit --meta)
 
-	# run1: pull all the configuration fragments, no matter where they come from
-	elements="`echo -n ${bsp_definition} $sccs_defconfig ${sccs} ${patches} ${KERNEL_FEATURES}`"
-	if [ -n "${elements}" ]; then
-		echo "${bsp_definition}" > ${S}/${meta_dir}/bsp_definition
-		scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition $sccs $patches ${KERNEL_FEATURES}
-		if [ $? -ne 0 ]; then
-			bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+	KERNEL_FEATURES_FINAL=""
+	if [ -n "${KERNEL_FEATURES}" ]; then
+		for feature in ${KERNEL_FEATURES}; do
+			feature_found=f
+			for d in $includes; do
+				path_to_check=$(echo $d | sed 's/-I//g')
+				if [ "$feature_found" = "f" ] && [ -e "$path_to_check/$feature" ]; then
+				    feature_found=t
+				fi
+			done
+			if [ "$feature_found" = "f" ]; then
+				if [ -n "${KERNEL_DANGLING_FEATURES_WARN_ONLY}" ]; then
+				    bbwarn "Feature '$feature' not found, but KERNEL_DANGLING_FEATURES_WARN_ONLY is set"
+				    bbwarn "This may cause runtime issues, dropping feature and allowing configuration to continue"
+				else
+				    bberror "Feature '$feature' not found, this will cause configuration failures."
+				    bberror "Check the SRC_URI for meta-data repositories or directories that may be missing"
+				    bbfatal_log "Set KERNEL_DANGLING_FEATURES_WARN_ONLY to ignore this issue"
+				fi
+			else
+				KERNEL_FEATURES_FINAL="$KERNEL_FEATURES_FINAL $feature"
+			fi
+		done
+        fi
+
+	if [ "$mode" = "config" ]; then
+		# run1: pull all the configuration fragments, no matter where they come from
+		elements="`echo -n ${bsp_definition} $sccs_defconfig ${sccs} ${patches} $KERNEL_FEATURES_FINAL`"
+		if [ -n "${elements}" ]; then
+			echo "${bsp_definition}" > ${S}/${meta_dir}/bsp_definition
+			scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition $sccs $patches $KERNEL_FEATURES_FINAL
+			if [ $? -ne 0 ]; then
+				bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+			fi
 		fi
 	fi
 
@@ -229,12 +264,14 @@
 		sccs="${bsp_definition} ${sccs}"
 	fi
 
-	# run2: only generate patches for elements that have been passed on the SRC_URI
-	elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
-	if [ -n "${elements}" ]; then
-		scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES}
-		if [ $? -ne 0 ]; then
-			bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+	if [ "$mode" = "patch" ]; then
+		# run2: only generate patches for elements that have been passed on the SRC_URI
+		elements="`echo -n ${sccs} ${patches} $KERNEL_FEATURES_FINAL`"
+		if [ -n "${elements}" ]; then
+			scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} $KERNEL_FEATURES_FINAL
+			if [ $? -ne 0 ]; then
+				bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
+			fi
 		fi
 	fi
 }
@@ -338,6 +375,8 @@
 do_kernel_configme[depends] += "kern-tools-native:do_populate_sysroot"
 do_kernel_configme[dirs] += "${S} ${B}"
 do_kernel_configme() {
+	do_kernel_metadata config
+
 	# translate the kconfig_mode into something that merge_config.sh
 	# understands
 	case ${KCONFIG_MODE} in
@@ -380,6 +419,67 @@
 }
 
 addtask kernel_configme before do_configure after do_patch
+addtask config_analysis
+
+do_config_analysis[depends] = "virtual/kernel:do_configure"
+do_config_analysis[depends] += "kern-tools-native:do_populate_sysroot"
+
+CONFIG_AUDIT_FILE ?= "${WORKDIR}/config-audit.txt"
+CONFIG_ANALYSIS_FILE ?= "${WORKDIR}/config-analysis.txt"
+
+python do_config_analysis() {
+    import re, string, sys, subprocess
+
+    s = d.getVar('S')
+
+    env = os.environ.copy()
+    env['PATH'] = "%s:%s%s" % (d.getVar('PATH'), s, "/scripts/util/")
+    env['LD'] = d.getVar('KERNEL_LD')
+    env['CC'] = d.getVar('KERNEL_CC')
+    env['ARCH'] = d.getVar('ARCH')
+    env['srctree'] = s
+
+    # read specific symbols from the kernel recipe or from local.conf
+    # i.e.: CONFIG_ANALYSIS_pn-linux-yocto-dev = 'NF_CONNTRACK LOCALVERSION'
+    config = d.getVar( 'CONFIG_ANALYSIS' )
+    if not config:
+       config = [ "" ]
+    else:
+       config = config.split()
+
+    for c in config:
+        for action in ["analysis","audit"]:
+            if action == "analysis":
+                try:
+                    analysis = subprocess.check_output(['symbol_why.py', '--dotconfig',  '{}'.format( d.getVar('B') + '/.config' ), '--blame', c], cwd=s, env=env ).decode('utf-8')
+                except subprocess.CalledProcessError as e:
+                    bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
+
+                outfile = d.getVar( 'CONFIG_ANALYSIS_FILE' )
+
+            if action == "audit":
+                try:
+                    analysis = subprocess.check_output(['symbol_why.py', '--dotconfig',  '{}'.format( d.getVar('B') + '/.config' ), '--summary', '--extended', '--sanity', c], cwd=s, env=env ).decode('utf-8')
+                except subprocess.CalledProcessError as e:
+                    bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
+
+                outfile = d.getVar( 'CONFIG_AUDIT_FILE' )
+
+            if c:
+                outdir = os.path.dirname( outfile )
+                outname = os.path.basename( outfile )
+                outfile = outdir + '/'+ c + '-' + outname
+
+            if config and os.path.isfile(outfile):
+                os.remove(outfile)
+
+            with open(outfile, 'w+') as f:
+                f.write( analysis )
+
+            bb.warn( "Configuration {} executed, see: {} for details".format(action,outfile ))
+            if c:
+                bb.warn( analysis )
+}
 
 python do_kernel_configcheck() {
     import re, string, sys, subprocess
@@ -389,57 +489,89 @@
     # meta-series for processing
     kmeta = d.getVar("KMETA") or "meta"
     if not os.path.exists(kmeta):
-        kmeta = "." + kmeta
+        kmeta = subprocess.check_output(['kgit', '--meta'], cwd=d.getVar('S')).decode('utf-8').rstrip()
 
     s = d.getVar('S')
 
     env = os.environ.copy()
     env['PATH'] = "%s:%s%s" % (d.getVar('PATH'), s, "/scripts/util/")
-    env['LD'] = "${KERNEL_LD}"
+    env['LD'] = d.getVar('KERNEL_LD')
+    env['CC'] = d.getVar('KERNEL_CC')
+    env['ARCH'] = d.getVar('ARCH')
+    env['srctree'] = s
 
     try:
         configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8')
     except subprocess.CalledProcessError as e:
         bb.fatal( "Cannot gather config fragments for audit: %s" % e.output.decode("utf-8") )
 
-    try:
-        subprocess.check_call(['kconf_check', '--report', '-o',
-                '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env)
-    except subprocess.CalledProcessError:
-        # The configuration gathering can return different exit codes, but
-        # we interpret them based on the KCONF_AUDIT_LEVEL variable, so we catch
-        # everything here, and let the run continue.
-        pass
-
     config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0)
     bsp_check_visibility = int(d.getVar("KCONF_BSP_AUDIT_LEVEL") or 0)
 
-    # if config check visibility is non-zero, report dropped configuration values
-    mismatch_file = d.expand("${S}/%s/cfg/mismatch.txt" % kmeta)
-    if os.path.exists(mismatch_file):
-        if config_check_visibility:
-            with open (mismatch_file, "r") as myfile:
+    # if config check visibility is "1", that's the lowest level of audit. So
+    # we add the --classify option to the run, since classification will
+    # streamline the output to only report options that could be boot issues,
+    # or are otherwise required for proper operation.
+    extra_params = ""
+    if config_check_visibility == 1:
+       extra_params = "--classify"
+
+    # category #1: mismatches
+    try:
+        analysis = subprocess.check_output(['symbol_why.py', '--dotconfig',  '{}'.format( d.getVar('B') + '/.config' ), '--mismatches', extra_params], cwd=s, env=env ).decode('utf-8')
+    except subprocess.CalledProcessError as e:
+        bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
+
+    if analysis:
+        outfile = "{}/{}/cfg/mismatch.txt".format( s, kmeta )
+        if os.path.isfile(outfile):
+           os.remove(outfile)
+        with open(outfile, 'w+') as f:
+            f.write( analysis )
+
+        if config_check_visibility and os.stat(outfile).st_size > 0:
+            with open (outfile, "r") as myfile:
                 results = myfile.read()
                 bb.warn( "[kernel config]: specified values did not make it into the kernel's final configuration:\n\n%s" % results)
 
-    if bsp_check_visibility:
-        invalid_file = d.expand("${S}/%s/cfg/invalid.cfg" % kmeta)
-        if os.path.exists(invalid_file) and os.stat(invalid_file).st_size > 0:
-            with open (invalid_file, "r") as myfile:
-                results = myfile.read()
-                bb.warn( "[kernel config]: This BSP sets config options that are not offered anywhere within this kernel:\n\n%s" % results)
-        errors_file = d.expand("${S}/%s/cfg/fragment_errors.txt" % kmeta)
-        if os.path.exists(errors_file) and os.stat(errors_file).st_size > 0:
-            with open (errors_file, "r") as myfile:
-               results = myfile.read()
-               bb.warn( "[kernel config]: This BSP contains fragments with errors:\n\n%s" % results)
+    # category #2: invalid fragment elements
+    extra_params = ""
+    if bsp_check_visibility > 1:
+        extra_params = "--strict"
+    try:
+        analysis = subprocess.check_output(['symbol_why.py', '--dotconfig',  '{}'.format( d.getVar('B') + '/.config' ), '--invalid', extra_params], cwd=s, env=env ).decode('utf-8')
+    except subprocess.CalledProcessError as e:
+        bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
 
-    # if the audit level is greater than two, we report if a fragment has overriden
-    # a value from a base fragment. This is really only used for new kernel introduction
-    if bsp_check_visibility > 2:
-        redefinition_file = d.expand("${S}/%s/cfg/redefinition.txt" % kmeta)
-        if os.path.exists(redefinition_file) and os.stat(redefinition_file).st_size > 0:
-            with open (redefinition_file, "r") as myfile:
+    if analysis:
+        outfile = "{}/{}/cfg/invalid.txt".format(s,kmeta)
+        if os.path.isfile(outfile):
+           os.remove(outfile)
+        with open(outfile, 'w+') as f:
+            f.write( analysis )
+
+        if bsp_check_visibility and os.stat(outfile).st_size > 0:
+            with open (outfile, "r") as myfile:
+               results = myfile.read()
+               bb.warn( "[kernel config]: This BSP contains fragments with warnings:\n\n%s" % results)
+
+    # category #3: redefined options (this is pretty verbose and is debug only)
+    try:
+        analysis = subprocess.check_output(['symbol_why.py', '--dotconfig',  '{}'.format( d.getVar('B') + '/.config' ), '--sanity'], cwd=s, env=env ).decode('utf-8')
+    except subprocess.CalledProcessError as e:
+        bb.fatal( "config analysis failed: %s" % e.output.decode('utf-8'))
+
+    if analysis:
+        outfile = "{}/{}/cfg/redefinition.txt".format(s,kmeta)
+        if os.path.isfile(outfile):
+           os.remove(outfile)
+        with open(outfile, 'w+') as f:
+            f.write( analysis )
+
+        # if the audit level is greater than two, we report if a fragment has overriden
+        # a value from a base fragment. This is really only used for new kernel introduction
+        if bsp_check_visibility > 2 and os.stat(outfile).st_size > 0:
+            with open (outfile, "r") as myfile:
                 results = myfile.read()
                 bb.warn( "[kernel config]: This BSP has configuration options defined in more than one config, with differing values:\n\n%s" % results)
 }
diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass
index cf43a5d..e2ceb6a 100644
--- a/poky/meta/classes/kernel.bbclass
+++ b/poky/meta/classes/kernel.bbclass
@@ -212,6 +212,8 @@
 KERNEL_EXTRA_ARGS ?= ""
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+
 KERNEL_ALT_IMAGETYPE ??= ""
 
 copy_initramfs() {
diff --git a/poky/meta/classes/meson.bbclass b/poky/meta/classes/meson.bbclass
index ff52d20..83aa854 100644
--- a/poky/meta/classes/meson.bbclass
+++ b/poky/meta/classes/meson.bbclass
@@ -98,6 +98,7 @@
 readelf = ${@meson_array('READELF', d)}
 pkgconfig = 'pkg-config'
 llvm-config = 'llvm-config${LLVMVERSION}'
+cups-config = 'cups-config'
 
 [properties]
 needs_exe_wrapper = true
diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass
index f8dc1bb..7a36262 100644
--- a/poky/meta/classes/package.bbclass
+++ b/poky/meta/classes/package.bbclass
@@ -1936,7 +1936,7 @@
         shlibs_file = os.path.join(shlibswork_dir, pkg + ".list")
         if len(sonames):
             with open(shlibs_file, 'w') as fd:
-                for s in sonames:
+                for s in sorted(sonames):
                     if s[0] in shlib_provider and s[1] in shlib_provider[s[0]]:
                         (old_pkg, old_pkgver) = shlib_provider[s[0]][s[1]]
                         if old_pkg != pkg:
diff --git a/poky/meta/classes/packagefeed-stability.bbclass b/poky/meta/classes/packagefeed-stability.bbclass
deleted file mode 100644
index 5648602..0000000
--- a/poky/meta/classes/packagefeed-stability.bbclass
+++ /dev/null
@@ -1,252 +0,0 @@
-# Class to avoid copying packages into the feed if they haven't materially changed
-#
-# Copyright (C) 2015 Intel Corporation
-# Released under the MIT license (see COPYING.MIT for details)
-#
-# This class effectively intercepts packages as they are written out by
-# do_package_write_*, causing them to be written into a different
-# directory where we can compare them to whatever older packages might
-# be in the "real" package feed directory, and avoid copying the new
-# package to the feed if it has not materially changed. The idea is to
-# avoid unnecessary churn in the packages when dependencies trigger task
-# reexecution (and thus repackaging). Enabling the class is simple:
-#
-# INHERIT += "packagefeed-stability"
-#
-# Caveats:
-# 1) Latest PR values in the build system may not match those in packages
-#    seen on the target (naturally)
-# 2) If you rebuild from sstate without the existing package feed present,
-#    you will lose the "state" of the package feed i.e. the preserved old
-#    package versions. Not the end of the world, but would negate the
-#    entire purpose of this class.
-#
-# Note that running -c cleanall on a recipe will purposely delete the old
-# package files so they will definitely be copied the next time.
-
-python() {
-    if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d):
-        return
-    # Package backend agnostic intercept
-    # This assumes that the package_write task is called package_write_<pkgtype>
-    # and that the directory in which packages should be written is
-    # pointed to by the variable DEPLOY_DIR_<PKGTYPE>
-    for pkgclass in (d.getVar('PACKAGE_CLASSES') or '').split():
-        if pkgclass.startswith('package_'):
-            pkgtype = pkgclass.split('_', 1)[1]
-            pkgwritefunc = 'do_package_write_%s' % pkgtype
-            sstate_outputdirs = d.getVarFlag(pkgwritefunc, 'sstate-outputdirs', False)
-            deploydirvar = 'DEPLOY_DIR_%s' % pkgtype.upper()
-            deploydirvarref = '${' + deploydirvar + '}'
-            pkgcomparefunc = 'do_package_compare_%s' % pkgtype
-
-            if bb.data.inherits_class('image', d):
-                d.appendVarFlag('do_rootfs', 'recrdeptask', ' ' + pkgcomparefunc)
-
-            if bb.data.inherits_class('populate_sdk_base', d):
-                d.appendVarFlag('do_populate_sdk', 'recrdeptask', ' ' + pkgcomparefunc)
-
-            if bb.data.inherits_class('populate_sdk_ext', d):
-                d.appendVarFlag('do_populate_sdk_ext', 'recrdeptask', ' ' + pkgcomparefunc)
-
-            d.appendVarFlag('do_build', 'recrdeptask', ' ' + pkgcomparefunc)
-
-            if d.getVarFlag(pkgwritefunc, 'noexec') or not d.getVarFlag(pkgwritefunc, 'task'):
-                # Packaging is disabled for this recipe, we shouldn't do anything
-                continue
-
-            if deploydirvarref in sstate_outputdirs:
-                deplor_dir_pkgtype = d.expand(deploydirvarref + '-prediff')
-                # Set intermediate output directory
-                d.setVarFlag(pkgwritefunc, 'sstate-outputdirs', sstate_outputdirs.replace(deploydirvarref, deplor_dir_pkgtype))
-                # Update SSTATE_DUPWHITELIST to avoid shared location conflicted error
-                d.appendVar('SSTATE_DUPWHITELIST', ' %s' % deplor_dir_pkgtype)
-
-            d.setVar(pkgcomparefunc, d.getVar('do_package_compare', False))
-            d.setVarFlags(pkgcomparefunc, d.getVarFlags('do_package_compare', False))
-            d.appendVarFlag(pkgcomparefunc, 'depends', ' build-compare-native:do_populate_sysroot')
-            bb.build.addtask(pkgcomparefunc, 'do_build', 'do_packagedata ' + pkgwritefunc, d)
-}
-
-# This isn't the real task function - it's a template that we use in the
-# anonymous python code above
-fakeroot python do_package_compare () {
-    currenttask = d.getVar('BB_CURRENTTASK')
-    pkgtype = currenttask.rsplit('_', 1)[1]
-    package_compare_impl(pkgtype, d)
-}
-
-def package_compare_impl(pkgtype, d):
-    import errno
-    import fnmatch
-    import glob
-    import subprocess
-    import oe.sstatesig
-
-    pn = d.getVar('PN')
-    deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper())
-    prepath = deploydir + '-prediff/'
-
-    # Find out PKGR values are
-    pkgdatadir = d.getVar('PKGDATA_DIR')
-    packages = []
-    try:
-        with open(os.path.join(pkgdatadir, pn), 'r') as f:
-            for line in f:
-                if line.startswith('PACKAGES:'):
-                    packages = line.split(':', 1)[1].split()
-                    break
-    except IOError as e:
-        if e.errno == errno.ENOENT:
-            pass
-
-    if not packages:
-        bb.debug(2, '%s: no packages, nothing to do' % pn)
-        return
-
-    pkgrvalues = {}
-    rpkgnames = {}
-    rdepends = {}
-    pkgvvalues = {}
-    for pkg in packages:
-        with open(os.path.join(pkgdatadir, 'runtime', pkg), 'r') as f:
-            for line in f:
-                if line.startswith('PKGR:'):
-                    pkgrvalues[pkg] = line.split(':', 1)[1].strip()
-                if line.startswith('PKGV:'):
-                    pkgvvalues[pkg] = line.split(':', 1)[1].strip()
-                elif line.startswith('PKG_%s:' % pkg):
-                    rpkgnames[pkg] = line.split(':', 1)[1].strip()
-                elif line.startswith('RDEPENDS_%s:' % pkg):
-                    rdepends[pkg] = line.split(':', 1)[1].strip()
-
-    # Prepare a list of the runtime package names for packages that were
-    # actually produced
-    rpkglist = []
-    for pkg, rpkg in rpkgnames.items():
-        if os.path.exists(os.path.join(pkgdatadir, 'runtime', pkg + '.packaged')):
-            rpkglist.append((rpkg, pkg))
-    rpkglist.sort(key=lambda x: len(x[0]), reverse=True)
-
-    pvu = d.getVar('PV', False)
-    if '$' + '{SRCPV}' in pvu:
-        pvprefix = pvu.split('$' + '{SRCPV}', 1)[0]
-    else:
-        pvprefix = None
-
-    pkgwritetask = 'package_write_%s' % pkgtype
-    files = []
-    docopy = False
-    manifest, _ = oe.sstatesig.sstate_get_manifest_filename(pkgwritetask, d)
-    mlprefix = d.getVar('MLPREFIX')
-    # Copy recipe's all packages if one of the packages are different to make
-    # they have the same PR.
-    with open(manifest, 'r') as f:
-        for line in f:
-            if line.startswith(prepath):
-                srcpath = line.rstrip()
-                if os.path.isfile(srcpath):
-                    destpath = os.path.join(deploydir, os.path.relpath(srcpath, prepath))
-
-                    # This is crude but should work assuming the output
-                    # package file name starts with the package name
-                    # and rpkglist is sorted by length (descending)
-                    pkgbasename = os.path.basename(destpath)
-                    pkgname = None
-                    for rpkg, pkg in rpkglist:
-                        if mlprefix and pkgtype == 'rpm' and rpkg.startswith(mlprefix):
-                            rpkg = rpkg[len(mlprefix):]
-                        if pkgbasename.startswith(rpkg):
-                            pkgr = pkgrvalues[pkg]
-                            destpathspec = destpath.replace(pkgr, '*')
-                            if pvprefix:
-                                pkgv = pkgvvalues[pkg]
-                                if pkgv.startswith(pvprefix):
-                                    pkgvsuffix = pkgv[len(pvprefix):]
-                                    if '+' in pkgvsuffix:
-                                        newpkgv = pvprefix + '*+' + pkgvsuffix.split('+', 1)[1]
-                                        destpathspec = destpathspec.replace(pkgv, newpkgv)
-                            pkgname = pkg
-                            break
-                    else:
-                        bb.warn('Unable to map %s back to package' % pkgbasename)
-                        destpathspec = destpath
-
-                    oldfile = None
-                    if not docopy:
-                        oldfiles = glob.glob(destpathspec)
-                        if oldfiles:
-                            oldfile = oldfiles[-1]
-                            result = subprocess.call(['pkg-diff.sh', oldfile, srcpath])
-                            if result != 0:
-                                docopy = True
-                                bb.note("%s and %s are different, will copy packages" % (oldfile, srcpath))
-                        else:
-                            docopy = True
-                            bb.note("No old packages found for %s, will copy packages" % pkgname)
-
-                    files.append((pkgname, pkgbasename, srcpath, destpath))
-
-    # Remove all the old files and copy again if docopy
-    if docopy:
-        bb.note('Copying packages for recipe %s' % pn)
-        pcmanifest = os.path.join(prepath, d.expand('pkg-compare-manifest-${MULTIMACH_TARGET_SYS}-${PN}'))
-        try:
-            with open(pcmanifest, 'r') as f:
-                for line in f:
-                    fn = line.rstrip()
-                    if fn:
-                        try:
-                            os.remove(fn)
-                            bb.note('Removed old package %s' % fn)
-                        except OSError as e:
-                            if e.errno == errno.ENOENT:
-                                pass
-        except IOError as e:
-            if e.errno == errno.ENOENT:
-                pass
-
-        # Create new manifest
-        with open(pcmanifest, 'w') as f:
-            for pkgname, pkgbasename, srcpath, destpath in files:
-                destdir = os.path.dirname(destpath)
-                bb.utils.mkdirhier(destdir)
-                # Remove allarch rpm pkg if it is already existed (for
-                # multilib), they're identical in theory, but sstate.bbclass
-                # copies it again, so keep align with that.
-                if os.path.exists(destpath) and pkgtype == 'rpm' \
-                        and d.getVar('PACKAGE_ARCH') == 'all':
-                    os.unlink(destpath)
-                if (os.stat(srcpath).st_dev == os.stat(destdir).st_dev):
-                    # Use a hard link to save space
-                    os.link(srcpath, destpath)
-                else:
-                    shutil.copyfile(srcpath, destpath)
-                f.write('%s\n' % destpath)
-    else:
-        bb.note('Not copying packages for recipe %s' % pn)
-
-do_cleansstate[postfuncs] += "pfs_cleanpkgs"
-python pfs_cleanpkgs () {
-    import errno
-    for pkgclass in (d.getVar('PACKAGE_CLASSES') or '').split():
-        if pkgclass.startswith('package_'):
-            pkgtype = pkgclass.split('_', 1)[1]
-            deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper())
-            prepath = deploydir + '-prediff'
-            pcmanifest = os.path.join(prepath, d.expand('pkg-compare-manifest-${MULTIMACH_TARGET_SYS}-${PN}'))
-            try:
-                with open(pcmanifest, 'r') as f:
-                    for line in f:
-                        fn = line.rstrip()
-                        if fn:
-                            try:
-                                os.remove(fn)
-                            except OSError as e:
-                                if e.errno == errno.ENOENT:
-                                    pass
-                os.remove(pcmanifest)
-            except IOError as e:
-                if e.errno == errno.ENOENT:
-                    pass
-}
diff --git a/poky/meta/classes/populate_sdk_ext.bbclass b/poky/meta/classes/populate_sdk_ext.bbclass
index fd0da16..44d99cf 100644
--- a/poky/meta/classes/populate_sdk_ext.bbclass
+++ b/poky/meta/classes/populate_sdk_ext.bbclass
@@ -653,7 +653,10 @@
 
 		# Make sure when the user sets up the environment, they also get
 		# the buildtools-tarball tools in their path.
+		echo "# Save and reset OECORE_NATIVE_SYSROOT as buildtools may change it" >> $env_setup_script
+		echo "SAVED=\"\$OECORE_NATIVE_SYSROOT\"" >> $env_setup_script
 		echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script
+		echo "OECORE_NATIVE_SYSROOT=\"\$SAVED\"" >> $env_setup_script
 	fi
 
 	# Allow bitbake environment setup to be ran as part of this sdk.
diff --git a/poky/meta/classes/rootfs-postcommands.bbclass b/poky/meta/classes/rootfs-postcommands.bbclass
index c43b9a9..984730e 100644
--- a/poky/meta/classes/rootfs-postcommands.bbclass
+++ b/poky/meta/classes/rootfs-postcommands.bbclass
@@ -1,6 +1,6 @@
 
 # Zap the root password if debug-tweaks feature is not enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}'
 
 # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
@@ -12,7 +12,7 @@
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
 
 # Create /etc/timestamp during image construction to give a reasonably sane default time setting
-ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; "
 
 # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
@@ -26,7 +26,7 @@
 APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}'
 
 # Generates test data file with data store variables expanded in json format
-ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; "
 
 # Write manifest
 IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
diff --git a/poky/meta/classes/rootfsdebugfiles.bbclass b/poky/meta/classes/rootfsdebugfiles.bbclass
index e2ba4e3..85c7ec7 100644
--- a/poky/meta/classes/rootfsdebugfiles.bbclass
+++ b/poky/meta/classes/rootfsdebugfiles.bbclass
@@ -28,7 +28,7 @@
 ROOTFS_DEBUG_FILES ?= ""
 ROOTFS_DEBUG_FILES[doc] = "Lists additional files or directories to be installed with 'cp -a' in the format 'source1 target1;source2 target2;...'"
 
-ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files ;"
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files;"
 rootfs_debug_files () {
    #!/bin/sh -e
    echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target mode; do
diff --git a/poky/meta/classes/uninative.bbclass b/poky/meta/classes/uninative.bbclass
index 70799bb..316c0f0 100644
--- a/poky/meta/classes/uninative.bbclass
+++ b/poky/meta/classes/uninative.bbclass
@@ -56,12 +56,17 @@
             # Our games with path manipulation of DL_DIR mean standard PREMIRRORS don't work
             # and we can't easily put 'chksum' into the url path from a url parameter with
             # the current fetcher url handling
-            ownmirror = d.getVar('SOURCE_MIRROR_URL')
-            if ownmirror:
-                localdata.appendVar("PREMIRRORS", " ${UNINATIVE_URL}${UNINATIVE_TARBALL} ${SOURCE_MIRROR_URL}/uninative/%s/${UNINATIVE_TARBALL}" % chksum)
+            premirrors = bb.fetch2.mirror_from_string(localdata.getVar("PREMIRRORS"))
+            for line in premirrors:
+                try:
+                    (find, replace) = line
+                except ValueError:
+                    continue
+                if find.startswith("http"):
+                    localdata.appendVar("PREMIRRORS", " ${UNINATIVE_URL}${UNINATIVE_TARBALL} %s/uninative/%s/${UNINATIVE_TARBALL}" % (replace, chksum))
 
             srcuri = d.expand("${UNINATIVE_URL}${UNINATIVE_TARBALL};sha256sum=%s" % chksum)
-            bb.note("Fetching uninative binary shim from %s" % srcuri)
+            bb.note("Fetching uninative binary shim %s (will check PREMIRRORS first)" % srcuri)
 
             fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
             fetcher.download()
diff --git a/poky/meta/conf/distro/include/distro_alias.inc b/poky/meta/conf/distro/include/distro_alias.inc
index 2f9e1b1..56055f7 100644
--- a/poky/meta/conf/distro/include/distro_alias.inc
+++ b/poky/meta/conf/distro/include/distro_alias.inc
@@ -22,7 +22,6 @@
 DISTRO_PN_ALIAS_pn-bootchart2 = "Fedora=bootchart2 Opensuse=bootchart"
 DISTRO_PN_ALIAS_pn-btrfs-tools = "Debian=btrfs-tools Fedora=btrfs-progs"
 DISTRO_PN_ALIAS_pn-build-appliance-image = "OSPDT"
-DISTRO_PN_ALIAS_pn-build-compare = "Opensuse=build-compare Fedora=build-compare"
 DISTRO_PN_ALIAS_pn-builder = "OE-Core"
 DISTRO_PN_ALIAS_pn-buildtools-tarball = "OE-Core"
 DISTRO_PN_ALIAS_pn-cdrtools = "OpenSUSE=cdrtools OSPDT"
diff --git a/poky/meta/conf/distro/include/maintainers.inc b/poky/meta/conf/distro/include/maintainers.inc
index e8d42db..c3a1f27 100644
--- a/poky/meta/conf/distro/include/maintainers.inc
+++ b/poky/meta/conf/distro/include/maintainers.inc
@@ -80,7 +80,6 @@
 RECIPE_MAINTAINER_pn-bsd-headers = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-btrfs-tools = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-build-appliance-image = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-build-compare = "Paul Eggleton <paul.eggleton@linux.intel.com>"
 RECIPE_MAINTAINER_pn-build-sysroots = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-builder = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-buildtools-extended-tarball = "Richard Purdie <richard.purdie@linuxfoundation.org>"
@@ -135,14 +134,14 @@
 RECIPE_MAINTAINER_pn-curl = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-cve-update-db-native = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER_pn-cwautomacros = "Ross Burton <ross.burton@arm.com>"
-RECIPE_MAINTAINER_pn-db = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-db = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER_pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus-glib = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus-test = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus-wait = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-debianutils = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-dejagnu = "Nathan Rossi <nathan@nathanrossi.com>"
-RECIPE_MAINTAINER_pn-depmodwrapper-cross = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-depmodwrapper-cross = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER_pn-desktop-file-utils = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-dhcp = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-diffoscope = "Joshua Watt <JPEWhacker@gmail.com>"
@@ -192,7 +191,7 @@
 RECIPE_MAINTAINER_pn-gcc-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gcc-runtime = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gcc-sanitizers = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-gcc-source-10.1.0 = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-gcc-source-10.2.0 = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-gconf = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER_pn-gcr = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-gdb = "Khem Raj <raj.khem@gmail.com>"
@@ -567,9 +566,9 @@
 RECIPE_MAINTAINER_pn-powertop = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-ppp = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-ppp-dialin = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-prelink = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-prelink = "Mark Hatle <mark.hatle@kernel.crashing.org>"
 RECIPE_MAINTAINER_pn-procps = "Alexander Kanavin <alex.kanavin@gmail.com>"
-RECIPE_MAINTAINER_pn-pseudo = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-pseudo = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER_pn-psmisc = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-psplash = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-ptest-runner = "Ross Burton <ross.burton@arm.com>"
@@ -622,7 +621,7 @@
 RECIPE_MAINTAINER_pn-rpcbind = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-rng-tools = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-rpcsvc-proto = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-rpm = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-rpm = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER_pn-rsync = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-rt-tests = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-ruby = "Ross Burton <ross.burton@arm.com>"
diff --git a/poky/meta/conf/distro/include/ptest-packagelists.inc b/poky/meta/conf/distro/include/ptest-packagelists.inc
index 1e99d4f..ce13368 100644
--- a/poky/meta/conf/distro/include/ptest-packagelists.inc
+++ b/poky/meta/conf/distro/include/ptest-packagelists.inc
@@ -21,7 +21,6 @@
     gettext-ptest \
     gzip-ptest \
     json-glib-ptest \
-    kbd-ptest \
     libconvert-asn1-perl-ptest \
     liberror-perl-ptest \
     libmodule-build-perl-ptest \
diff --git a/poky/meta/conf/distro/include/tcmode-default.inc b/poky/meta/conf/distro/include/tcmode-default.inc
index 054985c..4f29d00 100644
--- a/poky/meta/conf/distro/include/tcmode-default.inc
+++ b/poky/meta/conf/distro/include/tcmode-default.inc
@@ -18,15 +18,15 @@
 
 GCCVERSION ?= "10.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
-BINUVERSION ?= "2.34%"
+BINUVERSION ?= "2.35%"
 GDBVERSION ?= "9.%"
-GLIBCVERSION ?= "2.31%"
-LINUXLIBCVERSION ?= "5.4%"
-QEMUVERSION ?= "5.0%"
+GLIBCVERSION ?= "2.32"
+LINUXLIBCVERSION ?= "5.8%"
+QEMUVERSION ?= "5.1%"
 GOVERSION ?= "1.14%"
 # This can not use wildcards like 8.0.% since it is also used in mesa to denote
 # llvm version being used, so always bump it with llvm recipe version bump
-LLVMVERSION ?= "9.0.1"
+LLVMVERSION ?= "10.0.1"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
diff --git a/poky/meta/conf/layer.conf b/poky/meta/conf/layer.conf
index 098ef12..1a01d02 100644
--- a/poky/meta/conf/layer.conf
+++ b/poky/meta/conf/layer.conf
@@ -71,6 +71,7 @@
   grub-efi->grub-bootconf \
   liberation-fonts->fontconfig \
   cantarell-fonts->fontconfig \
+  ttf-bitstream-vera->fontconfig \
   gnome-icon-theme->librsvg \
   font-alias->font-util \
   systemd-boot->systemd-bootconf \
@@ -80,6 +81,8 @@
   weston-init->kbd \
   connman->xl2tpd \
   lttng-tools->lttng-modules \
+  adwaita-icon-theme->gdk-pixbuf \
+  adwaita-icon-theme->gtk+3 \
 "
 
 # Avoid adding bison-native to the sysroot without a specific
diff --git a/poky/meta/conf/machine/include/arm/arch-armv6m.inc b/poky/meta/conf/machine/include/arm/arch-armv6m.inc
new file mode 100755
index 0000000..6876810
--- /dev/null
+++ b/poky/meta/conf/machine/include/arm/arch-armv6m.inc
@@ -0,0 +1,19 @@
+# Tuning for ARMV6-m defined in ARM v6-M ArchitectureReference Manual
+# at https://static.docs.arm.com/ddi0419/d/DDI0419D_armv6m_arm.pdf
+DEFAULTTUNE ?= "armv6m"
+
+TUNEVALID[armv6m] = "Enable instructions for ARMv6-m"
+TUNECONFLICTS[armv6m] = "armv4 armv5 armv6 armv7a"
+
+# Use armv6s-m instead of armv6-m to avoid gcc bug "SVC is not permitted on this architecture".
+# SVC is a valid instruction.
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', ' -march=armv6s-m', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', 'armv6m:', '' ,d)}"
+
+require conf/machine/include/arm/arch-armv5.inc
+
+# Little Endian
+AVAILTUNES += "armv6m"
+ARMPKGARCH_tune-armv6m             = "armv6m"
+TUNE_FEATURES_tune-armv6m          = "armv6m"
+PACKAGE_EXTRA_ARCHS_tune-armv6m    = "armv6m"
diff --git a/poky/meta/conf/machine/include/arm/arch-armv8-2a.inc b/poky/meta/conf/machine/include/arm/arch-armv8-2a.inc
new file mode 100644
index 0000000..1c09525
--- /dev/null
+++ b/poky/meta/conf/machine/include/arm/arch-armv8-2a.inc
@@ -0,0 +1,19 @@
+DEFAULTTUNE ?= "armv8-2a"
+
+TUNEVALID[armv8-2a] = "Enable instructions for ARMv8-a"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8-2a', ' -march=armv8.2-a', '', d)}"
+# TUNE crypto will be handled by arch-armv8a.inc below
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8-2a', 'armv8-2a:', '' ,d)}"
+
+require conf/machine/include/arm/arch-armv8a.inc
+
+# Little Endian base configs
+AVAILTUNES += "armv8-2a armv8-2a-crypto"
+ARMPKGARCH_tune-armv8-2a                    ?= "armv8-2a"
+ARMPKGARCH_tune-armv8-2a-crypto             ?= "armv8-2a"
+TUNE_FEATURES_tune-armv8-2a                  = "aarch64 armv8-2a"
+TUNE_FEATURES_tune-armv8-2a-crypto           = "${TUNE_FEATURES_tune-armv8-2a} crypto"
+PACKAGE_EXTRA_ARCHS_tune-armv8-2a            = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8-2a"
+PACKAGE_EXTRA_ARCHS_tune-armv8-2a-crypto     = "${PACKAGE_EXTRA_ARCHS_tune-armv8-2a} armv8-2a-crypto"
+BASE_LIB_tune-armv8-2a                       = "lib64"
+BASE_LIB_tune-armv8-2a-crypto                = "lib64"
diff --git a/poky/meta/conf/machine/include/tune-cortex-m0plus.inc b/poky/meta/conf/machine/include/tune-cortex-m0plus.inc
new file mode 100755
index 0000000..1c7512b
--- /dev/null
+++ b/poky/meta/conf/machine/include/tune-cortex-m0plus.inc
@@ -0,0 +1,11 @@
+DEFAULTTUNE ?= "cortexm0-plus"
+require conf/machine/include/arm/arch-armv6m.inc
+
+TUNEVALID[cortexm0-plus] = "Enable Cortex-M0 Plus specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm0-plus', ' -mcpu=cortex-m0plus', '', d)}"
+AVAILTUNES += "cortexm0-plus"
+
+ARMPKGARCH_tune-cortexm0-plus = "cortexm0-plus"
+TUNE_FEATURES_tune-cortexm0-plus = "${TUNE_FEATURES_tune-armv6m} cortexm0-plus"
+
+PACKAGE_EXTRA_ARCHS_tune-cortexm0-plus = "${PACKAGE_EXTRA_ARCHS_tune-armv6m} cortexm0-plus"
diff --git a/poky/meta/conf/machine/include/tune-cortexa55.inc b/poky/meta/conf/machine/include/tune-cortexa55.inc
index 89032b5..b383eb7 100644
--- a/poky/meta/conf/machine/include/tune-cortexa55.inc
+++ b/poky/meta/conf/machine/include/tune-cortexa55.inc
@@ -3,7 +3,7 @@
 TUNEVALID[cortexa55] = "Enable Cortex-A55 specific processor optimizations"
 TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa55', ' -mcpu=cortex-a55', '', d)}"
 
-require conf/machine/include/arm/arch-armv8a.inc
+require conf/machine/include/arm/arch-armv8-2a.inc
 
 # Little Endian base configs
 AVAILTUNES += "cortexa55"
diff --git a/poky/meta/conf/machine/qemuarm.conf b/poky/meta/conf/machine/qemuarm.conf
index 44e73a3..3364dcf 100644
--- a/poky/meta/conf/machine/qemuarm.conf
+++ b/poky/meta/conf/machine/qemuarm.conf
@@ -7,6 +7,8 @@
 
 KERNEL_IMAGETYPE = "zImage"
 
+UBOOT_MACHINE ?= "qemu_arm_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
diff --git a/poky/meta/conf/machine/qemuarm64.conf b/poky/meta/conf/machine/qemuarm64.conf
index d0d6f38..fdd464d 100644
--- a/poky/meta/conf/machine/qemuarm64.conf
+++ b/poky/meta/conf/machine/qemuarm64.conf
@@ -7,6 +7,8 @@
 
 KERNEL_IMAGETYPE = "Image"
 
+UBOOT_MACHINE ?= "qemu_arm64_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
diff --git a/poky/meta/conf/machine/qemumips.conf b/poky/meta/conf/machine/qemumips.conf
index 31ad754..1373e4c 100644
--- a/poky/meta/conf/machine/qemumips.conf
+++ b/poky/meta/conf/machine/qemumips.conf
@@ -9,6 +9,10 @@
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips"
+
+QB_CPU = "-cpu 34Kf"
diff --git a/poky/meta/conf/machine/qemumips64.conf b/poky/meta/conf/machine/qemumips64.conf
index 6d51746..1e77486 100644
--- a/poky/meta/conf/machine/qemumips64.conf
+++ b/poky/meta/conf/machine/qemumips64.conf
@@ -11,6 +11,8 @@
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips64_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips64"
diff --git a/poky/meta/conf/multilib.conf b/poky/meta/conf/multilib.conf
index 58f2ac5..d231107 100644
--- a/poky/meta/conf/multilib.conf
+++ b/poky/meta/conf/multilib.conf
@@ -30,4 +30,4 @@
 
 # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES
 # ${MLPREFIX}${BPN}
-NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf"
+NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
diff --git a/poky/meta/lib/oe/manifest.py b/poky/meta/lib/oe/manifest.py
index f7c88f9..47bd622 100644
--- a/poky/meta/lib/oe/manifest.py
+++ b/poky/meta/lib/oe/manifest.py
@@ -7,7 +7,6 @@
 import re
 import bb
 
-
 class Manifest(object, metaclass=ABCMeta):
     """
     This is an abstract class. Do not instantiate this directly.
@@ -189,149 +188,12 @@
         return installed_pkgs
 
 
-class RpmManifest(Manifest):
-    """
-    Returns a dictionary object with mip and mlp packages.
-    """
-    def _split_multilib(self, pkg_list):
-        pkgs = dict()
-
-        for pkg in pkg_list.split():
-            pkg_type = self.PKG_TYPE_MUST_INSTALL
-
-            ml_variants = self.d.getVar('MULTILIB_VARIANTS').split()
-
-            for ml_variant in ml_variants:
-                if pkg.startswith(ml_variant + '-'):
-                    pkg_type = self.PKG_TYPE_MULTILIB
-
-            if not pkg_type in pkgs:
-                pkgs[pkg_type] = pkg
-            else:
-                pkgs[pkg_type] += " " + pkg
-
-        return pkgs
-
-    def create_initial(self):
-        pkgs = dict()
-
-        with open(self.initial_manifest, "w+") as manifest:
-            manifest.write(self.initial_manifest_file_header)
-
-            for var in self.var_maps[self.manifest_type]:
-                if var in self.vars_to_split:
-                    split_pkgs = self._split_multilib(self.d.getVar(var))
-                    if split_pkgs is not None:
-                        pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
-                else:
-                    pkg_list = self.d.getVar(var)
-                    if pkg_list is not None:
-                        pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
-
-            for pkg_type in pkgs:
-                for pkg in pkgs[pkg_type].split():
-                    manifest.write("%s,%s\n" % (pkg_type, pkg))
-
-    def create_final(self):
-        pass
-
-    def create_full(self, pm):
-        pass
-
-
-class OpkgManifest(Manifest):
-    """
-    Returns a dictionary object with mip and mlp packages.
-    """
-    def _split_multilib(self, pkg_list):
-        pkgs = dict()
-
-        for pkg in pkg_list.split():
-            pkg_type = self.PKG_TYPE_MUST_INSTALL
-
-            ml_variants = self.d.getVar('MULTILIB_VARIANTS').split()
-
-            for ml_variant in ml_variants:
-                if pkg.startswith(ml_variant + '-'):
-                    pkg_type = self.PKG_TYPE_MULTILIB
-
-            if not pkg_type in pkgs:
-                pkgs[pkg_type] = pkg
-            else:
-                pkgs[pkg_type] += " " + pkg
-
-        return pkgs
-
-    def create_initial(self):
-        pkgs = dict()
-
-        with open(self.initial_manifest, "w+") as manifest:
-            manifest.write(self.initial_manifest_file_header)
-
-            for var in self.var_maps[self.manifest_type]:
-                if var in self.vars_to_split:
-                    split_pkgs = self._split_multilib(self.d.getVar(var))
-                    if split_pkgs is not None:
-                        pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
-                else:
-                    pkg_list = self.d.getVar(var)
-                    if pkg_list is not None:
-                        pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
-
-            for pkg_type in sorted(pkgs):
-                for pkg in sorted(pkgs[pkg_type].split()):
-                    manifest.write("%s,%s\n" % (pkg_type, pkg))
-
-    def create_final(self):
-        pass
-
-    def create_full(self, pm):
-        if not os.path.exists(self.initial_manifest):
-            self.create_initial()
-
-        initial_manifest = self.parse_initial_manifest()
-        pkgs_to_install = list()
-        for pkg_type in initial_manifest:
-            pkgs_to_install += initial_manifest[pkg_type]
-        if len(pkgs_to_install) == 0:
-            return
-
-        output = pm.dummy_install(pkgs_to_install)
-
-        with open(self.full_manifest, 'w+') as manifest:
-            pkg_re = re.compile('^Installing ([^ ]+) [^ ].*')
-            for line in set(output.split('\n')):
-                m = pkg_re.match(line)
-                if m:
-                    manifest.write(m.group(1) + '\n')
-
-        return
-
-
-class DpkgManifest(Manifest):
-    def create_initial(self):
-        with open(self.initial_manifest, "w+") as manifest:
-            manifest.write(self.initial_manifest_file_header)
-
-            for var in self.var_maps[self.manifest_type]:
-                pkg_list = self.d.getVar(var)
-
-                if pkg_list is None:
-                    continue
-
-                for pkg in pkg_list.split():
-                    manifest.write("%s,%s\n" %
-                                   (self.var_maps[self.manifest_type][var], pkg))
-
-    def create_final(self):
-        pass
-
-    def create_full(self, pm):
-        pass
-
 
 def create_manifest(d, final_manifest=False, manifest_dir=None,
                     manifest_type=Manifest.MANIFEST_TYPE_IMAGE):
+    from oe.package_manager.rpm.manifest import RpmManifest
+    from oe.package_manager.ipk.manifest import OpkgManifest
+    from oe.package_manager.deb.manifest import DpkgManifest
     manifest_map = {'rpm': RpmManifest,
                     'ipk': OpkgManifest,
                     'deb': DpkgManifest}
diff --git a/poky/meta/lib/oe/package_manager.py b/poky/meta/lib/oe/package_manager.py
deleted file mode 100644
index 35e5cff..0000000
--- a/poky/meta/lib/oe/package_manager.py
+++ /dev/null
@@ -1,1863 +0,0 @@
-#
-# SPDX-License-Identifier: GPL-2.0-only
-#
-
-from abc import ABCMeta, abstractmethod
-import os
-import glob
-import subprocess
-import shutil
-import re
-import collections
-import bb
-import tempfile
-import oe.utils
-import oe.path
-import string
-from oe.gpg_sign import get_signer
-import hashlib
-import fnmatch
-
-# this can be used by all PM backends to create the index files in parallel
-def create_index(arg):
-    index_cmd = arg
-
-    bb.note("Executing '%s' ..." % index_cmd)
-    result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
-    if result:
-        bb.note(result)
-
-def opkg_query(cmd_output):
-    """
-    This method parse the output from the package managerand return
-    a dictionary with the information of the packages. This is used
-    when the packages are in deb or ipk format.
-    """
-    verregex = re.compile(r' \([=<>]* [^ )]*\)')
-    output = dict()
-    pkg = ""
-    arch = ""
-    ver = ""
-    filename = ""
-    dep = []
-    prov = []
-    pkgarch = ""
-    for line in cmd_output.splitlines()+['']:
-        line = line.rstrip()
-        if ':' in line:
-            if line.startswith("Package: "):
-                pkg = line.split(": ")[1]
-            elif line.startswith("Architecture: "):
-                arch = line.split(": ")[1]
-            elif line.startswith("Version: "):
-                ver = line.split(": ")[1]
-            elif line.startswith("File: ") or line.startswith("Filename:"):
-                filename = line.split(": ")[1]
-                if "/" in filename:
-                    filename = os.path.basename(filename)
-            elif line.startswith("Depends: "):
-                depends = verregex.sub('', line.split(": ")[1])
-                for depend in depends.split(", "):
-                    dep.append(depend)
-            elif line.startswith("Recommends: "):
-                recommends = verregex.sub('', line.split(": ")[1])
-                for recommend in recommends.split(", "):
-                    dep.append("%s [REC]" % recommend)
-            elif line.startswith("PackageArch: "):
-                pkgarch = line.split(": ")[1]
-            elif line.startswith("Provides: "):
-                provides = verregex.sub('', line.split(": ")[1])
-                for provide in provides.split(", "):
-                    prov.append(provide)
-
-        # When there is a blank line save the package information
-        elif not line:
-            # IPK doesn't include the filename
-            if not filename:
-                filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
-            if pkg:
-                output[pkg] = {"arch":arch, "ver":ver,
-                        "filename":filename, "deps": dep, "pkgarch":pkgarch, "provs": prov}
-            pkg = ""
-            arch = ""
-            ver = ""
-            filename = ""
-            dep = []
-            prov = []
-            pkgarch = ""
-
-    return output
-
-def failed_postinsts_abort(pkgs, log_path):
-    bb.fatal("""Postinstall scriptlets of %s have failed. If the intention is to defer them to first boot,
-then please place them into pkg_postinst_ontarget_${PN} ().
-Deferring to first boot via 'exit 1' is no longer supported.
-Details of the failure are in %s.""" %(pkgs, log_path))
-
-def generate_locale_archive(d, rootfs, target_arch, localedir):
-    # Pretty sure we don't need this for locale archive generation but
-    # keeping it to be safe...
-    locale_arch_options = { \
-        "arc": ["--uint32-align=4", "--little-endian"],
-        "arceb": ["--uint32-align=4", "--big-endian"],
-        "arm": ["--uint32-align=4", "--little-endian"],
-        "armeb": ["--uint32-align=4", "--big-endian"],
-        "aarch64": ["--uint32-align=4", "--little-endian"],
-        "aarch64_be": ["--uint32-align=4", "--big-endian"],
-        "sh4": ["--uint32-align=4", "--big-endian"],
-        "powerpc": ["--uint32-align=4", "--big-endian"],
-        "powerpc64": ["--uint32-align=4", "--big-endian"],
-        "powerpc64le": ["--uint32-align=4", "--little-endian"],
-        "mips": ["--uint32-align=4", "--big-endian"],
-        "mipsisa32r6": ["--uint32-align=4", "--big-endian"],
-        "mips64": ["--uint32-align=4", "--big-endian"],
-        "mipsisa64r6": ["--uint32-align=4", "--big-endian"],
-        "mipsel": ["--uint32-align=4", "--little-endian"],
-        "mipsisa32r6el": ["--uint32-align=4", "--little-endian"],
-        "mips64el": ["--uint32-align=4", "--little-endian"],
-        "mipsisa64r6el": ["--uint32-align=4", "--little-endian"],
-        "riscv64": ["--uint32-align=4", "--little-endian"],
-        "riscv32": ["--uint32-align=4", "--little-endian"],
-        "i586": ["--uint32-align=4", "--little-endian"],
-        "i686": ["--uint32-align=4", "--little-endian"],
-        "x86_64": ["--uint32-align=4", "--little-endian"]
-    }
-    if target_arch in locale_arch_options:
-        arch_options = locale_arch_options[target_arch]
-    else:
-        bb.error("locale_arch_options not found for target_arch=" + target_arch)
-        bb.fatal("unknown arch:" + target_arch + " for locale_arch_options")
-
-    # Need to set this so cross-localedef knows where the archive is
-    env = dict(os.environ)
-    env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-archive")
-
-    for name in sorted(os.listdir(localedir)):
-        path = os.path.join(localedir, name)
-        if os.path.isdir(path):
-            cmd = ["cross-localedef", "--verbose"]
-            cmd += arch_options
-            cmd += ["--add-to-archive", path]
-            subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT)
-
-class Indexer(object, metaclass=ABCMeta):
-    def __init__(self, d, deploy_dir):
-        self.d = d
-        self.deploy_dir = deploy_dir
-
-    @abstractmethod
-    def write_index(self):
-        pass
-
-
-class RpmIndexer(Indexer):
-    def write_index(self):
-        self.do_write_index(self.deploy_dir)
-
-    def do_write_index(self, deploy_dir):
-        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
-            signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
-        else:
-            signer = None
-
-        createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c")
-        result = create_index("%s --update -q %s" % (createrepo_c, deploy_dir))
-        if result:
-            bb.fatal(result)
-
-        # Sign repomd
-        if signer:
-            sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
-            is_ascii_sig = (sig_type.upper() != "BIN")
-            signer.detach_sign(os.path.join(deploy_dir, 'repodata', 'repomd.xml'),
-                               self.d.getVar('PACKAGE_FEED_GPG_NAME'),
-                               self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
-                               armor=is_ascii_sig)
-
-class RpmSubdirIndexer(RpmIndexer):
-    def write_index(self):
-        bb.note("Generating package index for %s" %(self.deploy_dir))
-        self.do_write_index(self.deploy_dir)
-        for entry in os.walk(self.deploy_dir):
-            if os.path.samefile(self.deploy_dir, entry[0]):
-                for dir in entry[1]:
-                    if dir != 'repodata':
-                        dir_path = oe.path.join(self.deploy_dir, dir)
-                        bb.note("Generating package index for %s" %(dir_path))
-                        self.do_write_index(dir_path)
-
-class OpkgIndexer(Indexer):
-    def write_index(self):
-        arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS",
-                     "SDK_PACKAGE_ARCHS",
-                     ]
-
-        opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index")
-        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
-            signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
-        else:
-            signer = None
-
-        if not os.path.exists(os.path.join(self.deploy_dir, "Packages")):
-            open(os.path.join(self.deploy_dir, "Packages"), "w").close()
-
-        index_cmds = set()
-        index_sign_files = set()
-        for arch_var in arch_vars:
-            archs = self.d.getVar(arch_var)
-            if archs is None:
-                continue
-
-            for arch in archs.split():
-                pkgs_dir = os.path.join(self.deploy_dir, arch)
-                pkgs_file = os.path.join(pkgs_dir, "Packages")
-
-                if not os.path.isdir(pkgs_dir):
-                    continue
-
-                if not os.path.exists(pkgs_file):
-                    open(pkgs_file, "w").close()
-
-                index_cmds.add('%s --checksum md5 --checksum sha256 -r %s -p %s -m %s' %
-                                  (opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir))
-
-                index_sign_files.add(pkgs_file)
-
-        if len(index_cmds) == 0:
-            bb.note("There are no packages in %s!" % self.deploy_dir)
-            return
-
-        oe.utils.multiprocess_launch(create_index, index_cmds, self.d)
-
-        if signer:
-            feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
-            is_ascii_sig = (feed_sig_type.upper() != "BIN")
-            for f in index_sign_files:
-                signer.detach_sign(f,
-                                   self.d.getVar('PACKAGE_FEED_GPG_NAME'),
-                                   self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
-                                   armor=is_ascii_sig)
-
-
-class DpkgIndexer(Indexer):
-    def _create_configs(self):
-        bb.utils.mkdirhier(self.apt_conf_dir)
-        bb.utils.mkdirhier(os.path.join(self.apt_conf_dir, "lists", "partial"))
-        bb.utils.mkdirhier(os.path.join(self.apt_conf_dir, "apt.conf.d"))
-        bb.utils.mkdirhier(os.path.join(self.apt_conf_dir, "preferences.d"))
-
-        with open(os.path.join(self.apt_conf_dir, "preferences"),
-                "w") as prefs_file:
-            pass
-        with open(os.path.join(self.apt_conf_dir, "sources.list"),
-                "w+") as sources_file:
-            pass
-
-        with open(self.apt_conf_file, "w") as apt_conf:
-            with open(os.path.join(self.d.expand("${STAGING_ETCDIR_NATIVE}"),
-                "apt", "apt.conf.sample")) as apt_conf_sample:
-                for line in apt_conf_sample.read().split("\n"):
-                    line = re.sub(r"#ROOTFS#", "/dev/null", line)
-                    line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
-                    apt_conf.write(line + "\n")
-
-    def write_index(self):
-        self.apt_conf_dir = os.path.join(self.d.expand("${APTCONF_TARGET}"),
-                "apt-ftparchive")
-        self.apt_conf_file = os.path.join(self.apt_conf_dir, "apt.conf")
-        self._create_configs()
-
-        os.environ['APT_CONFIG'] = self.apt_conf_file
-
-        pkg_archs = self.d.getVar('PACKAGE_ARCHS')
-        if pkg_archs is not None:
-            arch_list = pkg_archs.split()
-        sdk_pkg_archs = self.d.getVar('SDK_PACKAGE_ARCHS')
-        if sdk_pkg_archs is not None:
-            for a in sdk_pkg_archs.split():
-                if a not in pkg_archs:
-                    arch_list.append(a)
-
-        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").split()
-        arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in arch_list)
-
-        apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
-        gzip = bb.utils.which(os.getenv('PATH'), "gzip")
-
-        index_cmds = []
-        deb_dirs_found = False
-        for arch in arch_list:
-            arch_dir = os.path.join(self.deploy_dir, arch)
-            if not os.path.isdir(arch_dir):
-                continue
-
-            cmd = "cd %s; PSEUDO_UNLOAD=1 %s packages . > Packages;" % (arch_dir, apt_ftparchive)
-
-            cmd += "%s -fcn Packages > Packages.gz;" % gzip
-
-            with open(os.path.join(arch_dir, "Release"), "w+") as release:
-                release.write("Label: %s\n" % arch)
-
-            cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
-
-            index_cmds.append(cmd)
-
-            deb_dirs_found = True
-
-        if not deb_dirs_found:
-            bb.note("There are no packages in %s" % self.deploy_dir)
-            return
-
-        oe.utils.multiprocess_launch(create_index, index_cmds, self.d)
-        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
-            raise NotImplementedError('Package feed signing not implementd for dpkg')
-
-
-
-class PkgsList(object, metaclass=ABCMeta):
-    def __init__(self, d, rootfs_dir):
-        self.d = d
-        self.rootfs_dir = rootfs_dir
-
-    @abstractmethod
-    def list_pkgs(self):
-        pass
-
-class RpmPkgsList(PkgsList):
-    def list_pkgs(self):
-        return RpmPM(self.d, self.rootfs_dir, self.d.getVar('TARGET_VENDOR'), needfeed=False).list_installed()
-
-class OpkgPkgsList(PkgsList):
-    def __init__(self, d, rootfs_dir, config_file):
-        super(OpkgPkgsList, self).__init__(d, rootfs_dir)
-
-        self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
-        self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir)
-        self.opkg_args += self.d.getVar("OPKG_ARGS")
-
-    def list_pkgs(self, format=None):
-        cmd = "%s %s status" % (self.opkg_cmd, self.opkg_args)
-
-        # opkg returns success even when it printed some
-        # "Collected errors:" report to stderr. Mixing stderr into
-        # stdout then leads to random failures later on when
-        # parsing the output. To avoid this we need to collect both
-        # output streams separately and check for empty stderr.
-        p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
-        cmd_output, cmd_stderr = p.communicate()
-        cmd_output = cmd_output.decode("utf-8")
-        cmd_stderr = cmd_stderr.decode("utf-8")
-        if p.returncode or cmd_stderr:
-            bb.fatal("Cannot get the installed packages list. Command '%s' "
-                     "returned %d and stderr:\n%s" % (cmd, p.returncode, cmd_stderr))
-
-        return opkg_query(cmd_output)
-
-
-class DpkgPkgsList(PkgsList):
-
-    def list_pkgs(self):
-        cmd = [bb.utils.which(os.getenv('PATH'), "dpkg-query"),
-               "--admindir=%s/var/lib/dpkg" % self.rootfs_dir,
-               "-W"]
-
-        cmd.append("-f=Package: ${Package}\nArchitecture: ${PackageArch}\nVersion: ${Version}\nFile: ${Package}_${Version}_${Architecture}.deb\nDepends: ${Depends}\nRecommends: ${Recommends}\nProvides: ${Provides}\n\n")
-
-        try:
-            cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Cannot get the installed packages list. Command '%s' "
-                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-        return opkg_query(cmd_output)
-
-
-class PackageManager(object, metaclass=ABCMeta):
-    """
-    This is an abstract class. Do not instantiate this directly.
-    """
-
-    def __init__(self, d, target_rootfs):
-        self.d = d
-        self.target_rootfs = target_rootfs
-        self.deploy_dir = None
-        self.deploy_lock = None
-        self._initialize_intercepts()
-
-    def _initialize_intercepts(self):
-        bb.note("Initializing intercept dir for %s" % self.target_rootfs)
-        # As there might be more than one instance of PackageManager operating at the same time
-        # we need to isolate the intercept_scripts directories from each other,
-        # hence the ugly hash digest in dir name.
-        self.intercepts_dir = os.path.join(self.d.getVar('WORKDIR'), "intercept_scripts-%s" %
-                                           (hashlib.sha256(self.target_rootfs.encode()).hexdigest()))
-
-        postinst_intercepts = (self.d.getVar("POSTINST_INTERCEPTS") or "").split()
-        if not postinst_intercepts:
-            postinst_intercepts_path = self.d.getVar("POSTINST_INTERCEPTS_PATH")
-            if not postinst_intercepts_path:
-                postinst_intercepts_path = self.d.getVar("POSTINST_INTERCEPTS_DIR") or self.d.expand("${COREBASE}/scripts/postinst-intercepts")
-            postinst_intercepts = oe.path.which_wild('*', postinst_intercepts_path)
-
-        bb.debug(1, 'Collected intercepts:\n%s' % ''.join('  %s\n' % i for i in postinst_intercepts))
-        bb.utils.remove(self.intercepts_dir, True)
-        bb.utils.mkdirhier(self.intercepts_dir)
-        for intercept in postinst_intercepts:
-            bb.utils.copyfile(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
-
-    @abstractmethod
-    def _handle_intercept_failure(self, failed_script):
-        pass
-
-    def _postpone_to_first_boot(self, postinst_intercept_hook):
-        with open(postinst_intercept_hook) as intercept:
-            registered_pkgs = None
-            for line in intercept.read().split("\n"):
-                m = re.match(r"^##PKGS:(.*)", line)
-                if m is not None:
-                    registered_pkgs = m.group(1).strip()
-                    break
-
-            if registered_pkgs is not None:
-                bb.note("If an image is being built, the postinstalls for the following packages "
-                        "will be postponed for first boot: %s" %
-                        registered_pkgs)
-
-                # call the backend dependent handler
-                self._handle_intercept_failure(registered_pkgs)
-
-
-    def run_intercepts(self, populate_sdk=None):
-        intercepts_dir = self.intercepts_dir
-
-        bb.note("Running intercept scripts:")
-        os.environ['D'] = self.target_rootfs
-        os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
-        for script in os.listdir(intercepts_dir):
-            script_full = os.path.join(intercepts_dir, script)
-
-            if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
-                continue
-
-            # we do not want to run any multilib variant of this
-            if script.startswith("delay_to_first_boot"):
-                self._postpone_to_first_boot(script_full)
-                continue
-
-            if populate_sdk == 'host' and self.d.getVar('SDK_OS') == 'mingw32':
-                bb.note("The postinstall intercept hook '%s' could not be executed due to missing wine support, details in %s/log.do_%s"
-                                % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
-                continue
-
-            bb.note("> Executing %s intercept ..." % script)
-
-            try:
-                output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
-                if output: bb.note(output.decode("utf-8"))
-            except subprocess.CalledProcessError as e:
-                bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
-                if populate_sdk == 'host':
-                    bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
-                elif populate_sdk == 'target':
-                    if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
-                        bb.note("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
-                                % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
-                    else:
-                        bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
-                else:
-                    if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
-                        bb.note("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
-                                % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
-                        self._postpone_to_first_boot(script_full)
-                    else:
-                        bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
-
-    @abstractmethod
-    def update(self):
-        """
-        Update the package manager package database.
-        """
-        pass
-
-    @abstractmethod
-    def install(self, pkgs, attempt_only=False):
-        """
-        Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
-        True, installation failures are ignored.
-        """
-        pass
-
-    @abstractmethod
-    def remove(self, pkgs, with_dependencies=True):
-        """
-        Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
-        is False, then any dependencies are left in place.
-        """
-        pass
-
-    @abstractmethod
-    def write_index(self):
-        """
-        This function creates the index files
-        """
-        pass
-
-    @abstractmethod
-    def remove_packaging_data(self):
-        pass
-
-    @abstractmethod
-    def list_installed(self):
-        pass
-
-    @abstractmethod
-    def extract(self, pkg):
-        """
-        Returns the path to a tmpdir where resides the contents of a package.
-        Deleting the tmpdir is responsability of the caller.
-        """
-        pass
-
-    @abstractmethod
-    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
-        """
-        Add remote package feeds into repository manager configuration. The parameters
-        for the feeds are set by feed_uris, feed_base_paths and feed_archs.
-        See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
-        for their description.
-        """
-        pass
-
-    def install_glob(self, globs, sdk=False):
-        """
-        Install all packages that match a glob.
-        """
-        # TODO don't have sdk here but have a property on the superclass
-        # (and respect in install_complementary)
-        if sdk:
-            pkgdatadir = self.d.expand("${TMPDIR}/pkgdata/${SDK_SYS}")
-        else:
-            pkgdatadir = self.d.getVar("PKGDATA_DIR")
-
-        try:
-            bb.note("Installing globbed packages...")
-            cmd = ["oe-pkgdata-util", "-p", pkgdatadir, "list-pkgs", globs]
-            pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
-            self.install(pkgs.split(), attempt_only=True)
-        except subprocess.CalledProcessError as e:
-            # Return code 1 means no packages matched
-            if e.returncode != 1:
-                bb.fatal("Could not compute globbed packages list. Command "
-                         "'%s' returned %d:\n%s" %
-                         (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-    def install_complementary(self, globs=None):
-        """
-        Install complementary packages based upon the list of currently installed
-        packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
-        these packages, if they don't exist then no error will occur.  Note: every
-        backend needs to call this function explicitly after the normal package
-        installation
-        """
-        if globs is None:
-            globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY')
-            split_linguas = set()
-
-            for translation in self.d.getVar('IMAGE_LINGUAS').split():
-                split_linguas.add(translation)
-                split_linguas.add(translation.split('-')[0])
-
-            split_linguas = sorted(split_linguas)
-
-            for lang in split_linguas:
-                globs += " *-locale-%s" % lang
-                for complementary_linguas in (self.d.getVar('IMAGE_LINGUAS_COMPLEMENTARY') or "").split():
-                    globs += (" " + complementary_linguas) % lang
-
-        if globs is None:
-            return
-
-        # we need to write the list of installed packages to a file because the
-        # oe-pkgdata-util reads it from a file
-        with tempfile.NamedTemporaryFile(mode="w+", prefix="installed-pkgs") as installed_pkgs:
-            pkgs = self.list_installed()
-
-            provided_pkgs = set()
-            for pkg in pkgs.values():
-                provided_pkgs |= set(pkg.get('provs', []))
-
-            output = oe.utils.format_pkg_list(pkgs, "arch")
-            installed_pkgs.write(output)
-            installed_pkgs.flush()
-
-            cmd = ["oe-pkgdata-util",
-                   "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name,
-                   globs]
-            exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY')
-            if exclude:
-                cmd.extend(['--exclude=' + '|'.join(exclude.split())])
-            try:
-                bb.note('Running %s' % cmd)
-                complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
-                complementary_pkgs = set(complementary_pkgs.split())
-                skip_pkgs = sorted(complementary_pkgs & provided_pkgs)
-                install_pkgs = sorted(complementary_pkgs - provided_pkgs)
-                bb.note("Installing complementary packages ... %s (skipped already provided packages %s)" % (
-                    ' '.join(install_pkgs),
-                    ' '.join(skip_pkgs)))
-                self.install(install_pkgs, attempt_only=True)
-            except subprocess.CalledProcessError as e:
-                bb.fatal("Could not compute complementary packages list. Command "
-                         "'%s' returned %d:\n%s" %
-                         (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-        target_arch = self.d.getVar('TARGET_ARCH')
-        localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale")
-        if os.path.exists(localedir) and os.listdir(localedir):
-            generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir)
-            # And now delete the binary locales
-            self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False)
-
-    def deploy_dir_lock(self):
-        if self.deploy_dir is None:
-            raise RuntimeError("deploy_dir is not set!")
-
-        lock_file_name = os.path.join(self.deploy_dir, "deploy.lock")
-
-        self.deploy_lock = bb.utils.lockfile(lock_file_name)
-
-    def deploy_dir_unlock(self):
-        if self.deploy_lock is None:
-            return
-
-        bb.utils.unlockfile(self.deploy_lock)
-
-        self.deploy_lock = None
-
-    def construct_uris(self, uris, base_paths):
-        """
-        Construct URIs based on the following pattern: uri/base_path where 'uri'
-        and 'base_path' correspond to each element of the corresponding array
-        argument leading to len(uris) x len(base_paths) elements on the returned
-        array
-        """
-        def _append(arr1, arr2, sep='/'):
-            res = []
-            narr1 = [a.rstrip(sep) for a in arr1]
-            narr2 = [a.rstrip(sep).lstrip(sep) for a in arr2]
-            for a1 in narr1:
-                if arr2:
-                    for a2 in narr2:
-                        res.append("%s%s%s" % (a1, sep, a2))
-                else:
-                    res.append(a1)
-            return res
-        return _append(uris, base_paths)
-
-def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies):
-    """
-    Go through our do_package_write_X dependencies and hardlink the packages we depend
-    upon into the repo directory. This prevents us seeing other packages that may
-    have been built that we don't depend upon and also packages for architectures we don't
-    support.
-    """
-    import errno
-
-    taskdepdata = d.getVar("BB_TASKDEPDATA", False)
-    mytaskname = d.getVar("BB_RUNTASK")
-    pn = d.getVar("PN")
-    seendirs = set()
-    multilibs = {}
-
-    bb.utils.remove(subrepo_dir, recurse=True)
-    bb.utils.mkdirhier(subrepo_dir)
-
-    # Detect bitbake -b usage
-    nodeps = d.getVar("BB_LIMITEDDEPS") or False
-    if nodeps or not filterbydependencies:
-        oe.path.symlink(deploydir, subrepo_dir, True)
-        return
-
-    start = None
-    for dep in taskdepdata:
-        data = taskdepdata[dep]
-        if data[1] == mytaskname and data[0] == pn:
-            start = dep
-            break
-    if start is None:
-        bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
-    pkgdeps = set()
-    start = [start]
-    seen = set(start)
-    # Support direct dependencies (do_rootfs -> do_package_write_X)
-    # or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> do_package_write_X)
-    while start:
-        next = []
-        for dep2 in start:
-            for dep in taskdepdata[dep2][3]:
-                if taskdepdata[dep][0] != pn:
-                    if "do_" + taskname in dep:
-                        pkgdeps.add(dep)
-                elif dep not in seen:
-                    next.append(dep)
-                    seen.add(dep)
-        start = next
-
-    for dep in pkgdeps:
-        c = taskdepdata[dep][0]
-        manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs)
-        if not manifest:
-            bb.fatal("No manifest generated from: %s in %s" % (c, taskdepdata[dep][2]))
-        if not os.path.exists(manifest):
-            continue
-        with open(manifest, "r") as f:
-            for l in f:
-                l = l.strip()
-                deploydir = os.path.normpath(deploydir)
-                if bb.data.inherits_class('packagefeed-stability', d):
-                    dest = l.replace(deploydir + "-prediff", "")
-                else:
-                    dest = l.replace(deploydir, "")
-                dest = subrepo_dir + dest
-                if l.endswith("/"):
-                    if dest not in seendirs:
-                        bb.utils.mkdirhier(dest)
-                        seendirs.add(dest)
-                    continue
-                # Try to hardlink the file, copy if that fails
-                destdir = os.path.dirname(dest)
-                if destdir not in seendirs:
-                    bb.utils.mkdirhier(destdir)
-                    seendirs.add(destdir)
-                try:
-                    os.link(l, dest)
-                except OSError as err:
-                    if err.errno == errno.EXDEV:
-                        bb.utils.copyfile(l, dest)
-                    else:
-                        raise
-
-class RpmPM(PackageManager):
-    def __init__(self,
-                 d,
-                 target_rootfs,
-                 target_vendor,
-                 task_name='target',
-                 arch_var=None,
-                 os_var=None,
-                 rpm_repo_workdir="oe-rootfs-repo",
-                 filterbydependencies=True,
-                 needfeed=True):
-        super(RpmPM, self).__init__(d, target_rootfs)
-        self.target_vendor = target_vendor
-        self.task_name = task_name
-        if arch_var == None:
-            self.archs = self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS').replace("-","_")
-        else:
-            self.archs = self.d.getVar(arch_var).replace("-","_")
-        if task_name == "host":
-            self.primary_arch = self.d.getVar('SDK_ARCH')
-        else:
-            self.primary_arch = self.d.getVar('MACHINE_ARCH')
-
-        if needfeed:
-            self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), rpm_repo_workdir)
-            create_packages_dir(self.d, oe.path.join(self.rpm_repo_dir, "rpm"), d.getVar("DEPLOY_DIR_RPM"), "package_write_rpm", filterbydependencies)
-
-        self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name)
-        if not os.path.exists(self.d.expand('${T}/saved_packaging_data')):
-            bb.utils.mkdirhier(self.d.expand('${T}/saved_packaging_data'))
-        self.packaging_data_dirs = ['etc/rpm', 'etc/rpmrc', 'etc/dnf', 'var/lib/rpm', 'var/lib/dnf', 'var/cache/dnf']
-        self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
-                                               self.task_name)
-        if not os.path.exists(self.d.expand('${T}/saved')):
-            bb.utils.mkdirhier(self.d.expand('${T}/saved'))
-
-    def _configure_dnf(self):
-        # libsolv handles 'noarch' internally, we don't need to specify it explicitly
-        archs = [i for i in reversed(self.archs.split()) if i not in ["any", "all", "noarch"]]
-        # This prevents accidental matching against libsolv's built-in policies
-        if len(archs) <= 1:
-            archs = archs + ["bogusarch"]
-        # This architecture needs to be upfront so that packages using it are properly prioritized
-        archs = ["sdk_provides_dummy_target"] + archs
-        confdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
-        bb.utils.mkdirhier(confdir)
-        open(confdir + "arch", 'w').write(":".join(archs))
-        distro_codename = self.d.getVar('DISTRO_CODENAME')
-        open(confdir + "releasever", 'w').write(distro_codename if distro_codename is not None else '')
-
-        open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("")
-
-
-    def _configure_rpm(self):
-        # We need to configure rpm to use our primary package architecture as the installation architecture,
-        # and to make it compatible with other package architectures that we use.
-        # Otherwise it will refuse to proceed with packages installation.
-        platformconfdir = "%s/%s" %(self.target_rootfs, "etc/rpm/")
-        rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/")
-        bb.utils.mkdirhier(platformconfdir)
-        open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch)
-        with open(rpmrcconfdir + "rpmrc", 'w') as f:
-            f.write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
-            f.write("buildarch_compat: %s: noarch\n" % self.primary_arch)
-
-        open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n")
-        if self.d.getVar('RPM_PREFER_ELF_ARCH'):
-            open(platformconfdir + "macros", 'a').write("%%_prefer_color %s" % (self.d.getVar('RPM_PREFER_ELF_ARCH')))
-
-        if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
-            signer = get_signer(self.d, self.d.getVar('RPM_GPG_BACKEND'))
-            pubkey_path = oe.path.join(self.d.getVar('B'), 'rpm-key')
-            signer.export_pubkey(pubkey_path, self.d.getVar('RPM_GPG_NAME'))
-            rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmkeys")
-            cmd = [rpm_bin, '--root=%s' % self.target_rootfs, '--import', pubkey_path]
-            try:
-                subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-            except subprocess.CalledProcessError as e:
-                bb.fatal("Importing GPG key failed. Command '%s' "
-                        "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
-    def create_configs(self):
-        self._configure_dnf()
-        self._configure_rpm()
-
-    def write_index(self):
-        lockfilename = self.d.getVar('DEPLOY_DIR_RPM') + "/rpm.lock"
-        lf = bb.utils.lockfile(lockfilename, False)
-        RpmIndexer(self.d, self.rpm_repo_dir).write_index()
-        bb.utils.unlockfile(lf)
-
-    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
-        from urllib.parse import urlparse
-
-        if feed_uris == "":
-            return
-
-        gpg_opts = ''
-        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
-            gpg_opts += 'repo_gpgcheck=1\n'
-            gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME'))
-
-        if self.d.getVar('RPM_SIGN_PACKAGES') != '1':
-            gpg_opts += 'gpgcheck=0\n'
-
-        bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
-        remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
-        for uri in remote_uris:
-            repo_base = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/"))
-            if feed_archs is not None:
-                for arch in feed_archs.split():
-                    repo_uri = uri + "/" + arch
-                    repo_id   = "oe-remote-repo"  + "-".join(urlparse(repo_uri).path.split("/"))
-                    repo_name = "OE Remote Repo:" + " ".join(urlparse(repo_uri).path.split("/"))
-                    open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'a').write(
-                             "[%s]\nname=%s\nbaseurl=%s\n%s\n" % (repo_id, repo_name, repo_uri, gpg_opts))
-            else:
-                repo_name = "OE Remote Repo:" + " ".join(urlparse(uri).path.split("/"))
-                repo_uri = uri
-                open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'w').write(
-                             "[%s]\nname=%s\nbaseurl=%s\n%s" % (repo_base, repo_name, repo_uri, gpg_opts))
-
-    def _prepare_pkg_transaction(self):
-        os.environ['D'] = self.target_rootfs
-        os.environ['OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
-        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
-
-
-    def install(self, pkgs, attempt_only = False):
-        if len(pkgs) == 0:
-            return
-        self._prepare_pkg_transaction()
-
-        bad_recommendations = self.d.getVar('BAD_RECOMMENDATIONS')
-        package_exclude = self.d.getVar('PACKAGE_EXCLUDE')
-        exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exclude.split() if package_exclude else [])
-
-        output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) +
-                         (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) +
-                         (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == "1" else []) +
-                         (["--nogpgcheck"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=gpgcheck=True"]) +
-                         ["install"] +
-                         pkgs)
-
-        failed_scriptlets_pkgnames = collections.OrderedDict()
-        for line in output.splitlines():
-            if line.startswith("Error in POSTIN scriptlet in rpm package"):
-                failed_scriptlets_pkgnames[line.split()[-1]] = True
-
-        if len(failed_scriptlets_pkgnames) > 0:
-            failed_postinsts_abort(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
-
-    def remove(self, pkgs, with_dependencies = True):
-        if not pkgs:
-            return
-
-        self._prepare_pkg_transaction()
-
-        if with_dependencies:
-            self._invoke_dnf(["remove"] + pkgs)
-        else:
-            cmd = bb.utils.which(os.getenv('PATH'), "rpm")
-            args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs]
-
-            try:
-                bb.note("Running %s" % ' '.join([cmd] + args + pkgs))
-                output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8")
-                bb.note(output)
-            except subprocess.CalledProcessError as e:
-                bb.fatal("Could not invoke rpm. Command "
-                     "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8")))
-
-    def upgrade(self):
-        self._prepare_pkg_transaction()
-        self._invoke_dnf(["upgrade"])
-
-    def autoremove(self):
-        self._prepare_pkg_transaction()
-        self._invoke_dnf(["autoremove"])
-
-    def remove_packaging_data(self):
-        self._invoke_dnf(["clean", "all"])
-        for dir in self.packaging_data_dirs:
-            bb.utils.remove(oe.path.join(self.target_rootfs, dir), True)
-
-    def backup_packaging_data(self):
-        # Save the packaging dirs for increment rpm image generation
-        if os.path.exists(self.saved_packaging_data):
-            bb.utils.remove(self.saved_packaging_data, True)
-        for i in self.packaging_data_dirs:
-            source_dir = oe.path.join(self.target_rootfs, i)
-            target_dir = oe.path.join(self.saved_packaging_data, i)
-            if os.path.isdir(source_dir):
-                shutil.copytree(source_dir, target_dir, symlinks=True)
-            elif os.path.isfile(source_dir):
-                shutil.copy2(source_dir, target_dir)
-
-    def recovery_packaging_data(self):
-        # Move the rpmlib back
-        if os.path.exists(self.saved_packaging_data):
-            for i in self.packaging_data_dirs:
-                target_dir = oe.path.join(self.target_rootfs, i)
-                if os.path.exists(target_dir):
-                    bb.utils.remove(target_dir, True)
-                source_dir = oe.path.join(self.saved_packaging_data, i)
-                if os.path.isdir(source_dir):
-                    shutil.copytree(source_dir, target_dir, symlinks=True)
-                elif os.path.isfile(source_dir):
-                    shutil.copy2(source_dir, target_dir)
-
-    def list_installed(self):
-        output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{name}-%{version}-%{release}.%{arch}.rpm\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"],
-                                  print_output = False)
-        packages = {}
-        current_package = None
-        current_deps = None
-        current_state = "initial"
-        for line in output.splitlines():
-            if line.startswith("Package:"):
-                package_info = line.split(" ")[1:]
-                current_package = package_info[0]
-                package_arch = package_info[1]
-                package_version = package_info[2]
-                package_rpm = package_info[3]
-                packages[current_package] = {"arch":package_arch, "ver":package_version, "filename":package_rpm}
-                current_deps = []
-            elif line.startswith("Dependencies:"):
-                current_state = "dependencies"
-            elif line.startswith("Recommendations"):
-                current_state = "recommendations"
-            elif line.startswith("DependenciesEndHere:"):
-                current_state = "initial"
-                packages[current_package]["deps"] = current_deps
-            elif len(line) > 0:
-                if current_state == "dependencies":
-                    current_deps.append(line)
-                elif current_state == "recommendations":
-                    current_deps.append("%s [REC]" % line)
-
-        return packages
-
-    def update(self):
-        self._invoke_dnf(["makecache", "--refresh"])
-
-    def _invoke_dnf(self, dnf_args, fatal = True, print_output = True ):
-        os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
-
-        dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf")
-        standard_dnf_args = ["-v", "--rpmverbosity=info", "-y",
-                             "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
-                             "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
-                             "--installroot=%s" % (self.target_rootfs),
-                             "--setopt=logdir=%s" % (self.d.getVar('T'))
-                            ]
-        if hasattr(self, "rpm_repo_dir"):
-            standard_dnf_args.append("--repofrompath=oe-repo,%s" % (self.rpm_repo_dir))
-        cmd = [dnf_cmd] + standard_dnf_args + dnf_args
-        bb.note('Running %s' % ' '.join(cmd))
-        try:
-            output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
-            if print_output:
-                bb.debug(1, output)
-            return output
-        except subprocess.CalledProcessError as e:
-            if print_output:
-                (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
-                     "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-            else:
-                (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
-                     "'%s' returned %d:" % (' '.join(cmd), e.returncode))
-            return e.output.decode("utf-8")
-
-    def dump_install_solution(self, pkgs):
-        open(self.solution_manifest, 'w').write(" ".join(pkgs))
-        return pkgs
-
-    def load_old_install_solution(self):
-        if not os.path.exists(self.solution_manifest):
-            return []
-        with open(self.solution_manifest, 'r') as fd:
-            return fd.read().split()
-
-    def _script_num_prefix(self, path):
-        files = os.listdir(path)
-        numbers = set()
-        numbers.add(99)
-        for f in files:
-            numbers.add(int(f.split("-")[0]))
-        return max(numbers) + 1
-
-    def save_rpmpostinst(self, pkg):
-        bb.note("Saving postinstall script of %s" % (pkg))
-        cmd = bb.utils.which(os.getenv('PATH'), "rpm")
-        args = ["-q", "--root=%s" % self.target_rootfs, "--queryformat", "%{postin}", pkg]
-
-        try:
-            output = subprocess.check_output([cmd] + args,stderr=subprocess.STDOUT).decode("utf-8")
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Could not invoke rpm. Command "
-                     "'%s' returned %d:\n%s" % (' '.join([cmd] + args), e.returncode, e.output.decode("utf-8")))
-
-        # may need to prepend #!/bin/sh to output
-
-        target_path = oe.path.join(self.target_rootfs, self.d.expand('${sysconfdir}/rpm-postinsts/'))
-        bb.utils.mkdirhier(target_path)
-        num = self._script_num_prefix(target_path)
-        saved_script_name = oe.path.join(target_path, "%d-%s" % (num, pkg))
-        open(saved_script_name, 'w').write(output)
-        os.chmod(saved_script_name, 0o755)
-
-    def _handle_intercept_failure(self, registered_pkgs):
-        rpm_postinsts_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
-        bb.utils.mkdirhier(rpm_postinsts_dir)
-
-        # Save the package postinstalls in /etc/rpm-postinsts
-        for pkg in registered_pkgs.split():
-            self.save_rpmpostinst(pkg)
-
-    def extract(self, pkg):
-        output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
-        pkg_name = output.splitlines()[-1]
-        if not pkg_name.endswith(".rpm"):
-            bb.fatal("dnf could not find package %s in repository: %s" %(pkg, output))
-        pkg_path = oe.path.join(self.rpm_repo_dir, pkg_name)
-
-        cpio_cmd = bb.utils.which(os.getenv("PATH"), "cpio")
-        rpm2cpio_cmd = bb.utils.which(os.getenv("PATH"), "rpm2cpio")
-
-        if not os.path.isfile(pkg_path):
-            bb.fatal("Unable to extract package for '%s'."
-                     "File %s doesn't exists" % (pkg, pkg_path))
-
-        tmp_dir = tempfile.mkdtemp()
-        current_dir = os.getcwd()
-        os.chdir(tmp_dir)
-
-        try:
-            cmd = "%s %s | %s -idmv" % (rpm2cpio_cmd, pkg_path, cpio_cmd)
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
-        except subprocess.CalledProcessError as e:
-            bb.utils.remove(tmp_dir, recurse=True)
-            bb.fatal("Unable to extract %s package. Command '%s' "
-                     "returned %d:\n%s" % (pkg_path, cmd, e.returncode, e.output.decode("utf-8")))
-        except OSError as e:
-            bb.utils.remove(tmp_dir, recurse=True)
-            bb.fatal("Unable to extract %s package. Command '%s' "
-                     "returned %d:\n%s at %s" % (pkg_path, cmd, e.errno, e.strerror, e.filename))
-
-        bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
-        os.chdir(current_dir)
-
-        return tmp_dir
-
-
-class OpkgDpkgPM(PackageManager):
-    def __init__(self, d, target_rootfs):
-        """
-        This is an abstract class. Do not instantiate this directly.
-        """
-        super(OpkgDpkgPM, self).__init__(d, target_rootfs)
-
-    def package_info(self, pkg, cmd):
-        """
-        Returns a dictionary with the package info.
-
-        This method extracts the common parts for Opkg and Dpkg
-        """
-
-        try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to list available packages. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-        return opkg_query(output)
-
-    def extract(self, pkg, pkg_info):
-        """
-        Returns the path to a tmpdir where resides the contents of a package.
-
-        Deleting the tmpdir is responsability of the caller.
-
-        This method extracts the common parts for Opkg and Dpkg
-        """
-
-        ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
-        tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
-        pkg_path = pkg_info[pkg]["filepath"]
-
-        if not os.path.isfile(pkg_path):
-            bb.fatal("Unable to extract package for '%s'."
-                     "File %s doesn't exists" % (pkg, pkg_path))
-
-        tmp_dir = tempfile.mkdtemp()
-        current_dir = os.getcwd()
-        os.chdir(tmp_dir)
-        data_tar = 'data.tar.xz'
-
-        try:
-            cmd = [ar_cmd, 'x', pkg_path]
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-            cmd = [tar_cmd, 'xf', data_tar]
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            bb.utils.remove(tmp_dir, recurse=True)
-            bb.fatal("Unable to extract %s package. Command '%s' "
-                     "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-        except OSError as e:
-            bb.utils.remove(tmp_dir, recurse=True)
-            bb.fatal("Unable to extract %s package. Command '%s' "
-                     "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
-
-        bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
-        bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
-        bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz"))
-        os.chdir(current_dir)
-
-        return tmp_dir
-
-    def _handle_intercept_failure(self, registered_pkgs):
-        self.mark_packages("unpacked", registered_pkgs.split())
-
-class OpkgPM(OpkgDpkgPM):
-    def __init__(self, d, target_rootfs, config_file, archs, task_name='target', ipk_repo_workdir="oe-rootfs-repo", filterbydependencies=True, prepare_index=True):
-        super(OpkgPM, self).__init__(d, target_rootfs)
-
-        self.config_file = config_file
-        self.pkg_archs = archs
-        self.task_name = task_name
-
-        self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), ipk_repo_workdir)
-        self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock")
-        self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
-        self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs)
-        self.opkg_args += self.d.getVar("OPKG_ARGS")
-
-        if prepare_index:
-            create_packages_dir(self.d, self.deploy_dir, d.getVar("DEPLOY_DIR_IPK"), "package_write_ipk", filterbydependencies)
-
-        opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
-        if opkg_lib_dir[0] == "/":
-            opkg_lib_dir = opkg_lib_dir[1:]
-
-        self.opkg_dir = os.path.join(target_rootfs, opkg_lib_dir, "opkg")
-
-        bb.utils.mkdirhier(self.opkg_dir)
-
-        self.saved_opkg_dir = self.d.expand('${T}/saved/%s' % self.task_name)
-        if not os.path.exists(self.d.expand('${T}/saved')):
-            bb.utils.mkdirhier(self.d.expand('${T}/saved'))
-
-        self.from_feeds = (self.d.getVar('BUILD_IMAGES_FROM_FEEDS') or "") == "1"
-        if self.from_feeds:
-            self._create_custom_config()
-        else:
-            self._create_config()
-
-        self.indexer = OpkgIndexer(self.d, self.deploy_dir)
-
-    def mark_packages(self, status_tag, packages=None):
-        """
-        This function will change a package's status in /var/lib/opkg/status file.
-        If 'packages' is None then the new_status will be applied to all
-        packages
-        """
-        status_file = os.path.join(self.opkg_dir, "status")
-
-        with open(status_file, "r") as sf:
-            with open(status_file + ".tmp", "w+") as tmp_sf:
-                if packages is None:
-                    tmp_sf.write(re.sub(r"Package: (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
-                                        r"Package: \1\n\2Status: \3%s" % status_tag,
-                                        sf.read()))
-                else:
-                    if type(packages).__name__ != "list":
-                        raise TypeError("'packages' should be a list object")
-
-                    status = sf.read()
-                    for pkg in packages:
-                        status = re.sub(r"Package: %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
-                                        r"Package: %s\n\1Status: \2%s" % (pkg, status_tag),
-                                        status)
-
-                    tmp_sf.write(status)
-
-        os.rename(status_file + ".tmp", status_file)
-
-    def _create_custom_config(self):
-        bb.note("Building from feeds activated!")
-
-        with open(self.config_file, "w+") as config_file:
-            priority = 1
-            for arch in self.pkg_archs.split():
-                config_file.write("arch %s %d\n" % (arch, priority))
-                priority += 5
-
-            for line in (self.d.getVar('IPK_FEED_URIS') or "").split():
-                feed_match = re.match(r"^[ \t]*(.*)##([^ \t]*)[ \t]*$", line)
-
-                if feed_match is not None:
-                    feed_name = feed_match.group(1)
-                    feed_uri = feed_match.group(2)
-
-                    bb.note("Add %s feed with URL %s" % (feed_name, feed_uri))
-
-                    config_file.write("src/gz %s %s\n" % (feed_name, feed_uri))
-
-            """
-            Allow to use package deploy directory contents as quick devel-testing
-            feed. This creates individual feed configs for each arch subdir of those
-            specified as compatible for the current machine.
-            NOTE: Development-helper feature, NOT a full-fledged feed.
-            """
-            if (self.d.getVar('FEED_DEPLOYDIR_BASE_URI') or "") != "":
-                for arch in self.pkg_archs.split():
-                    cfg_file_name = os.path.join(self.target_rootfs,
-                                                 self.d.getVar("sysconfdir"),
-                                                 "opkg",
-                                                 "local-%s-feed.conf" % arch)
-
-                    with open(cfg_file_name, "w+") as cfg_file:
-                        cfg_file.write("src/gz local-%s %s/%s" %
-                                       (arch,
-                                        self.d.getVar('FEED_DEPLOYDIR_BASE_URI'),
-                                        arch))
-
-                        if self.d.getVar('OPKGLIBDIR') != '/var/lib':
-                            # There is no command line option for this anymore, we need to add
-                            # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
-                            # the default value of "/var/lib" as defined in opkg:
-                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR     VARDIR "/lib/opkg/lists"
-                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      VARDIR "/lib/opkg/info"
-                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   VARDIR "/lib/opkg/status"
-                            cfg_file.write("option info_dir     %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
-                            cfg_file.write("option lists_dir    %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists'))
-                            cfg_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
-
-
-    def _create_config(self):
-        with open(self.config_file, "w+") as config_file:
-            priority = 1
-            for arch in self.pkg_archs.split():
-                config_file.write("arch %s %d\n" % (arch, priority))
-                priority += 5
-
-            config_file.write("src oe file:%s\n" % self.deploy_dir)
-
-            for arch in self.pkg_archs.split():
-                pkgs_dir = os.path.join(self.deploy_dir, arch)
-                if os.path.isdir(pkgs_dir):
-                    config_file.write("src oe-%s file:%s\n" %
-                                      (arch, pkgs_dir))
-
-            if self.d.getVar('OPKGLIBDIR') != '/var/lib':
-                # There is no command line option for this anymore, we need to add
-                # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
-                # the default value of "/var/lib" as defined in opkg:
-                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR     VARDIR "/lib/opkg/lists"
-                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      VARDIR "/lib/opkg/info"
-                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   VARDIR "/lib/opkg/status"
-                config_file.write("option info_dir     %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
-                config_file.write("option lists_dir    %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists'))
-                config_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
-
-    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
-        if feed_uris == "":
-            return
-
-        rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
-                                  % self.target_rootfs)
-
-        os.makedirs('%s/etc/opkg' % self.target_rootfs, exist_ok=True)
-
-        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
-        archs = self.pkg_archs.split() if feed_archs is None else feed_archs.split()
-
-        with open(rootfs_config, "w+") as config_file:
-            uri_iterator = 0
-            for uri in feed_uris:
-                if archs:
-                    for arch in archs:
-                        if (feed_archs is None) and (not os.path.exists(oe.path.join(self.deploy_dir, arch))):
-                            continue
-                        bb.note('Adding opkg feed url-%s-%d (%s)' %
-                            (arch, uri_iterator, uri))
-                        config_file.write("src/gz uri-%s-%d %s/%s\n" %
-                                          (arch, uri_iterator, uri, arch))
-                else:
-                    bb.note('Adding opkg feed url-%d (%s)' %
-                        (uri_iterator, uri))
-                    config_file.write("src/gz uri-%d %s\n" %
-                                      (uri_iterator, uri))
-
-                uri_iterator += 1
-
-    def update(self):
-        self.deploy_dir_lock()
-
-        cmd = "%s %s update" % (self.opkg_cmd, self.opkg_args)
-
-        try:
-            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            self.deploy_dir_unlock()
-            bb.fatal("Unable to update the package index files. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
-        self.deploy_dir_unlock()
-
-    def install(self, pkgs, attempt_only=False):
-        if not pkgs:
-            return
-
-        cmd = "%s %s" % (self.opkg_cmd, self.opkg_args)
-        for exclude in (self.d.getVar("PACKAGE_EXCLUDE") or "").split():
-            cmd += " --add-exclude %s" % exclude
-        for bad_recommendation in (self.d.getVar("BAD_RECOMMENDATIONS") or "").split():
-            cmd += " --add-ignore-recommends %s" % bad_recommendation
-        cmd += " install "
-        cmd += " ".join(pkgs)
-
-        os.environ['D'] = self.target_rootfs
-        os.environ['OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
-        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
-
-        try:
-            bb.note("Installing the following packages: %s" % ' '.join(pkgs))
-            bb.note(cmd)
-            output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
-            bb.note(output)
-            failed_pkgs = []
-            for line in output.split('\n'):
-                if line.endswith("configuration required on target."):
-                    bb.warn(line)
-                    failed_pkgs.append(line.split(".")[0])
-            if failed_pkgs:
-                failed_postinsts_abort(failed_pkgs, self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
-        except subprocess.CalledProcessError as e:
-            (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
-                                              "Command '%s' returned %d:\n%s" %
-                                              (cmd, e.returncode, e.output.decode("utf-8")))
-
-    def remove(self, pkgs, with_dependencies=True):
-        if not pkgs:
-            return
-
-        if with_dependencies:
-            cmd = "%s %s --force-remove --force-removal-of-dependent-packages remove %s" % \
-                (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
-        else:
-            cmd = "%s %s --force-depends remove %s" % \
-                (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
-
-        try:
-            bb.note(cmd)
-            output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
-            bb.note(output)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to remove packages. Command '%s' "
-                     "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
-
-    def write_index(self):
-        self.deploy_dir_lock()
-
-        result = self.indexer.write_index()
-
-        self.deploy_dir_unlock()
-
-        if result is not None:
-            bb.fatal(result)
-
-    def remove_packaging_data(self):
-        bb.utils.remove(self.opkg_dir, True)
-        # create the directory back, it's needed by PM lock
-        bb.utils.mkdirhier(self.opkg_dir)
-
-    def remove_lists(self):
-        if not self.from_feeds:
-            bb.utils.remove(os.path.join(self.opkg_dir, "lists"), True)
-
-    def list_installed(self):
-        return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs()
-
-    def dummy_install(self, pkgs):
-        """
-        The following function dummy installs pkgs and returns the log of output.
-        """
-        if len(pkgs) == 0:
-            return
-
-        # Create an temp dir as opkg root for dummy installation
-        temp_rootfs = self.d.expand('${T}/opkg')
-        opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
-        if opkg_lib_dir[0] == "/":
-            opkg_lib_dir = opkg_lib_dir[1:]
-        temp_opkg_dir = os.path.join(temp_rootfs, opkg_lib_dir, 'opkg')
-        bb.utils.mkdirhier(temp_opkg_dir)
-
-        opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs)
-        opkg_args += self.d.getVar("OPKG_ARGS")
-
-        cmd = "%s %s update" % (self.opkg_cmd, opkg_args)
-        try:
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to update. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
-        # Dummy installation
-        cmd = "%s %s --noaction install %s " % (self.opkg_cmd,
-                                                opkg_args,
-                                                ' '.join(pkgs))
-        try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to dummy install packages. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
-        bb.utils.remove(temp_rootfs, True)
-
-        return output
-
-    def backup_packaging_data(self):
-        # Save the opkglib for increment ipk image generation
-        if os.path.exists(self.saved_opkg_dir):
-            bb.utils.remove(self.saved_opkg_dir, True)
-        shutil.copytree(self.opkg_dir,
-                        self.saved_opkg_dir,
-                        symlinks=True)
-
-    def recover_packaging_data(self):
-        # Move the opkglib back
-        if os.path.exists(self.saved_opkg_dir):
-            if os.path.exists(self.opkg_dir):
-                bb.utils.remove(self.opkg_dir, True)
-
-            bb.note('Recover packaging data')
-            shutil.copytree(self.saved_opkg_dir,
-                            self.opkg_dir,
-                            symlinks=True)
-
-    def package_info(self, pkg):
-        """
-        Returns a dictionary with the package info.
-        """
-        cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg)
-        pkg_info = super(OpkgPM, self).package_info(pkg, cmd)
-
-        pkg_arch = pkg_info[pkg]["arch"]
-        pkg_filename = pkg_info[pkg]["filename"]
-        pkg_info[pkg]["filepath"] = \
-                os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
-
-        return pkg_info
-
-    def extract(self, pkg):
-        """
-        Returns the path to a tmpdir where resides the contents of a package.
-
-        Deleting the tmpdir is responsability of the caller.
-        """
-        pkg_info = self.package_info(pkg)
-        if not pkg_info:
-            bb.fatal("Unable to get information for package '%s' while "
-                     "trying to extract the package."  % pkg)
-
-        tmp_dir = super(OpkgPM, self).extract(pkg, pkg_info)
-        bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
-
-        return tmp_dir
-
-class DpkgPM(OpkgDpkgPM):
-    def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None, deb_repo_workdir="oe-rootfs-repo", filterbydependencies=True):
-        super(DpkgPM, self).__init__(d, target_rootfs)
-        self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), deb_repo_workdir)
-
-        create_packages_dir(self.d, self.deploy_dir, d.getVar("DEPLOY_DIR_DEB"), "package_write_deb", filterbydependencies)
-
-        if apt_conf_dir is None:
-            self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
-        else:
-            self.apt_conf_dir = apt_conf_dir
-        self.apt_conf_file = os.path.join(self.apt_conf_dir, "apt.conf")
-        self.apt_get_cmd = bb.utils.which(os.getenv('PATH'), "apt-get")
-        self.apt_cache_cmd = bb.utils.which(os.getenv('PATH'), "apt-cache")
-
-        self.apt_args = d.getVar("APT_ARGS")
-
-        self.all_arch_list = archs.split()
-        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").split()
-        self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
-
-        self._create_configs(archs, base_archs)
-
-        self.indexer = DpkgIndexer(self.d, self.deploy_dir)
-
-    def mark_packages(self, status_tag, packages=None):
-        """
-        This function will change a package's status in /var/lib/dpkg/status file.
-        If 'packages' is None then the new_status will be applied to all
-        packages
-        """
-        status_file = self.target_rootfs + "/var/lib/dpkg/status"
-
-        with open(status_file, "r") as sf:
-            with open(status_file + ".tmp", "w+") as tmp_sf:
-                if packages is None:
-                    tmp_sf.write(re.sub(r"Package: (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
-                                        r"Package: \1\n\2Status: \3%s" % status_tag,
-                                        sf.read()))
-                else:
-                    if type(packages).__name__ != "list":
-                        raise TypeError("'packages' should be a list object")
-
-                    status = sf.read()
-                    for pkg in packages:
-                        status = re.sub(r"Package: %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
-                                        r"Package: %s\n\1Status: \2%s" % (pkg, status_tag),
-                                        status)
-
-                    tmp_sf.write(status)
-
-        os.rename(status_file + ".tmp", status_file)
-
-    def run_pre_post_installs(self, package_name=None):
-        """
-        Run the pre/post installs for package "package_name". If package_name is
-        None, then run all pre/post install scriptlets.
-        """
-        info_dir = self.target_rootfs + "/var/lib/dpkg/info"
-        ControlScript = collections.namedtuple("ControlScript", ["suffix", "name", "argument"])
-        control_scripts = [
-                ControlScript(".preinst", "Preinstall", "install"),
-                ControlScript(".postinst", "Postinstall", "configure")]
-        status_file = self.target_rootfs + "/var/lib/dpkg/status"
-        installed_pkgs = []
-
-        with open(status_file, "r") as status:
-            for line in status.read().split('\n'):
-                m = re.match(r"^Package: (.*)", line)
-                if m is not None:
-                    installed_pkgs.append(m.group(1))
-
-        if package_name is not None and not package_name in installed_pkgs:
-            return
-
-        os.environ['D'] = self.target_rootfs
-        os.environ['OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
-        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
-
-        for pkg_name in installed_pkgs:
-            for control_script in control_scripts:
-                p_full = os.path.join(info_dir, pkg_name + control_script.suffix)
-                if os.path.exists(p_full):
-                    try:
-                        bb.note("Executing %s for package: %s ..." %
-                                 (control_script.name.lower(), pkg_name))
-                        output = subprocess.check_output([p_full, control_script.argument],
-                                stderr=subprocess.STDOUT).decode("utf-8")
-                        bb.note(output)
-                    except subprocess.CalledProcessError as e:
-                        bb.warn("%s for package %s failed with %d:\n%s" %
-                                (control_script.name, pkg_name, e.returncode,
-                                    e.output.decode("utf-8")))
-                        failed_postinsts_abort([pkg_name], self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
-
-    def update(self):
-        os.environ['APT_CONFIG'] = self.apt_conf_file
-
-        self.deploy_dir_lock()
-
-        cmd = "%s update" % self.apt_get_cmd
-
-        try:
-            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to update the package index files. Command '%s' "
-                     "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
-
-        self.deploy_dir_unlock()
-
-    def install(self, pkgs, attempt_only=False):
-        if attempt_only and len(pkgs) == 0:
-            return
-
-        os.environ['APT_CONFIG'] = self.apt_conf_file
-
-        cmd = "%s %s install --force-yes --allow-unauthenticated --no-remove %s" % \
-              (self.apt_get_cmd, self.apt_args, ' '.join(pkgs))
-
-        try:
-            bb.note("Installing the following packages: %s" % ' '.join(pkgs))
-            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
-                                              "Command '%s' returned %d:\n%s" %
-                                              (cmd, e.returncode, e.output.decode("utf-8")))
-
-        # rename *.dpkg-new files/dirs
-        for root, dirs, files in os.walk(self.target_rootfs):
-            for dir in dirs:
-                new_dir = re.sub(r"\.dpkg-new", "", dir)
-                if dir != new_dir:
-                    os.rename(os.path.join(root, dir),
-                              os.path.join(root, new_dir))
-
-            for file in files:
-                new_file = re.sub(r"\.dpkg-new", "", file)
-                if file != new_file:
-                    os.rename(os.path.join(root, file),
-                              os.path.join(root, new_file))
-
-
-    def remove(self, pkgs, with_dependencies=True):
-        if not pkgs:
-            return
-
-        if with_dependencies:
-            os.environ['APT_CONFIG'] = self.apt_conf_file
-            cmd = "%s purge %s" % (self.apt_get_cmd, ' '.join(pkgs))
-        else:
-            cmd = "%s --admindir=%s/var/lib/dpkg --instdir=%s" \
-                  " -P --force-depends %s" % \
-                  (bb.utils.which(os.getenv('PATH'), "dpkg"),
-                   self.target_rootfs, self.target_rootfs, ' '.join(pkgs))
-
-        try:
-            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Unable to remove packages. Command '%s' "
-                     "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
-
-    def write_index(self):
-        self.deploy_dir_lock()
-
-        result = self.indexer.write_index()
-
-        self.deploy_dir_unlock()
-
-        if result is not None:
-            bb.fatal(result)
-
-    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
-        if feed_uris == "":
-            return
-
-        sources_conf = os.path.join("%s/etc/apt/sources.list"
-                                    % self.target_rootfs)
-        arch_list = []
-
-        if feed_archs is None:
-            for arch in self.all_arch_list:
-                if not os.path.exists(os.path.join(self.deploy_dir, arch)):
-                    continue
-                arch_list.append(arch)
-        else:
-            arch_list = feed_archs.split()
-
-        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
-
-        with open(sources_conf, "w+") as sources_file:
-            for uri in feed_uris:
-                if arch_list:
-                    for arch in arch_list:
-                        bb.note('Adding dpkg channel at (%s)' % uri)
-                        sources_file.write("deb %s/%s ./\n" %
-                                           (uri, arch))
-                else:
-                    bb.note('Adding dpkg channel at (%s)' % uri)
-                    sources_file.write("deb %s ./\n" % uri)
-
-    def _create_configs(self, archs, base_archs):
-        base_archs = re.sub(r"_", r"-", base_archs)
-
-        if os.path.exists(self.apt_conf_dir):
-            bb.utils.remove(self.apt_conf_dir, True)
-
-        bb.utils.mkdirhier(self.apt_conf_dir)
-        bb.utils.mkdirhier(self.apt_conf_dir + "/lists/partial/")
-        bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/")
-        bb.utils.mkdirhier(self.apt_conf_dir + "/preferences.d/")
-
-        arch_list = []
-        for arch in self.all_arch_list:
-            if not os.path.exists(os.path.join(self.deploy_dir, arch)):
-                continue
-            arch_list.append(arch)
-
-        with open(os.path.join(self.apt_conf_dir, "preferences"), "w+") as prefs_file:
-            priority = 801
-            for arch in arch_list:
-                prefs_file.write(
-                    "Package: *\n"
-                    "Pin: release l=%s\n"
-                    "Pin-Priority: %d\n\n" % (arch, priority))
-
-                priority += 5
-
-            pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE') or ""
-            for pkg in pkg_exclude.split():
-                prefs_file.write(
-                    "Package: %s\n"
-                    "Pin: release *\n"
-                    "Pin-Priority: -1\n\n" % pkg)
-
-        arch_list.reverse()
-
-        with open(os.path.join(self.apt_conf_dir, "sources.list"), "w+") as sources_file:
-            for arch in arch_list:
-                sources_file.write("deb file:%s/ ./\n" %
-                                   os.path.join(self.deploy_dir, arch))
-
-        base_arch_list = base_archs.split()
-        multilib_variants = self.d.getVar("MULTILIB_VARIANTS");
-        for variant in multilib_variants.split():
-            localdata = bb.data.createCopy(self.d)
-            variant_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, False)
-            orig_arch = localdata.getVar("DPKG_ARCH")
-            localdata.setVar("DEFAULTTUNE", variant_tune)
-            variant_arch = localdata.getVar("DPKG_ARCH")
-            if variant_arch not in base_arch_list:
-                base_arch_list.append(variant_arch)
-
-        with open(self.apt_conf_file, "w+") as apt_conf:
-            with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample:
-                for line in apt_conf_sample.read().split("\n"):
-                    match_arch = re.match(r"  Architecture \".*\";$", line)
-                    architectures = ""
-                    if match_arch:
-                        for base_arch in base_arch_list:
-                            architectures += "\"%s\";" % base_arch
-                        apt_conf.write("  Architectures {%s};\n" % architectures);
-                        apt_conf.write("  Architecture \"%s\";\n" % base_archs)
-                    else:
-                        line = re.sub(r"#ROOTFS#", self.target_rootfs, line)
-                        line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
-                        apt_conf.write(line + "\n")
-
-        target_dpkg_dir = "%s/var/lib/dpkg" % self.target_rootfs
-        bb.utils.mkdirhier(os.path.join(target_dpkg_dir, "info"))
-
-        bb.utils.mkdirhier(os.path.join(target_dpkg_dir, "updates"))
-
-        if not os.path.exists(os.path.join(target_dpkg_dir, "status")):
-            open(os.path.join(target_dpkg_dir, "status"), "w+").close()
-        if not os.path.exists(os.path.join(target_dpkg_dir, "available")):
-            open(os.path.join(target_dpkg_dir, "available"), "w+").close()
-
-    def remove_packaging_data(self):
-        bb.utils.remove(self.target_rootfs + self.d.getVar('opkglibdir'), True)
-        bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True)
-
-    def fix_broken_dependencies(self):
-        os.environ['APT_CONFIG'] = self.apt_conf_file
-
-        cmd = "%s %s --allow-unauthenticated -f install" % (self.apt_get_cmd, self.apt_args)
-
-        try:
-            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            bb.fatal("Cannot fix broken dependencies. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-
-    def list_installed(self):
-        return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
-
-    def package_info(self, pkg):
-        """
-        Returns a dictionary with the package info.
-        """
-        cmd = "%s show %s" % (self.apt_cache_cmd, pkg)
-        pkg_info = super(DpkgPM, self).package_info(pkg, cmd)
-
-        pkg_arch = pkg_info[pkg]["pkgarch"]
-        pkg_filename = pkg_info[pkg]["filename"]
-        pkg_info[pkg]["filepath"] = \
-                os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
-
-        return pkg_info
-
-    def extract(self, pkg):
-        """
-        Returns the path to a tmpdir where resides the contents of a package.
-
-        Deleting the tmpdir is responsability of the caller.
-        """
-        pkg_info = self.package_info(pkg)
-        if not pkg_info:
-            bb.fatal("Unable to get information for package '%s' while "
-                     "trying to extract the package."  % pkg)
-
-        tmp_dir = super(DpkgPM, self).extract(pkg, pkg_info)
-        bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
-
-        return tmp_dir
-
-def generate_index_files(d):
-    classes = d.getVar('PACKAGE_CLASSES').replace("package_", "").split()
-
-    indexer_map = {
-        "rpm": (RpmSubdirIndexer, d.getVar('DEPLOY_DIR_RPM')),
-        "ipk": (OpkgIndexer, d.getVar('DEPLOY_DIR_IPK')),
-        "deb": (DpkgIndexer, d.getVar('DEPLOY_DIR_DEB'))
-    }
-
-    result = None
-
-    for pkg_class in classes:
-        if not pkg_class in indexer_map:
-            continue
-
-        if os.path.exists(indexer_map[pkg_class][1]):
-            result = indexer_map[pkg_class][0](d, indexer_map[pkg_class][1]).write_index()
-
-            if result is not None:
-                bb.fatal(result)
diff --git a/poky/meta/lib/oe/package_manager/__init__.py b/poky/meta/lib/oe/package_manager/__init__.py
new file mode 100644
index 0000000..865d6f9
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/__init__.py
@@ -0,0 +1,550 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from abc import ABCMeta, abstractmethod
+import os
+import glob
+import subprocess
+import shutil
+import re
+import collections
+import bb
+import tempfile
+import oe.utils
+import oe.path
+import string
+from oe.gpg_sign import get_signer
+import hashlib
+import fnmatch
+
+# this can be used by all PM backends to create the index files in parallel
+def create_index(arg):
+    index_cmd = arg
+
+    bb.note("Executing '%s' ..." % index_cmd)
+    result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+    if result:
+        bb.note(result)
+
+def opkg_query(cmd_output):
+    """
+    This method parse the output from the package managerand return
+    a dictionary with the information of the packages. This is used
+    when the packages are in deb or ipk format.
+    """
+    verregex = re.compile(r' \([=<>]* [^ )]*\)')
+    output = dict()
+    pkg = ""
+    arch = ""
+    ver = ""
+    filename = ""
+    dep = []
+    prov = []
+    pkgarch = ""
+    for line in cmd_output.splitlines()+['']:
+        line = line.rstrip()
+        if ':' in line:
+            if line.startswith("Package: "):
+                pkg = line.split(": ")[1]
+            elif line.startswith("Architecture: "):
+                arch = line.split(": ")[1]
+            elif line.startswith("Version: "):
+                ver = line.split(": ")[1]
+            elif line.startswith("File: ") or line.startswith("Filename:"):
+                filename = line.split(": ")[1]
+                if "/" in filename:
+                    filename = os.path.basename(filename)
+            elif line.startswith("Depends: "):
+                depends = verregex.sub('', line.split(": ")[1])
+                for depend in depends.split(", "):
+                    dep.append(depend)
+            elif line.startswith("Recommends: "):
+                recommends = verregex.sub('', line.split(": ")[1])
+                for recommend in recommends.split(", "):
+                    dep.append("%s [REC]" % recommend)
+            elif line.startswith("PackageArch: "):
+                pkgarch = line.split(": ")[1]
+            elif line.startswith("Provides: "):
+                provides = verregex.sub('', line.split(": ")[1])
+                for provide in provides.split(", "):
+                    prov.append(provide)
+
+        # When there is a blank line save the package information
+        elif not line:
+            # IPK doesn't include the filename
+            if not filename:
+                filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
+            if pkg:
+                output[pkg] = {"arch":arch, "ver":ver,
+                        "filename":filename, "deps": dep, "pkgarch":pkgarch, "provs": prov}
+            pkg = ""
+            arch = ""
+            ver = ""
+            filename = ""
+            dep = []
+            prov = []
+            pkgarch = ""
+
+    return output
+
+def failed_postinsts_abort(pkgs, log_path):
+    bb.fatal("""Postinstall scriptlets of %s have failed. If the intention is to defer them to first boot,
+then please place them into pkg_postinst_ontarget_${PN} ().
+Deferring to first boot via 'exit 1' is no longer supported.
+Details of the failure are in %s.""" %(pkgs, log_path))
+
+def generate_locale_archive(d, rootfs, target_arch, localedir):
+    # Pretty sure we don't need this for locale archive generation but
+    # keeping it to be safe...
+    locale_arch_options = { \
+        "arc": ["--uint32-align=4", "--little-endian"],
+        "arceb": ["--uint32-align=4", "--big-endian"],
+        "arm": ["--uint32-align=4", "--little-endian"],
+        "armeb": ["--uint32-align=4", "--big-endian"],
+        "aarch64": ["--uint32-align=4", "--little-endian"],
+        "aarch64_be": ["--uint32-align=4", "--big-endian"],
+        "sh4": ["--uint32-align=4", "--big-endian"],
+        "powerpc": ["--uint32-align=4", "--big-endian"],
+        "powerpc64": ["--uint32-align=4", "--big-endian"],
+        "powerpc64le": ["--uint32-align=4", "--little-endian"],
+        "mips": ["--uint32-align=4", "--big-endian"],
+        "mipsisa32r6": ["--uint32-align=4", "--big-endian"],
+        "mips64": ["--uint32-align=4", "--big-endian"],
+        "mipsisa64r6": ["--uint32-align=4", "--big-endian"],
+        "mipsel": ["--uint32-align=4", "--little-endian"],
+        "mipsisa32r6el": ["--uint32-align=4", "--little-endian"],
+        "mips64el": ["--uint32-align=4", "--little-endian"],
+        "mipsisa64r6el": ["--uint32-align=4", "--little-endian"],
+        "riscv64": ["--uint32-align=4", "--little-endian"],
+        "riscv32": ["--uint32-align=4", "--little-endian"],
+        "i586": ["--uint32-align=4", "--little-endian"],
+        "i686": ["--uint32-align=4", "--little-endian"],
+        "x86_64": ["--uint32-align=4", "--little-endian"]
+    }
+    if target_arch in locale_arch_options:
+        arch_options = locale_arch_options[target_arch]
+    else:
+        bb.error("locale_arch_options not found for target_arch=" + target_arch)
+        bb.fatal("unknown arch:" + target_arch + " for locale_arch_options")
+
+    # Need to set this so cross-localedef knows where the archive is
+    env = dict(os.environ)
+    env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-archive")
+
+    for name in sorted(os.listdir(localedir)):
+        path = os.path.join(localedir, name)
+        if os.path.isdir(path):
+            cmd = ["cross-localedef", "--verbose"]
+            cmd += arch_options
+            cmd += ["--add-to-archive", path]
+            subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT)
+
+class Indexer(object, metaclass=ABCMeta):
+    def __init__(self, d, deploy_dir):
+        self.d = d
+        self.deploy_dir = deploy_dir
+
+    @abstractmethod
+    def write_index(self):
+        pass
+
+class PkgsList(object, metaclass=ABCMeta):
+    def __init__(self, d, rootfs_dir):
+        self.d = d
+        self.rootfs_dir = rootfs_dir
+
+    @abstractmethod
+    def list_pkgs(self):
+        pass
+
+class PackageManager(object, metaclass=ABCMeta):
+    """
+    This is an abstract class. Do not instantiate this directly.
+    """
+
+    def __init__(self, d, target_rootfs):
+        self.d = d
+        self.target_rootfs = target_rootfs
+        self.deploy_dir = None
+        self.deploy_lock = None
+        self._initialize_intercepts()
+
+    def _initialize_intercepts(self):
+        bb.note("Initializing intercept dir for %s" % self.target_rootfs)
+        # As there might be more than one instance of PackageManager operating at the same time
+        # we need to isolate the intercept_scripts directories from each other,
+        # hence the ugly hash digest in dir name.
+        self.intercepts_dir = os.path.join(self.d.getVar('WORKDIR'), "intercept_scripts-%s" %
+                                           (hashlib.sha256(self.target_rootfs.encode()).hexdigest()))
+
+        postinst_intercepts = (self.d.getVar("POSTINST_INTERCEPTS") or "").split()
+        if not postinst_intercepts:
+            postinst_intercepts_path = self.d.getVar("POSTINST_INTERCEPTS_PATH")
+            if not postinst_intercepts_path:
+                postinst_intercepts_path = self.d.getVar("POSTINST_INTERCEPTS_DIR") or self.d.expand("${COREBASE}/scripts/postinst-intercepts")
+            postinst_intercepts = oe.path.which_wild('*', postinst_intercepts_path)
+
+        bb.debug(1, 'Collected intercepts:\n%s' % ''.join('  %s\n' % i for i in postinst_intercepts))
+        bb.utils.remove(self.intercepts_dir, True)
+        bb.utils.mkdirhier(self.intercepts_dir)
+        for intercept in postinst_intercepts:
+            bb.utils.copyfile(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
+
+    @abstractmethod
+    def _handle_intercept_failure(self, failed_script):
+        pass
+
+    def _postpone_to_first_boot(self, postinst_intercept_hook):
+        with open(postinst_intercept_hook) as intercept:
+            registered_pkgs = None
+            for line in intercept.read().split("\n"):
+                m = re.match(r"^##PKGS:(.*)", line)
+                if m is not None:
+                    registered_pkgs = m.group(1).strip()
+                    break
+
+            if registered_pkgs is not None:
+                bb.note("If an image is being built, the postinstalls for the following packages "
+                        "will be postponed for first boot: %s" %
+                        registered_pkgs)
+
+                # call the backend dependent handler
+                self._handle_intercept_failure(registered_pkgs)
+
+
+    def run_intercepts(self, populate_sdk=None):
+        intercepts_dir = self.intercepts_dir
+
+        bb.note("Running intercept scripts:")
+        os.environ['D'] = self.target_rootfs
+        os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
+        for script in os.listdir(intercepts_dir):
+            script_full = os.path.join(intercepts_dir, script)
+
+            if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
+                continue
+
+            # we do not want to run any multilib variant of this
+            if script.startswith("delay_to_first_boot"):
+                self._postpone_to_first_boot(script_full)
+                continue
+
+            if populate_sdk == 'host' and self.d.getVar('SDK_OS') == 'mingw32':
+                bb.note("The postinstall intercept hook '%s' could not be executed due to missing wine support, details in %s/log.do_%s"
+                                % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+                continue
+
+            bb.note("> Executing %s intercept ..." % script)
+
+            try:
+                output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
+                if output: bb.note(output.decode("utf-8"))
+            except subprocess.CalledProcessError as e:
+                bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
+                if populate_sdk == 'host':
+                    bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+                elif populate_sdk == 'target':
+                    if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
+                        bb.note("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
+                                % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+                    else:
+                        bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+                else:
+                    if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
+                        bb.note("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
+                                % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+                        self._postpone_to_first_boot(script_full)
+                    else:
+                        bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
+
+    @abstractmethod
+    def update(self):
+        """
+        Update the package manager package database.
+        """
+        pass
+
+    @abstractmethod
+    def install(self, pkgs, attempt_only=False):
+        """
+        Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is
+        True, installation failures are ignored.
+        """
+        pass
+
+    @abstractmethod
+    def remove(self, pkgs, with_dependencies=True):
+        """
+        Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies'
+        is False, then any dependencies are left in place.
+        """
+        pass
+
+    @abstractmethod
+    def write_index(self):
+        """
+        This function creates the index files
+        """
+        pass
+
+    @abstractmethod
+    def remove_packaging_data(self):
+        pass
+
+    @abstractmethod
+    def list_installed(self):
+        pass
+
+    @abstractmethod
+    def extract(self, pkg):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+        Deleting the tmpdir is responsability of the caller.
+        """
+        pass
+
+    @abstractmethod
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        """
+        Add remote package feeds into repository manager configuration. The parameters
+        for the feeds are set by feed_uris, feed_base_paths and feed_archs.
+        See http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
+        for their description.
+        """
+        pass
+
+    def install_glob(self, globs, sdk=False):
+        """
+        Install all packages that match a glob.
+        """
+        # TODO don't have sdk here but have a property on the superclass
+        # (and respect in install_complementary)
+        if sdk:
+            pkgdatadir = self.d.expand("${TMPDIR}/pkgdata/${SDK_SYS}")
+        else:
+            pkgdatadir = self.d.getVar("PKGDATA_DIR")
+
+        try:
+            bb.note("Installing globbed packages...")
+            cmd = ["oe-pkgdata-util", "-p", pkgdatadir, "list-pkgs", globs]
+            pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
+            self.install(pkgs.split(), attempt_only=True)
+        except subprocess.CalledProcessError as e:
+            # Return code 1 means no packages matched
+            if e.returncode != 1:
+                bb.fatal("Could not compute globbed packages list. Command "
+                         "'%s' returned %d:\n%s" %
+                         (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+
+    def install_complementary(self, globs=None):
+        """
+        Install complementary packages based upon the list of currently installed
+        packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install
+        these packages, if they don't exist then no error will occur.  Note: every
+        backend needs to call this function explicitly after the normal package
+        installation
+        """
+        if globs is None:
+            globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY')
+            split_linguas = set()
+
+            for translation in self.d.getVar('IMAGE_LINGUAS').split():
+                split_linguas.add(translation)
+                split_linguas.add(translation.split('-')[0])
+
+            split_linguas = sorted(split_linguas)
+
+            for lang in split_linguas:
+                globs += " *-locale-%s" % lang
+                for complementary_linguas in (self.d.getVar('IMAGE_LINGUAS_COMPLEMENTARY') or "").split():
+                    globs += (" " + complementary_linguas) % lang
+
+        if globs is None:
+            return
+
+        # we need to write the list of installed packages to a file because the
+        # oe-pkgdata-util reads it from a file
+        with tempfile.NamedTemporaryFile(mode="w+", prefix="installed-pkgs") as installed_pkgs:
+            pkgs = self.list_installed()
+
+            provided_pkgs = set()
+            for pkg in pkgs.values():
+                provided_pkgs |= set(pkg.get('provs', []))
+
+            output = oe.utils.format_pkg_list(pkgs, "arch")
+            installed_pkgs.write(output)
+            installed_pkgs.flush()
+
+            cmd = ["oe-pkgdata-util",
+                   "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name,
+                   globs]
+            exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY')
+            if exclude:
+                cmd.extend(['--exclude=' + '|'.join(exclude.split())])
+            try:
+                bb.note('Running %s' % cmd)
+                complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
+                complementary_pkgs = set(complementary_pkgs.split())
+                skip_pkgs = sorted(complementary_pkgs & provided_pkgs)
+                install_pkgs = sorted(complementary_pkgs - provided_pkgs)
+                bb.note("Installing complementary packages ... %s (skipped already provided packages %s)" % (
+                    ' '.join(install_pkgs),
+                    ' '.join(skip_pkgs)))
+                self.install(install_pkgs, attempt_only=True)
+            except subprocess.CalledProcessError as e:
+                bb.fatal("Could not compute complementary packages list. Command "
+                         "'%s' returned %d:\n%s" %
+                         (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+
+        target_arch = self.d.getVar('TARGET_ARCH')
+        localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale")
+        if os.path.exists(localedir) and os.listdir(localedir):
+            generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir)
+            # And now delete the binary locales
+            self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False)
+
+    def deploy_dir_lock(self):
+        if self.deploy_dir is None:
+            raise RuntimeError("deploy_dir is not set!")
+
+        lock_file_name = os.path.join(self.deploy_dir, "deploy.lock")
+
+        self.deploy_lock = bb.utils.lockfile(lock_file_name)
+
+    def deploy_dir_unlock(self):
+        if self.deploy_lock is None:
+            return
+
+        bb.utils.unlockfile(self.deploy_lock)
+
+        self.deploy_lock = None
+
+    def construct_uris(self, uris, base_paths):
+        """
+        Construct URIs based on the following pattern: uri/base_path where 'uri'
+        and 'base_path' correspond to each element of the corresponding array
+        argument leading to len(uris) x len(base_paths) elements on the returned
+        array
+        """
+        def _append(arr1, arr2, sep='/'):
+            res = []
+            narr1 = [a.rstrip(sep) for a in arr1]
+            narr2 = [a.rstrip(sep).lstrip(sep) for a in arr2]
+            for a1 in narr1:
+                if arr2:
+                    for a2 in narr2:
+                        res.append("%s%s%s" % (a1, sep, a2))
+                else:
+                    res.append(a1)
+            return res
+        return _append(uris, base_paths)
+
+def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies):
+    """
+    Go through our do_package_write_X dependencies and hardlink the packages we depend
+    upon into the repo directory. This prevents us seeing other packages that may
+    have been built that we don't depend upon and also packages for architectures we don't
+    support.
+    """
+    import errno
+
+    taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+    mytaskname = d.getVar("BB_RUNTASK")
+    pn = d.getVar("PN")
+    seendirs = set()
+    multilibs = {}
+
+    bb.utils.remove(subrepo_dir, recurse=True)
+    bb.utils.mkdirhier(subrepo_dir)
+
+    # Detect bitbake -b usage
+    nodeps = d.getVar("BB_LIMITEDDEPS") or False
+    if nodeps or not filterbydependencies:
+        oe.path.symlink(deploydir, subrepo_dir, True)
+        return
+
+    start = None
+    for dep in taskdepdata:
+        data = taskdepdata[dep]
+        if data[1] == mytaskname and data[0] == pn:
+            start = dep
+            break
+    if start is None:
+        bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+    pkgdeps = set()
+    start = [start]
+    seen = set(start)
+    # Support direct dependencies (do_rootfs -> do_package_write_X)
+    # or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> do_package_write_X)
+    while start:
+        next = []
+        for dep2 in start:
+            for dep in taskdepdata[dep2][3]:
+                if taskdepdata[dep][0] != pn:
+                    if "do_" + taskname in dep:
+                        pkgdeps.add(dep)
+                elif dep not in seen:
+                    next.append(dep)
+                    seen.add(dep)
+        start = next
+
+    for dep in pkgdeps:
+        c = taskdepdata[dep][0]
+        manifest, d2 = oe.sstatesig.find_sstate_manifest(c, taskdepdata[dep][2], taskname, d, multilibs)
+        if not manifest:
+            bb.fatal("No manifest generated from: %s in %s" % (c, taskdepdata[dep][2]))
+        if not os.path.exists(manifest):
+            continue
+        with open(manifest, "r") as f:
+            for l in f:
+                l = l.strip()
+                deploydir = os.path.normpath(deploydir)
+                if bb.data.inherits_class('packagefeed-stability', d):
+                    dest = l.replace(deploydir + "-prediff", "")
+                else:
+                    dest = l.replace(deploydir, "")
+                dest = subrepo_dir + dest
+                if l.endswith("/"):
+                    if dest not in seendirs:
+                        bb.utils.mkdirhier(dest)
+                        seendirs.add(dest)
+                    continue
+                # Try to hardlink the file, copy if that fails
+                destdir = os.path.dirname(dest)
+                if destdir not in seendirs:
+                    bb.utils.mkdirhier(destdir)
+                    seendirs.add(destdir)
+                try:
+                    os.link(l, dest)
+                except OSError as err:
+                    if err.errno == errno.EXDEV:
+                        bb.utils.copyfile(l, dest)
+                    else:
+                        raise
+
+
+def generate_index_files(d):
+    from oe.package_manager.rpm import RpmSubdirIndexer
+    from oe.package_manager.ipk import OpkgIndexer
+    from oe.package_manager.deb import DpkgIndexer
+
+    classes = d.getVar('PACKAGE_CLASSES').replace("package_", "").split()
+
+    indexer_map = {
+        "rpm": (RpmSubdirIndexer, d.getVar('DEPLOY_DIR_RPM')),
+        "ipk": (OpkgIndexer, d.getVar('DEPLOY_DIR_IPK')),
+        "deb": (DpkgIndexer, d.getVar('DEPLOY_DIR_DEB'))
+    }
+
+    result = None
+
+    for pkg_class in classes:
+        if not pkg_class in indexer_map:
+            continue
+
+        if os.path.exists(indexer_map[pkg_class][1]):
+            result = indexer_map[pkg_class][0](d, indexer_map[pkg_class][1]).write_index()
+
+            if result is not None:
+                bb.fatal(result)
diff --git a/poky/meta/lib/oe/package_manager/deb/__init__.py b/poky/meta/lib/oe/package_manager/deb/__init__.py
new file mode 100644
index 0000000..72155b1
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/deb/__init__.py
@@ -0,0 +1,492 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import re
+import subprocess
+from oe.package_manager import *
+
+class DpkgIndexer(Indexer):
+    def _create_configs(self):
+        bb.utils.mkdirhier(self.apt_conf_dir)
+        bb.utils.mkdirhier(os.path.join(self.apt_conf_dir, "lists", "partial"))
+        bb.utils.mkdirhier(os.path.join(self.apt_conf_dir, "apt.conf.d"))
+        bb.utils.mkdirhier(os.path.join(self.apt_conf_dir, "preferences.d"))
+
+        with open(os.path.join(self.apt_conf_dir, "preferences"),
+                "w") as prefs_file:
+            pass
+        with open(os.path.join(self.apt_conf_dir, "sources.list"),
+                "w+") as sources_file:
+            pass
+
+        with open(self.apt_conf_file, "w") as apt_conf:
+            with open(os.path.join(self.d.expand("${STAGING_ETCDIR_NATIVE}"),
+                "apt", "apt.conf.sample")) as apt_conf_sample:
+                for line in apt_conf_sample.read().split("\n"):
+                    line = re.sub(r"#ROOTFS#", "/dev/null", line)
+                    line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
+                    apt_conf.write(line + "\n")
+
+    def write_index(self):
+        self.apt_conf_dir = os.path.join(self.d.expand("${APTCONF_TARGET}"),
+                "apt-ftparchive")
+        self.apt_conf_file = os.path.join(self.apt_conf_dir, "apt.conf")
+        self._create_configs()
+
+        os.environ['APT_CONFIG'] = self.apt_conf_file
+
+        pkg_archs = self.d.getVar('PACKAGE_ARCHS')
+        if pkg_archs is not None:
+            arch_list = pkg_archs.split()
+        sdk_pkg_archs = self.d.getVar('SDK_PACKAGE_ARCHS')
+        if sdk_pkg_archs is not None:
+            for a in sdk_pkg_archs.split():
+                if a not in pkg_archs:
+                    arch_list.append(a)
+
+        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").split()
+        arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in arch_list)
+
+        apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
+        gzip = bb.utils.which(os.getenv('PATH'), "gzip")
+
+        index_cmds = []
+        deb_dirs_found = False
+        for arch in arch_list:
+            arch_dir = os.path.join(self.deploy_dir, arch)
+            if not os.path.isdir(arch_dir):
+                continue
+
+            cmd = "cd %s; PSEUDO_UNLOAD=1 %s packages . > Packages;" % (arch_dir, apt_ftparchive)
+
+            cmd += "%s -fcn Packages > Packages.gz;" % gzip
+
+            with open(os.path.join(arch_dir, "Release"), "w+") as release:
+                release.write("Label: %s\n" % arch)
+
+            cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
+
+            index_cmds.append(cmd)
+
+            deb_dirs_found = True
+
+        if not deb_dirs_found:
+            bb.note("There are no packages in %s" % self.deploy_dir)
+            return
+
+        oe.utils.multiprocess_launch(create_index, index_cmds, self.d)
+        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
+            raise NotImplementedError('Package feed signing not implementd for dpkg')
+
+class DpkgPkgsList(PkgsList):
+
+    def list_pkgs(self):
+        cmd = [bb.utils.which(os.getenv('PATH'), "dpkg-query"),
+               "--admindir=%s/var/lib/dpkg" % self.rootfs_dir,
+               "-W"]
+
+        cmd.append("-f=Package: ${Package}\nArchitecture: ${PackageArch}\nVersion: ${Version}\nFile: ${Package}_${Version}_${Architecture}.deb\nDepends: ${Depends}\nRecommends: ${Recommends}\nProvides: ${Provides}\n\n")
+
+        try:
+            cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Cannot get the installed packages list. Command '%s' "
+                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+
+        return opkg_query(cmd_output)
+
+class OpkgDpkgPM(PackageManager):
+    def __init__(self, d, target_rootfs):
+        """
+        This is an abstract class. Do not instantiate this directly.
+        """
+        super(OpkgDpkgPM, self).__init__(d, target_rootfs)
+
+    def package_info(self, pkg, cmd):
+        """
+        Returns a dictionary with the package info.
+
+        This method extracts the common parts for Opkg and Dpkg
+        """
+
+        try:
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Unable to list available packages. Command '%s' "
+                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+        return opkg_query(output)
+
+    def extract(self, pkg, pkg_info):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+
+        Deleting the tmpdir is responsability of the caller.
+
+        This method extracts the common parts for Opkg and Dpkg
+        """
+
+        ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
+        tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
+        pkg_path = pkg_info[pkg]["filepath"]
+
+        if not os.path.isfile(pkg_path):
+            bb.fatal("Unable to extract package for '%s'."
+                     "File %s doesn't exists" % (pkg, pkg_path))
+
+        tmp_dir = tempfile.mkdtemp()
+        current_dir = os.getcwd()
+        os.chdir(tmp_dir)
+        data_tar = 'data.tar.xz'
+
+        try:
+            cmd = [ar_cmd, 'x', pkg_path]
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+            cmd = [tar_cmd, 'xf', data_tar]
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            bb.utils.remove(tmp_dir, recurse=True)
+            bb.fatal("Unable to extract %s package. Command '%s' "
+                     "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+        except OSError as e:
+            bb.utils.remove(tmp_dir, recurse=True)
+            bb.fatal("Unable to extract %s package. Command '%s' "
+                     "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
+
+        bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
+        bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
+        bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz"))
+        os.chdir(current_dir)
+
+        return tmp_dir
+
+    def _handle_intercept_failure(self, registered_pkgs):
+        self.mark_packages("unpacked", registered_pkgs.split())
+
+class DpkgPM(OpkgDpkgPM):
+    def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None, deb_repo_workdir="oe-rootfs-repo", filterbydependencies=True):
+        super(DpkgPM, self).__init__(d, target_rootfs)
+        self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), deb_repo_workdir)
+
+        create_packages_dir(self.d, self.deploy_dir, d.getVar("DEPLOY_DIR_DEB"), "package_write_deb", filterbydependencies)
+
+        if apt_conf_dir is None:
+            self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
+        else:
+            self.apt_conf_dir = apt_conf_dir
+        self.apt_conf_file = os.path.join(self.apt_conf_dir, "apt.conf")
+        self.apt_get_cmd = bb.utils.which(os.getenv('PATH'), "apt-get")
+        self.apt_cache_cmd = bb.utils.which(os.getenv('PATH'), "apt-cache")
+
+        self.apt_args = d.getVar("APT_ARGS")
+
+        self.all_arch_list = archs.split()
+        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or "").split()
+        self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
+
+        self._create_configs(archs, base_archs)
+
+        self.indexer = DpkgIndexer(self.d, self.deploy_dir)
+
+    def mark_packages(self, status_tag, packages=None):
+        """
+        This function will change a package's status in /var/lib/dpkg/status file.
+        If 'packages' is None then the new_status will be applied to all
+        packages
+        """
+        status_file = self.target_rootfs + "/var/lib/dpkg/status"
+
+        with open(status_file, "r") as sf:
+            with open(status_file + ".tmp", "w+") as tmp_sf:
+                if packages is None:
+                    tmp_sf.write(re.sub(r"Package: (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
+                                        r"Package: \1\n\2Status: \3%s" % status_tag,
+                                        sf.read()))
+                else:
+                    if type(packages).__name__ != "list":
+                        raise TypeError("'packages' should be a list object")
+
+                    status = sf.read()
+                    for pkg in packages:
+                        status = re.sub(r"Package: %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
+                                        r"Package: %s\n\1Status: \2%s" % (pkg, status_tag),
+                                        status)
+
+                    tmp_sf.write(status)
+
+        os.rename(status_file + ".tmp", status_file)
+
+    def run_pre_post_installs(self, package_name=None):
+        """
+        Run the pre/post installs for package "package_name". If package_name is
+        None, then run all pre/post install scriptlets.
+        """
+        info_dir = self.target_rootfs + "/var/lib/dpkg/info"
+        ControlScript = collections.namedtuple("ControlScript", ["suffix", "name", "argument"])
+        control_scripts = [
+                ControlScript(".preinst", "Preinstall", "install"),
+                ControlScript(".postinst", "Postinstall", "configure")]
+        status_file = self.target_rootfs + "/var/lib/dpkg/status"
+        installed_pkgs = []
+
+        with open(status_file, "r") as status:
+            for line in status.read().split('\n'):
+                m = re.match(r"^Package: (.*)", line)
+                if m is not None:
+                    installed_pkgs.append(m.group(1))
+
+        if package_name is not None and not package_name in installed_pkgs:
+            return
+
+        os.environ['D'] = self.target_rootfs
+        os.environ['OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
+        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
+
+        for pkg_name in installed_pkgs:
+            for control_script in control_scripts:
+                p_full = os.path.join(info_dir, pkg_name + control_script.suffix)
+                if os.path.exists(p_full):
+                    try:
+                        bb.note("Executing %s for package: %s ..." %
+                                 (control_script.name.lower(), pkg_name))
+                        output = subprocess.check_output([p_full, control_script.argument],
+                                stderr=subprocess.STDOUT).decode("utf-8")
+                        bb.note(output)
+                    except subprocess.CalledProcessError as e:
+                        bb.warn("%s for package %s failed with %d:\n%s" %
+                                (control_script.name, pkg_name, e.returncode,
+                                    e.output.decode("utf-8")))
+                        failed_postinsts_abort([pkg_name], self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
+
+    def update(self):
+        os.environ['APT_CONFIG'] = self.apt_conf_file
+
+        self.deploy_dir_lock()
+
+        cmd = "%s update" % self.apt_get_cmd
+
+        try:
+            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Unable to update the package index files. Command '%s' "
+                     "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
+
+        self.deploy_dir_unlock()
+
+    def install(self, pkgs, attempt_only=False):
+        if attempt_only and len(pkgs) == 0:
+            return
+
+        os.environ['APT_CONFIG'] = self.apt_conf_file
+
+        cmd = "%s %s install --force-yes --allow-unauthenticated --no-remove %s" % \
+              (self.apt_get_cmd, self.apt_args, ' '.join(pkgs))
+
+        try:
+            bb.note("Installing the following packages: %s" % ' '.join(pkgs))
+            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
+                                              "Command '%s' returned %d:\n%s" %
+                                              (cmd, e.returncode, e.output.decode("utf-8")))
+
+        # rename *.dpkg-new files/dirs
+        for root, dirs, files in os.walk(self.target_rootfs):
+            for dir in dirs:
+                new_dir = re.sub(r"\.dpkg-new", "", dir)
+                if dir != new_dir:
+                    os.rename(os.path.join(root, dir),
+                              os.path.join(root, new_dir))
+
+            for file in files:
+                new_file = re.sub(r"\.dpkg-new", "", file)
+                if file != new_file:
+                    os.rename(os.path.join(root, file),
+                              os.path.join(root, new_file))
+
+
+    def remove(self, pkgs, with_dependencies=True):
+        if not pkgs:
+            return
+
+        if with_dependencies:
+            os.environ['APT_CONFIG'] = self.apt_conf_file
+            cmd = "%s purge %s" % (self.apt_get_cmd, ' '.join(pkgs))
+        else:
+            cmd = "%s --admindir=%s/var/lib/dpkg --instdir=%s" \
+                  " -P --force-depends %s" % \
+                  (bb.utils.which(os.getenv('PATH'), "dpkg"),
+                   self.target_rootfs, self.target_rootfs, ' '.join(pkgs))
+
+        try:
+            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Unable to remove packages. Command '%s' "
+                     "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
+
+    def write_index(self):
+        self.deploy_dir_lock()
+
+        result = self.indexer.write_index()
+
+        self.deploy_dir_unlock()
+
+        if result is not None:
+            bb.fatal(result)
+
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        if feed_uris == "":
+            return
+
+        sources_conf = os.path.join("%s/etc/apt/sources.list"
+                                    % self.target_rootfs)
+        arch_list = []
+
+        if feed_archs is None:
+            for arch in self.all_arch_list:
+                if not os.path.exists(os.path.join(self.deploy_dir, arch)):
+                    continue
+                arch_list.append(arch)
+        else:
+            arch_list = feed_archs.split()
+
+        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
+
+        with open(sources_conf, "w+") as sources_file:
+            for uri in feed_uris:
+                if arch_list:
+                    for arch in arch_list:
+                        bb.note('Adding dpkg channel at (%s)' % uri)
+                        sources_file.write("deb %s/%s ./\n" %
+                                           (uri, arch))
+                else:
+                    bb.note('Adding dpkg channel at (%s)' % uri)
+                    sources_file.write("deb %s ./\n" % uri)
+
+    def _create_configs(self, archs, base_archs):
+        base_archs = re.sub(r"_", r"-", base_archs)
+
+        if os.path.exists(self.apt_conf_dir):
+            bb.utils.remove(self.apt_conf_dir, True)
+
+        bb.utils.mkdirhier(self.apt_conf_dir)
+        bb.utils.mkdirhier(self.apt_conf_dir + "/lists/partial/")
+        bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/")
+        bb.utils.mkdirhier(self.apt_conf_dir + "/preferences.d/")
+
+        arch_list = []
+        for arch in self.all_arch_list:
+            if not os.path.exists(os.path.join(self.deploy_dir, arch)):
+                continue
+            arch_list.append(arch)
+
+        with open(os.path.join(self.apt_conf_dir, "preferences"), "w+") as prefs_file:
+            priority = 801
+            for arch in arch_list:
+                prefs_file.write(
+                    "Package: *\n"
+                    "Pin: release l=%s\n"
+                    "Pin-Priority: %d\n\n" % (arch, priority))
+
+                priority += 5
+
+            pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE') or ""
+            for pkg in pkg_exclude.split():
+                prefs_file.write(
+                    "Package: %s\n"
+                    "Pin: release *\n"
+                    "Pin-Priority: -1\n\n" % pkg)
+
+        arch_list.reverse()
+
+        with open(os.path.join(self.apt_conf_dir, "sources.list"), "w+") as sources_file:
+            for arch in arch_list:
+                sources_file.write("deb file:%s/ ./\n" %
+                                   os.path.join(self.deploy_dir, arch))
+
+        base_arch_list = base_archs.split()
+        multilib_variants = self.d.getVar("MULTILIB_VARIANTS");
+        for variant in multilib_variants.split():
+            localdata = bb.data.createCopy(self.d)
+            variant_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, False)
+            orig_arch = localdata.getVar("DPKG_ARCH")
+            localdata.setVar("DEFAULTTUNE", variant_tune)
+            variant_arch = localdata.getVar("DPKG_ARCH")
+            if variant_arch not in base_arch_list:
+                base_arch_list.append(variant_arch)
+
+        with open(self.apt_conf_file, "w+") as apt_conf:
+            with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample:
+                for line in apt_conf_sample.read().split("\n"):
+                    match_arch = re.match(r"  Architecture \".*\";$", line)
+                    architectures = ""
+                    if match_arch:
+                        for base_arch in base_arch_list:
+                            architectures += "\"%s\";" % base_arch
+                        apt_conf.write("  Architectures {%s};\n" % architectures);
+                        apt_conf.write("  Architecture \"%s\";\n" % base_archs)
+                    else:
+                        line = re.sub(r"#ROOTFS#", self.target_rootfs, line)
+                        line = re.sub(r"#APTCONF#", self.apt_conf_dir, line)
+                        apt_conf.write(line + "\n")
+
+        target_dpkg_dir = "%s/var/lib/dpkg" % self.target_rootfs
+        bb.utils.mkdirhier(os.path.join(target_dpkg_dir, "info"))
+
+        bb.utils.mkdirhier(os.path.join(target_dpkg_dir, "updates"))
+
+        if not os.path.exists(os.path.join(target_dpkg_dir, "status")):
+            open(os.path.join(target_dpkg_dir, "status"), "w+").close()
+        if not os.path.exists(os.path.join(target_dpkg_dir, "available")):
+            open(os.path.join(target_dpkg_dir, "available"), "w+").close()
+
+    def remove_packaging_data(self):
+        bb.utils.remove(self.target_rootfs + self.d.getVar('opkglibdir'), True)
+        bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True)
+
+    def fix_broken_dependencies(self):
+        os.environ['APT_CONFIG'] = self.apt_conf_file
+
+        cmd = "%s %s --allow-unauthenticated -f install" % (self.apt_get_cmd, self.apt_args)
+
+        try:
+            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Cannot fix broken dependencies. Command '%s' "
+                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+
+    def list_installed(self):
+        return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
+
+    def package_info(self, pkg):
+        """
+        Returns a dictionary with the package info.
+        """
+        cmd = "%s show %s" % (self.apt_cache_cmd, pkg)
+        pkg_info = super(DpkgPM, self).package_info(pkg, cmd)
+
+        pkg_arch = pkg_info[pkg]["pkgarch"]
+        pkg_filename = pkg_info[pkg]["filename"]
+        pkg_info[pkg]["filepath"] = \
+                os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
+
+        return pkg_info
+
+    def extract(self, pkg):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+
+        Deleting the tmpdir is responsability of the caller.
+        """
+        pkg_info = self.package_info(pkg)
+        if not pkg_info:
+            bb.fatal("Unable to get information for package '%s' while "
+                     "trying to extract the package."  % pkg)
+
+        tmp_dir = super(DpkgPM, self).extract(pkg, pkg_info)
+        bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
+
+        return tmp_dir
diff --git a/poky/meta/lib/oe/package_manager/deb/manifest.py b/poky/meta/lib/oe/package_manager/deb/manifest.py
new file mode 100644
index 0000000..0b12036
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/deb/manifest.py
@@ -0,0 +1,26 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from oe.manifest import Manifest
+
+class DpkgManifest(Manifest):
+    def create_initial(self):
+        with open(self.initial_manifest, "w+") as manifest:
+            manifest.write(self.initial_manifest_file_header)
+
+            for var in self.var_maps[self.manifest_type]:
+                pkg_list = self.d.getVar(var)
+
+                if pkg_list is None:
+                    continue
+
+                for pkg in pkg_list.split():
+                    manifest.write("%s,%s\n" %
+                                   (self.var_maps[self.manifest_type][var], pkg))
+
+    def create_final(self):
+        pass
+
+    def create_full(self, pm):
+        pass
diff --git a/poky/meta/lib/oe/package_manager/deb/rootfs.py b/poky/meta/lib/oe/package_manager/deb/rootfs.py
new file mode 100644
index 0000000..819f67e
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/deb/rootfs.py
@@ -0,0 +1,210 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import re
+import shutil
+from oe.rootfs import Rootfs
+from oe.manifest import Manifest
+from oe.utils import execute_pre_post_process
+from oe.package_manager.deb.manifest import DpkgManifest
+from oe.package_manager.deb import DpkgPM
+
+class DpkgOpkgRootfs(Rootfs):
+    def __init__(self, d, progress_reporter=None, logcatcher=None):
+        super(DpkgOpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
+
+    def _get_pkgs_postinsts(self, status_file):
+        def _get_pkg_depends_list(pkg_depends):
+            pkg_depends_list = []
+            # filter version requirements like libc (>= 1.1)
+            for dep in pkg_depends.split(', '):
+                m_dep = re.match(r"^(.*) \(.*\)$", dep)
+                if m_dep:
+                    dep = m_dep.group(1)
+                pkg_depends_list.append(dep)
+
+            return pkg_depends_list
+
+        pkgs = {}
+        pkg_name = ""
+        pkg_status_match = False
+        pkg_depends = ""
+
+        with open(status_file) as status:
+            data = status.read()
+            status.close()
+            for line in data.split('\n'):
+                m_pkg = re.match(r"^Package: (.*)", line)
+                m_status = re.match(r"^Status:.*unpacked", line)
+                m_depends = re.match(r"^Depends: (.*)", line)
+
+                #Only one of m_pkg, m_status or m_depends is not None at time
+                #If m_pkg is not None, we started a new package
+                if m_pkg is not None:
+                    #Get Package name
+                    pkg_name = m_pkg.group(1)
+                    #Make sure we reset other variables
+                    pkg_status_match = False
+                    pkg_depends = ""
+                elif m_status is not None:
+                    #New status matched
+                    pkg_status_match = True
+                elif m_depends is not None:
+                    #New depends macthed
+                    pkg_depends = m_depends.group(1)
+                else:
+                    pass
+
+                #Now check if we can process package depends and postinst
+                if "" != pkg_name and pkg_status_match:
+                    pkgs[pkg_name] = _get_pkg_depends_list(pkg_depends)
+                else:
+                    #Not enough information
+                    pass
+
+        # remove package dependencies not in postinsts
+        pkg_names = list(pkgs.keys())
+        for pkg_name in pkg_names:
+            deps = pkgs[pkg_name][:]
+
+            for d in deps:
+                if d not in pkg_names:
+                    pkgs[pkg_name].remove(d)
+
+        return pkgs
+
+    def _get_delayed_postinsts_common(self, status_file):
+        def _dep_resolve(graph, node, resolved, seen):
+            seen.append(node)
+
+            for edge in graph[node]:
+                if edge not in resolved:
+                    if edge in seen:
+                        raise RuntimeError("Packages %s and %s have " \
+                                "a circular dependency in postinsts scripts." \
+                                % (node, edge))
+                    _dep_resolve(graph, edge, resolved, seen)
+
+            resolved.append(node)
+
+        pkg_list = []
+
+        pkgs = None
+        if not self.d.getVar('PACKAGE_INSTALL').strip():
+            bb.note("Building empty image")
+        else:
+            pkgs = self._get_pkgs_postinsts(status_file)
+        if pkgs:
+            root = "__packagegroup_postinst__"
+            pkgs[root] = list(pkgs.keys())
+            _dep_resolve(pkgs, root, pkg_list, [])
+            pkg_list.remove(root)
+
+        if len(pkg_list) == 0:
+            return None
+
+        return pkg_list
+
+    def _save_postinsts_common(self, dst_postinst_dir, src_postinst_dir):
+        if bb.utils.contains("IMAGE_FEATURES", "package-management",
+                         True, False, self.d):
+            return
+        num = 0
+        for p in self._get_delayed_postinsts():
+            bb.utils.mkdirhier(dst_postinst_dir)
+
+            if os.path.exists(os.path.join(src_postinst_dir, p + ".postinst")):
+                shutil.copy(os.path.join(src_postinst_dir, p + ".postinst"),
+                            os.path.join(dst_postinst_dir, "%03d-%s" % (num, p)))
+
+            num += 1
+
+class DpkgRootfs(DpkgOpkgRootfs):
+    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+        super(DpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
+        self.log_check_regex = '^E:'
+        self.log_check_expected_regexes = \
+        [
+            "^E: Unmet dependencies."
+        ]
+
+        bb.utils.remove(self.image_rootfs, True)
+        bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
+        self.manifest = DpkgManifest(d, manifest_dir)
+        self.pm = DpkgPM(d, d.getVar('IMAGE_ROOTFS'),
+                         d.getVar('PACKAGE_ARCHS'),
+                         d.getVar('DPKG_ARCH'))
+
+
+    def _create(self):
+        pkgs_to_install = self.manifest.parse_initial_manifest()
+        deb_pre_process_cmds = self.d.getVar('DEB_PREPROCESS_COMMANDS')
+        deb_post_process_cmds = self.d.getVar('DEB_POSTPROCESS_COMMANDS')
+
+        alt_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/alternatives")
+        bb.utils.mkdirhier(alt_dir)
+
+        # update PM index files
+        self.pm.write_index()
+
+        execute_pre_post_process(self.d, deb_pre_process_cmds)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+            # Don't support incremental, so skip that
+            self.progress_reporter.next_stage()
+
+        self.pm.update()
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        for pkg_type in self.install_order:
+            if pkg_type in pkgs_to_install:
+                self.pm.install(pkgs_to_install[pkg_type],
+                                [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+                self.pm.fix_broken_dependencies()
+
+        if self.progress_reporter:
+            # Don't support attemptonly, so skip that
+            self.progress_reporter.next_stage()
+            self.progress_reporter.next_stage()
+
+        self.pm.install_complementary()
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        self._setup_dbg_rootfs(['/var/lib/dpkg'])
+
+        self.pm.fix_broken_dependencies()
+
+        self.pm.mark_packages("installed")
+
+        self.pm.run_pre_post_installs()
+
+        execute_pre_post_process(self.d, deb_post_process_cmds)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+    @staticmethod
+    def _depends_list():
+        return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMANDS']
+
+    def _get_delayed_postinsts(self):
+        status_file = self.image_rootfs + "/var/lib/dpkg/status"
+        return self._get_delayed_postinsts_common(status_file)
+
+    def _save_postinsts(self):
+        dst_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/deb-postinsts")
+        src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/info")
+        return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
+
+    def _log_check(self):
+        self._log_check_warn()
+        self._log_check_error()
+
+    def _cleanup(self):
+        pass
diff --git a/poky/meta/lib/oe/package_manager/deb/sdk.py b/poky/meta/lib/oe/package_manager/deb/sdk.py
new file mode 100644
index 0000000..b25eb70
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/deb/sdk.py
@@ -0,0 +1,96 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import glob
+import shutil
+from oe.utils import execute_pre_post_process
+from oe.sdk import Sdk
+from oe.manifest import Manifest
+from oe.package_manager.deb import DpkgPM
+
+class DpkgSdk(Sdk):
+    def __init__(self, d, manifest_dir=None):
+        super(DpkgSdk, self).__init__(d, manifest_dir)
+
+        self.target_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt")
+        self.host_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt-sdk")
+
+        from oe.package_manager.deb.manifest import DpkgManifest
+
+        self.target_manifest = DpkgManifest(d, self.manifest_dir,
+                                            Manifest.MANIFEST_TYPE_SDK_TARGET)
+        self.host_manifest = DpkgManifest(d, self.manifest_dir,
+                                          Manifest.MANIFEST_TYPE_SDK_HOST)
+
+        deb_repo_workdir = "oe-sdk-repo"
+        if "sdk_ext" in d.getVar("BB_RUNTASK"):
+            deb_repo_workdir = "oe-sdk-ext-repo"
+
+        self.target_pm = DpkgPM(d, self.sdk_target_sysroot,
+                                self.d.getVar("PACKAGE_ARCHS"),
+                                self.d.getVar("DPKG_ARCH"),
+                                self.target_conf_dir,
+                                deb_repo_workdir=deb_repo_workdir)
+
+        self.host_pm = DpkgPM(d, self.sdk_host_sysroot,
+                              self.d.getVar("SDK_PACKAGE_ARCHS"),
+                              self.d.getVar("DEB_SDK_ARCH"),
+                              self.host_conf_dir,
+                              deb_repo_workdir=deb_repo_workdir)
+
+    def _copy_apt_dir_to(self, dst_dir):
+        staging_etcdir_native = self.d.getVar("STAGING_ETCDIR_NATIVE")
+
+        self.remove(dst_dir, True)
+
+        shutil.copytree(os.path.join(staging_etcdir_native, "apt"), dst_dir)
+
+    def _populate_sysroot(self, pm, manifest):
+        pkgs_to_install = manifest.parse_initial_manifest()
+
+        pm.write_index()
+        pm.update()
+
+        for pkg_type in self.install_order:
+            if pkg_type in pkgs_to_install:
+                pm.install(pkgs_to_install[pkg_type],
+                           [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+
+    def _populate(self):
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
+        bb.note("Installing TARGET packages")
+        self._populate_sysroot(self.target_pm, self.target_manifest)
+
+        self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
+
+        self.target_pm.run_intercepts(populate_sdk='target')
+
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
+
+        self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
+
+        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+            self.target_pm.remove_packaging_data()
+
+        bb.note("Installing NATIVESDK packages")
+        self._populate_sysroot(self.host_pm, self.host_manifest)
+        self.install_locales(self.host_pm)
+
+        self.host_pm.run_intercepts(populate_sdk='host')
+
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
+
+        self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
+                                           "etc", "apt"))
+
+        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+            self.host_pm.remove_packaging_data()
+
+        native_dpkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
+                                             "var", "lib", "dpkg")
+        self.mkdirhier(native_dpkg_state_dir)
+        for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "dpkg", "*")):
+            self.movefile(f, native_dpkg_state_dir)
+        self.remove(os.path.join(self.sdk_output, "var"), True)
diff --git a/poky/meta/lib/oe/package_manager/ipk/__init__.py b/poky/meta/lib/oe/package_manager/ipk/__init__.py
new file mode 100644
index 0000000..9603993
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/ipk/__init__.py
@@ -0,0 +1,507 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import re
+import shutil
+import subprocess
+from oe.package_manager import *
+
+class OpkgIndexer(Indexer):
+    def write_index(self):
+        arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS",
+                     "SDK_PACKAGE_ARCHS",
+                     ]
+
+        opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index")
+        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
+            signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
+        else:
+            signer = None
+
+        if not os.path.exists(os.path.join(self.deploy_dir, "Packages")):
+            open(os.path.join(self.deploy_dir, "Packages"), "w").close()
+
+        index_cmds = set()
+        index_sign_files = set()
+        for arch_var in arch_vars:
+            archs = self.d.getVar(arch_var)
+            if archs is None:
+                continue
+
+            for arch in archs.split():
+                pkgs_dir = os.path.join(self.deploy_dir, arch)
+                pkgs_file = os.path.join(pkgs_dir, "Packages")
+
+                if not os.path.isdir(pkgs_dir):
+                    continue
+
+                if not os.path.exists(pkgs_file):
+                    open(pkgs_file, "w").close()
+
+                index_cmds.add('%s --checksum md5 --checksum sha256 -r %s -p %s -m %s' %
+                                  (opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir))
+
+                index_sign_files.add(pkgs_file)
+
+        if len(index_cmds) == 0:
+            bb.note("There are no packages in %s!" % self.deploy_dir)
+            return
+
+        oe.utils.multiprocess_launch(create_index, index_cmds, self.d)
+
+        if signer:
+            feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
+            is_ascii_sig = (feed_sig_type.upper() != "BIN")
+            for f in index_sign_files:
+                signer.detach_sign(f,
+                                   self.d.getVar('PACKAGE_FEED_GPG_NAME'),
+                                   self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
+                                   armor=is_ascii_sig)
+
+class OpkgPkgsList(PkgsList):
+    def __init__(self, d, rootfs_dir, config_file):
+        super(OpkgPkgsList, self).__init__(d, rootfs_dir)
+
+        self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
+        self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir)
+        self.opkg_args += self.d.getVar("OPKG_ARGS")
+
+    def list_pkgs(self, format=None):
+        cmd = "%s %s status" % (self.opkg_cmd, self.opkg_args)
+
+        # opkg returns success even when it printed some
+        # "Collected errors:" report to stderr. Mixing stderr into
+        # stdout then leads to random failures later on when
+        # parsing the output. To avoid this we need to collect both
+        # output streams separately and check for empty stderr.
+        p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+        cmd_output, cmd_stderr = p.communicate()
+        cmd_output = cmd_output.decode("utf-8")
+        cmd_stderr = cmd_stderr.decode("utf-8")
+        if p.returncode or cmd_stderr:
+            bb.fatal("Cannot get the installed packages list. Command '%s' "
+                     "returned %d and stderr:\n%s" % (cmd, p.returncode, cmd_stderr))
+
+        return opkg_query(cmd_output)
+
+
+
+class OpkgDpkgPM(PackageManager):
+    def __init__(self, d, target_rootfs):
+        """
+        This is an abstract class. Do not instantiate this directly.
+        """
+        super(OpkgDpkgPM, self).__init__(d, target_rootfs)
+
+    def package_info(self, pkg, cmd):
+        """
+        Returns a dictionary with the package info.
+
+        This method extracts the common parts for Opkg and Dpkg
+        """
+
+        try:
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Unable to list available packages. Command '%s' "
+                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+        return opkg_query(output)
+
+    def extract(self, pkg, pkg_info):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+
+        Deleting the tmpdir is responsability of the caller.
+
+        This method extracts the common parts for Opkg and Dpkg
+        """
+
+        ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
+        tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
+        pkg_path = pkg_info[pkg]["filepath"]
+
+        if not os.path.isfile(pkg_path):
+            bb.fatal("Unable to extract package for '%s'."
+                     "File %s doesn't exists" % (pkg, pkg_path))
+
+        tmp_dir = tempfile.mkdtemp()
+        current_dir = os.getcwd()
+        os.chdir(tmp_dir)
+        data_tar = 'data.tar.xz'
+
+        try:
+            cmd = [ar_cmd, 'x', pkg_path]
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+            cmd = [tar_cmd, 'xf', data_tar]
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            bb.utils.remove(tmp_dir, recurse=True)
+            bb.fatal("Unable to extract %s package. Command '%s' "
+                     "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+        except OSError as e:
+            bb.utils.remove(tmp_dir, recurse=True)
+            bb.fatal("Unable to extract %s package. Command '%s' "
+                     "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
+
+        bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
+        bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
+        bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz"))
+        os.chdir(current_dir)
+
+        return tmp_dir
+
+    def _handle_intercept_failure(self, registered_pkgs):
+        self.mark_packages("unpacked", registered_pkgs.split())
+
+class OpkgPM(OpkgDpkgPM):
+    def __init__(self, d, target_rootfs, config_file, archs, task_name='target', ipk_repo_workdir="oe-rootfs-repo", filterbydependencies=True, prepare_index=True):
+        super(OpkgPM, self).__init__(d, target_rootfs)
+
+        self.config_file = config_file
+        self.pkg_archs = archs
+        self.task_name = task_name
+
+        self.deploy_dir = oe.path.join(self.d.getVar('WORKDIR'), ipk_repo_workdir)
+        self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock")
+        self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
+        self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs)
+        self.opkg_args += self.d.getVar("OPKG_ARGS")
+
+        if prepare_index:
+            create_packages_dir(self.d, self.deploy_dir, d.getVar("DEPLOY_DIR_IPK"), "package_write_ipk", filterbydependencies)
+
+        opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
+        if opkg_lib_dir[0] == "/":
+            opkg_lib_dir = opkg_lib_dir[1:]
+
+        self.opkg_dir = os.path.join(target_rootfs, opkg_lib_dir, "opkg")
+
+        bb.utils.mkdirhier(self.opkg_dir)
+
+        self.saved_opkg_dir = self.d.expand('${T}/saved/%s' % self.task_name)
+        if not os.path.exists(self.d.expand('${T}/saved')):
+            bb.utils.mkdirhier(self.d.expand('${T}/saved'))
+
+        self.from_feeds = (self.d.getVar('BUILD_IMAGES_FROM_FEEDS') or "") == "1"
+        if self.from_feeds:
+            self._create_custom_config()
+        else:
+            self._create_config()
+
+        self.indexer = OpkgIndexer(self.d, self.deploy_dir)
+
+    def mark_packages(self, status_tag, packages=None):
+        """
+        This function will change a package's status in /var/lib/opkg/status file.
+        If 'packages' is None then the new_status will be applied to all
+        packages
+        """
+        status_file = os.path.join(self.opkg_dir, "status")
+
+        with open(status_file, "r") as sf:
+            with open(status_file + ".tmp", "w+") as tmp_sf:
+                if packages is None:
+                    tmp_sf.write(re.sub(r"Package: (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
+                                        r"Package: \1\n\2Status: \3%s" % status_tag,
+                                        sf.read()))
+                else:
+                    if type(packages).__name__ != "list":
+                        raise TypeError("'packages' should be a list object")
+
+                    status = sf.read()
+                    for pkg in packages:
+                        status = re.sub(r"Package: %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
+                                        r"Package: %s\n\1Status: \2%s" % (pkg, status_tag),
+                                        status)
+
+                    tmp_sf.write(status)
+
+        os.rename(status_file + ".tmp", status_file)
+
+    def _create_custom_config(self):
+        bb.note("Building from feeds activated!")
+
+        with open(self.config_file, "w+") as config_file:
+            priority = 1
+            for arch in self.pkg_archs.split():
+                config_file.write("arch %s %d\n" % (arch, priority))
+                priority += 5
+
+            for line in (self.d.getVar('IPK_FEED_URIS') or "").split():
+                feed_match = re.match(r"^[ \t]*(.*)##([^ \t]*)[ \t]*$", line)
+
+                if feed_match is not None:
+                    feed_name = feed_match.group(1)
+                    feed_uri = feed_match.group(2)
+
+                    bb.note("Add %s feed with URL %s" % (feed_name, feed_uri))
+
+                    config_file.write("src/gz %s %s\n" % (feed_name, feed_uri))
+
+            """
+            Allow to use package deploy directory contents as quick devel-testing
+            feed. This creates individual feed configs for each arch subdir of those
+            specified as compatible for the current machine.
+            NOTE: Development-helper feature, NOT a full-fledged feed.
+            """
+            if (self.d.getVar('FEED_DEPLOYDIR_BASE_URI') or "") != "":
+                for arch in self.pkg_archs.split():
+                    cfg_file_name = os.path.join(self.target_rootfs,
+                                                 self.d.getVar("sysconfdir"),
+                                                 "opkg",
+                                                 "local-%s-feed.conf" % arch)
+
+                    with open(cfg_file_name, "w+") as cfg_file:
+                        cfg_file.write("src/gz local-%s %s/%s" %
+                                       (arch,
+                                        self.d.getVar('FEED_DEPLOYDIR_BASE_URI'),
+                                        arch))
+
+                        if self.d.getVar('OPKGLIBDIR') != '/var/lib':
+                            # There is no command line option for this anymore, we need to add
+                            # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
+                            # the default value of "/var/lib" as defined in opkg:
+                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR     VARDIR "/lib/opkg/lists"
+                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      VARDIR "/lib/opkg/info"
+                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   VARDIR "/lib/opkg/status"
+                            cfg_file.write("option info_dir     %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
+                            cfg_file.write("option lists_dir    %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists'))
+                            cfg_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
+
+
+    def _create_config(self):
+        with open(self.config_file, "w+") as config_file:
+            priority = 1
+            for arch in self.pkg_archs.split():
+                config_file.write("arch %s %d\n" % (arch, priority))
+                priority += 5
+
+            config_file.write("src oe file:%s\n" % self.deploy_dir)
+
+            for arch in self.pkg_archs.split():
+                pkgs_dir = os.path.join(self.deploy_dir, arch)
+                if os.path.isdir(pkgs_dir):
+                    config_file.write("src oe-%s file:%s\n" %
+                                      (arch, pkgs_dir))
+
+            if self.d.getVar('OPKGLIBDIR') != '/var/lib':
+                # There is no command line option for this anymore, we need to add
+                # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
+                # the default value of "/var/lib" as defined in opkg:
+                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR     VARDIR "/lib/opkg/lists"
+                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      VARDIR "/lib/opkg/info"
+                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   VARDIR "/lib/opkg/status"
+                config_file.write("option info_dir     %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
+                config_file.write("option lists_dir    %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists'))
+                config_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
+
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        if feed_uris == "":
+            return
+
+        rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
+                                  % self.target_rootfs)
+
+        os.makedirs('%s/etc/opkg' % self.target_rootfs, exist_ok=True)
+
+        feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
+        archs = self.pkg_archs.split() if feed_archs is None else feed_archs.split()
+
+        with open(rootfs_config, "w+") as config_file:
+            uri_iterator = 0
+            for uri in feed_uris:
+                if archs:
+                    for arch in archs:
+                        if (feed_archs is None) and (not os.path.exists(oe.path.join(self.deploy_dir, arch))):
+                            continue
+                        bb.note('Adding opkg feed url-%s-%d (%s)' %
+                            (arch, uri_iterator, uri))
+                        config_file.write("src/gz uri-%s-%d %s/%s\n" %
+                                          (arch, uri_iterator, uri, arch))
+                else:
+                    bb.note('Adding opkg feed url-%d (%s)' %
+                        (uri_iterator, uri))
+                    config_file.write("src/gz uri-%d %s\n" %
+                                      (uri_iterator, uri))
+
+                uri_iterator += 1
+
+    def update(self):
+        self.deploy_dir_lock()
+
+        cmd = "%s %s update" % (self.opkg_cmd, self.opkg_args)
+
+        try:
+            subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            self.deploy_dir_unlock()
+            bb.fatal("Unable to update the package index files. Command '%s' "
+                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+
+        self.deploy_dir_unlock()
+
+    def install(self, pkgs, attempt_only=False):
+        if not pkgs:
+            return
+
+        cmd = "%s %s" % (self.opkg_cmd, self.opkg_args)
+        for exclude in (self.d.getVar("PACKAGE_EXCLUDE") or "").split():
+            cmd += " --add-exclude %s" % exclude
+        for bad_recommendation in (self.d.getVar("BAD_RECOMMENDATIONS") or "").split():
+            cmd += " --add-ignore-recommends %s" % bad_recommendation
+        cmd += " install "
+        cmd += " ".join(pkgs)
+
+        os.environ['D'] = self.target_rootfs
+        os.environ['OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
+        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
+
+        try:
+            bb.note("Installing the following packages: %s" % ' '.join(pkgs))
+            bb.note(cmd)
+            output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
+            bb.note(output)
+            failed_pkgs = []
+            for line in output.split('\n'):
+                if line.endswith("configuration required on target."):
+                    bb.warn(line)
+                    failed_pkgs.append(line.split(".")[0])
+            if failed_pkgs:
+                failed_postinsts_abort(failed_pkgs, self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
+        except subprocess.CalledProcessError as e:
+            (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
+                                              "Command '%s' returned %d:\n%s" %
+                                              (cmd, e.returncode, e.output.decode("utf-8")))
+
+    def remove(self, pkgs, with_dependencies=True):
+        if not pkgs:
+            return
+
+        if with_dependencies:
+            cmd = "%s %s --force-remove --force-removal-of-dependent-packages remove %s" % \
+                (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
+        else:
+            cmd = "%s %s --force-depends remove %s" % \
+                (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
+
+        try:
+            bb.note(cmd)
+            output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
+            bb.note(output)
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Unable to remove packages. Command '%s' "
+                     "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
+
+    def write_index(self):
+        self.deploy_dir_lock()
+
+        result = self.indexer.write_index()
+
+        self.deploy_dir_unlock()
+
+        if result is not None:
+            bb.fatal(result)
+
+    def remove_packaging_data(self):
+        bb.utils.remove(self.opkg_dir, True)
+        # create the directory back, it's needed by PM lock
+        bb.utils.mkdirhier(self.opkg_dir)
+
+    def remove_lists(self):
+        if not self.from_feeds:
+            bb.utils.remove(os.path.join(self.opkg_dir, "lists"), True)
+
+    def list_installed(self):
+        return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs()
+
+    def dummy_install(self, pkgs):
+        """
+        The following function dummy installs pkgs and returns the log of output.
+        """
+        if len(pkgs) == 0:
+            return
+
+        # Create an temp dir as opkg root for dummy installation
+        temp_rootfs = self.d.expand('${T}/opkg')
+        opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
+        if opkg_lib_dir[0] == "/":
+            opkg_lib_dir = opkg_lib_dir[1:]
+        temp_opkg_dir = os.path.join(temp_rootfs, opkg_lib_dir, 'opkg')
+        bb.utils.mkdirhier(temp_opkg_dir)
+
+        opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs)
+        opkg_args += self.d.getVar("OPKG_ARGS")
+
+        cmd = "%s %s update" % (self.opkg_cmd, opkg_args)
+        try:
+            subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Unable to update. Command '%s' "
+                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+
+        # Dummy installation
+        cmd = "%s %s --noaction install %s " % (self.opkg_cmd,
+                                                opkg_args,
+                                                ' '.join(pkgs))
+        try:
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Unable to dummy install packages. Command '%s' "
+                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+
+        bb.utils.remove(temp_rootfs, True)
+
+        return output
+
+    def backup_packaging_data(self):
+        # Save the opkglib for increment ipk image generation
+        if os.path.exists(self.saved_opkg_dir):
+            bb.utils.remove(self.saved_opkg_dir, True)
+        shutil.copytree(self.opkg_dir,
+                        self.saved_opkg_dir,
+                        symlinks=True)
+
+    def recover_packaging_data(self):
+        # Move the opkglib back
+        if os.path.exists(self.saved_opkg_dir):
+            if os.path.exists(self.opkg_dir):
+                bb.utils.remove(self.opkg_dir, True)
+
+            bb.note('Recover packaging data')
+            shutil.copytree(self.saved_opkg_dir,
+                            self.opkg_dir,
+                            symlinks=True)
+
+    def package_info(self, pkg):
+        """
+        Returns a dictionary with the package info.
+        """
+        cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg)
+        pkg_info = super(OpkgPM, self).package_info(pkg, cmd)
+
+        pkg_arch = pkg_info[pkg]["arch"]
+        pkg_filename = pkg_info[pkg]["filename"]
+        pkg_info[pkg]["filepath"] = \
+                os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
+
+        return pkg_info
+
+    def extract(self, pkg):
+        """
+        Returns the path to a tmpdir where resides the contents of a package.
+
+        Deleting the tmpdir is responsability of the caller.
+        """
+        pkg_info = self.package_info(pkg)
+        if not pkg_info:
+            bb.fatal("Unable to get information for package '%s' while "
+                     "trying to extract the package."  % pkg)
+
+        tmp_dir = super(OpkgPM, self).extract(pkg, pkg_info)
+        bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
+
+        return tmp_dir
diff --git a/poky/meta/lib/oe/package_manager/ipk/manifest.py b/poky/meta/lib/oe/package_manager/ipk/manifest.py
new file mode 100644
index 0000000..6967690
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/ipk/manifest.py
@@ -0,0 +1,73 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from oe.manifest import Manifest
+
+class OpkgManifest(Manifest):
+    """
+    Returns a dictionary object with mip and mlp packages.
+    """
+    def _split_multilib(self, pkg_list):
+        pkgs = dict()
+
+        for pkg in pkg_list.split():
+            pkg_type = self.PKG_TYPE_MUST_INSTALL
+
+            ml_variants = self.d.getVar('MULTILIB_VARIANTS').split()
+
+            for ml_variant in ml_variants:
+                if pkg.startswith(ml_variant + '-'):
+                    pkg_type = self.PKG_TYPE_MULTILIB
+
+            if not pkg_type in pkgs:
+                pkgs[pkg_type] = pkg
+            else:
+                pkgs[pkg_type] += " " + pkg
+
+        return pkgs
+
+    def create_initial(self):
+        pkgs = dict()
+
+        with open(self.initial_manifest, "w+") as manifest:
+            manifest.write(self.initial_manifest_file_header)
+
+            for var in self.var_maps[self.manifest_type]:
+                if var in self.vars_to_split:
+                    split_pkgs = self._split_multilib(self.d.getVar(var))
+                    if split_pkgs is not None:
+                        pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
+                else:
+                    pkg_list = self.d.getVar(var)
+                    if pkg_list is not None:
+                        pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
+
+            for pkg_type in sorted(pkgs):
+                for pkg in sorted(pkgs[pkg_type].split()):
+                    manifest.write("%s,%s\n" % (pkg_type, pkg))
+
+    def create_final(self):
+        pass
+
+    def create_full(self, pm):
+        if not os.path.exists(self.initial_manifest):
+            self.create_initial()
+
+        initial_manifest = self.parse_initial_manifest()
+        pkgs_to_install = list()
+        for pkg_type in initial_manifest:
+            pkgs_to_install += initial_manifest[pkg_type]
+        if len(pkgs_to_install) == 0:
+            return
+
+        output = pm.dummy_install(pkgs_to_install)
+
+        with open(self.full_manifest, 'w+') as manifest:
+            pkg_re = re.compile('^Installing ([^ ]+) [^ ].*')
+            for line in set(output.split('\n')):
+                m = pkg_re.match(line)
+                if m:
+                    manifest.write(m.group(1) + '\n')
+
+        return
diff --git a/poky/meta/lib/oe/package_manager/ipk/rootfs.py b/poky/meta/lib/oe/package_manager/ipk/rootfs.py
new file mode 100644
index 0000000..63b4a59
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/ipk/rootfs.py
@@ -0,0 +1,387 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import re
+import filecmp
+import shutil
+from oe.rootfs import Rootfs
+from oe.manifest import Manifest
+from oe.utils import execute_pre_post_process
+from oe.package_manager.ipk.manifest import OpkgManifest
+from oe.package_manager.ipk import OpkgPM
+
+class DpkgOpkgRootfs(Rootfs):
+    def __init__(self, d, progress_reporter=None, logcatcher=None):
+        super(DpkgOpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
+
+    def _get_pkgs_postinsts(self, status_file):
+        def _get_pkg_depends_list(pkg_depends):
+            pkg_depends_list = []
+            # filter version requirements like libc (>= 1.1)
+            for dep in pkg_depends.split(', '):
+                m_dep = re.match(r"^(.*) \(.*\)$", dep)
+                if m_dep:
+                    dep = m_dep.group(1)
+                pkg_depends_list.append(dep)
+
+            return pkg_depends_list
+
+        pkgs = {}
+        pkg_name = ""
+        pkg_status_match = False
+        pkg_depends = ""
+
+        with open(status_file) as status:
+            data = status.read()
+            status.close()
+            for line in data.split('\n'):
+                m_pkg = re.match(r"^Package: (.*)", line)
+                m_status = re.match(r"^Status:.*unpacked", line)
+                m_depends = re.match(r"^Depends: (.*)", line)
+
+                #Only one of m_pkg, m_status or m_depends is not None at time
+                #If m_pkg is not None, we started a new package
+                if m_pkg is not None:
+                    #Get Package name
+                    pkg_name = m_pkg.group(1)
+                    #Make sure we reset other variables
+                    pkg_status_match = False
+                    pkg_depends = ""
+                elif m_status is not None:
+                    #New status matched
+                    pkg_status_match = True
+                elif m_depends is not None:
+                    #New depends macthed
+                    pkg_depends = m_depends.group(1)
+                else:
+                    pass
+
+                #Now check if we can process package depends and postinst
+                if "" != pkg_name and pkg_status_match:
+                    pkgs[pkg_name] = _get_pkg_depends_list(pkg_depends)
+                else:
+                    #Not enough information
+                    pass
+
+        # remove package dependencies not in postinsts
+        pkg_names = list(pkgs.keys())
+        for pkg_name in pkg_names:
+            deps = pkgs[pkg_name][:]
+
+            for d in deps:
+                if d not in pkg_names:
+                    pkgs[pkg_name].remove(d)
+
+        return pkgs
+
+    def _get_delayed_postinsts_common(self, status_file):
+        def _dep_resolve(graph, node, resolved, seen):
+            seen.append(node)
+
+            for edge in graph[node]:
+                if edge not in resolved:
+                    if edge in seen:
+                        raise RuntimeError("Packages %s and %s have " \
+                                "a circular dependency in postinsts scripts." \
+                                % (node, edge))
+                    _dep_resolve(graph, edge, resolved, seen)
+
+            resolved.append(node)
+
+        pkg_list = []
+
+        pkgs = None
+        if not self.d.getVar('PACKAGE_INSTALL').strip():
+            bb.note("Building empty image")
+        else:
+            pkgs = self._get_pkgs_postinsts(status_file)
+        if pkgs:
+            root = "__packagegroup_postinst__"
+            pkgs[root] = list(pkgs.keys())
+            _dep_resolve(pkgs, root, pkg_list, [])
+            pkg_list.remove(root)
+
+        if len(pkg_list) == 0:
+            return None
+
+        return pkg_list
+
+    def _save_postinsts_common(self, dst_postinst_dir, src_postinst_dir):
+        if bb.utils.contains("IMAGE_FEATURES", "package-management",
+                         True, False, self.d):
+            return
+        num = 0
+        for p in self._get_delayed_postinsts():
+            bb.utils.mkdirhier(dst_postinst_dir)
+
+            if os.path.exists(os.path.join(src_postinst_dir, p + ".postinst")):
+                shutil.copy(os.path.join(src_postinst_dir, p + ".postinst"),
+                            os.path.join(dst_postinst_dir, "%03d-%s" % (num, p)))
+
+            num += 1
+
+class OpkgRootfs(DpkgOpkgRootfs):
+    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+        super(OpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
+        self.log_check_regex = '(exit 1|Collected errors)'
+
+        self.manifest = OpkgManifest(d, manifest_dir)
+        self.opkg_conf = self.d.getVar("IPKGCONF_TARGET")
+        self.pkg_archs = self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS")
+
+        self.inc_opkg_image_gen = self.d.getVar('INC_IPK_IMAGE_GEN') or ""
+        if self._remove_old_rootfs():
+            bb.utils.remove(self.image_rootfs, True)
+            self.pm = OpkgPM(d,
+                             self.image_rootfs,
+                             self.opkg_conf,
+                             self.pkg_archs)
+        else:
+            self.pm = OpkgPM(d,
+                             self.image_rootfs,
+                             self.opkg_conf,
+                             self.pkg_archs)
+            self.pm.recover_packaging_data()
+
+        bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
+
+    def _prelink_file(self, root_dir, filename):
+        bb.note('prelink %s in %s' % (filename, root_dir))
+        prelink_cfg = oe.path.join(root_dir,
+                                   self.d.expand('${sysconfdir}/prelink.conf'))
+        if not os.path.exists(prelink_cfg):
+            shutil.copy(self.d.expand('${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf'),
+                        prelink_cfg)
+
+        cmd_prelink = self.d.expand('${STAGING_DIR_NATIVE}${sbindir_native}/prelink')
+        self._exec_shell_cmd([cmd_prelink,
+                              '--root',
+                              root_dir,
+                              '-amR',
+                              '-N',
+                              '-c',
+                              self.d.expand('${sysconfdir}/prelink.conf')])
+
+    '''
+    Compare two files with the same key twice to see if they are equal.
+    If they are not equal, it means they are duplicated and come from
+    different packages.
+    1st: Comapre them directly;
+    2nd: While incremental image creation is enabled, one of the
+         files could be probaly prelinked in the previous image
+         creation and the file has been changed, so we need to
+         prelink the other one and compare them.
+    '''
+    def _file_equal(self, key, f1, f2):
+
+        # Both of them are not prelinked
+        if filecmp.cmp(f1, f2):
+            return True
+
+        if bb.data.inherits_class('image-prelink', self.d):
+            if self.image_rootfs not in f1:
+                self._prelink_file(f1.replace(key, ''), f1)
+
+            if self.image_rootfs not in f2:
+                self._prelink_file(f2.replace(key, ''), f2)
+
+            # Both of them are prelinked
+            if filecmp.cmp(f1, f2):
+                return True
+
+        # Not equal
+        return False
+
+    """
+    This function was reused from the old implementation.
+    See commit: "image.bbclass: Added variables for multilib support." by
+    Lianhao Lu.
+    """
+    def _multilib_sanity_test(self, dirs):
+
+        allow_replace = self.d.getVar("MULTILIBRE_ALLOW_REP")
+        if allow_replace is None:
+            allow_replace = ""
+
+        allow_rep = re.compile(re.sub(r"\|$", r"", allow_replace))
+        error_prompt = "Multilib check error:"
+
+        files = {}
+        for dir in dirs:
+            for root, subfolders, subfiles in os.walk(dir):
+                for file in subfiles:
+                    item = os.path.join(root, file)
+                    key = str(os.path.join("/", os.path.relpath(item, dir)))
+
+                    valid = True
+                    if key in files:
+                        #check whether the file is allow to replace
+                        if allow_rep.match(key):
+                            valid = True
+                        else:
+                            if os.path.exists(files[key]) and \
+                               os.path.exists(item) and \
+                               not self._file_equal(key, files[key], item):
+                                valid = False
+                                bb.fatal("%s duplicate files %s %s is not the same\n" %
+                                         (error_prompt, item, files[key]))
+
+                    #pass the check, add to list
+                    if valid:
+                        files[key] = item
+
+    def _multilib_test_install(self, pkgs):
+        ml_temp = self.d.getVar("MULTILIB_TEMP_ROOTFS")
+        bb.utils.mkdirhier(ml_temp)
+
+        dirs = [self.image_rootfs]
+
+        for variant in self.d.getVar("MULTILIB_VARIANTS").split():
+            ml_target_rootfs = os.path.join(ml_temp, variant)
+
+            bb.utils.remove(ml_target_rootfs, True)
+
+            ml_opkg_conf = os.path.join(ml_temp,
+                                        variant + "-" + os.path.basename(self.opkg_conf))
+
+            ml_pm = OpkgPM(self.d, ml_target_rootfs, ml_opkg_conf, self.pkg_archs, prepare_index=False)
+
+            ml_pm.update()
+            ml_pm.install(pkgs)
+
+            dirs.append(ml_target_rootfs)
+
+        self._multilib_sanity_test(dirs)
+
+    '''
+    While ipk incremental image generation is enabled, it will remove the
+    unneeded pkgs by comparing the old full manifest in previous existing
+    image and the new full manifest in the current image.
+    '''
+    def _remove_extra_packages(self, pkgs_initial_install):
+        if self.inc_opkg_image_gen == "1":
+            # Parse full manifest in previous existing image creation session
+            old_full_manifest = self.manifest.parse_full_manifest()
+
+            # Create full manifest for the current image session, the old one
+            # will be replaced by the new one.
+            self.manifest.create_full(self.pm)
+
+            # Parse full manifest in current image creation session
+            new_full_manifest = self.manifest.parse_full_manifest()
+
+            pkg_to_remove = list()
+            for pkg in old_full_manifest:
+                if pkg not in new_full_manifest:
+                    pkg_to_remove.append(pkg)
+
+            if pkg_to_remove != []:
+                bb.note('decremental removed: %s' % ' '.join(pkg_to_remove))
+                self.pm.remove(pkg_to_remove)
+
+    '''
+    Compare with previous existing image creation, if some conditions
+    triggered, the previous old image should be removed.
+    The conditions include any of 'PACKAGE_EXCLUDE, NO_RECOMMENDATIONS
+    and BAD_RECOMMENDATIONS' has been changed.
+    '''
+    def _remove_old_rootfs(self):
+        if self.inc_opkg_image_gen != "1":
+            return True
+
+        vars_list_file = self.d.expand('${T}/vars_list')
+
+        old_vars_list = ""
+        if os.path.exists(vars_list_file):
+            old_vars_list = open(vars_list_file, 'r+').read()
+
+        new_vars_list = '%s:%s:%s\n' % \
+                ((self.d.getVar('BAD_RECOMMENDATIONS') or '').strip(),
+                 (self.d.getVar('NO_RECOMMENDATIONS') or '').strip(),
+                 (self.d.getVar('PACKAGE_EXCLUDE') or '').strip())
+        open(vars_list_file, 'w+').write(new_vars_list)
+
+        if old_vars_list != new_vars_list:
+            return True
+
+        return False
+
+    def _create(self):
+        pkgs_to_install = self.manifest.parse_initial_manifest()
+        opkg_pre_process_cmds = self.d.getVar('OPKG_PREPROCESS_COMMANDS')
+        opkg_post_process_cmds = self.d.getVar('OPKG_POSTPROCESS_COMMANDS')
+
+        # update PM index files
+        self.pm.write_index()
+
+        execute_pre_post_process(self.d, opkg_pre_process_cmds)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+            # Steps are a bit different in order, skip next
+            self.progress_reporter.next_stage()
+
+        self.pm.update()
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        if self.inc_opkg_image_gen == "1":
+            self._remove_extra_packages(pkgs_to_install)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        for pkg_type in self.install_order:
+            if pkg_type in pkgs_to_install:
+                # For multilib, we perform a sanity test before final install
+                # If sanity test fails, it will automatically do a bb.fatal()
+                # and the installation will stop
+                if pkg_type == Manifest.PKG_TYPE_MULTILIB:
+                    self._multilib_test_install(pkgs_to_install[pkg_type])
+
+                self.pm.install(pkgs_to_install[pkg_type],
+                                [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        self.pm.install_complementary()
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
+        opkg_dir = os.path.join(opkg_lib_dir, 'opkg')
+        self._setup_dbg_rootfs([opkg_dir])
+
+        execute_pre_post_process(self.d, opkg_post_process_cmds)
+
+        if self.inc_opkg_image_gen == "1":
+            self.pm.backup_packaging_data()
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+    @staticmethod
+    def _depends_list():
+        return ['IPKGCONF_SDK', 'IPK_FEED_URIS', 'DEPLOY_DIR_IPK', 'IPKGCONF_TARGET', 'INC_IPK_IMAGE_GEN', 'OPKG_ARGS', 'OPKGLIBDIR', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'OPKGLIBDIR']
+
+    def _get_delayed_postinsts(self):
+        status_file = os.path.join(self.image_rootfs,
+                                   self.d.getVar('OPKGLIBDIR').strip('/'),
+                                   "opkg", "status")
+        return self._get_delayed_postinsts_common(status_file)
+
+    def _save_postinsts(self):
+        dst_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts")
+        src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info")
+        return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
+
+    def _log_check(self):
+        self._log_check_warn()
+        self._log_check_error()
+
+    def _cleanup(self):
+        self.pm.remove_lists()
diff --git a/poky/meta/lib/oe/package_manager/ipk/sdk.py b/poky/meta/lib/oe/package_manager/ipk/sdk.py
new file mode 100644
index 0000000..47c0a92
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/ipk/sdk.py
@@ -0,0 +1,96 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import glob
+import shutil
+from oe.utils import execute_pre_post_process
+from oe.sdk import Sdk
+from oe.manifest import Manifest
+from oe.package_manager.ipk import OpkgPM
+
+class OpkgSdk(Sdk):
+    def __init__(self, d, manifest_dir=None):
+        super(OpkgSdk, self).__init__(d, manifest_dir)
+
+        self.target_conf = self.d.getVar("IPKGCONF_TARGET")
+        self.host_conf = self.d.getVar("IPKGCONF_SDK")
+
+        from oe.package_manager.ipk.manifest import OpkgManifest
+        self.target_manifest = OpkgManifest(d, self.manifest_dir,
+                                            Manifest.MANIFEST_TYPE_SDK_TARGET)
+        self.host_manifest = OpkgManifest(d, self.manifest_dir,
+                                          Manifest.MANIFEST_TYPE_SDK_HOST)
+
+        ipk_repo_workdir = "oe-sdk-repo"
+        if "sdk_ext" in d.getVar("BB_RUNTASK"):
+            ipk_repo_workdir = "oe-sdk-ext-repo"
+
+        self.target_pm = OpkgPM(d, self.sdk_target_sysroot, self.target_conf,
+                                self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS"),
+                                ipk_repo_workdir=ipk_repo_workdir)
+
+        self.host_pm = OpkgPM(d, self.sdk_host_sysroot, self.host_conf,
+                              self.d.getVar("SDK_PACKAGE_ARCHS"),
+                                ipk_repo_workdir=ipk_repo_workdir)
+
+    def _populate_sysroot(self, pm, manifest):
+        pkgs_to_install = manifest.parse_initial_manifest()
+
+        if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS') or "") != "1":
+            pm.write_index()
+
+        pm.update()
+
+        for pkg_type in self.install_order:
+            if pkg_type in pkgs_to_install:
+                pm.install(pkgs_to_install[pkg_type],
+                           [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+
+    def _populate(self):
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
+        bb.note("Installing TARGET packages")
+        self._populate_sysroot(self.target_pm, self.target_manifest)
+
+        self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
+
+        self.target_pm.run_intercepts(populate_sdk='target')
+
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
+
+        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+            self.target_pm.remove_packaging_data()
+
+        bb.note("Installing NATIVESDK packages")
+        self._populate_sysroot(self.host_pm, self.host_manifest)
+        self.install_locales(self.host_pm)
+
+        self.host_pm.run_intercepts(populate_sdk='host')
+
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
+
+        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+            self.host_pm.remove_packaging_data()
+
+        target_sysconfdir = os.path.join(self.sdk_target_sysroot, self.sysconfdir)
+        host_sysconfdir = os.path.join(self.sdk_host_sysroot, self.sysconfdir)
+
+        self.mkdirhier(target_sysconfdir)
+        shutil.copy(self.target_conf, target_sysconfdir)
+        os.chmod(os.path.join(target_sysconfdir,
+                              os.path.basename(self.target_conf)), 0o644)
+
+        self.mkdirhier(host_sysconfdir)
+        shutil.copy(self.host_conf, host_sysconfdir)
+        os.chmod(os.path.join(host_sysconfdir,
+                              os.path.basename(self.host_conf)), 0o644)
+
+        native_opkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
+                                             self.d.getVar('localstatedir_nativesdk').strip('/'),
+                                             "lib", "opkg")
+        self.mkdirhier(native_opkg_state_dir)
+        for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "opkg", "*")):
+            self.movefile(f, native_opkg_state_dir)
+
+        self.remove(os.path.join(self.sdk_output, "var"), True)
diff --git a/poky/meta/lib/oe/package_manager/rpm/__init__.py b/poky/meta/lib/oe/package_manager/rpm/__init__.py
new file mode 100644
index 0000000..c91f61a
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/rpm/__init__.py
@@ -0,0 +1,404 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import shutil
+import subprocess
+from oe.package_manager import *
+
+class RpmIndexer(Indexer):
+    def write_index(self):
+        self.do_write_index(self.deploy_dir)
+
+    def do_write_index(self, deploy_dir):
+        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
+            signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
+        else:
+            signer = None
+
+        createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c")
+        result = create_index("%s --update -q %s" % (createrepo_c, deploy_dir))
+        if result:
+            bb.fatal(result)
+
+        # Sign repomd
+        if signer:
+            sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
+            is_ascii_sig = (sig_type.upper() != "BIN")
+            signer.detach_sign(os.path.join(deploy_dir, 'repodata', 'repomd.xml'),
+                               self.d.getVar('PACKAGE_FEED_GPG_NAME'),
+                               self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
+                               armor=is_ascii_sig)
+
+class RpmSubdirIndexer(RpmIndexer):
+    def write_index(self):
+        bb.note("Generating package index for %s" %(self.deploy_dir))
+        self.do_write_index(self.deploy_dir)
+        for entry in os.walk(self.deploy_dir):
+            if os.path.samefile(self.deploy_dir, entry[0]):
+                for dir in entry[1]:
+                    if dir != 'repodata':
+                        dir_path = oe.path.join(self.deploy_dir, dir)
+                        bb.note("Generating package index for %s" %(dir_path))
+                        self.do_write_index(dir_path)
+
+
+class RpmPkgsList(PkgsList):
+    def list_pkgs(self):
+        return RpmPM(self.d, self.rootfs_dir, self.d.getVar('TARGET_VENDOR'), needfeed=False).list_installed()
+
+class RpmPM(PackageManager):
+    def __init__(self,
+                 d,
+                 target_rootfs,
+                 target_vendor,
+                 task_name='target',
+                 arch_var=None,
+                 os_var=None,
+                 rpm_repo_workdir="oe-rootfs-repo",
+                 filterbydependencies=True,
+                 needfeed=True):
+        super(RpmPM, self).__init__(d, target_rootfs)
+        self.target_vendor = target_vendor
+        self.task_name = task_name
+        if arch_var == None:
+            self.archs = self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS').replace("-","_")
+        else:
+            self.archs = self.d.getVar(arch_var).replace("-","_")
+        if task_name == "host":
+            self.primary_arch = self.d.getVar('SDK_ARCH')
+        else:
+            self.primary_arch = self.d.getVar('MACHINE_ARCH')
+
+        if needfeed:
+            self.rpm_repo_dir = oe.path.join(self.d.getVar('WORKDIR'), rpm_repo_workdir)
+            create_packages_dir(self.d, oe.path.join(self.rpm_repo_dir, "rpm"), d.getVar("DEPLOY_DIR_RPM"), "package_write_rpm", filterbydependencies)
+
+        self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name)
+        if not os.path.exists(self.d.expand('${T}/saved_packaging_data')):
+            bb.utils.mkdirhier(self.d.expand('${T}/saved_packaging_data'))
+        self.packaging_data_dirs = ['etc/rpm', 'etc/rpmrc', 'etc/dnf', 'var/lib/rpm', 'var/lib/dnf', 'var/cache/dnf']
+        self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
+                                               self.task_name)
+        if not os.path.exists(self.d.expand('${T}/saved')):
+            bb.utils.mkdirhier(self.d.expand('${T}/saved'))
+
+    def _configure_dnf(self):
+        # libsolv handles 'noarch' internally, we don't need to specify it explicitly
+        archs = [i for i in reversed(self.archs.split()) if i not in ["any", "all", "noarch"]]
+        # This prevents accidental matching against libsolv's built-in policies
+        if len(archs) <= 1:
+            archs = archs + ["bogusarch"]
+        # This architecture needs to be upfront so that packages using it are properly prioritized
+        archs = ["sdk_provides_dummy_target"] + archs
+        confdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
+        bb.utils.mkdirhier(confdir)
+        open(confdir + "arch", 'w').write(":".join(archs))
+        distro_codename = self.d.getVar('DISTRO_CODENAME')
+        open(confdir + "releasever", 'w').write(distro_codename if distro_codename is not None else '')
+
+        open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("")
+
+
+    def _configure_rpm(self):
+        # We need to configure rpm to use our primary package architecture as the installation architecture,
+        # and to make it compatible with other package architectures that we use.
+        # Otherwise it will refuse to proceed with packages installation.
+        platformconfdir = "%s/%s" %(self.target_rootfs, "etc/rpm/")
+        rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/")
+        bb.utils.mkdirhier(platformconfdir)
+        open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch)
+        with open(rpmrcconfdir + "rpmrc", 'w') as f:
+            f.write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
+            f.write("buildarch_compat: %s: noarch\n" % self.primary_arch)
+
+        open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n")
+        if self.d.getVar('RPM_PREFER_ELF_ARCH'):
+            open(platformconfdir + "macros", 'a').write("%%_prefer_color %s" % (self.d.getVar('RPM_PREFER_ELF_ARCH')))
+
+        if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
+            signer = get_signer(self.d, self.d.getVar('RPM_GPG_BACKEND'))
+            pubkey_path = oe.path.join(self.d.getVar('B'), 'rpm-key')
+            signer.export_pubkey(pubkey_path, self.d.getVar('RPM_GPG_NAME'))
+            rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmkeys")
+            cmd = [rpm_bin, '--root=%s' % self.target_rootfs, '--import', pubkey_path]
+            try:
+                subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+            except subprocess.CalledProcessError as e:
+                bb.fatal("Importing GPG key failed. Command '%s' "
+                        "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+
+    def create_configs(self):
+        self._configure_dnf()
+        self._configure_rpm()
+
+    def write_index(self):
+        lockfilename = self.d.getVar('DEPLOY_DIR_RPM') + "/rpm.lock"
+        lf = bb.utils.lockfile(lockfilename, False)
+        RpmIndexer(self.d, self.rpm_repo_dir).write_index()
+        bb.utils.unlockfile(lf)
+
+    def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+        from urllib.parse import urlparse
+
+        if feed_uris == "":
+            return
+
+        gpg_opts = ''
+        if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
+            gpg_opts += 'repo_gpgcheck=1\n'
+            gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME'))
+
+        if self.d.getVar('RPM_SIGN_PACKAGES') != '1':
+            gpg_opts += 'gpgcheck=0\n'
+
+        bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
+        remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
+        for uri in remote_uris:
+            repo_base = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/"))
+            if feed_archs is not None:
+                for arch in feed_archs.split():
+                    repo_uri = uri + "/" + arch
+                    repo_id   = "oe-remote-repo"  + "-".join(urlparse(repo_uri).path.split("/"))
+                    repo_name = "OE Remote Repo:" + " ".join(urlparse(repo_uri).path.split("/"))
+                    open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'a').write(
+                             "[%s]\nname=%s\nbaseurl=%s\n%s\n" % (repo_id, repo_name, repo_uri, gpg_opts))
+            else:
+                repo_name = "OE Remote Repo:" + " ".join(urlparse(uri).path.split("/"))
+                repo_uri = uri
+                open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'w').write(
+                             "[%s]\nname=%s\nbaseurl=%s\n%s" % (repo_base, repo_name, repo_uri, gpg_opts))
+
+    def _prepare_pkg_transaction(self):
+        os.environ['D'] = self.target_rootfs
+        os.environ['OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
+        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
+
+
+    def install(self, pkgs, attempt_only = False):
+        if len(pkgs) == 0:
+            return
+        self._prepare_pkg_transaction()
+
+        bad_recommendations = self.d.getVar('BAD_RECOMMENDATIONS')
+        package_exclude = self.d.getVar('PACKAGE_EXCLUDE')
+        exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exclude.split() if package_exclude else [])
+
+        output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) +
+                         (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) +
+                         (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == "1" else []) +
+                         (["--nogpgcheck"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=gpgcheck=True"]) +
+                         ["install"] +
+                         pkgs)
+
+        failed_scriptlets_pkgnames = collections.OrderedDict()
+        for line in output.splitlines():
+            if line.startswith("Error in POSTIN scriptlet in rpm package"):
+                failed_scriptlets_pkgnames[line.split()[-1]] = True
+
+        if len(failed_scriptlets_pkgnames) > 0:
+            failed_postinsts_abort(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
+
+    def remove(self, pkgs, with_dependencies = True):
+        if not pkgs:
+            return
+
+        self._prepare_pkg_transaction()
+
+        if with_dependencies:
+            self._invoke_dnf(["remove"] + pkgs)
+        else:
+            cmd = bb.utils.which(os.getenv('PATH'), "rpm")
+            args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs]
+
+            try:
+                bb.note("Running %s" % ' '.join([cmd] + args + pkgs))
+                output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8")
+                bb.note(output)
+            except subprocess.CalledProcessError as e:
+                bb.fatal("Could not invoke rpm. Command "
+                     "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8")))
+
+    def upgrade(self):
+        self._prepare_pkg_transaction()
+        self._invoke_dnf(["upgrade"])
+
+    def autoremove(self):
+        self._prepare_pkg_transaction()
+        self._invoke_dnf(["autoremove"])
+
+    def remove_packaging_data(self):
+        self._invoke_dnf(["clean", "all"])
+        for dir in self.packaging_data_dirs:
+            bb.utils.remove(oe.path.join(self.target_rootfs, dir), True)
+
+    def backup_packaging_data(self):
+        # Save the packaging dirs for increment rpm image generation
+        if os.path.exists(self.saved_packaging_data):
+            bb.utils.remove(self.saved_packaging_data, True)
+        for i in self.packaging_data_dirs:
+            source_dir = oe.path.join(self.target_rootfs, i)
+            target_dir = oe.path.join(self.saved_packaging_data, i)
+            if os.path.isdir(source_dir):
+                shutil.copytree(source_dir, target_dir, symlinks=True)
+            elif os.path.isfile(source_dir):
+                shutil.copy2(source_dir, target_dir)
+
+    def recovery_packaging_data(self):
+        # Move the rpmlib back
+        if os.path.exists(self.saved_packaging_data):
+            for i in self.packaging_data_dirs:
+                target_dir = oe.path.join(self.target_rootfs, i)
+                if os.path.exists(target_dir):
+                    bb.utils.remove(target_dir, True)
+                source_dir = oe.path.join(self.saved_packaging_data, i)
+                if os.path.isdir(source_dir):
+                    shutil.copytree(source_dir, target_dir, symlinks=True)
+                elif os.path.isfile(source_dir):
+                    shutil.copy2(source_dir, target_dir)
+
+    def list_installed(self):
+        output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{name}-%{version}-%{release}.%{arch}.rpm\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"],
+                                  print_output = False)
+        packages = {}
+        current_package = None
+        current_deps = None
+        current_state = "initial"
+        for line in output.splitlines():
+            if line.startswith("Package:"):
+                package_info = line.split(" ")[1:]
+                current_package = package_info[0]
+                package_arch = package_info[1]
+                package_version = package_info[2]
+                package_rpm = package_info[3]
+                packages[current_package] = {"arch":package_arch, "ver":package_version, "filename":package_rpm}
+                current_deps = []
+            elif line.startswith("Dependencies:"):
+                current_state = "dependencies"
+            elif line.startswith("Recommendations"):
+                current_state = "recommendations"
+            elif line.startswith("DependenciesEndHere:"):
+                current_state = "initial"
+                packages[current_package]["deps"] = current_deps
+            elif len(line) > 0:
+                if current_state == "dependencies":
+                    current_deps.append(line)
+                elif current_state == "recommendations":
+                    current_deps.append("%s [REC]" % line)
+
+        return packages
+
+    def update(self):
+        self._invoke_dnf(["makecache", "--refresh"])
+
+    def _invoke_dnf(self, dnf_args, fatal = True, print_output = True ):
+        os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
+
+        dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf")
+        standard_dnf_args = ["-v", "--rpmverbosity=info", "-y",
+                             "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
+                             "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
+                             "--installroot=%s" % (self.target_rootfs),
+                             "--setopt=logdir=%s" % (self.d.getVar('T'))
+                            ]
+        if hasattr(self, "rpm_repo_dir"):
+            standard_dnf_args.append("--repofrompath=oe-repo,%s" % (self.rpm_repo_dir))
+        cmd = [dnf_cmd] + standard_dnf_args + dnf_args
+        bb.note('Running %s' % ' '.join(cmd))
+        try:
+            output = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
+            if print_output:
+                bb.debug(1, output)
+            return output
+        except subprocess.CalledProcessError as e:
+            if print_output:
+                (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
+                     "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
+            else:
+                (bb.note, bb.fatal)[fatal]("Could not invoke dnf. Command "
+                     "'%s' returned %d:" % (' '.join(cmd), e.returncode))
+            return e.output.decode("utf-8")
+
+    def dump_install_solution(self, pkgs):
+        open(self.solution_manifest, 'w').write(" ".join(pkgs))
+        return pkgs
+
+    def load_old_install_solution(self):
+        if not os.path.exists(self.solution_manifest):
+            return []
+        with open(self.solution_manifest, 'r') as fd:
+            return fd.read().split()
+
+    def _script_num_prefix(self, path):
+        files = os.listdir(path)
+        numbers = set()
+        numbers.add(99)
+        for f in files:
+            numbers.add(int(f.split("-")[0]))
+        return max(numbers) + 1
+
+    def save_rpmpostinst(self, pkg):
+        bb.note("Saving postinstall script of %s" % (pkg))
+        cmd = bb.utils.which(os.getenv('PATH'), "rpm")
+        args = ["-q", "--root=%s" % self.target_rootfs, "--queryformat", "%{postin}", pkg]
+
+        try:
+            output = subprocess.check_output([cmd] + args,stderr=subprocess.STDOUT).decode("utf-8")
+        except subprocess.CalledProcessError as e:
+            bb.fatal("Could not invoke rpm. Command "
+                     "'%s' returned %d:\n%s" % (' '.join([cmd] + args), e.returncode, e.output.decode("utf-8")))
+
+        # may need to prepend #!/bin/sh to output
+
+        target_path = oe.path.join(self.target_rootfs, self.d.expand('${sysconfdir}/rpm-postinsts/'))
+        bb.utils.mkdirhier(target_path)
+        num = self._script_num_prefix(target_path)
+        saved_script_name = oe.path.join(target_path, "%d-%s" % (num, pkg))
+        open(saved_script_name, 'w').write(output)
+        os.chmod(saved_script_name, 0o755)
+
+    def _handle_intercept_failure(self, registered_pkgs):
+        rpm_postinsts_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
+        bb.utils.mkdirhier(rpm_postinsts_dir)
+
+        # Save the package postinstalls in /etc/rpm-postinsts
+        for pkg in registered_pkgs.split():
+            self.save_rpmpostinst(pkg)
+
+    def extract(self, pkg):
+        output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
+        pkg_name = output.splitlines()[-1]
+        if not pkg_name.endswith(".rpm"):
+            bb.fatal("dnf could not find package %s in repository: %s" %(pkg, output))
+        pkg_path = oe.path.join(self.rpm_repo_dir, pkg_name)
+
+        cpio_cmd = bb.utils.which(os.getenv("PATH"), "cpio")
+        rpm2cpio_cmd = bb.utils.which(os.getenv("PATH"), "rpm2cpio")
+
+        if not os.path.isfile(pkg_path):
+            bb.fatal("Unable to extract package for '%s'."
+                     "File %s doesn't exists" % (pkg, pkg_path))
+
+        tmp_dir = tempfile.mkdtemp()
+        current_dir = os.getcwd()
+        os.chdir(tmp_dir)
+
+        try:
+            cmd = "%s %s | %s -idmv" % (rpm2cpio_cmd, pkg_path, cpio_cmd)
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+        except subprocess.CalledProcessError as e:
+            bb.utils.remove(tmp_dir, recurse=True)
+            bb.fatal("Unable to extract %s package. Command '%s' "
+                     "returned %d:\n%s" % (pkg_path, cmd, e.returncode, e.output.decode("utf-8")))
+        except OSError as e:
+            bb.utils.remove(tmp_dir, recurse=True)
+            bb.fatal("Unable to extract %s package. Command '%s' "
+                     "returned %d:\n%s at %s" % (pkg_path, cmd, e.errno, e.strerror, e.filename))
+
+        bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
+        os.chdir(current_dir)
+
+        return tmp_dir
diff --git a/poky/meta/lib/oe/package_manager/rpm/manifest.py b/poky/meta/lib/oe/package_manager/rpm/manifest.py
new file mode 100644
index 0000000..a75f6bd
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/rpm/manifest.py
@@ -0,0 +1,54 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from oe.manifest import Manifest
+
+class RpmManifest(Manifest):
+    """
+    Returns a dictionary object with mip and mlp packages.
+    """
+    def _split_multilib(self, pkg_list):
+        pkgs = dict()
+
+        for pkg in pkg_list.split():
+            pkg_type = self.PKG_TYPE_MUST_INSTALL
+
+            ml_variants = self.d.getVar('MULTILIB_VARIANTS').split()
+
+            for ml_variant in ml_variants:
+                if pkg.startswith(ml_variant + '-'):
+                    pkg_type = self.PKG_TYPE_MULTILIB
+
+            if not pkg_type in pkgs:
+                pkgs[pkg_type] = pkg
+            else:
+                pkgs[pkg_type] += " " + pkg
+
+        return pkgs
+
+    def create_initial(self):
+        pkgs = dict()
+
+        with open(self.initial_manifest, "w+") as manifest:
+            manifest.write(self.initial_manifest_file_header)
+
+            for var in self.var_maps[self.manifest_type]:
+                if var in self.vars_to_split:
+                    split_pkgs = self._split_multilib(self.d.getVar(var))
+                    if split_pkgs is not None:
+                        pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
+                else:
+                    pkg_list = self.d.getVar(var)
+                    if pkg_list is not None:
+                        pkgs[self.var_maps[self.manifest_type][var]] = self.d.getVar(var)
+
+            for pkg_type in pkgs:
+                for pkg in pkgs[pkg_type].split():
+                    manifest.write("%s,%s\n" % (pkg_type, pkg))
+
+    def create_final(self):
+        pass
+
+    def create_full(self, pm):
+        pass
diff --git a/poky/meta/lib/oe/package_manager/rpm/rootfs.py b/poky/meta/lib/oe/package_manager/rpm/rootfs.py
new file mode 100644
index 0000000..2de5752
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/rpm/rootfs.py
@@ -0,0 +1,148 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+from oe.rootfs import Rootfs
+from oe.manifest import Manifest
+from oe.utils import execute_pre_post_process
+from oe.package_manager.rpm.manifest import RpmManifest
+from oe.package_manager.rpm import RpmPM
+
+class RpmRootfs(Rootfs):
+    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+        super(RpmRootfs, self).__init__(d, progress_reporter, logcatcher)
+        self.log_check_regex = r'(unpacking of archive failed|Cannot find package'\
+                               r'|exit 1|ERROR: |Error: |Error |ERROR '\
+                               r'|Failed |Failed: |Failed$|Failed\(\d+\):)'
+
+        self.manifest = RpmManifest(d, manifest_dir)
+
+        self.pm = RpmPM(d,
+                        d.getVar('IMAGE_ROOTFS'),
+                        self.d.getVar('TARGET_VENDOR')
+                        )
+
+        self.inc_rpm_image_gen = self.d.getVar('INC_RPM_IMAGE_GEN')
+        if self.inc_rpm_image_gen != "1":
+            bb.utils.remove(self.image_rootfs, True)
+        else:
+            self.pm.recovery_packaging_data()
+        bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
+
+        self.pm.create_configs()
+
+    '''
+    While rpm incremental image generation is enabled, it will remove the
+    unneeded pkgs by comparing the new install solution manifest and the
+    old installed manifest.
+    '''
+    def _create_incremental(self, pkgs_initial_install):
+        if self.inc_rpm_image_gen == "1":
+
+            pkgs_to_install = list()
+            for pkg_type in pkgs_initial_install:
+                pkgs_to_install += pkgs_initial_install[pkg_type]
+
+            installed_manifest = self.pm.load_old_install_solution()
+            solution_manifest = self.pm.dump_install_solution(pkgs_to_install)
+
+            pkg_to_remove = list()
+            for pkg in installed_manifest:
+                if pkg not in solution_manifest:
+                    pkg_to_remove.append(pkg)
+
+            self.pm.update()
+
+            bb.note('incremental update -- upgrade packages in place ')
+            self.pm.upgrade()
+            if pkg_to_remove != []:
+                bb.note('incremental removed: %s' % ' '.join(pkg_to_remove))
+                self.pm.remove(pkg_to_remove)
+
+            self.pm.autoremove()
+
+    def _create(self):
+        pkgs_to_install = self.manifest.parse_initial_manifest()
+        rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS')
+        rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS')
+
+        # update PM index files
+        self.pm.write_index()
+
+        execute_pre_post_process(self.d, rpm_pre_process_cmds)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        if self.inc_rpm_image_gen == "1":
+            self._create_incremental(pkgs_to_install)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        self.pm.update()
+
+        pkgs = []
+        pkgs_attempt = []
+        for pkg_type in pkgs_to_install:
+            if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
+                pkgs_attempt += pkgs_to_install[pkg_type]
+            else:
+                pkgs += pkgs_to_install[pkg_type]
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        self.pm.install(pkgs)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        self.pm.install(pkgs_attempt, True)
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        self.pm.install_complementary()
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+        self._setup_dbg_rootfs(['/etc', '/var/lib/rpm', '/var/cache/dnf', '/var/lib/dnf'])
+
+        execute_pre_post_process(self.d, rpm_post_process_cmds)
+
+        if self.inc_rpm_image_gen == "1":
+            self.pm.backup_packaging_data()
+
+        if self.progress_reporter:
+            self.progress_reporter.next_stage()
+
+
+    @staticmethod
+    def _depends_list():
+        return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS',
+                'RPM_POSTPROCESS_COMMANDS', 'RPM_PREFER_ELF_ARCH']
+
+    def _get_delayed_postinsts(self):
+        postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts")
+        if os.path.isdir(postinst_dir):
+            files = os.listdir(postinst_dir)
+            for f in files:
+                bb.note('Delayed package scriptlet: %s' % f)
+            return files
+
+        return None
+
+    def _save_postinsts(self):
+        # this is just a stub. For RPM, the failed postinstalls are
+        # already saved in /etc/rpm-postinsts
+        pass
+
+    def _log_check(self):
+        self._log_check_warn()
+        self._log_check_error()
+
+    def _cleanup(self):
+        if bb.utils.contains("IMAGE_FEATURES", "package-management", True, False, self.d):
+            self.pm._invoke_dnf(["clean", "all"])
diff --git a/poky/meta/lib/oe/package_manager/rpm/sdk.py b/poky/meta/lib/oe/package_manager/rpm/sdk.py
new file mode 100644
index 0000000..b14b155
--- /dev/null
+++ b/poky/meta/lib/oe/package_manager/rpm/sdk.py
@@ -0,0 +1,114 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import glob
+from oe.utils import execute_pre_post_process
+from oe.sdk import Sdk
+from oe.manifest import Manifest
+from oe.package_manager.rpm import RpmPM
+
+class RpmSdk(Sdk):
+    def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"):
+        super(RpmSdk, self).__init__(d, manifest_dir)
+
+        from oe.package_manager.rpm.manifest import RpmManifest
+        self.target_manifest = RpmManifest(d, self.manifest_dir,
+                                           Manifest.MANIFEST_TYPE_SDK_TARGET)
+        self.host_manifest = RpmManifest(d, self.manifest_dir,
+                                         Manifest.MANIFEST_TYPE_SDK_HOST)
+
+        rpm_repo_workdir = "oe-sdk-repo"
+        if "sdk_ext" in d.getVar("BB_RUNTASK"):
+            rpm_repo_workdir = "oe-sdk-ext-repo"
+
+        self.target_pm = RpmPM(d,
+                               self.sdk_target_sysroot,
+                               self.d.getVar('TARGET_VENDOR'),
+                               'target',
+                               rpm_repo_workdir=rpm_repo_workdir
+                               )
+
+        self.host_pm = RpmPM(d,
+                             self.sdk_host_sysroot,
+                             self.d.getVar('SDK_VENDOR'),
+                             'host',
+                             "SDK_PACKAGE_ARCHS",
+                             "SDK_OS",
+                             rpm_repo_workdir=rpm_repo_workdir
+                             )
+
+    def _populate_sysroot(self, pm, manifest):
+        pkgs_to_install = manifest.parse_initial_manifest()
+
+        pm.create_configs()
+        pm.write_index()
+        pm.update()
+
+        pkgs = []
+        pkgs_attempt = []
+        for pkg_type in pkgs_to_install:
+            if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
+                pkgs_attempt += pkgs_to_install[pkg_type]
+            else:
+                pkgs += pkgs_to_install[pkg_type]
+
+        pm.install(pkgs)
+
+        pm.install(pkgs_attempt, True)
+
+    def _populate(self):
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
+        bb.note("Installing TARGET packages")
+        self._populate_sysroot(self.target_pm, self.target_manifest)
+
+        self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
+
+        self.target_pm.run_intercepts(populate_sdk='target')
+
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
+
+        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+            self.target_pm.remove_packaging_data()
+
+        bb.note("Installing NATIVESDK packages")
+        self._populate_sysroot(self.host_pm, self.host_manifest)
+        self.install_locales(self.host_pm)
+
+        self.host_pm.run_intercepts(populate_sdk='host')
+
+        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
+
+        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+            self.host_pm.remove_packaging_data()
+
+        # Move host RPM library data
+        native_rpm_state_dir = os.path.join(self.sdk_output,
+                                            self.sdk_native_path,
+                                            self.d.getVar('localstatedir_nativesdk').strip('/'),
+                                            "lib",
+                                            "rpm"
+                                            )
+        self.mkdirhier(native_rpm_state_dir)
+        for f in glob.glob(os.path.join(self.sdk_output,
+                                        "var",
+                                        "lib",
+                                        "rpm",
+                                        "*")):
+            self.movefile(f, native_rpm_state_dir)
+
+        self.remove(os.path.join(self.sdk_output, "var"), True)
+
+        # Move host sysconfig data
+        native_sysconf_dir = os.path.join(self.sdk_output,
+                                          self.sdk_native_path,
+                                          self.d.getVar('sysconfdir',
+                                                        True).strip('/'),
+                                          )
+        self.mkdirhier(native_sysconf_dir)
+        for f in glob.glob(os.path.join(self.sdk_output, "etc", "rpm*")):
+            self.movefile(f, native_sysconf_dir)
+        for f in glob.glob(os.path.join(self.sdk_output, "etc", "dnf", "*")):
+            self.movefile(f, native_sysconf_dir)
+        self.remove(os.path.join(self.sdk_output, "etc"), True)
diff --git a/poky/meta/lib/oe/patch.py b/poky/meta/lib/oe/patch.py
index 7ca2e28..40755fb 100644
--- a/poky/meta/lib/oe/patch.py
+++ b/poky/meta/lib/oe/patch.py
@@ -41,7 +41,7 @@
         (exitstatus, output) = subprocess.getstatusoutput(cmd)
         if exitstatus != 0:
             raise CmdError(cmd, exitstatus >> 8, output)
-        if " fuzz " in output:
+        if " fuzz " in output and "Hunk " in output:
             # Drop patch fuzz info with header and footer to log file so
             # insane.bbclass can handle to throw error/warning
             bb.note("--- Patch fuzz start ---\n%s\n--- Patch fuzz end ---" % format(output))
diff --git a/poky/meta/lib/oe/reproducible.py b/poky/meta/lib/oe/reproducible.py
index f4f58dd..421bb12 100644
--- a/poky/meta/lib/oe/reproducible.py
+++ b/poky/meta/lib/oe/reproducible.py
@@ -56,13 +56,13 @@
 
     # Check that the repository has a valid HEAD; it may not if subdir is used
     # in SRC_URI
-    p = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=gitpath)
+    p = subprocess.run(['git', '--git-dir', gitpath, 'rev-parse', 'HEAD'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     if p.returncode != 0:
         bb.debug(1, "%s does not have a valid HEAD: %s" % (gitpath, p.stdout.decode('utf-8')))
         return None
 
     bb.debug(1, "git repository: %s" % gitpath)
-    p = subprocess.run(['git','log','-1','--pretty=%ct'], check=True, stdout=subprocess.PIPE, cwd=gitpath)
+    p = subprocess.run(['git', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'], check=True, stdout=subprocess.PIPE)
     return int(p.stdout.decode('utf-8'))
 
 def get_source_date_epoch_from_youngest_file(d, sourcedir):
diff --git a/poky/meta/lib/oe/rootfs.py b/poky/meta/lib/oe/rootfs.py
index 0e05f1f..3813f68 100644
--- a/poky/meta/lib/oe/rootfs.py
+++ b/poky/meta/lib/oe/rootfs.py
@@ -6,12 +6,16 @@
 from oe.package_manager import *
 from oe.manifest import *
 import oe.path
-import filecmp
 import shutil
 import os
 import subprocess
 import re
-
+from oe.package_manager.rpm.manifest import RpmManifest
+from oe.package_manager.ipk.manifest import OpkgManifest
+from oe.package_manager.deb.manifest import DpkgManifest
+from oe.package_manager.rpm import RpmPkgsList
+from oe.package_manager.ipk import OpkgPkgsList
+from oe.package_manager.deb import DpkgPkgsList
 
 class Rootfs(object, metaclass=ABCMeta):
     """
@@ -353,611 +357,10 @@
                                   self.image_rootfs, "-D", devtable])
 
 
-class RpmRootfs(Rootfs):
-    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
-        super(RpmRootfs, self).__init__(d, progress_reporter, logcatcher)
-        self.log_check_regex = r'(unpacking of archive failed|Cannot find package'\
-                               r'|exit 1|ERROR: |Error: |Error |ERROR '\
-                               r'|Failed |Failed: |Failed$|Failed\(\d+\):)'
-        self.manifest = RpmManifest(d, manifest_dir)
-
-        self.pm = RpmPM(d,
-                        d.getVar('IMAGE_ROOTFS'),
-                        self.d.getVar('TARGET_VENDOR')
-                        )
-
-        self.inc_rpm_image_gen = self.d.getVar('INC_RPM_IMAGE_GEN')
-        if self.inc_rpm_image_gen != "1":
-            bb.utils.remove(self.image_rootfs, True)
-        else:
-            self.pm.recovery_packaging_data()
-        bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
-
-        self.pm.create_configs()
-
-    '''
-    While rpm incremental image generation is enabled, it will remove the
-    unneeded pkgs by comparing the new install solution manifest and the
-    old installed manifest.
-    '''
-    def _create_incremental(self, pkgs_initial_install):
-        if self.inc_rpm_image_gen == "1":
-
-            pkgs_to_install = list()
-            for pkg_type in pkgs_initial_install:
-                pkgs_to_install += pkgs_initial_install[pkg_type]
-
-            installed_manifest = self.pm.load_old_install_solution()
-            solution_manifest = self.pm.dump_install_solution(pkgs_to_install)
-
-            pkg_to_remove = list()
-            for pkg in installed_manifest:
-                if pkg not in solution_manifest:
-                    pkg_to_remove.append(pkg)
-
-            self.pm.update()
-
-            bb.note('incremental update -- upgrade packages in place ')
-            self.pm.upgrade()
-            if pkg_to_remove != []:
-                bb.note('incremental removed: %s' % ' '.join(pkg_to_remove))
-                self.pm.remove(pkg_to_remove)
-
-            self.pm.autoremove()
-
-    def _create(self):
-        pkgs_to_install = self.manifest.parse_initial_manifest()
-        rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS')
-        rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS')
-
-        # update PM index files
-        self.pm.write_index()
-
-        execute_pre_post_process(self.d, rpm_pre_process_cmds)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        if self.inc_rpm_image_gen == "1":
-            self._create_incremental(pkgs_to_install)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        self.pm.update()
-
-        pkgs = []
-        pkgs_attempt = []
-        for pkg_type in pkgs_to_install:
-            if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
-                pkgs_attempt += pkgs_to_install[pkg_type]
-            else:
-                pkgs += pkgs_to_install[pkg_type]
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        self.pm.install(pkgs)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        self.pm.install(pkgs_attempt, True)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        self.pm.install_complementary()
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        self._setup_dbg_rootfs(['/etc', '/var/lib/rpm', '/var/cache/dnf', '/var/lib/dnf'])
-
-        execute_pre_post_process(self.d, rpm_post_process_cmds)
-
-        if self.inc_rpm_image_gen == "1":
-            self.pm.backup_packaging_data()
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-
-    @staticmethod
-    def _depends_list():
-        return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS',
-                'RPM_POSTPROCESS_COMMANDS', 'RPM_PREFER_ELF_ARCH']
-
-    def _get_delayed_postinsts(self):
-        postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts")
-        if os.path.isdir(postinst_dir):
-            files = os.listdir(postinst_dir)
-            for f in files:
-                bb.note('Delayed package scriptlet: %s' % f)
-            return files
-
-        return None
-
-    def _save_postinsts(self):
-        # this is just a stub. For RPM, the failed postinstalls are
-        # already saved in /etc/rpm-postinsts
-        pass
-
-    def _log_check(self):
-        self._log_check_warn()
-        self._log_check_error()
-
-    def _cleanup(self):
-        if bb.utils.contains("IMAGE_FEATURES", "package-management", True, False, self.d):
-            self.pm._invoke_dnf(["clean", "all"])
-
-
-class DpkgOpkgRootfs(Rootfs):
-    def __init__(self, d, progress_reporter=None, logcatcher=None):
-        super(DpkgOpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
-
-    def _get_pkgs_postinsts(self, status_file):
-        def _get_pkg_depends_list(pkg_depends):
-            pkg_depends_list = []
-            # filter version requirements like libc (>= 1.1)
-            for dep in pkg_depends.split(', '):
-                m_dep = re.match(r"^(.*) \(.*\)$", dep)
-                if m_dep:
-                    dep = m_dep.group(1)
-                pkg_depends_list.append(dep)
-
-            return pkg_depends_list
-
-        pkgs = {}
-        pkg_name = ""
-        pkg_status_match = False
-        pkg_depends = ""
-
-        with open(status_file) as status:
-            data = status.read()
-            status.close()
-            for line in data.split('\n'):
-                m_pkg = re.match(r"^Package: (.*)", line)
-                m_status = re.match(r"^Status:.*unpacked", line)
-                m_depends = re.match(r"^Depends: (.*)", line)
-
-                #Only one of m_pkg, m_status or m_depends is not None at time
-                #If m_pkg is not None, we started a new package
-                if m_pkg is not None:
-                    #Get Package name
-                    pkg_name = m_pkg.group(1)
-                    #Make sure we reset other variables
-                    pkg_status_match = False
-                    pkg_depends = ""
-                elif m_status is not None:
-                    #New status matched
-                    pkg_status_match = True
-                elif m_depends is not None:
-                    #New depends macthed
-                    pkg_depends = m_depends.group(1)
-                else:
-                    pass
-
-                #Now check if we can process package depends and postinst
-                if "" != pkg_name and pkg_status_match:
-                    pkgs[pkg_name] = _get_pkg_depends_list(pkg_depends)
-                else:
-                    #Not enough information
-                    pass
-
-        # remove package dependencies not in postinsts
-        pkg_names = list(pkgs.keys())
-        for pkg_name in pkg_names:
-            deps = pkgs[pkg_name][:]
-
-            for d in deps:
-                if d not in pkg_names:
-                    pkgs[pkg_name].remove(d)
-
-        return pkgs
-
-    def _get_delayed_postinsts_common(self, status_file):
-        def _dep_resolve(graph, node, resolved, seen):
-            seen.append(node)
-
-            for edge in graph[node]:
-                if edge not in resolved:
-                    if edge in seen:
-                        raise RuntimeError("Packages %s and %s have " \
-                                "a circular dependency in postinsts scripts." \
-                                % (node, edge))
-                    _dep_resolve(graph, edge, resolved, seen)
-
-            resolved.append(node)
-
-        pkg_list = []
-
-        pkgs = None
-        if not self.d.getVar('PACKAGE_INSTALL').strip():
-            bb.note("Building empty image")
-        else:
-            pkgs = self._get_pkgs_postinsts(status_file)
-        if pkgs:
-            root = "__packagegroup_postinst__"
-            pkgs[root] = list(pkgs.keys())
-            _dep_resolve(pkgs, root, pkg_list, [])
-            pkg_list.remove(root)
-
-        if len(pkg_list) == 0:
-            return None
-
-        return pkg_list
-
-    def _save_postinsts_common(self, dst_postinst_dir, src_postinst_dir):
-        if bb.utils.contains("IMAGE_FEATURES", "package-management",
-                         True, False, self.d):
-            return
-        num = 0
-        for p in self._get_delayed_postinsts():
-            bb.utils.mkdirhier(dst_postinst_dir)
-
-            if os.path.exists(os.path.join(src_postinst_dir, p + ".postinst")):
-                shutil.copy(os.path.join(src_postinst_dir, p + ".postinst"),
-                            os.path.join(dst_postinst_dir, "%03d-%s" % (num, p)))
-
-            num += 1
-
-class DpkgRootfs(DpkgOpkgRootfs):
-    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
-        super(DpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
-        self.log_check_regex = '^E:'
-        self.log_check_expected_regexes = \
-        [
-            "^E: Unmet dependencies."
-        ]
-
-        bb.utils.remove(self.image_rootfs, True)
-        bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
-        self.manifest = DpkgManifest(d, manifest_dir)
-        self.pm = DpkgPM(d, d.getVar('IMAGE_ROOTFS'),
-                         d.getVar('PACKAGE_ARCHS'),
-                         d.getVar('DPKG_ARCH'))
-
-
-    def _create(self):
-        pkgs_to_install = self.manifest.parse_initial_manifest()
-        deb_pre_process_cmds = self.d.getVar('DEB_PREPROCESS_COMMANDS')
-        deb_post_process_cmds = self.d.getVar('DEB_POSTPROCESS_COMMANDS')
-
-        alt_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/alternatives")
-        bb.utils.mkdirhier(alt_dir)
-
-        # update PM index files
-        self.pm.write_index()
-
-        execute_pre_post_process(self.d, deb_pre_process_cmds)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-            # Don't support incremental, so skip that
-            self.progress_reporter.next_stage()
-
-        self.pm.update()
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        for pkg_type in self.install_order:
-            if pkg_type in pkgs_to_install:
-                self.pm.install(pkgs_to_install[pkg_type],
-                                [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
-                self.pm.fix_broken_dependencies()
-
-        if self.progress_reporter:
-            # Don't support attemptonly, so skip that
-            self.progress_reporter.next_stage()
-            self.progress_reporter.next_stage()
-
-        self.pm.install_complementary()
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        self._setup_dbg_rootfs(['/var/lib/dpkg'])
-
-        self.pm.fix_broken_dependencies()
-
-        self.pm.mark_packages("installed")
-
-        self.pm.run_pre_post_installs()
-
-        execute_pre_post_process(self.d, deb_post_process_cmds)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-    @staticmethod
-    def _depends_list():
-        return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMANDS']
-
-    def _get_delayed_postinsts(self):
-        status_file = self.image_rootfs + "/var/lib/dpkg/status"
-        return self._get_delayed_postinsts_common(status_file)
-
-    def _save_postinsts(self):
-        dst_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/deb-postinsts")
-        src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/info")
-        return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
-
-    def _log_check(self):
-        self._log_check_warn()
-        self._log_check_error()
-
-    def _cleanup(self):
-        pass
-
-
-class OpkgRootfs(DpkgOpkgRootfs):
-    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
-        super(OpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
-        self.log_check_regex = '(exit 1|Collected errors)'
-
-        self.manifest = OpkgManifest(d, manifest_dir)
-        self.opkg_conf = self.d.getVar("IPKGCONF_TARGET")
-        self.pkg_archs = self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS")
-
-        self.inc_opkg_image_gen = self.d.getVar('INC_IPK_IMAGE_GEN') or ""
-        if self._remove_old_rootfs():
-            bb.utils.remove(self.image_rootfs, True)
-            self.pm = OpkgPM(d,
-                             self.image_rootfs,
-                             self.opkg_conf,
-                             self.pkg_archs)
-        else:
-            self.pm = OpkgPM(d,
-                             self.image_rootfs,
-                             self.opkg_conf,
-                             self.pkg_archs)
-            self.pm.recover_packaging_data()
-
-        bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
-
-    def _prelink_file(self, root_dir, filename):
-        bb.note('prelink %s in %s' % (filename, root_dir))
-        prelink_cfg = oe.path.join(root_dir,
-                                   self.d.expand('${sysconfdir}/prelink.conf'))
-        if not os.path.exists(prelink_cfg):
-            shutil.copy(self.d.expand('${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf'),
-                        prelink_cfg)
-
-        cmd_prelink = self.d.expand('${STAGING_DIR_NATIVE}${sbindir_native}/prelink')
-        self._exec_shell_cmd([cmd_prelink,
-                              '--root',
-                              root_dir,
-                              '-amR',
-                              '-N',
-                              '-c',
-                              self.d.expand('${sysconfdir}/prelink.conf')])
-
-    '''
-    Compare two files with the same key twice to see if they are equal.
-    If they are not equal, it means they are duplicated and come from
-    different packages.
-    1st: Comapre them directly;
-    2nd: While incremental image creation is enabled, one of the
-         files could be probaly prelinked in the previous image
-         creation and the file has been changed, so we need to
-         prelink the other one and compare them.
-    '''
-    def _file_equal(self, key, f1, f2):
-
-        # Both of them are not prelinked
-        if filecmp.cmp(f1, f2):
-            return True
-
-        if bb.data.inherits_class('image-prelink', self.d):
-            if self.image_rootfs not in f1:
-                self._prelink_file(f1.replace(key, ''), f1)
-
-            if self.image_rootfs not in f2:
-                self._prelink_file(f2.replace(key, ''), f2)
-
-            # Both of them are prelinked
-            if filecmp.cmp(f1, f2):
-                return True
-
-        # Not equal
-        return False
-
-    """
-    This function was reused from the old implementation.
-    See commit: "image.bbclass: Added variables for multilib support." by
-    Lianhao Lu.
-    """
-    def _multilib_sanity_test(self, dirs):
-
-        allow_replace = self.d.getVar("MULTILIBRE_ALLOW_REP")
-        if allow_replace is None:
-            allow_replace = ""
-
-        allow_rep = re.compile(re.sub(r"\|$", r"", allow_replace))
-        error_prompt = "Multilib check error:"
-
-        files = {}
-        for dir in dirs:
-            for root, subfolders, subfiles in os.walk(dir):
-                for file in subfiles:
-                    item = os.path.join(root, file)
-                    key = str(os.path.join("/", os.path.relpath(item, dir)))
-
-                    valid = True
-                    if key in files:
-                        #check whether the file is allow to replace
-                        if allow_rep.match(key):
-                            valid = True
-                        else:
-                            if os.path.exists(files[key]) and \
-                               os.path.exists(item) and \
-                               not self._file_equal(key, files[key], item):
-                                valid = False
-                                bb.fatal("%s duplicate files %s %s is not the same\n" %
-                                         (error_prompt, item, files[key]))
-
-                    #pass the check, add to list
-                    if valid:
-                        files[key] = item
-
-    def _multilib_test_install(self, pkgs):
-        ml_temp = self.d.getVar("MULTILIB_TEMP_ROOTFS")
-        bb.utils.mkdirhier(ml_temp)
-
-        dirs = [self.image_rootfs]
-
-        for variant in self.d.getVar("MULTILIB_VARIANTS").split():
-            ml_target_rootfs = os.path.join(ml_temp, variant)
-
-            bb.utils.remove(ml_target_rootfs, True)
-
-            ml_opkg_conf = os.path.join(ml_temp,
-                                        variant + "-" + os.path.basename(self.opkg_conf))
-
-            ml_pm = OpkgPM(self.d, ml_target_rootfs, ml_opkg_conf, self.pkg_archs, prepare_index=False)
-
-            ml_pm.update()
-            ml_pm.install(pkgs)
-
-            dirs.append(ml_target_rootfs)
-
-        self._multilib_sanity_test(dirs)
-
-    '''
-    While ipk incremental image generation is enabled, it will remove the
-    unneeded pkgs by comparing the old full manifest in previous existing
-    image and the new full manifest in the current image.
-    '''
-    def _remove_extra_packages(self, pkgs_initial_install):
-        if self.inc_opkg_image_gen == "1":
-            # Parse full manifest in previous existing image creation session
-            old_full_manifest = self.manifest.parse_full_manifest()
-
-            # Create full manifest for the current image session, the old one
-            # will be replaced by the new one.
-            self.manifest.create_full(self.pm)
-
-            # Parse full manifest in current image creation session
-            new_full_manifest = self.manifest.parse_full_manifest()
-
-            pkg_to_remove = list()
-            for pkg in old_full_manifest:
-                if pkg not in new_full_manifest:
-                    pkg_to_remove.append(pkg)
-
-            if pkg_to_remove != []:
-                bb.note('decremental removed: %s' % ' '.join(pkg_to_remove))
-                self.pm.remove(pkg_to_remove)
-
-    '''
-    Compare with previous existing image creation, if some conditions
-    triggered, the previous old image should be removed.
-    The conditions include any of 'PACKAGE_EXCLUDE, NO_RECOMMENDATIONS
-    and BAD_RECOMMENDATIONS' has been changed.
-    '''
-    def _remove_old_rootfs(self):
-        if self.inc_opkg_image_gen != "1":
-            return True
-
-        vars_list_file = self.d.expand('${T}/vars_list')
-
-        old_vars_list = ""
-        if os.path.exists(vars_list_file):
-            old_vars_list = open(vars_list_file, 'r+').read()
-
-        new_vars_list = '%s:%s:%s\n' % \
-                ((self.d.getVar('BAD_RECOMMENDATIONS') or '').strip(),
-                 (self.d.getVar('NO_RECOMMENDATIONS') or '').strip(),
-                 (self.d.getVar('PACKAGE_EXCLUDE') or '').strip())
-        open(vars_list_file, 'w+').write(new_vars_list)
-
-        if old_vars_list != new_vars_list:
-            return True
-
-        return False
-
-    def _create(self):
-        pkgs_to_install = self.manifest.parse_initial_manifest()
-        opkg_pre_process_cmds = self.d.getVar('OPKG_PREPROCESS_COMMANDS')
-        opkg_post_process_cmds = self.d.getVar('OPKG_POSTPROCESS_COMMANDS')
-
-        # update PM index files
-        self.pm.write_index()
-
-        execute_pre_post_process(self.d, opkg_pre_process_cmds)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-            # Steps are a bit different in order, skip next
-            self.progress_reporter.next_stage()
-
-        self.pm.update()
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        if self.inc_opkg_image_gen == "1":
-            self._remove_extra_packages(pkgs_to_install)
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        for pkg_type in self.install_order:
-            if pkg_type in pkgs_to_install:
-                # For multilib, we perform a sanity test before final install
-                # If sanity test fails, it will automatically do a bb.fatal()
-                # and the installation will stop
-                if pkg_type == Manifest.PKG_TYPE_MULTILIB:
-                    self._multilib_test_install(pkgs_to_install[pkg_type])
-
-                self.pm.install(pkgs_to_install[pkg_type],
-                                [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        self.pm.install_complementary()
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-        opkg_lib_dir = self.d.getVar('OPKGLIBDIR')
-        opkg_dir = os.path.join(opkg_lib_dir, 'opkg')
-        self._setup_dbg_rootfs([opkg_dir])
-
-        execute_pre_post_process(self.d, opkg_post_process_cmds)
-
-        if self.inc_opkg_image_gen == "1":
-            self.pm.backup_packaging_data()
-
-        if self.progress_reporter:
-            self.progress_reporter.next_stage()
-
-    @staticmethod
-    def _depends_list():
-        return ['IPKGCONF_SDK', 'IPK_FEED_URIS', 'DEPLOY_DIR_IPK', 'IPKGCONF_TARGET', 'INC_IPK_IMAGE_GEN', 'OPKG_ARGS', 'OPKGLIBDIR', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'OPKGLIBDIR']
-
-    def _get_delayed_postinsts(self):
-        status_file = os.path.join(self.image_rootfs,
-                                   self.d.getVar('OPKGLIBDIR').strip('/'),
-                                   "opkg", "status")
-        return self._get_delayed_postinsts_common(status_file)
-
-    def _save_postinsts(self):
-        dst_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/ipk-postinsts")
-        src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${OPKGLIBDIR}/opkg/info")
-        return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
-
-    def _log_check(self):
-        self._log_check_warn()
-        self._log_check_error()
-
-    def _cleanup(self):
-        self.pm.remove_lists()
-
 def get_class_for_type(imgtype):
+    from oe.package_manager.rpm.rootfs import RpmRootfs
+    from oe.package_manager.ipk.rootfs import OpkgRootfs
+    from oe.package_manager.deb.rootfs import DpkgRootfs
     return {"rpm": RpmRootfs,
             "ipk": OpkgRootfs,
             "deb": DpkgRootfs}[imgtype]
@@ -970,6 +373,9 @@
 def create_rootfs(d, manifest_dir=None, progress_reporter=None, logcatcher=None):
     env_bkp = os.environ.copy()
 
+    from oe.package_manager.rpm.rootfs import RpmRootfs
+    from oe.package_manager.ipk.rootfs import OpkgRootfs
+    from oe.package_manager.deb.rootfs import DpkgRootfs
     img_type = d.getVar('IMAGE_PKGTYPE')
     if img_type == "rpm":
         RpmRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
diff --git a/poky/meta/lib/oe/sdk.py b/poky/meta/lib/oe/sdk.py
index d02a274..fdcadcb 100644
--- a/poky/meta/lib/oe/sdk.py
+++ b/poky/meta/lib/oe/sdk.py
@@ -7,8 +7,6 @@
 from oe.manifest import *
 from oe.package_manager import *
 import os
-import shutil
-import glob
 import traceback
 
 class Sdk(object, metaclass=ABCMeta):
@@ -110,283 +108,6 @@
             pass
 
 
-class RpmSdk(Sdk):
-    def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"):
-        super(RpmSdk, self).__init__(d, manifest_dir)
-
-        self.target_manifest = RpmManifest(d, self.manifest_dir,
-                                           Manifest.MANIFEST_TYPE_SDK_TARGET)
-        self.host_manifest = RpmManifest(d, self.manifest_dir,
-                                         Manifest.MANIFEST_TYPE_SDK_HOST)
-
-        rpm_repo_workdir = "oe-sdk-repo"
-        if "sdk_ext" in d.getVar("BB_RUNTASK"):
-            rpm_repo_workdir = "oe-sdk-ext-repo"
-
-        self.target_pm = RpmPM(d,
-                               self.sdk_target_sysroot,
-                               self.d.getVar('TARGET_VENDOR'),
-                               'target',
-                               rpm_repo_workdir=rpm_repo_workdir
-                               )
-
-        self.host_pm = RpmPM(d,
-                             self.sdk_host_sysroot,
-                             self.d.getVar('SDK_VENDOR'),
-                             'host',
-                             "SDK_PACKAGE_ARCHS",
-                             "SDK_OS",
-                             rpm_repo_workdir=rpm_repo_workdir
-                             )
-
-    def _populate_sysroot(self, pm, manifest):
-        pkgs_to_install = manifest.parse_initial_manifest()
-
-        pm.create_configs()
-        pm.write_index()
-        pm.update()
-
-        pkgs = []
-        pkgs_attempt = []
-        for pkg_type in pkgs_to_install:
-            if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
-                pkgs_attempt += pkgs_to_install[pkg_type]
-            else:
-                pkgs += pkgs_to_install[pkg_type]
-
-        pm.install(pkgs)
-
-        pm.install(pkgs_attempt, True)
-
-    def _populate(self):
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
-
-        bb.note("Installing TARGET packages")
-        self._populate_sysroot(self.target_pm, self.target_manifest)
-
-        self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
-
-        self.target_pm.run_intercepts(populate_sdk='target')
-
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
-
-        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
-            self.target_pm.remove_packaging_data()
-
-        bb.note("Installing NATIVESDK packages")
-        self._populate_sysroot(self.host_pm, self.host_manifest)
-        self.install_locales(self.host_pm)
-
-        self.host_pm.run_intercepts(populate_sdk='host')
-
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
-
-        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
-            self.host_pm.remove_packaging_data()
-
-        # Move host RPM library data
-        native_rpm_state_dir = os.path.join(self.sdk_output,
-                                            self.sdk_native_path,
-                                            self.d.getVar('localstatedir_nativesdk').strip('/'),
-                                            "lib",
-                                            "rpm"
-                                            )
-        self.mkdirhier(native_rpm_state_dir)
-        for f in glob.glob(os.path.join(self.sdk_output,
-                                        "var",
-                                        "lib",
-                                        "rpm",
-                                        "*")):
-            self.movefile(f, native_rpm_state_dir)
-
-        self.remove(os.path.join(self.sdk_output, "var"), True)
-
-        # Move host sysconfig data
-        native_sysconf_dir = os.path.join(self.sdk_output,
-                                          self.sdk_native_path,
-                                          self.d.getVar('sysconfdir',
-                                                        True).strip('/'),
-                                          )
-        self.mkdirhier(native_sysconf_dir)
-        for f in glob.glob(os.path.join(self.sdk_output, "etc", "rpm*")):
-            self.movefile(f, native_sysconf_dir)
-        for f in glob.glob(os.path.join(self.sdk_output, "etc", "dnf", "*")):
-            self.movefile(f, native_sysconf_dir)
-        self.remove(os.path.join(self.sdk_output, "etc"), True)
-
-
-class OpkgSdk(Sdk):
-    def __init__(self, d, manifest_dir=None):
-        super(OpkgSdk, self).__init__(d, manifest_dir)
-
-        self.target_conf = self.d.getVar("IPKGCONF_TARGET")
-        self.host_conf = self.d.getVar("IPKGCONF_SDK")
-
-        self.target_manifest = OpkgManifest(d, self.manifest_dir,
-                                            Manifest.MANIFEST_TYPE_SDK_TARGET)
-        self.host_manifest = OpkgManifest(d, self.manifest_dir,
-                                          Manifest.MANIFEST_TYPE_SDK_HOST)
-
-        ipk_repo_workdir = "oe-sdk-repo"
-        if "sdk_ext" in d.getVar("BB_RUNTASK"):
-            ipk_repo_workdir = "oe-sdk-ext-repo"
-
-        self.target_pm = OpkgPM(d, self.sdk_target_sysroot, self.target_conf,
-                                self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS"), 
-                                ipk_repo_workdir=ipk_repo_workdir)
-
-        self.host_pm = OpkgPM(d, self.sdk_host_sysroot, self.host_conf,
-                              self.d.getVar("SDK_PACKAGE_ARCHS"),
-                                ipk_repo_workdir=ipk_repo_workdir)
-
-    def _populate_sysroot(self, pm, manifest):
-        pkgs_to_install = manifest.parse_initial_manifest()
-
-        if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS') or "") != "1":
-            pm.write_index()
-
-        pm.update()
-
-        for pkg_type in self.install_order:
-            if pkg_type in pkgs_to_install:
-                pm.install(pkgs_to_install[pkg_type],
-                           [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
-
-    def _populate(self):
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
-
-        bb.note("Installing TARGET packages")
-        self._populate_sysroot(self.target_pm, self.target_manifest)
-
-        self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
-
-        self.target_pm.run_intercepts(populate_sdk='target')
-
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
-
-        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
-            self.target_pm.remove_packaging_data()
-
-        bb.note("Installing NATIVESDK packages")
-        self._populate_sysroot(self.host_pm, self.host_manifest)
-        self.install_locales(self.host_pm)
-
-        self.host_pm.run_intercepts(populate_sdk='host')
-
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
-
-        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
-            self.host_pm.remove_packaging_data()
-
-        target_sysconfdir = os.path.join(self.sdk_target_sysroot, self.sysconfdir)
-        host_sysconfdir = os.path.join(self.sdk_host_sysroot, self.sysconfdir)
-
-        self.mkdirhier(target_sysconfdir)
-        shutil.copy(self.target_conf, target_sysconfdir)
-        os.chmod(os.path.join(target_sysconfdir,
-                              os.path.basename(self.target_conf)), 0o644)
-
-        self.mkdirhier(host_sysconfdir)
-        shutil.copy(self.host_conf, host_sysconfdir)
-        os.chmod(os.path.join(host_sysconfdir,
-                              os.path.basename(self.host_conf)), 0o644)
-
-        native_opkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
-                                             self.d.getVar('localstatedir_nativesdk').strip('/'),
-                                             "lib", "opkg")
-        self.mkdirhier(native_opkg_state_dir)
-        for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "opkg", "*")):
-            self.movefile(f, native_opkg_state_dir)
-
-        self.remove(os.path.join(self.sdk_output, "var"), True)
-
-
-class DpkgSdk(Sdk):
-    def __init__(self, d, manifest_dir=None):
-        super(DpkgSdk, self).__init__(d, manifest_dir)
-
-        self.target_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt")
-        self.host_conf_dir = os.path.join(self.d.getVar("APTCONF_TARGET"), "apt-sdk")
-
-        self.target_manifest = DpkgManifest(d, self.manifest_dir,
-                                            Manifest.MANIFEST_TYPE_SDK_TARGET)
-        self.host_manifest = DpkgManifest(d, self.manifest_dir,
-                                          Manifest.MANIFEST_TYPE_SDK_HOST)
-
-        deb_repo_workdir = "oe-sdk-repo"
-        if "sdk_ext" in d.getVar("BB_RUNTASK"):
-            deb_repo_workdir = "oe-sdk-ext-repo"
-
-        self.target_pm = DpkgPM(d, self.sdk_target_sysroot,
-                                self.d.getVar("PACKAGE_ARCHS"),
-                                self.d.getVar("DPKG_ARCH"),
-                                self.target_conf_dir,
-                                deb_repo_workdir=deb_repo_workdir)
-
-        self.host_pm = DpkgPM(d, self.sdk_host_sysroot,
-                              self.d.getVar("SDK_PACKAGE_ARCHS"),
-                              self.d.getVar("DEB_SDK_ARCH"),
-                              self.host_conf_dir,
-                              deb_repo_workdir=deb_repo_workdir)
-
-    def _copy_apt_dir_to(self, dst_dir):
-        staging_etcdir_native = self.d.getVar("STAGING_ETCDIR_NATIVE")
-
-        self.remove(dst_dir, True)
-
-        shutil.copytree(os.path.join(staging_etcdir_native, "apt"), dst_dir)
-
-    def _populate_sysroot(self, pm, manifest):
-        pkgs_to_install = manifest.parse_initial_manifest()
-
-        pm.write_index()
-        pm.update()
-
-        for pkg_type in self.install_order:
-            if pkg_type in pkgs_to_install:
-                pm.install(pkgs_to_install[pkg_type],
-                           [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
-
-    def _populate(self):
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
-
-        bb.note("Installing TARGET packages")
-        self._populate_sysroot(self.target_pm, self.target_manifest)
-
-        self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
-
-        self.target_pm.run_intercepts(populate_sdk='target')
-
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
-
-        self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
-
-        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
-            self.target_pm.remove_packaging_data()
-
-        bb.note("Installing NATIVESDK packages")
-        self._populate_sysroot(self.host_pm, self.host_manifest)
-        self.install_locales(self.host_pm)
-
-        self.host_pm.run_intercepts(populate_sdk='host')
-
-        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
-
-        self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
-                                           "etc", "apt"))
-
-        if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
-            self.host_pm.remove_packaging_data()
-
-        native_dpkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
-                                             "var", "lib", "dpkg")
-        self.mkdirhier(native_dpkg_state_dir)
-        for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "dpkg", "*")):
-            self.movefile(f, native_dpkg_state_dir)
-        self.remove(os.path.join(self.sdk_output, "var"), True)
-
-
-
 def sdk_list_installed_packages(d, target, rootfs_dir=None):
     if rootfs_dir is None:
         sdk_output = d.getVar('SDK_OUTPUT')
@@ -394,6 +115,9 @@
 
         rootfs_dir = [sdk_output, os.path.join(sdk_output, target_path)][target is True]
 
+    from oe.package_manager.rpm import RpmPkgsList
+    from oe.package_manager.ipk import OpkgPkgsList
+    from oe.package_manager.deb import DpkgPkgsList
     img_type = d.getVar('IMAGE_PKGTYPE')
     if img_type == "rpm":
         arch_var = ["SDK_PACKAGE_ARCHS", None][target is True]
@@ -409,6 +133,9 @@
     env_bkp = os.environ.copy()
 
     img_type = d.getVar('IMAGE_PKGTYPE')
+    from oe.package_manager.rpm.sdk import RpmSdk
+    from oe.package_manager.ipk.sdk import OpkgSdk
+    from oe.package_manager.deb.sdk import DpkgSdk
     if img_type == "rpm":
         RpmSdk(d, manifest_dir).populate()
     elif img_type == "ipk":
diff --git a/poky/meta/lib/oeqa/core/runner.py b/poky/meta/lib/oeqa/core/runner.py
index 00b7d0b..d50690a 100644
--- a/poky/meta/lib/oeqa/core/runner.py
+++ b/poky/meta/lib/oeqa/core/runner.py
@@ -195,6 +195,20 @@
                 report['log'] = log
             if duration:
                 report['duration'] = duration
+
+            alltags = []
+            # pull tags from the case class
+            if hasattr(case, "__oeqa_testtags"):
+                alltags.extend(getattr(case, "__oeqa_testtags"))
+            # pull tags from the method itself
+            test_name = case._testMethodName
+            if hasattr(case, test_name):
+                method = getattr(case, test_name)
+                if hasattr(method, "__oeqa_testtags"):
+                    alltags.extend(getattr(method, "__oeqa_testtags"))
+            if alltags:
+                report['oetags'] = alltags
+
             if dump_streams and case.id() in self.logged_output:
                 (stdout, stderr) = self.logged_output[case.id()]
                 report['stdout'] = stdout
diff --git a/poky/meta/lib/oeqa/core/target/ssh.py b/poky/meta/lib/oeqa/core/target/ssh.py
index 090b40a..aefb576 100644
--- a/poky/meta/lib/oeqa/core/target/ssh.py
+++ b/poky/meta/lib/oeqa/core/target/ssh.py
@@ -107,13 +107,16 @@
             scpCmd = self.scp + [localSrc, remotePath]
             return self._run(scpCmd, ignore_status=False)
 
-    def copyFrom(self, remoteSrc, localDst):
+    def copyFrom(self, remoteSrc, localDst, warn_on_failure=False):
         """
             Copy file from target.
         """
         remotePath = '%s@%s:%s' % (self.user, self.ip, remoteSrc)
         scpCmd = self.scp + [remotePath, localDst]
-        return self._run(scpCmd, ignore_status=False)
+        (status, output) = self._run(scpCmd, ignore_status=warn_on_failure)
+        if warn_on_failure and status:
+            self.logger.warning("Copy returned non-zero exit status %d:\n%s" % (status, output))
+        return (status, output)
 
     def copyDirTo(self, localSrc, remoteDst):
         """
diff --git a/poky/meta/lib/oeqa/manual/bsp-hw.json b/poky/meta/lib/oeqa/manual/bsp-hw.json
index a9bc7d4..75b8975 100644
--- a/poky/meta/lib/oeqa/manual/bsp-hw.json
+++ b/poky/meta/lib/oeqa/manual/bsp-hw.json
@@ -125,28 +125,6 @@
     },
     {
         "test": {
-            "@alias": "bsps-hw.bsps-hw.shutdown_system",
-            "author": [
-                {
-                    "email": "alexandru.c.georgescu@intel.com",
-                    "name": "alexandru.c.georgescu@intel.com"
-                }
-            ],
-            "execution": {
-                "1": {
-                    "action": "boot system",
-                    "expected_results": ""
-                },
-                "2": {
-                    "action": "launch terminal and run \"shutdown -h now\" or \"poweroff\"",
-                    "expected_results": "System can be shutdown successfully . "
-                }
-            },
-            "summary": "shutdown_system"
-        }
-    },
-    {
-        "test": {
             "@alias": "bsps-hw.bsps-hw.switch_among_multi_applications_and_desktop",
             "author": [
                 {
@@ -263,28 +241,6 @@
     },
     {
         "test": {
-            "@alias": "bsps-hw.bsps-hw.X_server_can_start_up_with_runlevel_5_boot",
-            "author": [
-                {
-                    "email": "alexandru.c.georgescu@intel.com",
-                    "name": "alexandru.c.georgescu@intel.com"
-                }
-            ],
-            "execution": {
-                "1": {
-                    "action": "boot up system with default runlevel  \n\n",
-                    "expected_results": "X server can start up well and desktop display has no problem .  \n\n"
-                },
-                "2": {
-                    "action": "type runlevel at command prompt",
-                    "expected_results": "Output:N 5"
-                }
-            },
-            "summary": "X_server_can_start_up_with_runlevel_5_boot"
-        }
-    },
-    {
-        "test": {
             "@alias": "bsps-hw.bsps-hw.standby",
             "author": [
                 {
diff --git a/poky/meta/lib/oeqa/runtime/cases/buildcpio.py b/poky/meta/lib/oeqa/runtime/cases/buildcpio.py
index d0f9166..e29bf16 100644
--- a/poky/meta/lib/oeqa/runtime/cases/buildcpio.py
+++ b/poky/meta/lib/oeqa/runtime/cases/buildcpio.py
@@ -27,6 +27,7 @@
     @OEHasPackage(['autoconf'])
     def test_cpio(self):
         self.project.download_archive()
-        self.project.run_configure('--disable-maintainer-mode','')
+        self.project.run_configure('--disable-maintainer-mode',
+                                   'sed -i -e "/char \*program_name/d" src/global.c;')
         self.project.run_make()
         self.project.run_install()
diff --git a/poky/meta/lib/oeqa/runtime/cases/ltp.py b/poky/meta/lib/oeqa/runtime/cases/ltp.py
index 6dc5ef2..a66d5d1 100644
--- a/poky/meta/lib/oeqa/runtime/cases/ltp.py
+++ b/poky/meta/lib/oeqa/runtime/cases/ltp.py
@@ -78,9 +78,10 @@
             # copy nice log from DUT
             dst = os.path.join(self.ltptest_log_dir, "%s" %  ltp_group )
             remote_src = "/opt/ltp/results/%s" % ltp_group 
-            (status, output) = self.target.copyFrom(remote_src, dst)
+            (status, output) = self.target.copyFrom(remote_src, dst, True)
             msg = 'File could not be copied. Output: %s' % output
-            self.assertEqual(status, 0, msg=msg)
+            if status:
+                self.target.logger.warning(msg)
 
             parser = LtpParser()
             results, sections  = parser.parse(dst)
diff --git a/poky/meta/lib/oeqa/sdk/cases/buildcpio.py b/poky/meta/lib/oeqa/sdk/cases/buildcpio.py
index 902e93f..e565826 100644
--- a/poky/meta/lib/oeqa/sdk/cases/buildcpio.py
+++ b/poky/meta/lib/oeqa/sdk/cases/buildcpio.py
@@ -28,6 +28,7 @@
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
+            self._run("sed -i -e '/char.*program_name/d' {source}/src/global.c".format(**dirs))
             self._run("cd {build} && {source}/configure --disable-maintainer-mode $CONFIGURE_FLAGS".format(**dirs))
             self._run("cd {build} && make -j".format(**dirs))
             self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
diff --git a/poky/meta/lib/oeqa/sdk/cases/buildgalculator.py b/poky/meta/lib/oeqa/sdk/cases/buildgalculator.py
index bbaa5c5..1121ed2 100644
--- a/poky/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/poky/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -35,7 +35,7 @@
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
-            self._run("cd {source} && autoreconf -i -f -I $OECORE_TARGET_SYSROOT/usr/share/aclocal -I m4".format(**dirs))
+            self._run("cd {source} && sed -i -e '/s_preferences.*prefs;/d' src/main.c && autoreconf -i -f -I $OECORE_TARGET_SYSROOT/usr/share/aclocal -I m4".format(**dirs))
             self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs))
             self._run("cd {build} && make -j".format(**dirs))
             self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
diff --git a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
index dea519e..f7a2533 100644
--- a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -263,6 +263,80 @@
 
         bitbake("--graphviz core-image-sato")
 
+    def test_fit_image(self):
+        """
+        Summary:     Check if FIT image and Image Tree Source (its) are built
+                     and the Image Tree Source has the correct fields.
+        Expected:    1. fitImage and fitImage-its can be built
+                     2. The type, load address, entrypoint address and
+                     default values of kernel and ramdisk are as expected
+                     in the Image Tree Source. Not all the fields are tested,
+                     only the key fields that wont vary between different
+                     architectures.
+        Product:     oe-core
+        Author:      Usama Arif <usama.arif@arm.com>
+        """
+        config = """
+# Enable creation of fitImage
+KERNEL_IMAGETYPE = "Image"
+KERNEL_IMAGETYPES += " fitImage "
+KERNEL_CLASSES = " kernel-fitimage "
+
+# RAM disk variables including load address and entrypoint for kernel and RAM disk
+IMAGE_FSTYPES += "cpio.gz"
+INITRAMFS_IMAGE = "core-image-minimal"
+UBOOT_RD_LOADADDRESS = "0x88000000"
+UBOOT_RD_ENTRYPOINT = "0x88000000"
+UBOOT_LOADADDRESS = "0x80080000"
+UBOOT_ENTRYPOINT = "0x80080000"
+"""
+        self.write_config(config)
+
+        # fitImage is created as part of linux recipe
+        bitbake("virtual/kernel")
+
+        image_type = "core-image-minimal"
+        deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+        machine = get_bb_var('MACHINE')
+        fitimage_its_path = os.path.join(deploy_dir_image,
+            "fitImage-its-%s-%s-%s" % (image_type, machine, machine))
+        fitimage_path = os.path.join(deploy_dir_image,
+            "fitImage-%s-%s-%s" % (image_type, machine, machine))
+
+        self.assertTrue(os.path.exists(fitimage_its_path),
+            "%s image tree source doesn't exist" % (fitimage_its_path))
+        self.assertTrue(os.path.exists(fitimage_path),
+            "%s FIT image doesn't exist" % (fitimage_path))
+
+        # Check that the type, load address, entrypoint address and default
+        # values for kernel and ramdisk in Image Tree Source are as expected.
+        # The order of fields in the below array is important. Not all the
+        # fields are tested, only the key fields that wont vary between
+        # different architectures.
+        its_field_check = ['type = "kernel";',
+            'load = <0x80080000>;',
+            'entry = <0x80080000>;',
+            'type = "ramdisk";',
+            'load = <0x88000000>;',
+            'entry = <0x88000000>;',
+            'default = "conf@1";',
+            'kernel = "kernel@1";',
+            'ramdisk = "ramdisk@1";'
+            ]
+
+        with open(fitimage_its_path) as its_file:
+            field_index = 0
+            for line in its_file:
+                if field_index == len(its_field_check):
+                    break
+                if its_field_check[field_index] in line:
+                    field_index +=1
+
+        if field_index != len(its_field_check): # if its equal, the test passed
+            self.assertTrue(field_index == len(its_field_check),
+                "Fields in Image Tree Source File %s did not match, error in finding %s"
+                % (fitimage_its_path, its_field_check[field_index]))
+
     def test_image_gen_debugfs(self):
         """
         Summary:     Check debugfs generation
diff --git a/poky/meta/lib/oeqa/selftest/cases/tinfoil.py b/poky/meta/lib/oeqa/selftest/cases/tinfoil.py
index d1aa7b9..206168e 100644
--- a/poky/meta/lib/oeqa/selftest/cases/tinfoil.py
+++ b/poky/meta/lib/oeqa/selftest/cases/tinfoil.py
@@ -100,8 +100,9 @@
             eventreceived = False
             commandcomplete = False
             start = time.time()
-            # Wait for 5s in total so we'd detect spurious heartbeat events for example
-            while time.time() - start < 5:
+            # Wait for 10s in total so we'd detect spurious heartbeat events for example
+            # The test is IO load sensitive too
+            while time.time() - start < 10:
                 event = tinfoil.wait_event(1)
                 if event:
                     if isinstance(event, bb.command.CommandCompleted):
diff --git a/poky/meta/lib/oeqa/utils/package_manager.py b/poky/meta/lib/oeqa/utils/package_manager.py
index 2d358f7..3623299 100644
--- a/poky/meta/lib/oeqa/utils/package_manager.py
+++ b/poky/meta/lib/oeqa/utils/package_manager.py
@@ -12,7 +12,9 @@
     """
     Returns an OE package manager that can install packages in root_path.
     """
-    from oe.package_manager import RpmPM, OpkgPM, DpkgPM
+    from oe.package_manager.rpm import RpmPM
+    from oe.package_manager.ipk import OpkgPM
+    from oe.package_manager.deb import DpkgPM
 
     pkg_class = d.getVar("IMAGE_PKGTYPE")
     if pkg_class == "rpm":
diff --git a/poky/meta/recipes-bsp/grub/grub2.inc b/poky/meta/recipes-bsp/grub/grub2.inc
index 2024e13..628ca64 100644
--- a/poky/meta/recipes-bsp/grub/grub2.inc
+++ b/poky/meta/recipes-bsp/grub/grub2.inc
@@ -11,6 +11,8 @@
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
+CVE_PRODUCT = "grub2"
+
 SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
            file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
            file://autogen.sh-exclude-pc.patch \
diff --git a/poky/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch b/poky/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch
new file mode 100644
index 0000000..32808fb
--- /dev/null
+++ b/poky/meta/recipes-bsp/libacpi/files/0001-libacpi-Fix-build-witth-fno-commom.patch
@@ -0,0 +1,68 @@
+From 9839c169f513e65fc711646257b3e8588cce623c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Aug 2020 12:06:01 -0700
+Subject: [PATCH] libacpi: Fix build witth -fno-commom
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libacpi.c | 16 ++++++++++++++++
+ libacpi.h |  6 +++---
+ 2 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/libacpi.c b/libacpi.c
+index 4e34725..9344ea4 100644
+--- a/libacpi.c
++++ b/libacpi.c
+@@ -14,6 +14,22 @@
+ #include "libacpi.h"
+ #include "list.h"
+ 
++/**
++ * Array for existing batteries, loop until
++ * globals->battery_count
++ */
++battery_t batteries[MAX_ITEMS];
++/**
++ * Array for existing thermal zones, loop until
++ * globals->thermal_count
++ */
++thermal_t thermals[MAX_ITEMS];
++/**
++ * Array for existing fans, loop until
++ * globals->fan_count
++ */
++fan_t fans[MAX_ITEMS];
++
+ static int read_acpi_battinfo(const int num);
+ static int read_acpi_battalarm(const int num);
+ static int read_acpi_battstate(const int num);
+diff --git a/libacpi.h b/libacpi.h
+index 9334b79..5242d3d 100644
+--- a/libacpi.h
++++ b/libacpi.h
+@@ -183,17 +183,17 @@ typedef struct {
+  * Array for existing batteries, loop until
+  * globals->battery_count
+  */
+-battery_t batteries[MAX_ITEMS];
++extern battery_t batteries[MAX_ITEMS];
+ /**
+  * Array for existing thermal zones, loop until
+  * globals->thermal_count
+  */
+-thermal_t thermals[MAX_ITEMS];
++extern thermal_t thermals[MAX_ITEMS];
+ /**
+  * Array for existing fans, loop until
+  * globals->fan_count
+  */
+-fan_t fans[MAX_ITEMS];
++extern fan_t fans[MAX_ITEMS];
+ /**
+  * Finds existing batteries and fills the
+  * corresponding batteries structures with the paths
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
index 5e7f7fa..fa9e3d4 100644
--- a/poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
+++ b/poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
@@ -11,7 +11,9 @@
 	   file://makefile-fix.patch \
 	   file://libacpi_fix_for_x32.patch \
 	   file://use_correct_strip_in_cross_environment.patch \
-	   file://ldflags.patch "
+	   file://ldflags.patch \
+           file://0001-libacpi-Fix-build-witth-fno-commom.patch \
+           "
 
 SRC_URI[md5sum] = "05b53dd7bead66dda35fec502b91066c"
 SRC_URI[sha256sum] = "13086e31d428b9c125954d48ac497b754bbbce2ef34ea29ecd903e82e25bad29"
diff --git a/poky/meta/recipes-bsp/u-boot/libubootenv_0.2.bb b/poky/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
similarity index 82%
rename from poky/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
rename to poky/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
index 3820ba2..47e64f9 100644
--- a/poky/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
+++ b/poky/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
@@ -10,9 +10,8 @@
 LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
 SECTION = "libs"
 
-PV = "0.2+git${SRCPV}"
 SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
-SRCREV = "86bd30a14e153a18f670b25708795253d8736f0f"
+SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
 
 S = "${WORKDIR}/git"
 
@@ -24,4 +23,8 @@
 PROVIDES += "u-boot-fw-utils"
 RPROVIDES_${PN}-bin += "u-boot-fw-utils"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
+
 BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.2.bb b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.2.bb
index b56a204..cf4af82 100644
--- a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.2.bb
+++ b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.2.bb
@@ -19,3 +19,5 @@
 
 PACKAGECONFIG ?= ""
 PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
+
+CFLAGS += "-fcommon"
diff --git a/poky/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch b/poky/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch
new file mode 100644
index 0000000..49d319f
--- /dev/null
+++ b/poky/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch
@@ -0,0 +1,58 @@
+From 7d39930468e272c740b0eed3c7e5b7fb3abf29e8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Aug 2020 10:36:22 -0700
+Subject: [PATCH] ftpd,telnetd: Fix multiple definitions of errcatch and not42
+
+This helps fix build failures when -fno-common option is used
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ftpd/extern.h     | 2 +-
+ ftpd/ftpcmd.c     | 1 +
+ telnetd/utility.c | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/ftpd/extern.h b/ftpd/extern.h
+index ab33cf3..91dbbee 100644
+--- a/ftpd/extern.h
++++ b/ftpd/extern.h
+@@ -90,7 +90,7 @@ extern void user (const char *);
+ extern char *sgetsave (const char *);
+ 
+ /* Exported from ftpd.c.  */
+-jmp_buf errcatch;
++extern jmp_buf errcatch;
+ extern struct sockaddr_storage data_dest;
+ extern socklen_t data_dest_len;
+ extern struct sockaddr_storage his_addr;
+diff --git a/ftpd/ftpcmd.c b/ftpd/ftpcmd.c
+index beb1f06..d272e9d 100644
+--- a/ftpd/ftpcmd.c
++++ b/ftpd/ftpcmd.c
+@@ -106,6 +106,7 @@
+ #endif
+ 
+ off_t restart_point;
++jmp_buf errcatch;
+ 
+ static char cbuf[512];           /* Command Buffer.  */
+ static char *fromname;
+diff --git a/telnetd/utility.c b/telnetd/utility.c
+index e7ffb8e..46bf91e 100644
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -63,7 +63,7 @@ static int ncc;
+ static char ptyibuf[BUFSIZ], *ptyip;
+ static int pcc;
+ 
+-int not42;
++extern int not42;
+ 
+ static int
+ readstream (int p, char *ibuf, int bufsize)
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/poky/meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb
index cc9410b..adf6d44 100644
--- a/poky/meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb
+++ b/poky/meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb
@@ -23,6 +23,7 @@
            file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \
            file://0001-rcp-fix-to-work-with-large-files.patch \
            file://fix-buffer-fortify-tfpt.patch \
+           file://0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch \
 "
 
 SRC_URI[md5sum] = "04852c26c47cc8c6b825f2b74f191f52"
diff --git a/poky/meta/recipes-connectivity/iproute2/iproute2/0001-devlink.c-add-missing-include.patch b/poky/meta/recipes-connectivity/iproute2/iproute2/0001-devlink.c-add-missing-include.patch
index f9580b7..fdd8bbf 100644
--- a/poky/meta/recipes-connectivity/iproute2/iproute2/0001-devlink.c-add-missing-include.patch
+++ b/poky/meta/recipes-connectivity/iproute2/iproute2/0001-devlink.c-add-missing-include.patch
@@ -1,23 +1,24 @@
-From 5df629d825df4ccc4283228bc0739da126326072 Mon Sep 17 00:00:00 2001
+From ce39396d4617874323f6039a5b476e44bf552908 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Sat, 6 Jun 2020 18:00:13 +0000
 Subject: [PATCH] devlink.c: add missing include
 
 Upstream-Status: Pending
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  devlink/devlink.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/devlink/devlink.c b/devlink/devlink.c
-index 16602ab..c278e6d 100644
+index 0982fae..93dc01c 100644
 --- a/devlink/devlink.c
 +++ b/devlink/devlink.c
-@@ -26,6 +26,7 @@
- #include <libmnl/libmnl.h>
- #include <netinet/ether.h>
+@@ -33,6 +33,7 @@
+ #include <sys/select.h>
+ #include <sys/socket.h>
  #include <sys/types.h>
 +#include <signal.h>
  
- #include "SNAPSHOT.h"
+ #include "version.h"
  #include "list.h"
diff --git a/poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
index 50c4bfb..74e3de1 100644
--- a/poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
+++ b/poky/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch
@@ -1,4 +1,4 @@
-From b7d96340c55afb7023ded0041107c63dbd886196 Mon Sep 17 00:00:00 2001
+From c25f8d1f7a6203dfeb10b39f80ffd314bb84a58d Mon Sep 17 00:00:00 2001
 From: Baruch Siach <baruch@tkos.co.il>
 Date: Thu, 22 Dec 2016 15:26:30 +0200
 Subject: [PATCH] libc-compat.h: add musl workaround
@@ -14,15 +14,16 @@
 
 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 Signed-off-by: Maxin B. John <maxin.john@intel.com>
+
 ---
  include/uapi/linux/libc-compat.h | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
-index f38571d..30f0b67 100644
+index a159991..22198fa 100644
 --- a/include/uapi/linux/libc-compat.h
 +++ b/include/uapi/linux/libc-compat.h
-@@ -49,10 +49,12 @@
+@@ -50,10 +50,12 @@
  #define _LIBC_COMPAT_H
  
  /* We have included glibc headers... */
@@ -36,6 +37,3 @@
  
  /* GLIBC headers included first so don't define anything
   * that would already be defined. */
--- 
-2.4.0
-
diff --git a/poky/meta/recipes-connectivity/iproute2/iproute2_5.7.0.bb b/poky/meta/recipes-connectivity/iproute2/iproute2_5.8.0.bb
similarity index 78%
rename from poky/meta/recipes-connectivity/iproute2/iproute2_5.7.0.bb
rename to poky/meta/recipes-connectivity/iproute2/iproute2_5.8.0.bb
index 276afea..3a590f9 100644
--- a/poky/meta/recipes-connectivity/iproute2/iproute2_5.7.0.bb
+++ b/poky/meta/recipes-connectivity/iproute2/iproute2_5.8.0.bb
@@ -5,7 +5,7 @@
            file://0001-devlink.c-add-missing-include.patch \
            "
 
-SRC_URI[sha256sum] = "725dc7ba94aae54c6f8d4223ca055d9fb4fe89d6994b1c03bfb4411c4dd10f21"
+SRC_URI[sha256sum] = "cfcd1f890290f8c8afcc91d9444ad929b9252c16f9ab3f286c50dd3c59dc646e"
 
 # CFLAGS are computed in Makefile and reference CCOPTS
 #
diff --git a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
index 6481377..5c845b7 100644
--- a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
+++ b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
@@ -17,7 +17,6 @@
 ExecStopPost=@SBINDIR@/exportfs -au
 ExecStopPost=@SBINDIR@/exportfs -f
 ExecReload=@SBINDIR@/exportfs -r
-StandardError=syslog
 RemainAfterExit=yes
 
 [Install]
diff --git a/poky/meta/recipes-connectivity/openssh/openssh/sshd@.service b/poky/meta/recipes-connectivity/openssh/openssh/sshd@.service
index 422450c..9d9965e 100644
--- a/poky/meta/recipes-connectivity/openssh/openssh/sshd@.service
+++ b/poky/meta/recipes-connectivity/openssh/openssh/sshd@.service
@@ -7,5 +7,4 @@
 EnvironmentFile=-/etc/default/ssh
 ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS
 StandardInput=socket
-StandardError=syslog
 KillMode=process
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux
index 83596e0..adad7e6 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux
@@ -2,4 +2,4 @@
 have_proc_self_cmdline = true
 
 [binaries]
-env = "/usr/bin/env"
+env = '/usr/bin/env'
diff --git a/poky/meta/recipes-core/glibc/cross-localedef-native_2.31.bb b/poky/meta/recipes-core/glibc/cross-localedef-native_2.32.bb
similarity index 70%
rename from poky/meta/recipes-core/glibc/cross-localedef-native_2.31.bb
rename to poky/meta/recipes-core/glibc/cross-localedef-native_2.32.bb
index 24de55d..5a0abbb 100644
--- a/poky/meta/recipes-core/glibc/cross-localedef-native_2.31.bb
+++ b/poky/meta/recipes-core/glibc/cross-localedef-native_2.32.bb
@@ -22,19 +22,17 @@
 SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
            \
-           file://0001-localedef-Add-hardlink-resolver-to-build.patch;patchdir=localedef \
-           \
            file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \
            file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \
            \
-           file://0018-timezone-re-written-tzselect-as-posix-sh.patch \
-           file://0019-Remove-bash-dependency-for-nscd-init-script.patch \
-           file://0020-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0021-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0023-eglibc-Forward-port-cross-locale-generation-support.patch \
-           file://0024-Define-DUMMY_LOCALE_T-if-not-defined.patch \
-           file://0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
+           file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+           file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+           file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0021-eglibc-Forward-port-cross-locale-generation-support.patch \
+           file://0022-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+           file://0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
 "
 # Makes for a rather long rev (22 characters), but...
 #
diff --git a/poky/meta/recipes-core/glibc/glibc-common.inc b/poky/meta/recipes-core/glibc/glibc-common.inc
index 8d412cc..027c700 100644
--- a/poky/meta/recipes-core/glibc/glibc-common.inc
+++ b/poky/meta/recipes-core/glibc/glibc-common.inc
@@ -22,4 +22,4 @@
 #
 COMPATIBLE_HOST_libc-musl_class-target = "null"
 
-PV = "2.31"
+PV = "2.32"
diff --git a/poky/meta/recipes-core/glibc/glibc-locale_2.31.bb b/poky/meta/recipes-core/glibc/glibc-locale_2.32.bb
similarity index 100%
rename from poky/meta/recipes-core/glibc/glibc-locale_2.31.bb
rename to poky/meta/recipes-core/glibc/glibc-locale_2.32.bb
diff --git a/poky/meta/recipes-core/glibc/glibc-mtrace_2.31.bb b/poky/meta/recipes-core/glibc/glibc-mtrace_2.32.bb
similarity index 100%
rename from poky/meta/recipes-core/glibc/glibc-mtrace_2.31.bb
rename to poky/meta/recipes-core/glibc/glibc-mtrace_2.32.bb
diff --git a/poky/meta/recipes-core/glibc/glibc-scripts_2.31.bb b/poky/meta/recipes-core/glibc/glibc-scripts_2.32.bb
similarity index 100%
rename from poky/meta/recipes-core/glibc/glibc-scripts_2.31.bb
rename to poky/meta/recipes-core/glibc/glibc-scripts_2.32.bb
diff --git a/poky/meta/recipes-core/glibc/glibc-testsuite_2.31.bb b/poky/meta/recipes-core/glibc/glibc-testsuite_2.32.bb
similarity index 100%
rename from poky/meta/recipes-core/glibc/glibc-testsuite_2.31.bb
rename to poky/meta/recipes-core/glibc/glibc-testsuite_2.32.bb
diff --git a/poky/meta/recipes-core/glibc/glibc-version.inc b/poky/meta/recipes-core/glibc/glibc-version.inc
index c2d6897..1566056 100644
--- a/poky/meta/recipes-core/glibc/glibc-version.inc
+++ b/poky/meta/recipes-core/glibc/glibc-version.inc
@@ -1,7 +1,7 @@
-SRCBRANCH ?= "release/2.31/master"
-PV = "2.31+git${SRCPV}"
-SRCREV_glibc ?= "109474122400ca7d60782b131dc867a5c1f2fe55"
-SRCREV_localedef ?= "cd9f958c4c94a638fa7b2b4e21627364f1a1a655"
+SRCBRANCH ?= "release/2.32/master"
+PV = "2.32"
+SRCREV_glibc ?= "3de512be7ea6053255afed6154db9ee31d4e557a"
+SRCREV_localedef ?= "bd644c9e6f3e20c5504da1488448173c69c56c28"
 
 GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
 
diff --git a/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch b/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch
index d0786be..e0ec188 100644
--- a/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch
@@ -1,7 +1,7 @@
-From 3dcf144e998aed17b3fb957a255b1e923ba07d71 Mon Sep 17 00:00:00 2001
+From 5db90855621a81d02f1434d5602cefea8c45de1c Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Sat, 7 Dec 2019 09:59:22 -0800
-Subject: [PATCH] localedef: Add hardlink resolver from util-linux
+Subject: [PATCH 01/29] localedef: Add hardlink resolver from util-linux
 
 The hard link resolver that is built into localedef cannot be run in
 parallel.  It will search sibling directories (which are be processed
@@ -1128,3 +1128,6 @@
 +}
 +
 +#endif
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-to-build.patch b/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-to-build.patch
deleted file mode 100644
index d665298..0000000
--- a/poky/meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-to-build.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 56ae260ac24ade94e2e0e77c81751312372d253f Mon Sep 17 00:00:00 2001
-From: Jason Wessel <jason.wessel@windriver.com>
-Date: Sat, 7 Dec 2019 09:56:23 -0800
-Subject: [PATCH] localedef: Add hardlink resolver to build
-
-The sourcecode for this is imported from util-linux and is kept with
-glibc sources
-
-Upstream-Status: Pending
-Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 77fbded..a87e5b2 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -40,6 +40,8 @@ WARNFLAGS	= -Wall -Wno-format
- FULLCC		= $(CC) $(CPPFLAGS) $(CFLAGS) \
- 		  $(DEFINES) $(INCLUDES) $(WARNFLAGS)
- 
-+CROSS_LOCALEDEF_HARDLINK_OBJS = cross-localedef-hardlink.o
-+
- LOCALEDEF_OBJS	= charmap.o charmap-dir.o ld-address.o ld-collate.o \
- 		  ld-ctype.o ld-identification.o ld-measurement.o \
- 		  ld-messages.o ld-monetary.o ld-name.o ld-numeric.o \
-@@ -54,11 +56,14 @@ LOCALEDEF_OBJS	= charmap.o charmap-dir.o ld-address.o ld-collate.o \
- 		  asprintf.o getdelim.o localedef_extra.o \
- 		  obstack_printf.o vasprintf.o
- 
--all:		localedef$(EXEEXT)
-+all:		localedef$(EXEEXT) cross-localedef-hardlink$(EXEEXT)
- 
- localedef$(EXEEXT): $(LOCALEDEF_OBJS)
- 		$(CC) -o $@ $(LOCALEDEF_OBJS) $(LIBS)
- 
-+cross-localedef-hardlink$(EXEEXT): $(CROSS_LOCALEDEF_HARDLINK_OBJS)
-+		$(CC) -o $@ $(CROSS_LOCALEDEF_HARDLINK_OBJS) $(LIBS)
-+
- clean:
- 		rm -f locale$(EXEEXT) $(LOCALEDEF_OBJS)
- 
-@@ -77,6 +82,7 @@ clean:
- %.o: $(srcdir)/%.c
- 		$(FULLCC) -c -o $@ $<
- 
-+cross-localedef-hardlink.o: glibc/locale/programs/cross-localedef-hardlink.c
- charmap.o: glibc/locale/programs/charmap.c
- charmap-dir.o: glibc/locale/programs/charmap-dir.c
- ld-address.o: glibc/locale/programs/ld-address.c
diff --git a/poky/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch b/poky/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch
index 5222e37..05b7680 100644
--- a/poky/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch
@@ -1,7 +1,7 @@
-From b52dba15527380cc18635e3696e0ef87efee9a84 Mon Sep 17 00:00:00 2001
+From ab022ce3c1c01fd6c850f541a33efd0cacabe052 Mon Sep 17 00:00:00 2001
 From: Jason Wessel <jason.wessel@windriver.com>
 Date: Sat, 7 Dec 2019 10:01:37 -0800
-Subject: [PATCH] localedef: fix-ups hardlink to make it compile
+Subject: [PATCH 02/29] localedef: fix-ups hardlink to make it compile
 
 Upstream-Status: Pending
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
@@ -236,3 +236,6 @@
  				}
  				continue;
  			}
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index 4cdc835..743994f 100644
--- a/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,8 @@
-From 6987ad183770cb56680ccc4f6ea065a04f31ccb6 Mon Sep 17 00:00:00 2001
+From de4322ef6d4dc9fc3ee9b69af1c10edbc64a66a3 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH] nativesdk-glibc: Look for host system ld.so.cache as well
+Subject: [PATCH 03/29] nativesdk-glibc: Look for host system ld.so.cache as
+ well
 
 Upstream-Status: Inappropriate [embedded specific]
 
@@ -30,10 +31,10 @@
  1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index a6b80f9395..3226f2e531 100644
+index e39980fb19..565b039b23 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -2073,6 +2073,14 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2160,6 +2160,14 @@ _dl_map_object (struct link_map *loader, const char *name,
              }
          }
  
@@ -48,7 +49,7 @@
  #ifdef USE_LDCONFIG
        if (fd == -1
  	  && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2131,14 +2139,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2218,14 +2226,6 @@ _dl_map_object (struct link_map *loader, const char *name,
  	}
  #endif
  
@@ -63,3 +64,6 @@
        /* Add another newline when we are tracing the library loading.  */
        if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
  	_dl_debug_printf ("\n");
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index 62e1289..a3b5b77 100644
--- a/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,8 @@
-From 7806340c2accc2c51e7e861b618c29fb5609a007 Mon Sep 17 00:00:00 2001
+From 258c44e4ecffd830cb89d0016d45b2bac765f559 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH] nativesdk-glibc: Fix buffer overrun with a relocated SDK
+Subject: [PATCH 04/29] nativesdk-glibc: Fix buffer overrun with a relocated
+ SDK
 
 When ld-linux-*.so.2 is relocated to a path that is longer than the
 original fixed location, the dynamic loader will crash in open_path
@@ -21,10 +22,10 @@
  1 file changed, 12 insertions(+)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 3226f2e531..7cb8a86fab 100644
+index 565b039b23..e1b3486549 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -1773,7 +1773,19 @@ open_path (const char *name, size_t namelen, int mode,
+@@ -1860,7 +1860,19 @@ open_path (const char *name, size_t namelen, int mode,
         given on the command line when rtld is run directly.  */
      return -1;
  
@@ -44,3 +45,6 @@
    do
      {
        struct r_search_path_elem *this_dir = *dirs;
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index 294c2b9..2073576 100644
--- a/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,8 @@
-From 1b97befbe693eb93a77b6098f6ae1394a53462f4 Mon Sep 17 00:00:00 2001
+From 19cd858f5f04a6ac584fbd89a2fbc51791263b85 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH] nativesdk-glibc: Raise the size of arrays containing dl paths
+Subject: [PATCH 05/29] nativesdk-glibc: Raise the size of arrays containing dl
+ paths
 
 This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
 and lengths as well as ld.so.cache path in the dynamic loader to specific
@@ -25,7 +26,7 @@
  7 files changed, 14 insertions(+), 10 deletions(-)
 
 diff --git a/elf/dl-cache.c b/elf/dl-cache.c
-index 3eedd9afcf..efdfe5cae7 100644
+index 93d185e788..e115b18756 100644
 --- a/elf/dl-cache.c
 +++ b/elf/dl-cache.c
 @@ -133,6 +133,10 @@ do									      \
@@ -40,10 +41,10 @@
  _dl_cache_libcmp (const char *p1, const char *p2)
  {
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 7cb8a86fab..e32d4aa936 100644
+index e1b3486549..5226d0c4fa 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -110,8 +110,8 @@ static size_t max_capstrlen attribute_relro;
+@@ -111,8 +111,8 @@ static size_t max_capstrlen attribute_relro;
     gen-trusted-dirs.awk.  */
  #include "trusted-dirs.h"
  
@@ -66,10 +67,10 @@
 +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
    = RUNTIME_LINKER;
 diff --git a/elf/ldconfig.c b/elf/ldconfig.c
-index 681ed78496..8833ed0a6b 100644
+index 0c090dca15..6bb6e0fe72 100644
 --- a/elf/ldconfig.c
 +++ b/elf/ldconfig.c
-@@ -168,6 +168,9 @@ static struct argp argp =
+@@ -171,6 +171,9 @@ static struct argp argp =
    options, parse_opt, NULL, doc, NULL, more_help, NULL
  };
  
@@ -80,18 +81,18 @@
     a platform.  */
  static int
 diff --git a/elf/rtld.c b/elf/rtld.c
-index 553cfbd1b7..39347c2c03 100644
+index 5b882163fa..db407b5d8b 100644
 --- a/elf/rtld.c
 +++ b/elf/rtld.c
-@@ -175,6 +175,7 @@ dso_name_valid_for_suid (const char *p)
+@@ -217,6 +217,7 @@ dso_name_valid_for_suid (const char *p)
      }
    return *p != '\0';
  }
 +extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
  
- /* LD_AUDIT variable contents.  Must be processed before the
-    audit_list below.  */
-@@ -1222,13 +1223,13 @@ of this helper program; chances are you did not intend to run this program.\n\
+ static void
+ audit_list_init (struct audit_list *list)
+@@ -1286,13 +1287,13 @@ of this helper program; chances are you did not intend to run this program.\n\
    --list                list all dependencies and how they are resolved\n\
    --verify              verify that given object really is a dynamically linked\n\
  			object we can handle\n\
@@ -135,3 +136,6 @@
  #ifndef add_system_dir
  # define add_system_dir(dir) add_dir (dir)
  #endif
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/poky/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
index db8b6c0..372dca7 100644
--- a/poky/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -1,7 +1,7 @@
-From a752857cc342ee5136c9a593037b6ee6ff8af8ee Mon Sep 17 00:00:00 2001
+From bd0486cab67c3441210aed48caab67418610a765 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 31 Dec 2015 14:35:35 -0800
-Subject: [PATCH] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 06/29] nativesdk-glibc: Allow 64 bit atomics for x86
 
 The fix consist of allowing 64bit atomic ops for x86.
 This should be safe for i586 and newer CPUs.
@@ -37,3 +37,6 @@
  # define SP_REG				"esp"
  # define SEG_REG			"gs"
  # define BR_CONSTRAINT			"r"
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch b/poky/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch
index 27cd17c..729ce1b 100644
--- a/poky/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch
@@ -1,7 +1,7 @@
-From 3df91d1d8b9c7a01b3ef8133c4f9b9764227d583 Mon Sep 17 00:00:00 2001
+From 9a8bf11ea375a2fe5eddb30bc10943e64d3b96a4 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 3 Aug 2018 09:55:12 -0700
-Subject: [PATCH] nativesdk-glibc: Make relocatable install for locales
+Subject: [PATCH 07/29] nativesdk-glibc: Make relocatable install for locales
 
 The glibc locale path is hard-coded to the install prefix, but in SDKs we need
 to be able to relocate the binaries.  Expand the strings to 4K and put them in a
@@ -12,16 +12,17 @@
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- locale/findlocale.c  | 4 ++--
- locale/loadarchive.c | 2 +-
- locale/localeinfo.h  | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
+ locale/findlocale.c      | 4 ++--
+ locale/loadarchive.c     | 2 +-
+ locale/localeinfo.h      | 2 +-
+ locale/programs/locale.c | 7 ++++---
+ 4 files changed, 8 insertions(+), 7 deletions(-)
 
-Index: git/locale/findlocale.c
-===================================================================
---- git.orig/locale/findlocale.c
-+++ git/locale/findlocale.c
-@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attr
+diff --git a/locale/findlocale.c b/locale/findlocale.c
+index 9cd3b71a6d..84272310e0 100644
+--- a/locale/findlocale.c
++++ b/locale/findlocale.c
+@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden =
     which are somehow addressed.  */
  struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
  
@@ -30,7 +31,7 @@
  
  /* Checks if the name is actually present, that is, not NULL and not
     empty.  */
-@@ -166,7 +166,7 @@ _nl_find_locale (const char *locale_path
+@@ -166,7 +166,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
  
        /* Nothing in the archive.  Set the default path to search below.  */
        locale_path = _nl_default_locale_path;
@@ -39,10 +40,10 @@
      }
    else
      /* We really have to load some data.  First see whether the name is
-Index: git/locale/loadarchive.c
-===================================================================
---- git.orig/locale/loadarchive.c
-+++ git/locale/loadarchive.c
+diff --git a/locale/loadarchive.c b/locale/loadarchive.c
+index ba0fe45648..9737fd4cda 100644
+--- a/locale/loadarchive.c
++++ b/locale/loadarchive.c
 @@ -42,7 +42,7 @@
  
  
@@ -52,11 +53,11 @@
  
  /* Size of initial mapping window, optimal if large enough to
     cover the header plus the initial locale.  */
-Index: git/locale/localeinfo.h
-===================================================================
---- git.orig/locale/localeinfo.h
-+++ git/locale/localeinfo.h
-@@ -331,7 +331,7 @@ _nl_lookup_word (locale_t l, int categor
+diff --git a/locale/localeinfo.h b/locale/localeinfo.h
+index 1bfe22aa7f..fdc283c69a 100644
+--- a/locale/localeinfo.h
++++ b/locale/localeinfo.h
+@@ -331,7 +331,7 @@ _nl_lookup_word (locale_t l, int category, int item)
  }
  
  /* Default search path if no LOCPATH environment variable.  */
@@ -65,11 +66,11 @@
  
  /* Load the locale data for CATEGORY from the file specified by *NAME.
     If *NAME is "", use environment variables as specified by POSIX, and
-Index: git/locale/programs/locale.c
-===================================================================
---- git.orig/locale/programs/locale.c
-+++ git/locale/programs/locale.c
-@@ -632,6 +632,7 @@ nameentcmp (const void *a, const void *b
+diff --git a/locale/programs/locale.c b/locale/programs/locale.c
+index e2e309c2a1..61a92cdcd1 100644
+--- a/locale/programs/locale.c
++++ b/locale/programs/locale.c
+@@ -632,6 +632,7 @@ nameentcmp (const void *a, const void *b)
  		  ((const struct nameent *) b)->name);
  }
  
@@ -77,7 +78,7 @@
  
  static int
  write_archive_locales (void **all_datap, char *linebuf)
-@@ -645,7 +646,7 @@ write_archive_locales (void **all_datap,
+@@ -645,7 +646,7 @@ write_archive_locales (void **all_datap, char *linebuf)
    int fd, ret = 0;
    uint32_t cnt;
  
@@ -86,7 +87,7 @@
    if (fd < 0)
      return 0;
  
-@@ -700,8 +701,8 @@ write_archive_locales (void **all_datap,
+@@ -700,8 +701,8 @@ write_archive_locales (void **all_datap, char *linebuf)
  	  if (cnt)
  	    putchar_unlocked ('\n');
  
@@ -97,3 +98,6 @@
  
  	  locrec = (struct locrecent *) (addr + names[cnt].locrec_offset);
  
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/poky/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
index 3dac325..5e3b3e2 100644
--- a/poky/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -1,7 +1,7 @@
-From 61b6c9737897c5828ef4b40699ee0a74c570034a Mon Sep 17 00:00:00 2001
+From 59b0a78ae706a540dbd8905bc97c875220d6aeb2 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 08/29] fsl e500/e5500/e6500/603e fsqrt implementation
 
 Upstream-Status: Pending
 Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
@@ -1579,3 +1579,6 @@
 +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
 @@ -0,0 +1 @@
 +powerpc/powerpc64/e6500/fpu
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/poky/meta/recipes-core/glibc/glibc/0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
similarity index 97%
rename from poky/meta/recipes-core/glibc/glibc/0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
rename to poky/meta/recipes-core/glibc/glibc/0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
index 01446ab..a94ed20 100644
--- a/poky/meta/recipes-core/glibc/glibc/0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -1,7 +1,7 @@
-From 4483a83074a340a921e319b88d72166f18e0df0b Mon Sep 17 00:00:00 2001
+From 78f67f016ca9e3f7a37af86cf6e400cf17cf1d05 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 09/29] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
 
 on ppc fixes the errors like below
 | ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -203,3 +203,6 @@
    return f_washf (b);
  }
 +strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/poky/meta/recipes-core/glibc/glibc/0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
similarity index 98%
rename from poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
rename to poky/meta/recipes-core/glibc/glibc/0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 451f372..743bea1 100644
--- a/poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,8 +1,8 @@
-From 347b2e31d010b04c42e78157a028aa1d58fe0f5e Mon Sep 17 00:00:00 2001
+From 670b5d70ab62b42ab02a8e18b8fcee2879b8c4a0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out
- __slow versions
+Subject: [PATCH 10/29] __ieee754_sqrt{,f} are now inline functions and call
+ out __slow versions
 
 Upstream-Status: Pending
 
@@ -382,3 +382,6 @@
 +}
 +
  strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/poky/meta/recipes-core/glibc/glibc/0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
similarity index 93%
rename from poky/meta/recipes-core/glibc/glibc/0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
rename to poky/meta/recipes-core/glibc/glibc/0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
index a0b46c0..a9280b7 100644
--- a/poky/meta/recipes-core/glibc/glibc/0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -1,7 +1,8 @@
-From 8ca8e5cd78cbd37a713e1181f8f6641b57352aa8 Mon Sep 17 00:00:00 2001
+From de7a7c04a92dbc5d35cb37e47c471e12784cc95e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH] Quote from bug 1443 which explains what the patch does :
+Subject: [PATCH 11/29] Quote from bug 1443 which explains what the patch does
+ :
 
   We build some random program and link it with -lust.  When we run it,
   it dies with a SIGSEGV before reaching main().
@@ -56,3 +57,6 @@
  	  break;
  
  	case R_ARM_TLS_TPOFF32:
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/poky/meta/recipes-core/glibc/glibc/0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
similarity index 87%
rename from poky/meta/recipes-core/glibc/glibc/0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
rename to poky/meta/recipes-core/glibc/glibc/0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index 736de8c..ab07455 100644
--- a/poky/meta/recipes-core/glibc/glibc/0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -1,7 +1,7 @@
-From 21509735678990760d5ebf9d0c65efa4b52b838d Mon Sep 17 00:00:00 2001
+From c8807899367e64d803585e7dd4b56a1085d5893b Mon Sep 17 00:00:00 2001
 From: Ting Liu <b28495@freescale.com>
 Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 12/29] eglibc: run libm-err-tab.pl with specific dirs in ${S}
 
 libm-err-tab.pl will parse all the files named "libm-test-ulps"
 in the given dir recursively. To avoid parsing the one in
@@ -31,3 +31,6 @@
  	$(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
  	touch $@
  
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/poky/meta/recipes-core/glibc/glibc/0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
similarity index 91%
rename from poky/meta/recipes-core/glibc/glibc/0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
rename to poky/meta/recipes-core/glibc/glibc/0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index e73b640..d875825 100644
--- a/poky/meta/recipes-core/glibc/glibc/0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,8 +1,8 @@
-From e33deb119734ef443ef44c42a00a569f90e1e149 Mon Sep 17 00:00:00 2001
+From 86fea3409b89f9d8884053a519282f2f30d7ea87 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out
- __slow versions
+Subject: [PATCH 13/29] __ieee754_sqrt{,f} are now inline functions and call
+ out __slow versions
 
 Upstream-Status: Pending
 
@@ -56,3 +56,6 @@
       float b;
  #endif
  {
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/poky/meta/recipes-core/glibc/glibc/0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
similarity index 88%
rename from poky/meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
rename to poky/meta/recipes-core/glibc/glibc/0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index 0cdd056..954534b 100644
--- a/poky/meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From c50cae36e90c41849301a9a668adf31e81e43a07 Mon Sep 17 00:00:00 2001
+From a3c4f67fb3cb02855073a9cdbcf2881fb53144f0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 14/29] sysdeps/gnu/configure.ac: handle correctly
  $libc_cv_rootsbindir
 
 Upstream-Status:Pending
@@ -37,3 +37,6 @@
 +  test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
    ;;
  esac
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0017-yes-within-the-path-sets-wrong-config-variables.patch b/poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
similarity index 97%
rename from poky/meta/recipes-core/glibc/glibc/0017-yes-within-the-path-sets-wrong-config-variables.patch
rename to poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
index 49089af..04a9bf0 100644
--- a/poky/meta/recipes-core/glibc/glibc/0017-yes-within-the-path-sets-wrong-config-variables.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
@@ -1,7 +1,7 @@
-From c421cd7e885497a99179b982dc4a27e8405f8857 Mon Sep 17 00:00:00 2001
+From 17a602b89cbe53a5a92d0153ccb013a737f028cb Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH] 'yes' within the path sets wrong config variables
+Subject: [PATCH 15/29] 'yes' within the path sets wrong config variables
 
 It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
 but being such a short word to grep it is likely to produce
@@ -29,7 +29,7 @@
  12 files changed, 28 insertions(+), 28 deletions(-)
 
 diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
-index 5bd355a691..3bc5537bc0 100644
+index ac3cf6fd36..32add94df9 100644
 --- a/sysdeps/aarch64/configure
 +++ b/sysdeps/aarch64/configure
 @@ -148,12 +148,12 @@ else
@@ -48,7 +48,7 @@
  else
    libc_cv_aarch64_be=no
 diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
-index 7851dd4dac..6e9238171f 100644
+index 8b042d6d05..3cdd262951 100644
 --- a/sysdeps/aarch64/configure.ac
 +++ b/sysdeps/aarch64/configure.ac
 @@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
@@ -258,3 +258,6 @@
                         #endif
      ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
    if test $libc_cv_ppc64_def_call_elf = no; then
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0016-Add-unused-attribute.patch b/poky/meta/recipes-core/glibc/glibc/0016-Add-unused-attribute.patch
deleted file mode 100644
index 574e7c3..0000000
--- a/poky/meta/recipes-core/glibc/glibc/0016-Add-unused-attribute.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From c323125744020a29f79e50dc4d024b55c482eafc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH] Add unused attribute
-
-Helps in avoiding gcc warning when header is is included in
-a source file which does not use both functions
-
-        * iconv/gconv_charset.h (strip):
-        Add unused attribute.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- iconv/gconv_charset.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
-index 348acc089b..fa92465d89 100644
---- a/iconv/gconv_charset.h
-+++ b/iconv/gconv_charset.h
-@@ -21,7 +21,7 @@
- #include <locale.h>
- 
- 
--static void
-+static void __attribute__ ((unused))
- strip (char *wp, const char *s)
- {
-   int slash_count = 0;
diff --git a/poky/meta/recipes-core/glibc/glibc/0018-timezone-re-written-tzselect-as-posix-sh.patch b/poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
similarity index 90%
rename from poky/meta/recipes-core/glibc/glibc/0018-timezone-re-written-tzselect-as-posix-sh.patch
rename to poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
index 20b0ee9..cd07201 100644
--- a/poky/meta/recipes-core/glibc/glibc/0018-timezone-re-written-tzselect-as-posix-sh.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
@@ -1,7 +1,7 @@
-From 2023d88c355b8af6458c8e39ce38b75c1ca4ea2a Mon Sep 17 00:00:00 2001
+From 4762386b599f5c3287310a69ad3555e0129e0c51 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH] timezone: re-written tzselect as posix sh
+Subject: [PATCH 16/29] timezone: re-written tzselect as posix sh
 
 To avoid the bash dependency.
 
@@ -40,3 +40,6 @@
  
  # Output one argument as-is to standard output.
  # Safer than 'echo', which can mishandle '\' or leading '-'.
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0019-Remove-bash-dependency-for-nscd-init-script.patch b/poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
similarity index 92%
rename from poky/meta/recipes-core/glibc/glibc/0019-Remove-bash-dependency-for-nscd-init-script.patch
rename to poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
index 1c15a51..57907fe 100644
--- a/poky/meta/recipes-core/glibc/glibc/0019-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,7 +1,7 @@
-From 06da20d9f89907e5f2777537244e6589ca3c9703 Mon Sep 17 00:00:00 2001
+From dac46c07736a799fc82be03aa546b2d24c19ad78 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 31 Dec 2015 14:33:02 -0800
-Subject: [PATCH] Remove bash dependency for nscd init script
+Subject: [PATCH 17/29] Remove bash dependency for nscd init script
 
 The nscd init script uses #! /bin/bash but only really uses one bashism
 (translated strings), so remove them and switch the shell to #!/bin/sh.
@@ -70,3 +70,6 @@
  	RETVAL=1
  	;;
  esac
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Cross-building-and-testing-instructions.patch b/poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
similarity index 99%
rename from poky/meta/recipes-core/glibc/glibc/0020-eglibc-Cross-building-and-testing-instructions.patch
rename to poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
index eda5565..58d41ff 100644
--- a/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Cross-building-and-testing-instructions.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,7 +1,7 @@
-From 5641452a24f76c5dafa3749a542fcac93f77390f Mon Sep 17 00:00:00 2001
+From 0bd1dedf77194151397c53b12e0355c2edb8bccc Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH] eglibc: Cross building and testing instructions
+Subject: [PATCH 18/29] eglibc: Cross building and testing instructions
 
 Ported from eglibc
 Upstream-Status: Pending
@@ -614,3 +614,6 @@
 +- Some tests require access to libstdc++.so.6 and libgcc_s.so.1; we
 +  simply place copies of these libraries in the top GLIBC build
 +  directory.
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Help-bootstrap-cross-toolchain.patch b/poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
similarity index 95%
rename from poky/meta/recipes-core/glibc/glibc/0021-eglibc-Help-bootstrap-cross-toolchain.patch
rename to poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
index 6374ea4..f633079 100644
--- a/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
-From 6a32d5bf40deee5d12d24c06f3ea9b5479c16802 Mon Sep 17 00:00:00 2001
+From 5591b7653411da26fa2939352e50ea4121b327e6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 19/29] eglibc: Help bootstrap cross toolchain
 
 Taken from EGLIBC, r1484 + r1525
 
@@ -29,7 +29,7 @@
  create mode 100644 include/stubs-bootstrap.h
 
 diff --git a/Makefile b/Makefile
-index 8f0a93aceb..8eba23a868 100644
+index 6dcfe40c25..bc37c32e5a 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -79,9 +79,18 @@ subdir-dirs = include
@@ -95,3 +95,6 @@
 +   difficult headers.  The <gnu/stubs.h> header depends, via the
 +   EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
 +   an empty stubs.h like this will do fine for GCC.  */
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch b/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
similarity index 92%
rename from poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
rename to poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
index 2a503c8..bb21c54 100644
--- a/poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0020-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -1,7 +1,7 @@
-From 25c21857a3fc0eb26831616ba88a696dd31ecba1 Mon Sep 17 00:00:00 2001
+From d3451c186f96c6b2434a4ac9304c01730bf22061 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4
+Subject: [PATCH 20/29] eglibc: Resolve __fpscr_values on SH4
 
 2010-09-29  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
             Andrew Stubbs  <ams@codesourcery.com>
@@ -51,3 +51,6 @@
 +       .long 0x80000
 +weak_alias (___fpscr_values, __fpscr_values)
 +
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0023-eglibc-Forward-port-cross-locale-generation-support.patch b/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Forward-port-cross-locale-generation-support.patch
similarity index 98%
rename from poky/meta/recipes-core/glibc/glibc/0023-eglibc-Forward-port-cross-locale-generation-support.patch
rename to poky/meta/recipes-core/glibc/glibc/0021-eglibc-Forward-port-cross-locale-generation-support.patch
index 1a90f22..7fe5db0 100644
--- a/poky/meta/recipes-core/glibc/glibc/0023-eglibc-Forward-port-cross-locale-generation-support.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0021-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -1,7 +1,7 @@
-From 30008327aadf0c775e644bb387d7c25952ed05b5 Mon Sep 17 00:00:00 2001
+From e4b8abdc2d884d721fd89d67b689546f2f780924 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH] eglibc: Forward port cross locale generation support
+Subject: [PATCH 21/29] eglibc: Forward port cross locale generation support
 
 Upstream-Status: Pending
 
@@ -23,7 +23,7 @@
  create mode 100644 locale/catnames.c
 
 diff --git a/locale/Makefile b/locale/Makefile
-index c9694e236e..ba7105fad6 100644
+index 49c0c78c7d..ebfcf4f4da 100644
 --- a/locale/Makefile
 +++ b/locale/Makefile
 @@ -26,7 +26,8 @@ headers		= langinfo.h locale.h bits/locale.h \
@@ -34,8 +34,8 @@
 +		  newlocale duplocale freelocale uselocale \
 +		  catnames
  tests		= tst-C-locale tst-locname tst-duplocale
+ tests-container	= tst-localedef-path-norm
  categories	= ctype messages monetary numeric time paper name \
- 		  address telephone measurement identification collate
 diff --git a/locale/catnames.c b/locale/catnames.c
 new file mode 100644
 index 0000000000..538f3f5edb
@@ -361,7 +361,7 @@
    size_t bufmax = 56;
  
 diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index dbbb0145c0..097a8b6193 100644
+index b048bd05b9..fed15c42ec 100644
 --- a/locale/programs/localedef.c
 +++ b/locale/programs/localedef.c
 @@ -109,6 +109,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
@@ -381,7 +381,7 @@
    { NULL, 0, NULL, 0, NULL }
  };
  
-@@ -242,12 +245,14 @@ main (int argc, char *argv[])
+@@ -243,12 +246,14 @@ main (int argc, char *argv[])
       ctype locale.  (P1003.2 4.35.5.2)  */
    setlocale (LC_CTYPE, "POSIX");
  
@@ -396,7 +396,7 @@
  
    /* Process charmap file.  */
    charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -399,6 +404,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+@@ -400,6 +405,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
        /* Do not hard link to other locales.  */
        hard_links = false;
        break;
@@ -558,3 +558,6 @@
  #ifdef NL_CURRENT_INDIRECT
  # define WEAK_POSTLOAD(postload) weak_extern (postload)
  #else
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0024-Define-DUMMY_LOCALE_T-if-not-defined.patch b/poky/meta/recipes-core/glibc/glibc/0022-Define-DUMMY_LOCALE_T-if-not-defined.patch
similarity index 84%
rename from poky/meta/recipes-core/glibc/glibc/0024-Define-DUMMY_LOCALE_T-if-not-defined.patch
rename to poky/meta/recipes-core/glibc/glibc/0022-Define-DUMMY_LOCALE_T-if-not-defined.patch
index 15e460e..0e93183 100644
--- a/poky/meta/recipes-core/glibc/glibc/0024-Define-DUMMY_LOCALE_T-if-not-defined.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0022-Define-DUMMY_LOCALE_T-if-not-defined.patch
@@ -1,7 +1,7 @@
-From 067f71a381ce6626ef1179be3dd90c4ed2aa52fb Mon Sep 17 00:00:00 2001
+From ad5bc87134871b99e082e2449b8c1ce2f1375ef9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 20 Apr 2016 21:11:00 -0700
-Subject: [PATCH] Define DUMMY_LOCALE_T if not defined
+Subject: [PATCH 22/29] Define DUMMY_LOCALE_T if not defined
 
 This is a hack to fix building the locale bits on an older
 CentOs 5.X machine
@@ -27,3 +27,6 @@
  /* Use the internal textdomain used for libc messages.  */
  #define PACKAGE _libc_intl_domainname
  #ifndef VERSION
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch b/poky/meta/recipes-core/glibc/glibc/0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
similarity index 95%
rename from poky/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
rename to poky/meta/recipes-core/glibc/glibc/0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
index 543f65d..7cbf681 100644
--- a/poky/meta/recipes-core/glibc/glibc/0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
@@ -1,7 +1,8 @@
-From 8f4b0bac85d14b184e08848b02de3f30775f05b1 Mon Sep 17 00:00:00 2001
+From c5fd8a3d336b8288f631fb6b6dd85f9d1076f25b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 3 Aug 2018 09:42:06 -0700
-Subject: [PATCH] localedef --add-to-archive uses a hard-coded locale path
+Subject: [PATCH 23/29] localedef --add-to-archive uses a hard-coded locale
+ path
 
 it doesn't exist in normal use, and there's no way to pass an
 alternative filename.
@@ -78,3 +79,6 @@
  	    {
  	      if (readonly)
  		{
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch b/poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
similarity index 88%
rename from poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
rename to poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
index 5f6ee40..02e7359 100644
--- a/poky/meta/recipes-core/glibc/glibc/0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch
@@ -1,7 +1,7 @@
-From 1dad746ce93928a57b2fe618c74722f710751826 Mon Sep 17 00:00:00 2001
+From dffa52364f8c54c455b2459ebe83f05cb6ffc9fc Mon Sep 17 00:00:00 2001
 From: Mark Hatle <mark.hatle@windriver.com>
 Date: Thu, 18 Aug 2016 14:07:58 -0500
-Subject: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+Subject: [PATCH 24/29] elf/dl-deps.c: Make _dl_build_local_scope breadth first
 
 According to the ELF specification:
 
@@ -24,7 +24,7 @@
  1 file changed, 10 insertions(+), 4 deletions(-)
 
 diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index 5103a8a111..54cd80aaff 100644
+index b5a43232a7..8aa8f37fa3 100644
 --- a/elf/dl-deps.c
 +++ b/elf/dl-deps.c
 @@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
@@ -51,3 +51,6 @@
    return p - list;
  }
  
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0027-intl-Emit-no-lines-in-bison-generated-files.patch b/poky/meta/recipes-core/glibc/glibc/0025-intl-Emit-no-lines-in-bison-generated-files.patch
similarity index 86%
rename from poky/meta/recipes-core/glibc/glibc/0027-intl-Emit-no-lines-in-bison-generated-files.patch
rename to poky/meta/recipes-core/glibc/glibc/0025-intl-Emit-no-lines-in-bison-generated-files.patch
index 2c317d5..700fb28 100644
--- a/poky/meta/recipes-core/glibc/glibc/0027-intl-Emit-no-lines-in-bison-generated-files.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0025-intl-Emit-no-lines-in-bison-generated-files.patch
@@ -1,7 +1,7 @@
-From 3c8d9eae83ab4f1677afc9b379f97114e8503363 Mon Sep 17 00:00:00 2001
+From bc3380877bd2a1f9368a913fa6a2ca1ee88fd95f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 3 Aug 2018 09:44:00 -0700
-Subject: [PATCH] intl: Emit no lines in bison generated files
+Subject: [PATCH 25/29] intl: Emit no lines in bison generated files
 
 Improve reproducibility:
 Do not put any #line preprocessor commands in bison generated files.
@@ -29,3 +29,6 @@
  
  $(inst_localedir)/locale.alias: locale.alias $(+force)
  	$(do-install)
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0028-inject-file-assembly-directives.patch b/poky/meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch
similarity index 66%
rename from poky/meta/recipes-core/glibc/glibc/0028-inject-file-assembly-directives.patch
rename to poky/meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch
index e1a030d..89eef82 100644
--- a/poky/meta/recipes-core/glibc/glibc/0028-inject-file-assembly-directives.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch
@@ -1,7 +1,7 @@
-From 420454f7098b5445730caa855c37b8143bfccc1b Mon Sep 17 00:00:00 2001
+From cf043d56638883157dbfaa8c6a8e2f63a6f66280 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 29 Nov 2018 17:29:35 -0800
-Subject: [PATCH] inject file assembly directives
+Subject: [PATCH 26/29] inject file assembly directives
 
 Currently, non-IA builds are not reproducibile since build paths are
 being injected into the debug symbols. These are coming from the use of
@@ -25,13 +25,12 @@
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- csu/abi-note.S                                | 2 ++
+ csu/abi-note.c                                | 2 ++
  sysdeps/aarch64/crti.S                        | 2 ++
- sysdeps/aarch64/crtn.S                        | 2 ++
+ sysdeps/aarch64/crtn.S                        | 1 +
  sysdeps/aarch64/dl-tlsdesc.S                  | 2 ++
  sysdeps/aarch64/dl-trampoline.S               | 2 ++
  sysdeps/aarch64/start.S                       | 2 ++
- sysdeps/arm/abi-note.S                        | 2 ++
  sysdeps/arm/crti.S                            | 2 ++
  sysdeps/arm/crtn.S                            | 2 ++
  sysdeps/arm/dl-tlsdesc.S                      | 2 ++
@@ -45,23 +44,8 @@
  sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S   | 2 ++
  sysdeps/unix/sysv/linux/arm/libc-do-syscall.S | 2 ++
  sysdeps/unix/sysv/linux/powerpc/dl-brk.S      | 2 ++
- 20 files changed, 40 insertions(+)
+ 19 files changed, 37 insertions(+)
 
-diff --git a/csu/abi-note.S b/csu/abi-note.S
-index 2b4b5f8824..964843016c 100644
---- a/csu/abi-note.S
-+++ b/csu/abi-note.S
-@@ -56,6 +56,8 @@ offset	length	contents
- #include <config.h>
- #include <abi-tag.h>		/* OS-specific ABI tag value */
- 
-+	.file "abi-note.S"
-+
- /* The linker (GNU ld 2.8 and later) recognizes an allocated section whose
-    name begins with `.note' and creates a PT_NOTE program header entry
-    pointing at it. */
-diff --git a/sysdeps/aarch64/crti.S b/sysdeps/aarch64/crti.S
-index 1728eac37a..76a8ab590b 100644
 --- a/sysdeps/aarch64/crti.S
 +++ b/sysdeps/aarch64/crti.S
 @@ -50,6 +50,8 @@
@@ -73,21 +57,16 @@
  #if PREINIT_FUNCTION_WEAK
  	weak_extern (PREINIT_FUNCTION)
  #else
-diff --git a/sysdeps/aarch64/crtn.S b/sysdeps/aarch64/crtn.S
-index c3e97cc449..fc2e5c2df8 100644
 --- a/sysdeps/aarch64/crtn.S
 +++ b/sysdeps/aarch64/crtn.S
-@@ -37,6 +37,8 @@
- /* crtn.S puts function epilogues in the .init and .fini sections
+@@ -38,6 +38,7 @@
     corresponding to the prologues in crti.S. */
  
+ #include <sysdep.h>
 +	.file "crtn.S"
-+
+ 
  	.section .init,"ax",%progbits
  	ldp	x29, x30, [sp], 16
- 	RET
-diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
-index 557ad1d505..194a8531da 100644
 --- a/sysdeps/aarch64/dl-tlsdesc.S
 +++ b/sysdeps/aarch64/dl-tlsdesc.S
 @@ -22,6 +22,8 @@
@@ -99,8 +78,6 @@
  #define NSAVEDQREGPAIRS	16
  #define SAVE_Q_REGISTERS				\
  	stp	q0, q1,	[sp, #-32*NSAVEDQREGPAIRS]!;	\
-diff --git a/sysdeps/aarch64/dl-trampoline.S b/sysdeps/aarch64/dl-trampoline.S
-index 94e965c096..ba18742f3e 100644
 --- a/sysdeps/aarch64/dl-trampoline.S
 +++ b/sysdeps/aarch64/dl-trampoline.S
 @@ -21,6 +21,8 @@
@@ -112,8 +89,6 @@
  #define ip0 x16
  #define ip0l PTR_REG (16)
  #define ip1 x17
-diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S
-index d96cf57e2d..07a523978a 100644
 --- a/sysdeps/aarch64/start.S
 +++ b/sysdeps/aarch64/start.S
 @@ -18,6 +18,8 @@
@@ -125,18 +100,6 @@
  /* This is the canonical entry point, usually the first thing in the text
     segment.
  
-diff --git a/sysdeps/arm/abi-note.S b/sysdeps/arm/abi-note.S
-index 07bd4c4619..7213b16f27 100644
---- a/sysdeps/arm/abi-note.S
-+++ b/sysdeps/arm/abi-note.S
-@@ -1,3 +1,5 @@
-+	.file "abi-note.S"
-+
- /* Tag_ABI_align8_preserved: This code preserves 8-byte
-    alignment in any callee.  */
- 	.eabi_attribute 25, 1
-diff --git a/sysdeps/arm/crti.S b/sysdeps/arm/crti.S
-index 8169783267..f56e0c85a6 100644
 --- a/sysdeps/arm/crti.S
 +++ b/sysdeps/arm/crti.S
 @@ -57,6 +57,8 @@
@@ -148,8 +111,6 @@
  #if PREINIT_FUNCTION_WEAK
  	.p2align 2
  	.type call_weak_fn, %function
-diff --git a/sysdeps/arm/crtn.S b/sysdeps/arm/crtn.S
-index d60f9f05de..1e10ec439f 100644
 --- a/sysdeps/arm/crtn.S
 +++ b/sysdeps/arm/crtn.S
 @@ -37,6 +37,8 @@
@@ -161,8 +122,6 @@
  /* crtn.S puts function epilogues in the .init and .fini sections
     corresponding to the prologues in crti.S. */
  
-diff --git a/sysdeps/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S
-index 8415e47607..29c2cb8128 100644
 --- a/sysdeps/arm/dl-tlsdesc.S
 +++ b/sysdeps/arm/dl-tlsdesc.S
 @@ -21,6 +21,8 @@
@@ -174,8 +133,6 @@
  	.text
  	@ emit debug information with cfi
  	@ use arm-specific pseudos for unwinding itself
-diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S
-index a20baf555e..2dd3bef04e 100644
 --- a/sysdeps/arm/dl-trampoline.S
 +++ b/sysdeps/arm/dl-trampoline.S
 @@ -21,6 +21,8 @@
@@ -187,8 +144,6 @@
  	.text
  	.globl _dl_runtime_resolve
  	.type _dl_runtime_resolve, #function
-diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S
-index 2ff56179d2..c118046ec6 100644
 --- a/sysdeps/arm/start.S
 +++ b/sysdeps/arm/start.S
 @@ -57,6 +57,8 @@
@@ -200,8 +155,6 @@
  /* Tag_ABI_align8_preserved: This code preserves 8-byte
     alignment in any callee.  */
  	.eabi_attribute 25, 1
-diff --git a/sysdeps/mips/start.S b/sysdeps/mips/start.S
-index fabc8080df..83c6b91d7d 100644
 --- a/sysdeps/mips/start.S
 +++ b/sysdeps/mips/start.S
 @@ -38,6 +38,8 @@
@@ -213,8 +166,6 @@
  #ifndef ENTRY_POINT
  #error ENTRY_POINT needs to be defined for start.S on MIPS/ELF.
  #endif
-diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S
-index c15242d3bc..6ca27715a4 100644
 --- a/sysdeps/powerpc/powerpc32/dl-start.S
 +++ b/sysdeps/powerpc/powerpc32/dl-start.S
 @@ -18,6 +18,8 @@
@@ -226,8 +177,6 @@
  /* Initial entry point code for the dynamic linker.
     The C function `_dl_start' is the real entry point;
     its return value is the user program's entry point.	*/
-diff --git a/sysdeps/powerpc/powerpc32/start.S b/sysdeps/powerpc/powerpc32/start.S
-index b7b9a133a2..8df714f81a 100644
 --- a/sysdeps/powerpc/powerpc32/start.S
 +++ b/sysdeps/powerpc/powerpc32/start.S
 @@ -35,6 +35,8 @@
@@ -239,8 +188,6 @@
  /* We do not want .eh_frame info for crt1.o since crt1.o is linked
     before crtbegin.o, the file defining __EH_FRAME_BEGIN__.  */
  #undef cfi_startproc
-diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S
-index 94bf771e83..cffb99500a 100644
 --- a/sysdeps/powerpc/powerpc64/start.S
 +++ b/sysdeps/powerpc/powerpc64/start.S
 @@ -35,6 +35,8 @@
@@ -252,8 +199,6 @@
  /* We do not want .eh_frame info for crt1.o since crt1.o is linked
     before crtbegin.o, the file defining __EH_FRAME_BEGIN__.  */
  #undef cfi_startproc
-diff --git a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
-index 12e1131fe7..767e0d043b 100644
 --- a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
 +++ b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
 @@ -18,6 +18,8 @@
@@ -265,8 +210,6 @@
  	.hidden __read_tp
  ENTRY (__read_tp)
  	mrs	x0, tpidr_el0
-diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
-index 3b0d611039..4a7e476c37 100644
 --- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
 +++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
 @@ -39,6 +39,8 @@
@@ -278,8 +221,6 @@
  	.hidden __aeabi_read_tp
  ENTRY (__aeabi_read_tp)
  #ifdef ARCH_HAS_HARD_TP
-diff --git a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
-index fb5e0c7d97..bd07bdb38b 100644
 --- a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
 +++ b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
 @@ -27,6 +27,8 @@
@@ -291,8 +232,6 @@
  #if defined(__thumb__)
  	.thumb
  	.syntax unified
-diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-brk.S b/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
-index eeb96544e3..da182b28f8 100644
 --- a/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
 +++ b/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
 @@ -1 +1,3 @@
diff --git a/poky/meta/recipes-core/glibc/glibc/0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch b/poky/meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
similarity index 92%
rename from poky/meta/recipes-core/glibc/glibc/0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
rename to poky/meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
index c8c359f..d2c88d2 100644
--- a/poky/meta/recipes-core/glibc/glibc/0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
@@ -1,7 +1,7 @@
-From 66963ad83bdd3b075006ddca9dfe357aed181d6a Mon Sep 17 00:00:00 2001
+From 10aef8f0671d814aaf910ababc0225cf6f0a46e8 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <martin.jansa@gmail.com>
 Date: Mon, 17 Dec 2018 21:36:18 +0000
-Subject: [PATCH] locale: prevent maybe-uninitialized errors with -Os [BZ
+Subject: [PATCH 27/29] locale: prevent maybe-uninitialized errors with -Os [BZ
  #19444]
 
 Fixes following error when building for aarch64 with -Os:
@@ -51,3 +51,6 @@
    const unsigned char *cp;
    const unsigned char *usrc;
  
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/poky/meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
similarity index 83%
rename from poky/meta/recipes-core/glibc/glibc/0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
rename to poky/meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index 456f91f..25c046f 100644
--- a/poky/meta/recipes-core/glibc/glibc/0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -1,7 +1,8 @@
-From 13beb1f428ec06778590bf526d6e641f73d5cf62 Mon Sep 17 00:00:00 2001
+From 70731329feb7ba20364aa37aed83d920de97f028 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known names
+Subject: [PATCH 28/29] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+ names
 
 This bolts in a hook for OE to pass its own version of interpreter
 names into glibc especially for multilib case, where it differs from any
@@ -27,3 +28,6 @@
  };
  
  static struct known_names known_libs[] =
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/poky/meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
similarity index 93%
rename from poky/meta/recipes-core/glibc/glibc/0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
rename to poky/meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
index cbef2f2..0ebf8a6 100644
--- a/poky/meta/recipes-core/glibc/glibc/0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
+++ b/poky/meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
@@ -1,7 +1,7 @@
-From 9cb0a756b017f5961b70ac781d3eaec6c82513cb Mon Sep 17 00:00:00 2001
+From bf1c4b2f01c5f86bb770fd1711a69ea727e0f56e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 15 May 2020 17:05:45 -0700
-Subject: [PATCH] wordsize.h: Unify the header between arm and aarch64
+Subject: [PATCH 29/29] wordsize.h: Unify the header between arm and aarch64
 
 This helps OE multilibs to not sythesize this header which causes all
 kind of recursions and other issues since wordsize is fundamental header
@@ -65,3 +65,6 @@
  #endif
  
  #define __WORDSIZE_TIME64_COMPAT32	0
+-- 
+2.27.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc/0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch b/poky/meta/recipes-core/glibc/glibc/0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch
new file mode 100644
index 0000000..a764552
--- /dev/null
+++ b/poky/meta/recipes-core/glibc/glibc/0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch
@@ -0,0 +1,51 @@
+From 8b1d521290218df8ceeaf2e6ee44a54b19d8d328 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Aug 2020 14:31:16 -0700
+Subject: [PATCH 30/30] powerpc: Do not ask compiler for finding arch
+
+This does not work well in cross compiling environments like OE
+and moreover it uses its own -mcpu/-march options via cflags
+
+Upstream-Status: Inappropriate [ OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/powerpc/preconfigure    | 5 +----
+ sysdeps/powerpc/preconfigure.ac | 5 +----
+ 2 files changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/sysdeps/powerpc/preconfigure b/sysdeps/powerpc/preconfigure
+index dfe8e20399..bbff040f0f 100644
+--- a/sysdeps/powerpc/preconfigure
++++ b/sysdeps/powerpc/preconfigure
+@@ -29,10 +29,7 @@ esac
+ # directive which shows up, and try using it.
+ case "${machine}:${submachine}" in
+ *powerpc*:)
+-  archcpu=`echo "int foo () { return 0; }" \
+-	   | $CC $CFLAGS $CPPFLAGS -S -frecord-gcc-switches -xc -o - - \
+-	   | grep -E "mcpu=|.machine" -m 1 \
+-	   | sed -e "s/.*machine //" -e "s/.*mcpu=\(.*\)\"/\1/"`
++  archcpu=''
+   # Note if you add patterns here you must ensure that an appropriate
+   # directory exists in sysdeps/powerpc.  Likewise, if we find a
+   # cpu, don't let the generic configure append extra compiler options.
+diff --git a/sysdeps/powerpc/preconfigure.ac b/sysdeps/powerpc/preconfigure.ac
+index 6c63bd8257..3e925f1d48 100644
+--- a/sysdeps/powerpc/preconfigure.ac
++++ b/sysdeps/powerpc/preconfigure.ac
+@@ -29,10 +29,7 @@ esac
+ # directive which shows up, and try using it.
+ case "${machine}:${submachine}" in
+ *powerpc*:)
+-  archcpu=`echo "int foo () { return 0; }" \
+-	   | $CC $CFLAGS $CPPFLAGS -S -frecord-gcc-switches -xc -o - - \
+-	   | grep -E "mcpu=|[.]machine" -m 1 \
+-	   | sed -e "s/.*machine //" -e "s/.*mcpu=\(.*\)\"/\1/"`
++  archcpu=''
+   # Note if you add patterns here you must ensure that an appropriate
+   # directory exists in sysdeps/powerpc.  Likewise, if we find a
+   # cpu, don't let the generic configure append extra compiler options.
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-core/glibc/glibc_2.31.bb b/poky/meta/recipes-core/glibc/glibc_2.32.bb
similarity index 70%
rename from poky/meta/recipes-core/glibc/glibc_2.31.bb
rename to poky/meta/recipes-core/glibc/glibc_2.32.bb
index 9b2cf1b..7049e61 100644
--- a/poky/meta/recipes-core/glibc/glibc_2.31.bb
+++ b/poky/meta/recipes-core/glibc/glibc_2.32.bb
@@ -21,28 +21,28 @@
            \
            ${NATIVESDKFIXES} \
            file://0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
-           file://0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
-           file://0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
-           file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
-           file://0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
-           file://0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
-           file://0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
-           file://0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
-           file://0016-Add-unused-attribute.patch \
-           file://0017-yes-within-the-path-sets-wrong-config-variables.patch \
-           file://0018-timezone-re-written-tzselect-as-posix-sh.patch \
-           file://0019-Remove-bash-dependency-for-nscd-init-script.patch \
-           file://0020-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0021-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0023-eglibc-Forward-port-cross-locale-generation-support.patch \
-           file://0024-Define-DUMMY_LOCALE_T-if-not-defined.patch \
-           file://0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
-           file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
-           file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \
-           file://0028-inject-file-assembly-directives.patch \
-           file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
-           file://0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
+           file://0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
+           file://0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+           file://0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
+           file://0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+           file://0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+           file://0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+           file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
+           file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+           file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+           file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0021-eglibc-Forward-port-cross-locale-generation-support.patch \
+           file://0022-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+           file://0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
+           file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
+           file://0025-intl-Emit-no-lines-in-bison-generated-files.patch \
+           file://0026-inject-file-assembly-directives.patch \
+           file://0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
+           file://0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+           file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
+           file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \
            "
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build-${TARGET_SYS}"
diff --git a/poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 1c525b7..f21f48d 100755
--- a/poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -9,10 +9,10 @@
 ### END INIT INFO
 
 # Get ROOT_DIR
-DIRNAME=`dirname $0`
-ROOT_DIR=`echo $DIRNAME | sed -ne 's:/etc/.*::p'`
+DIRNAME="$(dirname "$0")"
+ROOT_DIR="$(echo "$DIRNAME" | sed -ne 's:/etc/.*::p')"
 
-[ -e ${ROOT_DIR}/etc/default/rcS ] && . ${ROOT_DIR}/etc/default/rcS
+[ -e "${ROOT_DIR}/etc/default/rcS" ] && . "${ROOT_DIR}/etc/default/rcS"
 # When running populate-volatile.sh at rootfs time, disable cache.
 [ -n "$ROOT_DIR" ] && VOLATILE_ENABLE_CACHE=no
 # If rootfs is read-only, disable cache.
@@ -26,15 +26,15 @@
 
 create_file() {
 	EXEC=""
-	[ -z "$2" ] && {
+	if [ -z "$2" ]; then
 		EXEC="
 		touch \"$1\";
 		"
-	} || {
+	else
 		EXEC="
 		cp \"$2\" \"$1\";
 		"
-	}
+	fi
 	EXEC="
 	${EXEC}
 	chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
@@ -42,19 +42,19 @@
 
 	test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
 
-	[ -e "$1" ] && {
+	if [ -e "$1" ]; then
 		[ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
-	} || {
+	else
 		if [ -z "$ROOT_DIR" ]; then
-			eval $EXEC
+			eval "$EXEC"
 		else
 			# Creating some files at rootfs time may fail and should fail,
 			# but these failures should not be logged to make sure the do_rootfs
 			# process doesn't fail. This does no harm, as this script will
 			# run on target to set up the correct files and directories.
-			eval $EXEC > /dev/null 2>&1
+			eval "$EXEC" > /dev/null 2>&1
 		fi
-	}
+	fi
 }
 
 mk_dir() {
@@ -64,17 +64,17 @@
 	chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
 
 	test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
-	[ -e "$1" ] && {
+	if [ -e "$1" ]; then
 		[ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
-	} || {
+	else
 		if [ -z "$ROOT_DIR" ]; then
-			eval $EXEC
+			eval "$EXEC"
 		else
 			# For the same reason with create_file(), failures should
 			# not be logged.
-			eval $EXEC > /dev/null 2>&1
+			eval "$EXEC" > /dev/null 2>&1
 		fi
-	}
+	fi
 }
 
 link_file() {
@@ -96,11 +96,11 @@
 	test "$VOLATILE_ENABLE_CACHE" = yes && echo "	$EXEC" >> /etc/volatile.cache.build
 
 	if [ -z "$ROOT_DIR" ]; then
-		eval $EXEC
+		eval "$EXEC"
 	else
 		# For the same reason with create_file(), failures should
 		# not be logged.
-		eval $EXEC > /dev/null 2>&1
+		eval "$EXEC" > /dev/null 2>&1
 	fi
 }
 
@@ -117,11 +117,11 @@
 	TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
 	TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
 
-	sed 's@\(^:\)*:.*@\1@' ${ROOT_DIR}/etc/passwd | sort | uniq > "${TMP_DEFINED}"
-	cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 2 > "${TMP_INTERMED}"
+	sed 's@\(^:\)*:.*@\1@' "${ROOT_DIR}/etc/passwd" | sort | uniq > "${TMP_DEFINED}"
+	grep -v "^#" "${CFGFILE}" | cut -s -d " " -f 2 > "${TMP_INTERMED}"
 	cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
-	NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
-	NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
+	NR_DEFINED_USERS="$(wc -l < "${TMP_DEFINED}")"
+	NR_COMBINED_USERS="$(wc -l < "${TMP_COMBINED}")"
 
 	[ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ] && {
 		echo "Undefined users:"
@@ -131,12 +131,12 @@
 	}
 
 
-	sed 's@\(^:\)*:.*@\1@' ${ROOT_DIR}/etc/group | sort | uniq > "${TMP_DEFINED}"
-	cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 3 > "${TMP_INTERMED}"
+	sed 's@\(^:\)*:.*@\1@' "${ROOT_DIR}/etc/group" | sort | uniq > "${TMP_DEFINED}"
+	grep -v "^#" "${CFGFILE}" | cut -s -d " " -f 3 > "${TMP_INTERMED}"
 	cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
 
-	NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"
-	NR_COMBINED_GROUPS="`cat "${TMP_COMBINED}" | wc -l`"
+	NR_DEFINED_GROUPS="$(wc -l < "${TMP_DEFINED}")"
+	NR_COMBINED_GROUPS="$(wc -l < "${TMP_COMBINED}")"
 
 	[ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ] && {
 		echo "Undefined groups:"
@@ -157,13 +157,13 @@
 
 	[ "${VERBOSE}" != "no" ] && echo "Applying ${CFGFILE}"
 
-	[ "${SKIP_REQUIREMENTS}" == "yes" ] || check_requirements "${CFGFILE}" || {
+	[ "${SKIP_REQUIREMENTS}" = "yes" ] || check_requirements "${CFGFILE}" || {
 		echo "Skipping ${CFGFILE}"
 		return 1
 	}
 
-	cat ${CFGFILE} | sed 's/#.*//' | \
-	while read TTYPE TUSER TGROUP TMODE TNAME TLTARGET; do
+	sed 's/#.*//' "${CFGFILE}" | \
+	while read -r TTYPE TUSER TGROUP TMODE TNAME TLTARGET; do
 		test -z "${TLTARGET}" && continue
 		TNAME=${ROOT_DIR}${TNAME}
 		[ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
@@ -187,14 +187,14 @@
 
 		[ -L "${TNAME}" ] && {
 			[ "${VERBOSE}" != "no" ] && echo "Found link."
-			NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`
-			echo ${NEWNAME} | grep -v "^/" >/dev/null && {
-				TNAME="`echo ${TNAME} | sed -e 's@\(.*\)/.*@\1@'`/${NEWNAME}"
+			NEWNAME=$(ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/')
+			if echo "${NEWNAME}" | grep -v "^/" >/dev/null; then
+				TNAME="$(echo "${TNAME}" | sed -e 's@\(.*\)/.*@\1@')/${NEWNAME}"
 				[ "${VERBOSE}" != "no" ] && echo "Converted relative linktarget to absolute path -${TNAME}-."
-			} || {
+			else
 				TNAME="${NEWNAME}"
 				[ "${VERBOSE}" != "no" ] && echo "Using absolute link target -${TNAME}-."
-			}
+			fi
 		}
 
 		case "${TTYPE}" in
@@ -217,7 +217,7 @@
 
 clearcache=0
 exec 9</proc/cmdline
-while read line <&9
+while read -r line <&9
 do
 	case "$line" in
 		*clearcache*)  clearcache=1
@@ -228,11 +228,11 @@
 done
 exec 9>&-
 
-if test -e ${ROOT_DIR}/etc/volatile.cache -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0"
+if test -e "${ROOT_DIR}/etc/volatile.cache" -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0"
 then
-	sh ${ROOT_DIR}/etc/volatile.cache
+	sh "${ROOT_DIR}/etc/volatile.cache"
 else
-	rm -f ${ROOT_DIR}/etc/volatile.cache ${ROOT_DIR}/etc/volatile.cache.build
+	rm -f "${ROOT_DIR}/etc/volatile.cache" "${ROOT_DIR}/etc/volatile.cache.build"
 
 	# Apply the core file with out checking requirements. ${TMPROOT} is
 	# needed by check_requirements but is setup by this file, so it must be
@@ -246,7 +246,7 @@
 	TMP_FILE="${TMPROOT}/tmp_volatile.$$"
 	rm -f "$TMP_FILE"
 
-	CFGFILES="`ls -1 "${CFGDIR}" | grep -v "^${COREDEF}\$" | sort`"
+	CFGFILES="$(ls -1 "${CFGDIR}" | grep -v "^${COREDEF}\$" | sort)"
 	for file in ${CFGFILES}; do
 		cat "${CFGDIR}/${file}" >> "$TMP_FILE"
 	done
@@ -264,7 +264,7 @@
 	fi
 	rm "$TMP_FILE"
 
-	[ -e ${ROOT_DIR}/etc/volatile.cache.build ] && sync && mv ${ROOT_DIR}/etc/volatile.cache.build ${ROOT_DIR}/etc/volatile.cache
+	[ -e "${ROOT_DIR}/etc/volatile.cache.build" ] && sync && mv "${ROOT_DIR}/etc/volatile.cache.build" "${ROOT_DIR}/etc/volatile.cache"
 fi
 
 if [ -z "${ROOT_DIR}" ] && [ -f /etc/ld.so.cache ] && [ ! -f /var/run/ld.so.cache ]
diff --git a/poky/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch b/poky/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch
deleted file mode 100644
index dc52360..0000000
--- a/poky/meta/recipes-core/kbd/kbd/0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 4c12f76f4177cfd560cf708a16774ebfadbd41a5 Mon Sep 17 00:00:00 2001
-From: "Mingde (Matthew) Zeng" <matthew.zeng@windriver.com>
-Date: Wed, 22 Jan 2020 11:02:17 -0500
-Subject: [PATCH] Use DATADIR and append i386 to fix libkbdfile-test08 ptest
- failure
-
-Replace ABS_DATADIR with DATADIR and append i386 to dirpath.
-
-Upstream-Status: Inappropriate [OE specific]
-
-This OE specific patch applies to kbd v2.2.0 for now, the upstream
-made drastic changes since v2.2.0, in fact they got rid of ABS_DATADIR
-in commit 5b6df5c along with a series of other commits which may or
-may not fix this issue. We will find out in future releases.
-
-Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com>
----
- tests/libkbdfile-test08.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tests/libkbdfile-test08.c b/tests/libkbdfile-test08.c
-index bf41707..5e287f1 100644
---- a/tests/libkbdfile-test08.c
-+++ b/tests/libkbdfile-test08.c
-@@ -14,14 +14,14 @@ main(int __attribute__((unused)) argc, char **argv)
- 	if (!fp)
- 		kbd_error(EXIT_FAILURE, 0, "unable to create kbdfile");
-
--	const char *const dirpath[]  = { "", DATADIR "/findfile/test_0/keymaps/**", 0 };
-+	const char *const dirpath[]  = { "", DATADIR "/findfile/test_0/keymaps/i386/**", 0 };
- 	const char *const suffixes[] = { "", ".map", ".kmap", 0 };
-
--	const char *expect = ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
-+	const char *expect = DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
-
- 	int rc = 0;
-
--	rc = kbdfile_find((char *)(ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0"), (char **) dirpath, (char **) suffixes, fp);
-+	rc = kbdfile_find((char *)"test0", (char **) dirpath, (char **) suffixes, fp);
-
- 	if (rc != 0)
- 		kbd_error(EXIT_FAILURE, 0, "unable to find file");
---
-2.24.1
-
diff --git a/poky/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch b/poky/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch
deleted file mode 100644
index 8916fd9..0000000
--- a/poky/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From dc6bf2ae0835c6569b270e8e1f26a3173f3927d9 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 4 Dec 2019 13:14:01 +0100
-Subject: [PATCH] analyze.l: add missing string format
-
-Upstream-Status: Submitted [https://github.com/legionus/kbd/pull/35]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- src/libkeymap/analyze.l | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l
-index e32ace6..de62f46 100644
---- a/src/libkeymap/analyze.l
-+++ b/src/libkeymap/analyze.l
-@@ -463,7 +463,7 @@ To                      to|To|TO
- 
- 					strerror_r(errno, buf, sizeof(buf));
- 
--					ERR(yyextra, buf);
-+					ERR(yyextra, "%s", buf);
- 					return(ERROR);
- 				}
- 
diff --git a/poky/meta/recipes-core/kbd/kbd/fix_cflags.patch b/poky/meta/recipes-core/kbd/kbd/fix_cflags.patch
deleted file mode 100644
index 3722096..0000000
--- a/poky/meta/recipes-core/kbd/kbd/fix_cflags.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-We need to ensure our CFLAGS are preserved as well as whatever tweak configure
-tries to make. Without these, the debug prefix changes get lost and we lose
-build reproducibility, likely with other side effects.
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Upstream-Status: Pending
-2020/1/27
-
-Index: kbd-2.2.0/configure.ac
-===================================================================
---- kbd-2.2.0.orig/configure.ac
-+++ kbd-2.2.0/configure.ac
-@@ -72,9 +72,9 @@ if test "$enable_code_coverage" = yes; t
- fi
- 
- case "$GCC,$ac_cv_prog_cc_g" in
--	yes,yes) CFLAGS="-g $CC_O_LEVEL $FORTIFY_SOURCE" ;;
--	yes,)    CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE" ;;
--	   ,yes) CFLAGS="-g" ;;
-+	yes,yes) CFLAGS="-g $CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
-+	yes,)    CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
-+	   ,yes) CFLAGS="-g $CFLAGS" ;;
- esac
- 
- CC_CHECK_CFLAGS_APPEND([\
diff --git a/poky/meta/recipes-core/kbd/kbd/run-ptest b/poky/meta/recipes-core/kbd/kbd/run-ptest
deleted file mode 100644
index 7a2d205..0000000
--- a/poky/meta/recipes-core/kbd/kbd/run-ptest
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-CURDIR=$(dirname `readlink -f $0`)
-make -k -C ${CURDIR}/tests check-TESTS
diff --git a/poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
deleted file mode 100644
index 4b1e5b8..0000000
--- a/poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From cb3af8fb072f8999dbb5160bdc95a102b02fd37a Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Fri, 30 Sep 2016 16:49:55 +0800
-Subject: [PATCH] kbd: create ptest sub-package
-
-Upstream-Status: Inappropriate [embedded specific]
-
-kbd is out of source built, then the value of $(srcdir) is relative path of
-${S}/tests to ${B}/tests. Macro DATADIR is defined with $(srcdir) and replaced
-in .c files by compiler, and string @DATADIR@ is replaced with $(srdir) by rule
-"%: %.in" in Makefile.
-
-But kbd-ptest puts test cases and resource files in same directory, then some
-ptest cases fail to find resources.
-
-Replace DATADIR and @DATADIR@ with current directory(dot) to make test cases
-run as expected.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
----
- tests/Makefile.am           | 4 ++--
- tests/alt-is-meta.in        | 2 +-
- tests/dumpkeys-bkeymap.in   | 4 ++--
- tests/dumpkeys-fulltable.in | 2 +-
- tests/dumpkeys-mktable.in   | 4 ++--
- 5 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 8d0ab69..5147c28 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -7,8 +7,8 @@ AM_CPPFLAGS = \
- 	-I$(builddir)/../src/libkeymap \
- 	-I$(srcdir)/../src/libkbdfile \
- 	-I$(builddir)/../src/libkbdfile \
--	-DDATADIR=\"$(srcdir)\" \
--	-DABS_DATADIR=\"$(realpath $(srcdir))\" \
-+	-DDATADIR=\".\" \
-+	-DABS_DATADIR=\"/usr/lib/kbd/ptest/tests\" \
- 	-DBUILDDIR=\"$(builddir)\"
- 
- AM_CFLAGS = $(CHECK_CFLAGS) $(CODE_COVERAGE_CFLAGS)
-diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
-index 3a1441f..d829f2e 100755
---- a/tests/alt-is-meta.in
-+++ b/tests/alt-is-meta.in
-@@ -7,7 +7,7 @@ cd "$cwd"
- rc=0
- temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
- 
--datadir="@DATADIR@/data/alt-is-meta"
-+datadir="./data/alt-is-meta"
- 
- ./libkeymap-showmaps "$datadir"/alt-is-meta.map > "$temp" || rc=$?
- cmp -s "$datadir/alt-is-meta.output" "$temp" || rc=$?
-diff --git a/tests/dumpkeys-bkeymap.in b/tests/dumpkeys-bkeymap.in
-index 03d4ca2..d1d0e26 100755
---- a/tests/dumpkeys-bkeymap.in
-+++ b/tests/dumpkeys-bkeymap.in
-@@ -9,8 +9,8 @@ temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
- 
- datadir="@DATADIR@"
- 
--./libkeymap-bkeymap "$datadir/"../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
--cmp -s "$datadir/data/dumpkeys-bkeymap/bkeymap.bin" "$temp" || rc=$?
-+./libkeymap-bkeymap ../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
-+cmp -s "./data/dumpkeys-bkeymap/bkeymap.bin" "$temp" || rc=$?
- 
- if [ "$rc" != 0 ]; then
- 	printf 'failed\n'
-diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
-index a3a5ece..67a73ef 100755
---- a/tests/dumpkeys-fulltable.in
-+++ b/tests/dumpkeys-fulltable.in
-@@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")"
- cd "$cwd"
- 
- BUILDDIR="@BUILDDIR@"
--DATADIR="@DATADIR@"
-+DATADIR="."
- 
- check_keymap() {
- 	local kmap temp rc
-diff --git a/tests/dumpkeys-mktable.in b/tests/dumpkeys-mktable.in
-index 0f17c40..7e5161d 100755
---- a/tests/dumpkeys-mktable.in
-+++ b/tests/dumpkeys-mktable.in
-@@ -7,8 +7,8 @@ cd "$cwd"
- rc=0
- temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
- 
--./libkeymap-mktable "@DATADIR@/"../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
--cmp -s "@DATADIR@/data/dumpkeys-mktable/defkeymap.c" "$temp" || rc=$?
-+./libkeymap-mktable ../data/keymaps/i386/qwerty/defkeymap.map > "$temp" || rc=$?
-+cmp -s "./data/dumpkeys-mktable/defkeymap.c" "$temp" || rc=$?
- 
- if [ "$rc" != 0 ]; then
- 	printf 'failed\n'
diff --git a/poky/meta/recipes-core/kbd/kbd_2.2.0.bb b/poky/meta/recipes-core/kbd/kbd_2.2.0.bb
deleted file mode 100644
index e5700ff..0000000
--- a/poky/meta/recipes-core/kbd/kbd_2.2.0.bb
+++ /dev/null
@@ -1,72 +0,0 @@
-SUMMARY = "Keytable files and keyboard utilities"
-HOMEPAGE = "http://www.kbd-project.org/"
-# everything minus console-fonts is GPLv2+
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
-
-inherit autotools gettext ptest pkgconfig
-
-DEPENDS += "flex-native"
-
-RREPLACES_${PN} = "console-tools"
-RPROVIDES_${PN} = "console-tools"
-RCONFLICTS_${PN} = "console-tools"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
-           file://run-ptest \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \
-           file://0001-analyze.l-add-missing-string-format.patch \
-           file://0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch \
-           file://fix_cflags.patch \
-           "
-
-SRC_URI[md5sum] = "d1d7ae0b5fb875dc082731e09cd0c8bc"
-SRC_URI[sha256sum] = "21a1bc5f6fb3b18ce9fdd717e4533368060a3182a39c7155eaf7ec0f5f83e9f7"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
-                  ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \
-                  "
-
-PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
-PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck"
-
-do_compile_ptest() {
-    oe_runmake -C ${B}/tests alt-is-meta dumpkeys-bkeymap dumpkeys-fulltable dumpkeys-mktable
-}
-
-do_install_ptest() {
-    install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
-    sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
-	-e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
-	-e 's:${DEBUG_PREFIX_MAP}::g' \
-	-e 's:${HOSTTOOLS_DIR}/::g' \
-	-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	-e 's:${RECIPE_SYSROOT}::g' \
-	-e 's:${S}/config/missing::g' \
-	-e 's:${WORKDIR}::g' \
-	-e '/^lib.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
-
-    find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
-    cp -rf ${S}/tests/data ${D}${PTEST_PATH}/tests
-    cp -rf ${S}/tests/findfile ${D}${PTEST_PATH}/tests
-    cp -rf ${S}/data ${D}${PTEST_PATH}
-
-    install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver
-}
-
-PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
-
-FILES_${PN}-consolefonts = "${datadir}/consolefonts"
-FILES_${PN}-consoletrans = "${datadir}/consoletrans"
-FILES_${PN}-keymaps = "${datadir}/keymaps"
-FILES_${PN}-unimaps = "${datadir}/unimaps"
-
-RDEPENDS_${PN}-ptest = "make"
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \
-                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}"
-ALTERNATIVE_PRIORITY = "100"
-
-BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-core/kbd/kbd_2.3.0.bb b/poky/meta/recipes-core/kbd/kbd_2.3.0.bb
new file mode 100644
index 0000000..529f49b
--- /dev/null
+++ b/poky/meta/recipes-core/kbd/kbd_2.3.0.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Keytable files and keyboard utilities"
+HOMEPAGE = "http://www.kbd-project.org/"
+# everything minus console-fonts is GPLv2+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
+
+inherit autotools gettext pkgconfig
+
+DEPENDS += "flex-native"
+
+RREPLACES_${PN} = "console-tools"
+RPROVIDES_${PN} = "console-tools"
+RCONFLICTS_${PN} = "console-tools"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
+           "
+
+SRC_URI[sha256sum] = "685056143cb8effd0a1d44b5c391eb50d80dcfd014b1a4d6e2650a28d61cb82a"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
+                  "
+
+PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+
+PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
+
+FILES_${PN}-consolefonts = "${datadir}/consolefonts"
+FILES_${PN}-consoletrans = "${datadir}/consoletrans"
+FILES_${PN}-keymaps = "${datadir}/keymaps"
+FILES_${PN}-unimaps = "${datadir}/unimaps"
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \
+                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-core/meta/buildtools-tarball.bb b/poky/meta/recipes-core/meta/buildtools-tarball.bb
index d0f8dd7..3785941 100644
--- a/poky/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/poky/meta/recipes-core/meta/buildtools-tarball.bb
@@ -66,16 +66,19 @@
 	script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
 	touch $script
 	echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
-	# In order for the self-extraction script to correctly extract and set up things,
-	# we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup script.
-	# However, buildtools-tarball is inherently a tool set instead of a fully functional SDK,
-	# so instead of exporting the variable, we use a comment here.
-	echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
-	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
-
+	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
 	echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
-	echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script
+
+	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
+
+	cat >> $script <<EOF
+if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
+	for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
+		. \$envfile
+	done
+fi
+EOF
 
 	if [ "${SDKMACHINE}" = "i686" ]; then
 		echo 'export NO32LIBS="0"' >>$script
diff --git a/poky/meta/recipes-core/meta/cve-update-db-native.bb b/poky/meta/recipes-core/meta/cve-update-db-native.bb
index f27ade4..32d6dbd 100644
--- a/poky/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/poky/meta/recipes-core/meta/cve-update-db-native.bb
@@ -176,15 +176,20 @@
         if not elt['impact']:
             continue
 
+        accessVector = None
         cveId = elt['cve']['CVE_data_meta']['ID']
         cveDesc = elt['cve']['description']['description_data'][0]['value']
         date = elt['lastModifiedDate']
-        accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
-        cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
-
         try:
+            accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
+            cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
+        except KeyError:
+            cvssv2 = 0.0
+        try:
+            accessVector = accessVector or elt['impact']['baseMetricV3']['cvssV3']['attackVector']
             cvssv3 = elt['impact']['baseMetricV3']['cvssV3']['baseScore']
-        except:
+        except KeyError:
+            accessVector = accessVector or "UNKNOWN"
             cvssv3 = 0.0
 
         c.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)",
diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb
index ed2178b..51b19e8 100644
--- a/poky/meta/recipes-core/musl/musl_git.bb
+++ b/poky/meta/recipes-core/musl/musl_git.bb
@@ -4,9 +4,9 @@
 require musl.inc
 inherit linuxloader
 
-SRCREV = "0a005f499cf39822166dd4db3d2d31f0639f1b1b"
+SRCREV = "73cc775bee53300c7cf759f37580220b18ac13d3"
 
-BASEVER = "1.2.0"
+BASEVER = "1.2.1"
 
 PV = "${BASEVER}+git${SRCPV}"
 
diff --git a/poky/meta/recipes-core/systemd/systemd-boot_245.6.bb b/poky/meta/recipes-core/systemd/systemd-boot_246.1.bb
similarity index 100%
rename from poky/meta/recipes-core/systemd/systemd-boot_245.6.bb
rename to poky/meta/recipes-core/systemd/systemd-boot_246.1.bb
diff --git a/poky/meta/recipes-core/systemd/systemd-conf_245.6.bb b/poky/meta/recipes-core/systemd/systemd-conf_246.1.bb
similarity index 100%
rename from poky/meta/recipes-core/systemd/systemd-conf_245.6.bb
rename to poky/meta/recipes-core/systemd/systemd-conf_246.1.bb
diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc
index 8c758ab..b0d4fe4 100644
--- a/poky/meta/recipes-core/systemd/systemd.inc
+++ b/poky/meta/recipes-core/systemd/systemd.inc
@@ -14,8 +14,8 @@
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
                     file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "aa0cb635f1f6a4d9b50ed2cca7782f3f751be933"
-SRCBRANCH = "v245-stable"
+SRCREV = "91b37e6f0982e1e64c63017000248d7441a83a2e"
+SRCBRANCH = "v246-stable"
 SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch b/poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
index 26a597d..723cd2e 100644
--- a/poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
@@ -14,10 +14,10 @@
  src/shared/userdb.c           |  6 ++++++
  3 files changed, 30 insertions(+)
 
-diff --git a/src/shared/group-record-nss.c b/src/shared/group-record-nss.c
-index 77924f1c4067..c64490253ff3 100644
---- a/src/shared/group-record-nss.c
-+++ b/src/shared/group-record-nss.c
+Index: systemd-stable/src/shared/group-record-nss.c
+===================================================================
+--- systemd-stable.orig/src/shared/group-record-nss.c
++++ systemd-stable/src/shared/group-record-nss.c
 @@ -19,8 +19,10 @@ int nss_group_to_group_record(
          if (isempty(grp->gr_name))
                  return -EINVAL;
@@ -45,7 +45,7 @@
  
          r = json_build(&g->json, JSON_BUILD_OBJECT(
                                         JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)),
-@@ -76,6 +80,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
+@@ -76,6 +80,7 @@ int nss_sgrp_for_group(const struct grou
          assert(ret_sgrp);
          assert(ret_buffer);
  
@@ -53,7 +53,7 @@
          for (;;) {
                  _cleanup_free_ char *buf = NULL;
                  struct sgrp sgrp, *result;
-@@ -104,6 +109,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
+@@ -104,6 +109,9 @@ int nss_sgrp_for_group(const struct grou
                  buflen *= 2;
                  buf = mfree(buf);
          }
@@ -62,67 +62,67 @@
 +#endif
  }
  
- int nss_group_record_by_name(const char *name, GroupRecord **ret) {
-@@ -111,7 +119,9 @@ int nss_group_record_by_name(const char *name, GroupRecord **ret) {
+ int nss_group_record_by_name(
+@@ -115,7 +123,9 @@ int nss_group_record_by_name(
          struct group grp, *result;
          bool incomplete = false;
          size_t buflen = 4096;
 +#if ENABLE_GSHADOW
-         struct sgrp sgrp;
+         struct sgrp sgrp, *sresult = NULL;
 +#endif
          int r;
  
          assert(name);
-@@ -141,6 +151,7 @@ int nss_group_record_by_name(const char *name, GroupRecord **ret) {
+@@ -145,6 +155,7 @@ int nss_group_record_by_name(
                  buf = mfree(buf);
          }
  
 +#if ENABLE_GSHADOW
-         r = nss_sgrp_for_group(result, &sgrp, &sbuf);
-         if (r < 0) {
-                 log_debug_errno(r, "Failed to do shadow lookup for group %s, ignoring: %m", result->gr_name);
-@@ -148,6 +159,9 @@ int nss_group_record_by_name(const char *name, GroupRecord **ret) {
-         }
+         if (with_shadow) {
+                 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
+                 if (r < 0) {
+@@ -156,6 +167,9 @@ int nss_group_record_by_name(
+                 incomplete = true;
  
-         r = nss_group_to_group_record(result, r >= 0 ? &sgrp : NULL, ret);
+         r = nss_group_to_group_record(result, sresult, ret);
 +#else
 +        r = nss_group_to_group_record(result, NULL, ret);
 +#endif
          if (r < 0)
                  return r;
  
-@@ -160,7 +174,9 @@ int nss_group_record_by_gid(gid_t gid, GroupRecord **ret) {
+@@ -172,7 +186,9 @@ int nss_group_record_by_gid(
          struct group grp, *result;
          bool incomplete = false;
          size_t buflen = 4096;
 +#if ENABLE_GSHADOW
-         struct sgrp sgrp;
+         struct sgrp sgrp, *sresult = NULL;
 +#endif
          int r;
  
          assert(ret);
-@@ -188,6 +204,7 @@ int nss_group_record_by_gid(gid_t gid, GroupRecord **ret) {
+@@ -200,6 +216,7 @@ int nss_group_record_by_gid(
                  buf = mfree(buf);
          }
  
 +#if ENABLE_GSHADOW
-         r = nss_sgrp_for_group(result, &sgrp, &sbuf);
-         if (r < 0) {
-                 log_debug_errno(r, "Failed to do shadow lookup for group %s, ignoring: %m", result->gr_name);
-@@ -195,6 +212,9 @@ int nss_group_record_by_gid(gid_t gid, GroupRecord **ret) {
-         }
+         if (with_shadow) {
+                 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
+                 if (r < 0) {
+@@ -211,6 +228,9 @@ int nss_group_record_by_gid(
+                 incomplete = true;
  
-         r = nss_group_to_group_record(result, r >= 0 ? &sgrp : NULL, ret);
+         r = nss_group_to_group_record(result, sresult, ret);
 +#else
 +        r = nss_group_to_group_record(result, NULL, ret);
 +#endif
          if (r < 0)
                  return r;
  
-diff --git a/src/shared/group-record-nss.h b/src/shared/group-record-nss.h
-index 38b2995178ff..d7d95c44cf11 100644
---- a/src/shared/group-record-nss.h
-+++ b/src/shared/group-record-nss.h
+Index: systemd-stable/src/shared/group-record-nss.h
+===================================================================
+--- systemd-stable.orig/src/shared/group-record-nss.h
++++ systemd-stable/src/shared/group-record-nss.h
 @@ -2,7 +2,11 @@
  #pragma once
  
@@ -135,11 +135,11 @@
  
  #include "group-record.h"
  
-diff --git a/src/shared/userdb.c b/src/shared/userdb.c
-index 92f8796768d7..5d912862f85c 100644
---- a/src/shared/userdb.c
-+++ b/src/shared/userdb.c
-@@ -924,13 +924,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
+Index: systemd-stable/src/shared/userdb.c
+===================================================================
+--- systemd-stable.orig/src/shared/userdb.c
++++ systemd-stable/src/shared/userdb.c
+@@ -930,13 +930,16 @@ int groupdb_iterator_get(UserDBIterator
                  if (gr) {
                          _cleanup_free_ char *buffer = NULL;
                          bool incomplete = false;
@@ -156,7 +156,7 @@
                          r = nss_sgrp_for_group(gr, &sgrp, &buffer);
                          if (r < 0) {
                                  log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name);
-@@ -938,6 +941,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
+@@ -944,6 +947,9 @@ int groupdb_iterator_get(UserDBIterator
                          }
  
                          r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
@@ -166,6 +166,3 @@
                          if (r < 0)
                                  return r;
  
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Use-PREFIX-ROOTPREFIX-correctly.patch b/poky/meta/recipes-core/systemd/systemd/0001-Use-PREFIX-ROOTPREFIX-correctly.patch
new file mode 100644
index 0000000..c61941d
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-Use-PREFIX-ROOTPREFIX-correctly.patch
@@ -0,0 +1,81 @@
+From 2868e3b72d4ac02860e380d70c9af0d61a985790 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alex.kiernan@gmail.com>
+Date: Sun, 16 Aug 2020 16:07:12 +0000
+Subject: [PATCH] Use PREFIX/ROOTPREFIX correctly
+
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+Upstream-status: Pending [https://github.com/systemd/systemd/issues/16773]
+---
+ meson.build                      | 1 +
+ src/core/systemd.pc.in           | 8 ++++----
+ src/libsystemd/sd-path/sd-path.c | 8 ++++----
+ 3 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index dbbddb68e232..18618dba0623 100644
+--- a/meson.build
++++ b/meson.build
+@@ -226,6 +226,7 @@ conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH',               join_paths(rootlib
+ conf.set_quoted('SYSTEMCTL_BINARY_PATH',                      join_paths(rootbindir, 'systemctl'))
+ conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
+ conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH',           join_paths(bindir, 'systemd-stdio-bridge'))
++conf.set_quoted('PREFIX',                                     prefixdir)
+ conf.set_quoted('ROOTPREFIX',                                 rootprefixdir)
+ conf.set_quoted('RANDOM_SEED_DIR',                            randomseeddir)
+ conf.set_quoted('RANDOM_SEED',                                join_paths(randomseeddir, 'random-seed'))
+diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
+index 8424837824b5..410a126317ad 100644
+--- a/src/core/systemd.pc.in
++++ b/src/core/systemd.pc.in
+@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir}
+ tmpfiles_dir=${prefix}/lib/tmpfiles.d
+ tmpfilesdir=${tmpfiles_dir}
+ 
+-sysusers_dir=${rootprefix}/lib/sysusers.d
++sysusers_dir=${prefix}/lib/sysusers.d
+ sysusersdir=${sysusers_dir}
+ 
+-sysctl_dir=${rootprefix}/lib/sysctl.d
++sysctl_dir=${prefix}/lib/sysctl.d
+ sysctldir=${sysctl_dir}
+ 
+-binfmt_dir=${rootprefix}/lib/binfmt.d
++binfmt_dir=${prefix}/lib/binfmt.d
+ binfmtdir=${binfmt_dir}
+ 
+-modules_load_dir=${rootprefix}/lib/modules-load.d
++modules_load_dir=${prefix}/lib/modules-load.d
+ modulesloaddir=${modules_load_dir}
+ 
+ catalog_dir=${prefix}/lib/systemd/catalog
+diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c
+index 736795d1d797..3572916dc073 100644
+--- a/src/libsystemd/sd-path/sd-path.c
++++ b/src/libsystemd/sd-path/sd-path.c
+@@ -371,19 +371,19 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
+                 return 0;
+ 
+         case SD_PATH_SYSUSERS:
+-                *ret = ROOTPREFIX "/lib/sysusers.d";
++                *ret = PREFIX "/lib/sysusers.d";
+                 return 0;
+ 
+         case SD_PATH_SYSCTL:
+-                *ret = ROOTPREFIX "/lib/sysctl.d";
++                *ret = PREFIX "/lib/sysctl.d";
+                 return 0;
+ 
+         case SD_PATH_BINFMT:
+-                *ret = ROOTPREFIX "/lib/binfmt.d";
++                *ret = PREFIX "/lib/binfmt.d";
+                 return 0;
+ 
+         case SD_PATH_MODULES_LOAD:
+-                *ret = ROOTPREFIX "/lib/modules-load.d";
++                *ret = PREFIX "/lib/modules-load.d";
+                 return 0;
+ 
+         case SD_PATH_CATALOG:
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 26f70b3..2676c14 100644
--- a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -25,21 +25,21 @@
  units/systemd-binfmt.service.in         | 4 ++++
  3 files changed, 9 insertions(+), 4 deletions(-)
 
-diff --git a/units/meson.build b/units/meson.build
-index ea91f0cc9ea7..25186f88dfeb 100644
---- a/units/meson.build
-+++ b/units/meson.build
-@@ -52,8 +52,7 @@ units = [
+Index: systemd-stable/units/meson.build
+===================================================================
+--- systemd-stable.orig/units/meson.build
++++ systemd-stable/units/meson.build
+@@ -54,8 +54,7 @@ units = [
          ['poweroff.target',                     '',
-          'runlevel0.target'],
+          (with_runlevels ? 'runlevel0.target' : '')],
          ['printer.target',                      ''],
 -        ['proc-sys-fs-binfmt_misc.automount',   'ENABLE_BINFMT',
 -         'sysinit.target.wants/'],
 +        ['proc-sys-fs-binfmt_misc.automount',   'ENABLE_BINFMT'],
          ['proc-sys-fs-binfmt_misc.mount',       'ENABLE_BINFMT'],
          ['reboot.target',                       '',
-          'runlevel6.target ctrl-alt-del.target'],
-@@ -161,8 +160,7 @@ in_units = [
+          (with_runlevels ? 'runlevel6.target ctrl-alt-del.target' : 'ctrl-alt-del.target')],
+@@ -162,8 +161,7 @@ in_units = [
          ['rc-local.service',                     'HAVE_SYSV_COMPAT'],
          ['rescue.service',                       ''],
          ['systemd-backlight@.service',           'ENABLE_BACKLIGHT'],
@@ -49,10 +49,10 @@
          ['systemd-bless-boot.service',           'ENABLE_EFI HAVE_BLKID'],
          ['systemd-boot-check-no-failures.service', ''],
          ['systemd-coredump@.service',            'ENABLE_COREDUMP'],
-diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
-index 30a6bc991844..4231f3b70fe9 100644
---- a/units/proc-sys-fs-binfmt_misc.automount
-+++ b/units/proc-sys-fs-binfmt_misc.automount
+Index: systemd-stable/units/proc-sys-fs-binfmt_misc.automount
+===================================================================
+--- systemd-stable.orig/units/proc-sys-fs-binfmt_misc.automount
++++ systemd-stable/units/proc-sys-fs-binfmt_misc.automount
 @@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
  
  [Automount]
@@ -60,11 +60,11 @@
 +
 +[Install]
 +WantedBy=sysinit.target
-diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
-index e54e95e11d5d..372a598614d3 100644
---- a/units/systemd-binfmt.service.in
-+++ b/units/systemd-binfmt.service.in
-@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm
+Index: systemd-stable/units/systemd-binfmt.service.in
+===================================================================
+--- systemd-stable.orig/units/systemd-binfmt.service.in
++++ systemd-stable/units/systemd-binfmt.service.in
+@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc
  Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
  DefaultDependencies=no
  Conflicts=shutdown.target
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch b/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
index 4eeec7b..39a9753 100644
--- a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
@@ -40,11 +40,11 @@
  src/vconsole/vconsole-setup.c           |  2 +-
  18 files changed, 35 insertions(+), 35 deletions(-)
 
-diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
-index a5141f4cbedd..04c06e7a55cb 100644
---- a/src/basic/cgroup-util.c
-+++ b/src/basic/cgroup-util.c
-@@ -739,7 +739,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
+Index: systemd-stable/src/basic/cgroup-util.c
+===================================================================
+--- systemd-stable.orig/src/basic/cgroup-util.c
++++ systemd-stable/src/basic/cgroup-util.c
+@@ -769,7 +769,7 @@ int cg_install_release_agent(const char
  
          sc = strstrip(contents);
          if (isempty(sc)) {
@@ -53,7 +53,7 @@
                  if (r < 0)
                          return r;
          } else if (!path_equal(sc, agent))
-@@ -757,7 +757,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
+@@ -787,7 +787,7 @@ int cg_install_release_agent(const char
  
          sc = strstrip(contents);
          if (streq(sc, "0")) {
@@ -62,7 +62,7 @@
                  if (r < 0)
                          return r;
  
-@@ -784,7 +784,7 @@ int cg_uninstall_release_agent(const char *controller) {
+@@ -814,7 +814,7 @@ int cg_uninstall_release_agent(const cha
          if (r < 0)
                  return r;
  
@@ -71,7 +71,7 @@
          if (r < 0)
                  return r;
  
-@@ -794,7 +794,7 @@ int cg_uninstall_release_agent(const char *controller) {
+@@ -824,7 +824,7 @@ int cg_uninstall_release_agent(const cha
          if (r < 0)
                  return r;
  
@@ -80,7 +80,7 @@
          if (r < 0)
                  return r;
  
-@@ -1650,7 +1650,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
+@@ -1656,7 +1656,7 @@ int cg_set_attribute(const char *control
          if (r < 0)
                  return r;
  
@@ -89,11 +89,11 @@
  }
  
  int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
-diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
-index da7e836f143e..2138f20bcc03 100644
---- a/src/basic/procfs-util.c
-+++ b/src/basic/procfs-util.c
-@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) {
+Index: systemd-stable/src/basic/procfs-util.c
+===================================================================
+--- systemd-stable.orig/src/basic/procfs-util.c
++++ systemd-stable/src/basic/procfs-util.c
+@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limi
           * decrease it, as threads-max is the much more relevant sysctl. */
          if (limit > pid_max-1) {
                  sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */
@@ -109,11 +109,11 @@
          if (r < 0) {
                  uint64_t threads_max;
  
-diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
-index da9a2139d31a..5e91f5b8f5d9 100644
---- a/src/basic/smack-util.c
-+++ b/src/basic/smack-util.c
-@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
+Index: systemd-stable/src/basic/smack-util.c
+===================================================================
+--- systemd-stable.orig/src/basic/smack-util.c
++++ systemd-stable/src/basic/smack-util.c
+@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const
                  return 0;
  
          p = procfs_file_alloca(pid, "attr/current");
@@ -122,10 +122,10 @@
          if (r < 0)
                  return r;
  
-diff --git a/src/basic/util.c b/src/basic/util.c
-index 2b3b3918a32f..aff8d0fcd473 100644
---- a/src/basic/util.c
-+++ b/src/basic/util.c
+Index: systemd-stable/src/basic/util.c
+===================================================================
+--- systemd-stable.orig/src/basic/util.c
++++ systemd-stable/src/basic/util.c
 @@ -267,7 +267,7 @@ void disable_coredumps(void) {
          if (detect_container() > 0)
                  return;
@@ -135,11 +135,11 @@
          if (r < 0)
                  log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
  }
-diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
-index 7ff844c78c3a..5c5721d7c2f7 100644
---- a/src/binfmt/binfmt.c
-+++ b/src/binfmt/binfmt.c
-@@ -47,7 +47,7 @@ static int delete_rule(const char *rule) {
+Index: systemd-stable/src/binfmt/binfmt.c
+===================================================================
+--- systemd-stable.orig/src/binfmt/binfmt.c
++++ systemd-stable/src/binfmt/binfmt.c
+@@ -48,7 +48,7 @@ static int delete_rule(const char *rule)
          if (!fn)
                  return log_oom();
  
@@ -148,7 +148,7 @@
  }
  
  static int apply_rule(const char *rule) {
-@@ -55,7 +55,7 @@ static int apply_rule(const char *rule) {
+@@ -56,7 +56,7 @@ static int apply_rule(const char *rule)
  
          (void) delete_rule(rule);
  
@@ -157,7 +157,7 @@
          if (r < 0)
                  return log_error_errno(r, "Failed to add binary format: %m");
  
-@@ -212,7 +212,7 @@ static int run(int argc, char *argv[]) {
+@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) {
                  }
  
                  /* Flush out all rules */
@@ -166,11 +166,11 @@
  
                  STRV_FOREACH(f, files) {
                          k = apply_file(*f, true);
-diff --git a/src/core/main.c b/src/core/main.c
-index 3c6b66e89c8e..c39ebe56a5b3 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
-@@ -1312,7 +1312,7 @@ static int bump_unix_max_dgram_qlen(void) {
+Index: systemd-stable/src/core/main.c
+===================================================================
+--- systemd-stable.orig/src/core/main.c
++++ systemd-stable/src/core/main.c
+@@ -1382,7 +1382,7 @@ static int bump_unix_max_dgram_qlen(void
          if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
                  return 0;
  
@@ -179,7 +179,7 @@
          if (r < 0)
                  return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
                                        "Failed to bump AF_UNIX datagram queue length, ignoring: %m");
-@@ -1536,7 +1536,7 @@ static void initialize_core_pattern(bool skip_setup) {
+@@ -1668,7 +1668,7 @@ static void initialize_core_pattern(bool
          if (getpid_cached() != 1)
                  return;
  
@@ -188,11 +188,11 @@
          if (r < 0)
                  log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern);
  }
-diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
-index 4427397f2715..8aeb5c829513 100644
---- a/src/core/smack-setup.c
-+++ b/src/core/smack-setup.c
-@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) {
+Index: systemd-stable/src/core/smack-setup.c
+===================================================================
+--- systemd-stable.orig/src/core/smack-setup.c
++++ systemd-stable/src/core/smack-setup.c
+@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy)
          }
  
  #ifdef SMACK_RUN_LABEL
@@ -214,10 +214,10 @@
          if (r < 0)
                  log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
  #endif
-diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
-index 17e7cd1a009b..87a766771663 100644
---- a/src/hibernate-resume/hibernate-resume.c
-+++ b/src/hibernate-resume/hibernate-resume.c
+Index: systemd-stable/src/hibernate-resume/hibernate-resume.c
+===================================================================
+--- systemd-stable.orig/src/hibernate-resume/hibernate-resume.c
++++ systemd-stable/src/hibernate-resume/hibernate-resume.c
 @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
                  return EXIT_FAILURE;
          }
@@ -227,11 +227,11 @@
          if (r < 0) {
                  log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
                  return EXIT_FAILURE;
-diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
-index 1f2451f8e1b4..3f676ec2841a 100644
---- a/src/libsystemd/sd-device/sd-device.c
-+++ b/src/libsystemd/sd-device/sd-device.c
-@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
+Index: systemd-stable/src/libsystemd/sd-device/sd-device.c
+===================================================================
+--- systemd-stable.orig/src/libsystemd/sd-device/sd-device.c
++++ systemd-stable/src/libsystemd/sd-device/sd-device.c
+@@ -1877,7 +1877,7 @@ _public_ int sd_device_set_sysattr_value
          if (!value)
                  return -ENOMEM;
  
@@ -240,11 +240,11 @@
          if (r < 0) {
                  if (r == -ELOOP)
                          return -EINVAL;
-diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
-index 52a7ea3c77e9..9703de0dabee 100644
---- a/src/login/logind-dbus.c
-+++ b/src/login/logind-dbus.c
-@@ -1339,7 +1339,7 @@ static int trigger_device(Manager *m, sd_device *d) {
+Index: systemd-stable/src/login/logind-dbus.c
+===================================================================
+--- systemd-stable.orig/src/login/logind-dbus.c
++++ systemd-stable/src/login/logind-dbus.c
+@@ -1341,7 +1341,7 @@ static int trigger_device(Manager *m, sd
                  if (!t)
                          return -ENOMEM;
  
@@ -253,11 +253,11 @@
          }
  
          return 0;
-diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
-index f5048d9473cb..b6383ab5c97e 100644
---- a/src/nspawn/nspawn-cgroup.c
-+++ b/src/nspawn/nspawn-cgroup.c
-@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
+Index: systemd-stable/src/nspawn/nspawn-cgroup.c
+===================================================================
+--- systemd-stable.orig/src/nspawn/nspawn-cgroup.c
++++ systemd-stable/src/nspawn/nspawn-cgroup.c
+@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified
          fn = strjoina(tree, cgroup, "/cgroup.procs");
  
          sprintf(pid_string, PID_FMT, pid);
@@ -266,11 +266,11 @@
          if (r < 0) {
                  log_error_errno(r, "Failed to move process: %m");
                  goto finish;
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 734dee1130e0..71add9a055d2 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -2440,7 +2440,7 @@ static int reset_audit_loginuid(void) {
+Index: systemd-stable/src/nspawn/nspawn.c
+===================================================================
+--- systemd-stable.orig/src/nspawn/nspawn.c
++++ systemd-stable/src/nspawn/nspawn.c
+@@ -2493,7 +2493,7 @@ static int reset_audit_loginuid(void) {
          if (streq(p, "4294967295"))
                  return 0;
  
@@ -279,7 +279,7 @@
          if (r < 0) {
                  log_error_errno(r,
                                  "Failed to reset audit login UID. This probably means that your kernel is too\n"
-@@ -3665,13 +3665,13 @@ static int setup_uid_map(pid_t pid) {
+@@ -3726,13 +3726,13 @@ static int setup_uid_map(pid_t pid) {
  
          xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
          xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range);
@@ -295,11 +295,11 @@
          if (r < 0)
                  return log_error_errno(r, "Failed to write GID map: %m");
  
-diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
-index e8398cbde5ba..ba682ec0c9e7 100644
---- a/src/shared/cgroup-setup.c
-+++ b/src/shared/cgroup-setup.c
-@@ -267,7 +267,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
+Index: systemd-stable/src/shared/cgroup-setup.c
+===================================================================
+--- systemd-stable.orig/src/shared/cgroup-setup.c
++++ systemd-stable/src/shared/cgroup-setup.c
+@@ -267,7 +267,7 @@ int cg_attach(const char *controller, co
  
          xsprintf(c, PID_FMT "\n", pid);
  
@@ -317,11 +317,11 @@
                          if (r < 0) {
                                  log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
                                                  FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
-diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c
-index 8543dbd2d05f..76162599817e 100644
---- a/src/shared/sysctl-util.c
-+++ b/src/shared/sysctl-util.c
-@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c
+Index: systemd-stable/src/shared/sysctl-util.c
+===================================================================
+--- systemd-stable.orig/src/shared/sysctl-util.c
++++ systemd-stable/src/shared/sysctl-util.c
+@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, con
  
          log_debug("Setting '%s' to '%s'", p, value);
  
@@ -330,11 +330,11 @@
  }
  
  int sysctl_read(const char *property, char **content) {
-diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
-index fbfddc0262fc..7cc2902154e9 100644
---- a/src/sleep/sleep.c
-+++ b/src/sleep/sleep.c
-@@ -47,7 +47,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
+Index: systemd-stable/src/sleep/sleep.c
+===================================================================
+--- systemd-stable.orig/src/sleep/sleep.c
++++ systemd-stable/src/sleep/sleep.c
+@@ -48,7 +48,7 @@ static int write_hibernate_location_info
          assert(hibernate_location->swap);
  
          xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno));
@@ -343,7 +343,7 @@
          if (r < 0)
                  return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m",
                                         hibernate_location->swap->device, resume_str);
-@@ -74,7 +74,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
+@@ -75,7 +75,7 @@ static int write_hibernate_location_info
          }
  
          xsprintf(offset_str, "%" PRIu64, hibernate_location->offset);
@@ -352,7 +352,7 @@
          if (r < 0)
                  return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m",
                                         hibernate_location->swap->device, offset_str);
-@@ -91,7 +91,7 @@ static int write_mode(char **modes) {
+@@ -92,7 +92,7 @@ static int write_mode(char **modes) {
          STRV_FOREACH(mode, modes) {
                  int k;
  
@@ -361,7 +361,7 @@
                  if (k >= 0)
                          return 0;
  
-@@ -110,7 +110,7 @@ static int write_state(FILE **f, char **states) {
+@@ -114,7 +114,7 @@ static int write_state(FILE **f, char **
          STRV_FOREACH(state, states) {
                  int k;
  
@@ -370,11 +370,11 @@
                  if (k >= 0)
                          return 0;
                  log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
-diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
-index 60c68b5029cf..fdca03d3d42c 100644
---- a/src/udev/udevadm-trigger.c
-+++ b/src/udev/udevadm-trigger.c
-@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se
+Index: systemd-stable/src/udev/udevadm-trigger.c
+===================================================================
+--- systemd-stable.orig/src/udev/udevadm-trigger.c
++++ systemd-stable/src/udev/udevadm-trigger.c
+@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerato
                  if (!filename)
                          return log_oom();
  
@@ -383,11 +383,11 @@
                  if (r < 0) {
                          bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS);
  
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index ca65474f2763..38780681431a 100644
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -1089,7 +1089,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) {
+Index: systemd-stable/src/udev/udevd.c
+===================================================================
+--- systemd-stable.orig/src/udev/udevd.c
++++ systemd-stable/src/udev/udevd.c
+@@ -1153,7 +1153,7 @@ static int synthesize_change_one(sd_devi
  
          filename = strjoina(syspath, "/uevent");
          log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath);
@@ -396,11 +396,11 @@
          if (r < 0)
                  return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename);
          return 0;
-diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
-index 9d706085fb47..30dcfa86f4d0 100644
---- a/src/vconsole/vconsole-setup.c
-+++ b/src/vconsole/vconsole-setup.c
-@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) {
+Index: systemd-stable/src/vconsole/vconsole-setup.c
+===================================================================
+--- systemd-stable.orig/src/vconsole/vconsole-setup.c
++++ systemd-stable/src/vconsole/vconsole-setup.c
+@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *na
  static int toggle_utf8_sysfs(bool utf8) {
          int r;
  
diff --git a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
index a5e41bf..30fe9a1 100644
--- a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
@@ -17,13 +17,13 @@
  src/shared/format-table.c          | 36 ++++++++++++++++++++----------
  3 files changed, 38 insertions(+), 31 deletions(-)
 
-diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
-index e029f8646eb0..27d68b341cf3 100644
---- a/src/basic/sort-util.h
-+++ b/src/basic/sort-util.h
-@@ -54,17 +54,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn
+Index: systemd-stable/src/basic/sort-util.h
+===================================================================
+--- systemd-stable.orig/src/basic/sort-util.h
++++ systemd-stable/src/basic/sort-util.h
+@@ -54,17 +54,3 @@ static inline void _qsort_safe(void *bas
                  int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
-                 qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
+                 _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
          })
 -
 -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
@@ -39,11 +39,11 @@
 -                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
 -                qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
 -        })
-diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c
-index d790e8fd0b19..42e0fd7c9b3c 100644
---- a/src/libsystemd/sd-hwdb/hwdb-util.c
-+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
-@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) {
+Index: systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c
+===================================================================
+--- systemd-stable.orig/src/libsystemd/sd-hwdb/hwdb-util.c
++++ systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c
+@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie)
  
  DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
  
@@ -60,7 +60,7 @@
  }
  
  static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -158,7 +162,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -158,7 +162,10 @@ static int trie_node_add_value(struct tr
                          .value_off = v,
                  };
  
@@ -72,7 +72,7 @@
                  if (val) {
                          /* At this point we have 2 identical properties on the same match-string.
                           * Since we process files in order, we just replace the previous value. */
-@@ -184,7 +191,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -184,7 +191,9 @@ static int trie_node_add_value(struct tr
                  .line_number = line_number,
          };
          node->values_count++;
@@ -83,11 +83,11 @@
          return 0;
  }
  
-diff --git a/src/shared/format-table.c b/src/shared/format-table.c
-index 425013046491..33c1c5a12d43 100644
---- a/src/shared/format-table.c
-+++ b/src/shared/format-table.c
-@@ -1164,31 +1164,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
+Index: systemd-stable/src/shared/format-table.c
+===================================================================
+--- systemd-stable.orig/src/shared/format-table.c
++++ systemd-stable/src/shared/format-table.c
+@@ -1246,31 +1246,33 @@ static int cell_data_compare(TableData *
          return CMP(index_a, index_b);
  }
  
@@ -131,7 +131,7 @@
          }
  
          /* Order identical lines by the order there were originally added in */
-@@ -1690,7 +1692,12 @@ int table_print(Table *t, FILE *f) {
+@@ -1798,7 +1800,12 @@ int table_print(Table *t, FILE *f) {
                  for (i = 0; i < n_rows; i++)
                          sorted[i] = i * t->n_columns;
  
@@ -145,7 +145,7 @@
          }
  
          if (t->display_map)
-@@ -2236,7 +2243,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
+@@ -2375,7 +2382,12 @@ int table_to_json(Table *t, JsonVariant
                  for (i = 0; i < n_rows; i++)
                          sorted[i] = i * t->n_columns;
  
diff --git a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
index 0dea933..e65c543 100644
--- a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
@@ -22,11 +22,11 @@
  create mode 100644 src/basic/parse-printf-format.c
  create mode 100644 src/basic/parse-printf-format.h
 
-diff --git a/meson.build b/meson.build
-index fc216d22da24..a25996803d64 100644
---- a/meson.build
-+++ b/meson.build
-@@ -640,6 +640,7 @@ endif
+Index: systemd-stable/meson.build
+===================================================================
+--- systemd-stable.orig/meson.build
++++ systemd-stable/meson.build
+@@ -638,6 +638,7 @@ endif
  foreach header : ['crypt.h',
                    'linux/memfd.h',
                    'linux/vm_sockets.h',
@@ -34,11 +34,11 @@
                    'sys/auxv.h',
                    'valgrind/memcheck.h',
                    'valgrind/valgrind.h',
-diff --git a/src/basic/meson.build b/src/basic/meson.build
-index ccb22e159505..25c77ea6bc0e 100644
---- a/src/basic/meson.build
-+++ b/src/basic/meson.build
-@@ -313,6 +313,11 @@ foreach item : [['af',     af_list_txt,     'af',         ''],
+Index: systemd-stable/src/basic/meson.build
+===================================================================
+--- systemd-stable.orig/src/basic/meson.build
++++ systemd-stable/src/basic/meson.build
+@@ -317,6 +317,11 @@ foreach item : [['af',     af_list_txt,
  endforeach
  
  basic_sources += generated_gperf_headers
@@ -50,11 +50,10 @@
  basic_gcrypt_sources = files(
          'gcrypt-util.c',
          'gcrypt-util.h')
-diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
-new file mode 100644
-index 000000000000..49437e544540
+Index: systemd-stable/src/basic/parse-printf-format.c
+===================================================================
 --- /dev/null
-+++ b/src/basic/parse-printf-format.c
++++ systemd-stable/src/basic/parse-printf-format.c
 @@ -0,0 +1,273 @@
 +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 +
@@ -329,11 +328,10 @@
 +
 +        return last;
 +}
-diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
-new file mode 100644
-index 000000000000..47be7522d7fa
+Index: systemd-stable/src/basic/parse-printf-format.h
+===================================================================
 --- /dev/null
-+++ b/src/basic/parse-printf-format.h
++++ systemd-stable/src/basic/parse-printf-format.h
 @@ -0,0 +1,57 @@
 +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 +
@@ -392,10 +390,10 @@
 +size_t parse_printf_format(const char *fmt, size_t n, int *types);
 +
 +#endif /* HAVE_PRINTF_H */
-diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
-index c3b9448d4f4f..2937aa13b178 100644
---- a/src/basic/stdio-util.h
-+++ b/src/basic/stdio-util.h
+Index: systemd-stable/src/basic/stdio-util.h
+===================================================================
+--- systemd-stable.orig/src/basic/stdio-util.h
++++ systemd-stable/src/basic/stdio-util.h
 @@ -1,13 +1,13 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  #pragma once
@@ -411,10 +409,10 @@
  
  #define snprintf_ok(buf, len, fmt, ...) \
          ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len))
-diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
-index 912ecef73cce..43ed756bda53 100644
---- a/src/journal/journal-send.c
-+++ b/src/journal/journal-send.c
+Index: systemd-stable/src/journal/journal-send.c
+===================================================================
+--- systemd-stable.orig/src/journal/journal-send.c
++++ systemd-stable/src/journal/journal-send.c
 @@ -2,7 +2,6 @@
  
  #include <errno.h>
@@ -423,7 +421,7 @@
  #include <stddef.h>
  #include <sys/un.h>
  #include <unistd.h>
-@@ -20,6 +19,7 @@
+@@ -21,6 +20,7 @@
  #include "stdio-util.h"
  #include "string-util.h"
  #include "tmpfile-util.h"
diff --git a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
index ca4f0d5..8e7a2fb 100644
--- a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -1,4 +1,4 @@
-From 85dcaad8f38521ec3dc580794072b601900eed84 Mon Sep 17 00:00:00 2001
+From 7e771de87cf728a8678f1f28f391bba3589e2496 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 14:18:21 +0800
 Subject: [PATCH] src/basic/missing.h: check for missing strndupa
@@ -25,6 +25,7 @@
  src/basic/missing_stdlib.h                 | 12 ++++++++++++
  src/basic/mkdir.c                          |  1 +
  src/basic/parse-util.c                     |  1 +
+ src/basic/path-lookup.c                    |  1 +
  src/basic/proc-cmdline.c                   |  1 +
  src/basic/procfs-util.c                    |  1 +
  src/basic/selinux-util.c                   |  1 +
@@ -52,6 +53,7 @@
  src/nss-mymachines/nss-mymachines.c        |  1 +
  src/portable/portable.c                    |  1 +
  src/resolve/resolvectl.c                   |  1 +
+ src/shared/bus-get-properties.c            |  1 +
  src/shared/bus-unit-procs.c                |  1 +
  src/shared/bus-unit-util.c                 |  1 +
  src/shared/bus-util.c                      |  1 +
@@ -59,20 +61,19 @@
  src/shared/journal-importer.c              |  1 +
  src/shared/logs-show.c                     |  1 +
  src/shared/pager.c                         |  1 +
- src/shared/path-lookup.c                   |  1 +
  src/shared/uid-range.c                     |  1 +
  src/socket-proxy/socket-proxyd.c           |  1 +
  src/test/test-hexdecoct.c                  |  1 +
  src/udev/udev-builtin-path_id.c            |  1 +
  src/udev/udev-event.c                      |  1 +
  src/udev/udev-rules.c                      |  1 +
- 49 files changed, 60 insertions(+)
+ 50 files changed, 61 insertions(+)
 
 diff --git a/meson.build b/meson.build
-index a25996803d64..72b305b5ab58 100644
+index 9187439bdd..bea9935a91 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -529,6 +529,7 @@ foreach ident : [
+@@ -527,6 +527,7 @@ foreach ident : [
                                   #include <unistd.h>
                                   #include <signal.h>
                                   #include <sys/wait.h>'''],
@@ -81,7 +82,7 @@
  
          have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
 diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
-index 048441429025..01d74ea0ed4e 100644
+index 3a644363e1..73946a829b 100644
 --- a/src/backlight/backlight.c
 +++ b/src/backlight/backlight.c
 @@ -17,6 +17,7 @@
@@ -93,19 +94,19 @@
  static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
          const char *subsystem, *sysname, *value;
 diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
-index 54fc6ecf8b20..a5141f4cbedd 100644
+index e94fcfad02..856a7068b0 100644
 --- a/src/basic/cgroup-util.c
 +++ b/src/basic/cgroup-util.c
-@@ -37,6 +37,7 @@
- #include "strv.h"
+@@ -38,6 +38,7 @@
  #include "unit-name.h"
  #include "user-util.h"
+ #include "xattr-util.h"
 +#include "missing_stdlib.h"
  
  static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) {
          _cleanup_free_ char *fs = NULL;
 diff --git a/src/basic/env-util.c b/src/basic/env-util.c
-index b8dc98915f81..5049b37594bc 100644
+index b8dc98915f..5049b37594 100644
 --- a/src/basic/env-util.c
 +++ b/src/basic/env-util.c
 @@ -15,6 +15,7 @@
@@ -117,10 +118,10 @@
  #define VALID_CHARS_ENV_NAME                    \
          DIGITS LETTERS                          \
 diff --git a/src/basic/log.c b/src/basic/log.c
-index 17557e1844b2..6cec4d324aab 100644
+index c6fe203808..b7ef932d28 100644
 --- a/src/basic/log.c
 +++ b/src/basic/log.c
-@@ -34,6 +34,7 @@
+@@ -35,6 +35,7 @@
  #include "terminal-util.h"
  #include "time-util.h"
  #include "utf8.h"
@@ -129,7 +130,7 @@
  #define SNDBUF_SIZE (8*1024*1024)
  
 diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
-index 188a8d44066a..1e16ec287aad 100644
+index 188a8d4406..1e16ec287a 100644
 --- a/src/basic/missing_stdlib.h
 +++ b/src/basic/missing_stdlib.h
 @@ -11,3 +11,15 @@
@@ -149,7 +150,7 @@
 +  })
 +#endif
 diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
-index fa682d4c438e..37902551490a 100644
+index 6ebc2b95fd..88f4359bab 100644
 --- a/src/basic/mkdir.c
 +++ b/src/basic/mkdir.c
 @@ -13,6 +13,7 @@
@@ -158,22 +159,34 @@
  #include "user-util.h"
 +#include "missing_stdlib.h"
  
- int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) {
-         struct stat st;
+ int mkdir_safe_internal(
+                 const char *path,
 diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
-index e0094b0f370a..00da6518124b 100644
+index 44f0438cf4..54b4133343 100644
 --- a/src/basic/parse-util.c
 +++ b/src/basic/parse-util.c
-@@ -18,6 +18,7 @@
- #include "process-util.h"
+@@ -19,6 +19,7 @@
  #include "stat-util.h"
  #include "string-util.h"
+ #include "strv.h"
 +#include "missing_stdlib.h"
  
  int parse_boolean(const char *v) {
          if (!v)
+diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
+index 52968dee34..2f4f7e3dcd 100644
+--- a/src/basic/path-lookup.c
++++ b/src/basic/path-lookup.c
+@@ -15,6 +15,7 @@
+ #include "strv.h"
+ #include "tmpfile-util.h"
+ #include "user-util.h"
++#include "missing_stdlib.h"
+ 
+ int xdg_user_runtime_dir(char **ret, const char *suffix) {
+         const char *e;
 diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
-index 1af58717c686..c1020f4611d4 100644
+index ba47ca5812..8baf728fde 100644
 --- a/src/basic/proc-cmdline.c
 +++ b/src/basic/proc-cmdline.c
 @@ -15,6 +15,7 @@
@@ -185,7 +198,7 @@
  int proc_cmdline(char **ret) {
          const char *e;
 diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
-index 7aaf95bfced2..da7e836f143e 100644
+index 7aaf95bfce..da7e836f14 100644
 --- a/src/basic/procfs-util.c
 +++ b/src/basic/procfs-util.c
 @@ -11,6 +11,7 @@
@@ -197,10 +210,10 @@
  int procfs_tasks_get_limit(uint64_t *ret) {
          _cleanup_free_ char *value = NULL;
 diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c
-index 1095cb426cce..806ef4bd97a9 100644
+index c94ee26bd9..14e35b4653 100644
 --- a/src/basic/selinux-util.c
 +++ b/src/basic/selinux-util.c
-@@ -26,6 +26,7 @@
+@@ -27,6 +27,7 @@
  #include "selinux-util.h"
  #include "stdio-util.h"
  #include "time-util.h"
@@ -209,7 +222,7 @@
  #if HAVE_SELINUX
  DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free);
 diff --git a/src/basic/time-util.c b/src/basic/time-util.c
-index 105584e2e72f..eb0bed47dac3 100644
+index 15cc1b8851..02bb3f01f9 100644
 --- a/src/basic/time-util.c
 +++ b/src/basic/time-util.c
 @@ -26,6 +26,7 @@
@@ -221,7 +234,7 @@
  static clockid_t map_clock_id(clockid_t c) {
  
 diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c
-index b96e1f927fff..cba979baca3e 100644
+index b96e1f927f..cba979baca 100644
 --- a/src/boot/bless-boot.c
 +++ b/src/boot/bless-boot.c
 @@ -18,6 +18,7 @@
@@ -233,7 +246,7 @@
  static char **arg_path = NULL;
  
 diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
-index 27dc9e43c3e2..b1a83023600b 100644
+index b7d2e32639..fdbc1df95e 100644
 --- a/src/core/dbus-cgroup.c
 +++ b/src/core/dbus-cgroup.c
 @@ -15,6 +15,7 @@
@@ -245,7 +258,7 @@
  BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
  
 diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
-index d8ba3e5d9241..729e13fda64c 100644
+index 50f7ada8ce..5c760ee487 100644
 --- a/src/core/dbus-execute.c
 +++ b/src/core/dbus-execute.c
 @@ -41,6 +41,7 @@
@@ -257,7 +270,7 @@
  BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
  static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput);
 diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
-index 7862beaacb6d..3b1ea53a5f0d 100644
+index 951450e53d..50d134e9a1 100644
 --- a/src/core/dbus-util.c
 +++ b/src/core/dbus-util.c
 @@ -7,6 +7,7 @@
@@ -269,10 +282,10 @@
  int bus_property_get_triggered_unit(
                  sd_bus *bus,
 diff --git a/src/core/execute.c b/src/core/execute.c
-index 89dbf6fbd2c1..9762dc57443c 100644
+index 2a4840a3a9..d3f1e0e0f8 100644
 --- a/src/core/execute.c
 +++ b/src/core/execute.c
-@@ -88,6 +88,7 @@
+@@ -89,6 +89,7 @@
  #include "unit.h"
  #include "user-util.h"
  #include "utmp-wtmp.h"
@@ -281,7 +294,7 @@
  #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
  #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
 diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index 09ccd613e32c..f4e64fa283e9 100644
+index 09ccd613e3..f4e64fa283 100644
 --- a/src/core/kmod-setup.c
 +++ b/src/core/kmod-setup.c
 @@ -11,6 +11,7 @@
@@ -293,7 +306,7 @@
  #if HAVE_KMOD
  #include "module-util.h"
 diff --git a/src/core/service.c b/src/core/service.c
-index 17f27a4abce3..e5dcc532d0ce 100644
+index 00e61945ba..1ecab28354 100644
 --- a/src/core/service.c
 +++ b/src/core/service.c
 @@ -41,6 +41,7 @@
@@ -305,7 +318,7 @@
  static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
          [SERVICE_DEAD] = UNIT_INACTIVE,
 diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c
-index 35885dfb47c4..bb9f0660a6a0 100644
+index 35885dfb47..bb9f0660a6 100644
 --- a/src/coredump/coredump-vacuum.c
 +++ b/src/coredump/coredump-vacuum.c
 @@ -16,6 +16,7 @@
@@ -317,7 +330,7 @@
  #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL)           /* 1 MiB */
  #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL)   /* 4 GiB */
 diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
-index 88e42d3a984b..0f08376e5399 100644
+index 77dfdefd64..e21ecbeff8 100644
 --- a/src/journal-remote/journal-remote-main.c
 +++ b/src/journal-remote/journal-remote-main.c
 @@ -22,6 +22,7 @@
@@ -329,7 +342,7 @@
  #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
  #define CERT_FILE     CERTIFICATE_ROOT "/certs/journal-remote.pem"
 diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
-index e5feec83bce6..c3aec1e219d7 100644
+index 8d4897b942..15476b3c83 100644
 --- a/src/journal/journalctl.c
 +++ b/src/journal/journalctl.c
 @@ -69,6 +69,7 @@
@@ -341,7 +354,7 @@
  #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
  #define PROCESS_INOTIFY_INTERVAL 1024   /* Every 1,024 messages processed */
 diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
-index 3fa98dfda237..e655d77e714a 100644
+index 6fb0abb419..2d94d9938e 100644
 --- a/src/journal/sd-journal.c
 +++ b/src/journal/sd-journal.c
 @@ -40,6 +40,7 @@
@@ -353,7 +366,7 @@
  #define JOURNAL_FILES_MAX 7168
  
 diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
-index 73127dfe0253..cc8635dea591 100644
+index 55e35cd902..0ed98f9224 100644
 --- a/src/libsystemd/sd-bus/bus-message.c
 +++ b/src/libsystemd/sd-bus/bus-message.c
 @@ -21,6 +21,7 @@
@@ -365,7 +378,7 @@
  static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
  
 diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
-index 6d140348ec4c..9126b8801bc5 100644
+index 6abac8822c..c74c9cd7fa 100644
 --- a/src/libsystemd/sd-bus/bus-objects.c
 +++ b/src/libsystemd/sd-bus/bus-objects.c
 @@ -13,6 +13,7 @@
@@ -377,7 +390,7 @@
  static int node_vtable_get_userdata(
                  sd_bus *bus,
 diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
-index 18d30d010a20..be2ab703f8ed 100644
+index fc7e8e844a..7af4dd2712 100644
 --- a/src/libsystemd/sd-bus/bus-socket.c
 +++ b/src/libsystemd/sd-bus/bus-socket.c
 @@ -28,6 +28,7 @@
@@ -389,7 +402,7 @@
  #define SNDBUF_SIZE (8*1024*1024)
  
 diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
-index 7ad03680f48d..b9d2181e4910 100644
+index 9de5e454a6..fe86c93c63 100644
 --- a/src/libsystemd/sd-bus/sd-bus.c
 +++ b/src/libsystemd/sd-bus/sd-bus.c
 @@ -41,6 +41,7 @@
@@ -401,7 +414,7 @@
  #define log_debug_bus_message(m)                                         \
          do {                                                             \
 diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
-index 8de0a859ee94..58044b6ba908 100644
+index 8de0a859ee..58044b6ba9 100644
 --- a/src/libsystemd/sd-bus/test-bus-benchmark.c
 +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
 @@ -14,6 +14,7 @@
@@ -413,7 +426,7 @@
  #define MAX_SIZE (2*1024*1024)
  
 diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
-index 30669a9359e5..6544b3722099 100644
+index 233d081300..40a32b9700 100644
 --- a/src/locale/keymap-util.c
 +++ b/src/locale/keymap-util.c
 @@ -21,6 +21,7 @@
@@ -425,7 +438,7 @@
  static bool startswith_comma(const char *s, const char *prefix) {
          s = startswith(s, prefix);
 diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
-index 84bea21ab7be..49720c7f742e 100644
+index 16f4289585..6c5e438b36 100644
 --- a/src/login/pam_systemd.c
 +++ b/src/login/pam_systemd.c
 @@ -31,6 +31,7 @@
@@ -437,7 +450,7 @@
  #include "parse-util.h"
  #include "path-util.h"
 diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
-index bed1e42697c4..e4847c2beea2 100644
+index bed1e42697..e4847c2bee 100644
 --- a/src/network/generator/network-generator.c
 +++ b/src/network/generator/network-generator.c
 @@ -13,6 +13,7 @@
@@ -449,7 +462,7 @@
  /*
    # .network
 diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
-index 5fb5b49bbcc3..785ccc2da307 100644
+index d341fa25aa..91646bc2c2 100644
 --- a/src/nspawn/nspawn-settings.c
 +++ b/src/nspawn/nspawn-settings.c
 @@ -16,6 +16,7 @@
@@ -461,19 +474,19 @@
  Settings *settings_new(void) {
          Settings *s;
 diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
-index 364356da5622..47d4ea44e40f 100644
+index 5db0dcef76..681f8677e4 100644
 --- a/src/nss-mymachines/nss-mymachines.c
 +++ b/src/nss-mymachines/nss-mymachines.c
 @@ -19,6 +19,7 @@
+ #include "nss-util.h"
  #include "signal-util.h"
  #include "string-util.h"
- #include "user-util.h"
 +#include "missing_stdlib.h"
  
  NSS_GETHOSTBYNAME_PROTOTYPES(mymachines);
  NSS_GETPW_PROTOTYPES(mymachines);
 diff --git a/src/portable/portable.c b/src/portable/portable.c
-index e18826ab2685..d9f4b81d8937 100644
+index 3a1367ec2b..f29336cb1e 100644
 --- a/src/portable/portable.c
 +++ b/src/portable/portable.c
 @@ -31,6 +31,7 @@
@@ -485,10 +498,10 @@
  static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile");
  
 diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
-index f20e8c44b8bc..9f6c4e8f49a7 100644
+index 3072b984e5..c46ae374bf 100644
 --- a/src/resolve/resolvectl.c
 +++ b/src/resolve/resolvectl.c
-@@ -33,6 +33,7 @@
+@@ -36,6 +36,7 @@
  #include "strv.h"
  #include "terminal-util.h"
  #include "verbs.h"
@@ -496,8 +509,20 @@
  
  static int arg_family = AF_UNSPEC;
  static int arg_ifindex = 0;
+diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c
+index 8ad4694046..da5082c02a 100644
+--- a/src/shared/bus-get-properties.c
++++ b/src/shared/bus-get-properties.c
+@@ -3,6 +3,7 @@
+ #include "bus-get-properties.h"
+ #include "rlimit-util.h"
+ #include "string-util.h"
++#include "missing_stdlib.h"
+ 
+ int bus_property_get_bool(
+                 sd_bus *bus,
 diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c
-index b21fe393265f..af2640005c1d 100644
+index b21fe39326..af2640005c 100644
 --- a/src/shared/bus-unit-procs.c
 +++ b/src/shared/bus-unit-procs.c
 @@ -10,6 +10,7 @@
@@ -509,10 +534,10 @@
  struct CGroupInfo {
          char *cgroup_path;
 diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
-index 28d85944a8a7..4743a84a417e 100644
+index f2652ed9a5..eb019fc89f 100644
 --- a/src/shared/bus-unit-util.c
 +++ b/src/shared/bus-unit-util.c
-@@ -34,6 +34,7 @@
+@@ -39,6 +39,7 @@
  #include "unit-def.h"
  #include "user-util.h"
  #include "utf8.h"
@@ -521,19 +546,19 @@
  int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
          assert(message);
 diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
-index 8e6a6e2ce2de..0cbf4b1997df 100644
+index 77c1c62182..5cd31f3c15 100644
 --- a/src/shared/bus-util.c
 +++ b/src/shared/bus-util.c
-@@ -30,6 +30,7 @@
+@@ -22,6 +22,7 @@
+ #include "socket-util.h"
  #include "stdio-util.h"
- #include "strv.h"
- #include "user-util.h"
+ /* #include "string-util.h" */
 +#include "missing_stdlib.h"
  
  static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
          sd_event *e = userdata;
 diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
-index b812665315f6..8e68f7f8fc6c 100644
+index b812665315..8e68f7f8fc 100644
 --- a/src/shared/dns-domain.c
 +++ b/src/shared/dns-domain.c
 @@ -23,6 +23,7 @@
@@ -545,7 +570,7 @@
  int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
          const char *n;
 diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
-index 7c4fc7021dec..3fbaf5a63969 100644
+index 7c4fc7021d..3fbaf5a639 100644
 --- a/src/shared/journal-importer.c
 +++ b/src/shared/journal-importer.c
 @@ -14,6 +14,7 @@
@@ -557,19 +582,19 @@
  enum {
          IMPORTER_STATE_LINE = 0,    /* waiting to read, or reading line */
 diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
-index 2bfd0b60c26b..6a1bb3a0760f 100644
+index 899e894ab7..628854ac9c 100644
 --- a/src/shared/logs-show.c
 +++ b/src/shared/logs-show.c
-@@ -39,6 +39,7 @@
- #include "time-util.h"
+@@ -41,6 +41,7 @@
  #include "utf8.h"
  #include "util.h"
+ #include "web-util.h"
 +#include "missing_stdlib.h"
  
  /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
  #define PRINT_LINE_THRESHOLD 3
 diff --git a/src/shared/pager.c b/src/shared/pager.c
-index 1fe9db179176..67954b5cab93 100644
+index e03be6d23b..50e3d1f75c 100644
 --- a/src/shared/pager.c
 +++ b/src/shared/pager.c
 @@ -23,6 +23,7 @@
@@ -580,20 +605,8 @@
  
  static pid_t pager_pid = 0;
  
-diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
-index 5b1620974536..0e7cd1c2af12 100644
---- a/src/shared/path-lookup.c
-+++ b/src/shared/path-lookup.c
-@@ -19,6 +19,7 @@
- #include "tmpfile-util.h"
- #include "user-util.h"
- #include "util.h"
-+#include "missing_stdlib.h"
- 
- int xdg_user_runtime_dir(char **ret, const char *suffix) {
-         const char *e;
 diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
-index 7cb7d8a477e9..8e7d7f9e7ca6 100644
+index 7cb7d8a477..8e7d7f9e7c 100644
 --- a/src/shared/uid-range.c
 +++ b/src/shared/uid-range.c
 @@ -9,6 +9,7 @@
@@ -605,7 +618,7 @@
  static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
          assert(range);
 diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
-index 2ee6fc2f0a6a..4a9934f9c14d 100644
+index b461aead60..9941695ed9 100644
 --- a/src/socket-proxy/socket-proxyd.c
 +++ b/src/socket-proxy/socket-proxyd.c
 @@ -26,6 +26,7 @@
@@ -617,7 +630,7 @@
  #define BUFFER_SIZE (256 * 1024)
  
 diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
-index 52217429b154..70708dedf318 100644
+index 52217429b1..70708dedf3 100644
 --- a/src/test/test-hexdecoct.c
 +++ b/src/test/test-hexdecoct.c
 @@ -6,6 +6,7 @@
@@ -629,7 +642,7 @@
  static void test_hexchar(void) {
          assert_se(hexchar(0xa) == 'a');
 diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
-index ca38f5608791..9d8cf4d2807b 100644
+index 6c020ac0ed..10723ec46c 100644
 --- a/src/udev/udev-builtin-path_id.c
 +++ b/src/udev/udev-builtin-path_id.c
 @@ -22,6 +22,7 @@
@@ -641,7 +654,7 @@
  _printf_(2,3)
  static void path_prepend(char **path, const char *fmt, ...) {
 diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
-index eb51139e519c..977cc16e9d7c 100644
+index e1c2baf7f2..62d4086802 100644
 --- a/src/udev/udev-event.c
 +++ b/src/udev/udev-event.c
 @@ -34,6 +34,7 @@
@@ -653,7 +666,7 @@
  typedef struct Spawn {
          sd_device *device;
 diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
-index b9b350d1ef7a..2c114cc77572 100644
+index c36f032f66..36970813d8 100644
 --- a/src/udev/udev-rules.c
 +++ b/src/udev/udev-rules.c
 @@ -30,6 +30,7 @@
diff --git a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
index 9142d7b..abc438e 100644
--- a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
@@ -52,10 +52,10 @@
  src/udev/udev-builtin-net_setup_link.c    | 1 +
  19 files changed, 18 insertions(+), 4 deletions(-)
 
-diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
-index eac2e725cce7..1beae7ba91cc 100644
---- a/src/libsystemd-network/sd-dhcp6-client.c
-+++ b/src/libsystemd-network/sd-dhcp6-client.c
+Index: systemd-stable/src/libsystemd-network/sd-dhcp6-client.c
+===================================================================
+--- systemd-stable.orig/src/libsystemd-network/sd-dhcp6-client.c
++++ systemd-stable/src/libsystemd-network/sd-dhcp6-client.c
 @@ -5,7 +5,6 @@
  
  #include <errno.h>
@@ -64,10 +64,10 @@
  #include <linux/if_infiniband.h>
  
  #include "sd-dhcp6-client.h"
-diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
-index e35127a4cd2e..4f6ad9ef5886 100644
---- a/src/libsystemd/sd-netlink/netlink-types.c
-+++ b/src/libsystemd/sd-netlink/netlink-types.c
+Index: systemd-stable/src/libsystemd/sd-netlink/netlink-types.c
+===================================================================
+--- systemd-stable.orig/src/libsystemd/sd-netlink/netlink-types.c
++++ systemd-stable/src/libsystemd/sd-netlink/netlink-types.c
 @@ -3,6 +3,7 @@
  #include <netinet/in.h>
  #include <stdint.h>
@@ -76,10 +76,10 @@
  #include <linux/can/vxcan.h>
  #include <linux/netlink.h>
  #include <linux/rtnetlink.h>
-diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
-index a2990452af17..5af350883c28 100644
---- a/src/machine/machine-dbus.c
-+++ b/src/machine/machine-dbus.c
+Index: systemd-stable/src/machine/machine-dbus.c
+===================================================================
+--- systemd-stable.orig/src/machine/machine-dbus.c
++++ systemd-stable/src/machine/machine-dbus.c
 @@ -3,6 +3,7 @@
  #include <errno.h>
  #include <sys/mount.h>
@@ -88,21 +88,21 @@
  
  /* When we include libgen.h because we need dirname() we immediately
   * undefine basename() since libgen.h defines it as a macro to the POSIX
-diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
-index 8df39e35843f..8d697894f970 100644
---- a/src/network/netdev/bond.c
-+++ b/src/network/netdev/bond.c
+Index: systemd-stable/src/network/netdev/bond.c
+===================================================================
+--- systemd-stable.orig/src/network/netdev/bond.c
++++ systemd-stable/src/network/netdev/bond.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
 +#include <netinet/if_ether.h>
  #include "alloc-util.h"
  #include "bond.h"
- #include "conf-parser.h"
-diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
-index 6b8f9944612e..7f81ec25c407 100644
---- a/src/network/netdev/bridge.c
-+++ b/src/network/netdev/bridge.c
+ #include "bond-util.h"
+Index: systemd-stable/src/network/netdev/bridge.c
+===================================================================
+--- systemd-stable.orig/src/network/netdev/bridge.c
++++ systemd-stable/src/network/netdev/bridge.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
@@ -110,10 +110,10 @@
  #include <net/if.h>
  
  #include "bridge.h"
-diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
-index 7d1fec3afe6d..e948a335336d 100644
---- a/src/network/netdev/macsec.c
-+++ b/src/network/netdev/macsec.c
+Index: systemd-stable/src/network/netdev/macsec.c
+===================================================================
+--- systemd-stable.orig/src/network/netdev/macsec.c
++++ systemd-stable/src/network/netdev/macsec.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
@@ -121,10 +121,10 @@
  #include <netinet/in.h>
  #include <linux/if_ether.h>
  #include <linux/if_macsec.h>
-diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf
-index 09a5f4822e03..873299b1f98a 100644
---- a/src/network/netdev/netdev-gperf.gperf
-+++ b/src/network/netdev/netdev-gperf.gperf
+Index: systemd-stable/src/network/netdev/netdev-gperf.gperf
+===================================================================
+--- systemd-stable.orig/src/network/netdev/netdev-gperf.gperf
++++ systemd-stable/src/network/netdev/netdev-gperf.gperf
 @@ -2,6 +2,7 @@
  #if __GNUC__ >= 7
  _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
@@ -133,21 +133,21 @@
  #include <stddef.h>
  #include "bond.h"
  #include "bridge.h"
-diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
-index f8121a48ed92..437f411c61e8 100644
---- a/src/network/netdev/netdev.c
-+++ b/src/network/netdev/netdev.c
+Index: systemd-stable/src/network/netdev/netdev.c
+===================================================================
+--- systemd-stable.orig/src/network/netdev/netdev.c
++++ systemd-stable/src/network/netdev/netdev.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
 +#include <netinet/if_ether.h>
  #include <net/if.h>
  #include <netinet/in.h>
- 
-diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
-index 41f09287f2b7..b67ce4fc8844 100644
---- a/src/network/networkd-brvlan.c
-+++ b/src/network/networkd-brvlan.c
+ #include <unistd.h>
+Index: systemd-stable/src/network/networkd-brvlan.c
+===================================================================
+--- systemd-stable.orig/src/network/networkd-brvlan.c
++++ systemd-stable/src/network/networkd-brvlan.c
 @@ -4,6 +4,7 @@
  ***/
  
@@ -156,11 +156,11 @@
  #include <linux/if_bridge.h>
  #include <stdbool.h>
  
-diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
-index 8664d8cdc0d4..e9f91f74c1a1 100644
---- a/src/network/networkd-dhcp-common.c
-+++ b/src/network/networkd-dhcp-common.c
-@@ -4,6 +4,7 @@
+Index: systemd-stable/src/network/networkd-dhcp-common.c
+===================================================================
+--- systemd-stable.orig/src/network/networkd-dhcp-common.c
++++ systemd-stable/src/network/networkd-dhcp-common.c
+@@ -5,6 +5,7 @@
  #include "escape.h"
  #include "in-addr-util.h"
  #include "networkd-dhcp-common.h"
@@ -168,10 +168,10 @@
  #include "networkd-network.h"
  #include "parse-util.h"
  #include "string-table.h"
-diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
-index 13e3e32f40e8..5394399c9150 100644
---- a/src/network/networkd-dhcp4.c
-+++ b/src/network/networkd-dhcp4.c
+Index: systemd-stable/src/network/networkd-dhcp4.c
+===================================================================
+--- systemd-stable.orig/src/network/networkd-dhcp4.c
++++ systemd-stable/src/network/networkd-dhcp4.c
 @@ -1,9 +1,9 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
@@ -181,12 +181,12 @@
  #include <linux/if.h>
 -#include <linux/if_arp.h>
  
+ #include "escape.h"
  #include "alloc-util.h"
- #include "dhcp-client-internal.h"
-diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
-index 7304270c60b1..099064f64715 100644
---- a/src/network/networkd-dhcp6.c
-+++ b/src/network/networkd-dhcp6.c
+Index: systemd-stable/src/network/networkd-dhcp6.c
+===================================================================
+--- systemd-stable.orig/src/network/networkd-dhcp6.c
++++ systemd-stable/src/network/networkd-dhcp6.c
 @@ -3,9 +3,9 @@
    Copyright © 2014 Intel Corporation. All rights reserved.
  ***/
@@ -195,13 +195,13 @@
  #include <netinet/in.h>
  #include <linux/if.h>
 -#include <linux/if_arp.h>
- #include "sd-radv.h"
  
  #include "sd-dhcp6-client.h"
-diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
-index 99d4b29c31ec..e8b467d6ac09 100644
---- a/src/network/networkd-link.c
-+++ b/src/network/networkd-link.c
+ 
+Index: systemd-stable/src/network/networkd-link.c
+===================================================================
+--- systemd-stable.orig/src/network/networkd-link.c
++++ systemd-stable/src/network/networkd-link.c
 @@ -1,8 +1,8 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
@@ -209,13 +209,13 @@
  #include <netinet/in.h>
  #include <linux/if.h>
 -#include <linux/if_arp.h>
+ #include <linux/if_link.h>
  #include <unistd.h>
  
- #include "alloc-util.h"
-diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
-index 2e716b291e97..56f18cea57fe 100644
---- a/src/network/networkd-network.c
-+++ b/src/network/networkd-network.c
+Index: systemd-stable/src/network/networkd-network.c
+===================================================================
+--- systemd-stable.orig/src/network/networkd-network.c
++++ systemd-stable/src/network/networkd-network.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
@@ -223,19 +223,19 @@
  #include <net/if.h>
  #include <netinet/in.h>
  #include <linux/netdevice.h>
-diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c
-index 25b939639775..530e4928835c 100644
---- a/src/network/test-network-tables.c
-+++ b/src/network/test-network-tables.c
+Index: systemd-stable/src/network/test-network-tables.c
+===================================================================
+--- systemd-stable.orig/src/network/test-network-tables.c
++++ systemd-stable/src/network/test-network-tables.c
 @@ -1,3 +1,4 @@
 +#include <netinet/if_ether.h>
  #include "bond.h"
  #include "dhcp6-internal.h"
  #include "dhcp6-protocol.h"
-diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
-index 00a71d64a638..4593e89120b8 100644
---- a/src/shared/ethtool-util.c
-+++ b/src/shared/ethtool-util.c
+Index: systemd-stable/src/shared/ethtool-util.c
+===================================================================
+--- systemd-stable.orig/src/shared/ethtool-util.c
++++ systemd-stable/src/shared/ethtool-util.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
@@ -243,10 +243,10 @@
  #include <net/if.h>
  #include <sys/ioctl.h>
  #include <linux/ethtool.h>
-diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
-index c1d5d7590ef9..b3e018bf76e9 100644
---- a/src/shared/ethtool-util.h
-+++ b/src/shared/ethtool-util.h
+Index: systemd-stable/src/shared/ethtool-util.h
+===================================================================
+--- systemd-stable.orig/src/shared/ethtool-util.h
++++ systemd-stable/src/shared/ethtool-util.h
 @@ -3,6 +3,7 @@
  
  #include <macro.h>
@@ -255,21 +255,21 @@
  #include <linux/ethtool.h>
  
  #include "conf-parser.h"
-diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
-index 0332e99269c9..ff3aead4a779 100644
---- a/src/udev/net/link-config.c
-+++ b/src/udev/net/link-config.c
+Index: systemd-stable/src/udev/net/link-config.c
+===================================================================
+--- systemd-stable.orig/src/udev/net/link-config.c
++++ systemd-stable/src/udev/net/link-config.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
 +#include <netinet/if_ether.h>
  #include <linux/netdevice.h>
  #include <netinet/ether.h>
- 
-diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
-index ee3ca9fa3846..9aa4e828741f 100644
---- a/src/udev/udev-builtin-net_setup_link.c
-+++ b/src/udev/udev-builtin-net_setup_link.c
+ #include <unistd.h>
+Index: systemd-stable/src/udev/udev-builtin-net_setup_link.c
+===================================================================
+--- systemd-stable.orig/src/udev/udev-builtin-net_setup_link.c
++++ systemd-stable/src/udev/udev-builtin-net_setup_link.c
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
diff --git a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
index 580c49f..dd6eceb 100644
--- a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
@@ -23,10 +23,10 @@
  src/tmpfiles/tmpfiles.c   | 10 ++++++++++
  3 files changed, 38 insertions(+)
 
-diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
-index e3aa6c2e152b..38070b79c83a 100644
---- a/src/basic/glob-util.c
-+++ b/src/basic/glob-util.c
+Index: systemd-stable/src/basic/glob-util.c
+===================================================================
+--- systemd-stable.orig/src/basic/glob-util.c
++++ systemd-stable/src/basic/glob-util.c
 @@ -12,6 +12,12 @@
  #include "path-util.h"
  #include "strv.h"
@@ -48,7 +48,7 @@
          /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
          assert(!(flags & GLOB_ALTDIRFUNC));
  
-@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
+@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag
                  pglob->gl_lstat = lstat;
          if (!pglob->gl_stat)
                  pglob->gl_stat = stat;
@@ -63,10 +63,10 @@
          if (k == GLOB_NOMATCH)
                  return -ENOENT;
          if (k == GLOB_NOSPACE)
-diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
-index 667d15335fbf..76a84443aacf 100644
---- a/src/test/test-glob-util.c
-+++ b/src/test/test-glob-util.c
+Index: systemd-stable/src/test/test-glob-util.c
+===================================================================
+--- systemd-stable.orig/src/test/test-glob-util.c
++++ systemd-stable/src/test/test-glob-util.c
 @@ -12,6 +12,12 @@
  #include "rm-rf.h"
  #include "tmpfile-util.h"
@@ -114,11 +114,11 @@
          assert_se(r == GLOB_NOMATCH);
  
          (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
-diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
-index 193ed0bc781b..2f94fd2efd8f 100644
---- a/src/tmpfiles/tmpfiles.c
-+++ b/src/tmpfiles/tmpfiles.c
-@@ -58,6 +58,12 @@
+Index: systemd-stable/src/tmpfiles/tmpfiles.c
+===================================================================
+--- systemd-stable.orig/src/tmpfiles/tmpfiles.c
++++ systemd-stable/src/tmpfiles/tmpfiles.c
+@@ -59,6 +59,12 @@
  #include "umask-util.h"
  #include "user-util.h"
  
@@ -131,7 +131,7 @@
  /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
   * them in the file system. This is intended to be used to create
   * properly owned directories beneath /tmp, /var/tmp, /run, which are
-@@ -1850,7 +1856,9 @@ finish:
+@@ -1867,7 +1873,9 @@ finish:
  
  static int glob_item(Item *i, action_t action) {
          _cleanup_globfree_ glob_t g = {
@@ -141,7 +141,7 @@
          };
          int r = 0, k;
          char **fn;
-@@ -1870,7 +1878,9 @@ static int glob_item(Item *i, action_t action) {
+@@ -1887,7 +1895,9 @@ static int glob_item(Item *i, action_t a
  
  static int glob_item_recursively(Item *i, fdaction_t action) {
          _cleanup_globfree_ glob_t g = {
diff --git a/poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
index 5ee501f..1505516 100644
--- a/poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -11,10 +11,10 @@
  src/basic/process-util.c | 7 +++++++
  1 file changed, 7 insertions(+)
 
-diff --git a/src/basic/process-util.c b/src/basic/process-util.c
-index 5de366f830e8..644f53aee005 100644
---- a/src/basic/process-util.c
-+++ b/src/basic/process-util.c
+Index: systemd-stable/src/basic/process-util.c
+===================================================================
+--- systemd-stable.orig/src/basic/process-util.c
++++ systemd-stable/src/basic/process-util.c
 @@ -18,6 +18,9 @@
  #if HAVE_VALGRIND_VALGRIND_H
  #include <valgrind/valgrind.h>
@@ -25,7 +25,7 @@
  
  #include "alloc-util.h"
  #include "architecture.h"
-@@ -1116,11 +1119,15 @@ void reset_cached_pid(void) {
+@@ -1143,11 +1146,15 @@ void reset_cached_pid(void) {
          cached_pid = CACHED_PID_UNSET;
  }
  
diff --git a/poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch b/poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
index e5d9515..a6fcd2f 100644
--- a/poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
@@ -27,11 +27,11 @@
  src/core/execute.c      |  4 ++--
  3 files changed, 8 insertions(+), 14 deletions(-)
 
-diff --git a/src/basic/format-util.h b/src/basic/format-util.h
-index c47fa76ea8ff..14a78d9f5fd0 100644
---- a/src/basic/format-util.h
-+++ b/src/basic/format-util.h
-@@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t));
+Index: systemd-stable/src/basic/format-util.h
+===================================================================
+--- systemd-stable.orig/src/basic/format-util.h
++++ systemd-stable/src/basic/format-util.h
+@@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32
  #  define PRI_TIMEX "li"
  #endif
  
@@ -46,11 +46,11 @@
  
  #if SIZEOF_DEV_T == 8
  #  define DEV_FMT "%" PRIu64
-diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
-index 2dc13eabc30d..0633cc67f417 100644
---- a/src/basic/rlimit-util.c
-+++ b/src/basic/rlimit-util.c
-@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
+Index: systemd-stable/src/basic/rlimit-util.c
+===================================================================
+--- systemd-stable.orig/src/basic/rlimit-util.c
++++ systemd-stable/src/basic/rlimit-util.c
+@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *r
          if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
                  s = strdup("infinity");
          else if (rl->rlim_cur >= RLIM_INFINITY)
@@ -77,11 +77,11 @@
  
          return 1;
  }
-diff --git a/src/core/execute.c b/src/core/execute.c
-index 9762dc57443c..4a3421bb3ee6 100644
---- a/src/core/execute.c
-+++ b/src/core/execute.c
-@@ -4567,9 +4567,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
+Index: systemd-stable/src/core/execute.c
+===================================================================
+--- systemd-stable.orig/src/core/execute.c
++++ systemd-stable/src/core/execute.c
+@@ -4686,9 +4686,9 @@ void exec_context_dump(const ExecContext
          for (i = 0; i < RLIM_NLIMITS; i++)
                  if (c->rlimit[i]) {
                          fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
diff --git a/poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index efeef07..0a7594c 100644
--- a/poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -31,13 +31,13 @@
  src/shared/base-filesystem.c |  6 +++---
  2 files changed, 24 insertions(+), 4 deletions(-)
 
-diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
-index 78d68be9fd85..c5dc84d41868 100644
---- a/src/basic/fs-util.h
-+++ b/src/basic/fs-util.h
-@@ -40,7 +40,27 @@ int fchmod_opath(int fd, mode_t m);
- 
+Index: systemd-stable/src/basic/fs-util.h
+===================================================================
+--- systemd-stable.orig/src/basic/fs-util.h
++++ systemd-stable/src/basic/fs-util.h
+@@ -42,7 +42,27 @@ int fchmod_opath(int fd, mode_t m);
  int fd_warn_permissions(const char *path, int fd);
+ int stat_warn_permissions(const char *path, const struct stat *st);
  
 -#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
 +/*
@@ -64,11 +64,11 @@
  
  int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
  int touch(const char *path);
-diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
-index 657407da2d37..fbd5782d84fc 100644
---- a/src/shared/base-filesystem.c
-+++ b/src/shared/base-filesystem.c
-@@ -54,7 +54,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+Index: systemd-stable/src/shared/base-filesystem.c
+===================================================================
+--- systemd-stable.orig/src/shared/base-filesystem.c
++++ systemd-stable/src/shared/base-filesystem.c
+@@ -54,7 +54,7 @@ int base_filesystem_create(const char *r
                  return log_error_errno(errno, "Failed to open root file system: %m");
  
          for (i = 0; i < ELEMENTSOF(table); i ++) {
@@ -77,7 +77,7 @@
                          continue;
  
                  if (table[i].target) {
-@@ -62,7 +62,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+@@ -62,7 +62,7 @@ int base_filesystem_create(const char *r
  
                          /* check if one of the targets exists */
                          NULSTR_FOREACH(s, table[i].target) {
@@ -86,7 +86,7 @@
                                          continue;
  
                                  /* check if a specific file exists at the target path */
-@@ -73,7 +73,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
+@@ -73,7 +73,7 @@ int base_filesystem_create(const char *r
                                          if (!p)
                                                  return log_oom();
  
diff --git a/poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
index 19a3eef..67d5041 100644
--- a/poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -14,10 +14,10 @@
  src/machine/machine-dbus.c | 5 +++++
  1 file changed, 5 insertions(+)
 
-diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
-index 760ccb445cd0..0df20f3864b3 100644
---- a/src/machine/machine-dbus.c
-+++ b/src/machine/machine-dbus.c
+Index: systemd-stable/src/machine/machine-dbus.c
+===================================================================
+--- systemd-stable.orig/src/machine/machine-dbus.c
++++ systemd-stable/src/machine/machine-dbus.c
 @@ -11,6 +11,11 @@
  #include <libgen.h>
  #undef basename
@@ -29,4 +29,4 @@
 +
  #include "alloc-util.h"
  #include "bus-common-errors.h"
- #include "bus-internal.h"
+ #include "bus-get-properties.h"
diff --git a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
index 1934b78..3d456ec 100644
--- a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -24,11 +24,11 @@
  src/basic/process-util.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/src/basic/process-util.c b/src/basic/process-util.c
-index 644f53aee005..acaf13591396 100644
---- a/src/basic/process-util.c
-+++ b/src/basic/process-util.c
-@@ -1500,7 +1500,7 @@ int set_oom_score_adjust(int value) {
+Index: systemd-stable/src/basic/process-util.c
+===================================================================
+--- systemd-stable.orig/src/basic/process-util.c
++++ systemd-stable/src/basic/process-util.c
+@@ -1536,7 +1536,7 @@ int set_oom_score_adjust(int value) {
          sprintf(t, "%i", value);
  
          return write_string_file("/proc/self/oom_score_adj", t,
diff --git a/poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
index 84a492f..48fd007 100644
--- a/poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
@@ -24,11 +24,11 @@
  src/libsystemd/sd-bus/bus-error.c | 5 +++++
  2 files changed, 10 insertions(+)
 
-diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
-index 43ed756bda53..227ea64dbb48 100644
---- a/src/journal/journal-send.c
-+++ b/src/journal/journal-send.c
-@@ -336,7 +336,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove
+Index: systemd-stable/src/journal/journal-send.c
+===================================================================
+--- systemd-stable.orig/src/journal/journal-send.c
++++ systemd-stable/src/journal/journal-send.c
+@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co
                  char* j;
  
                  errno = 0;
@@ -41,11 +41,11 @@
                  if (errno == 0) {
                          char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1];
  
-diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
-index f760f0fdd21c..28a5159c4480 100644
---- a/src/libsystemd/sd-bus/bus-error.c
-+++ b/src/libsystemd/sd-bus/bus-error.c
-@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
+Index: systemd-stable/src/libsystemd/sd-bus/bus-error.c
+===================================================================
+--- systemd-stable.orig/src/libsystemd/sd-bus/bus-error.c
++++ systemd-stable/src/libsystemd/sd-bus/bus-error.c
+@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_er
                          return;
  
                  errno = 0;
diff --git a/poky/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch b/poky/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch
new file mode 100644
index 0000000..67d9162
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch
@@ -0,0 +1,23 @@
+From 190854c2114dc6e74c8859dc251e3737e3c0f353 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alex.kiernan@gmail.com>
+Date: Fri, 7 Aug 2020 15:19:27 +0000
+Subject: [PATCH] Handle missing LOCK_EX
+
+Upstream-Status: Inappropriate [musl specific]
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ src/partition/makefs.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/partition/makefs.c b/src/partition/makefs.c
+index 97f50c9033..7f55acd229 100644
+--- a/src/partition/makefs.c
++++ b/src/partition/makefs.c
+@@ -5,6 +5,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <sys/file.h>
+ 
+ #include "alloc-util.h"
+ #include "blockdev-util.h"
diff --git a/poky/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/poky/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
new file mode 100644
index 0000000..d57ca1f
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
@@ -0,0 +1,37 @@
+From 328c39fae2631deb5737dd56f46159dd6b4cdbed Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alex.kiernan@gmail.com>
+Date: Fri, 7 Aug 2020 15:20:17 +0000
+Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un *
+
+| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c: In function 'cant_be_in_netns':
+| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:4893:25: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types]
+|  4893 |         if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
+|       |                         ^~~~~~
+|       |                         |
+|       |                         struct sockaddr_un *
+| In file included from ../../../../../../workspace/sources/systemd/src/systemd/sd-daemon.h:22,
+|                  from ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:21:
+| /home/ubuntu/poky/build/tmp/work/core2-64-poky-linux-musl/systemd/1_246-r0/recipe-sysroot/usr/include/sys/socket.h:384:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *'
+|   384 | int connect (int, const struct sockaddr *, socklen_t);
+|       |                   ^~~~~~~~~~~~~~~~~~~~~~~
+| cc1: some warnings being treated as errors
+
+Upstream-Status: Inappropriate [musl specific]
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ src/nspawn/nspawn.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index 0450c9f795..7305db04ef 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -4890,7 +4890,7 @@ static int cant_be_in_netns(void) {
+         if (fd < 0)
+                 return log_error_errno(errno, "Failed to allocate udev control socket: %m");
+ 
+-        if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
++        if (connect(fd, (struct sockaddr *)&sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
+ 
+                 if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno))
+                         return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
diff --git a/poky/meta/recipes-core/systemd/systemd/0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch b/poky/meta/recipes-core/systemd/systemd/0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch
new file mode 100644
index 0000000..7866069
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch
@@ -0,0 +1,31 @@
+From f939d3e07e1175caac5cf4cbf54bd8a58c2f198a Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alex.kiernan@gmail.com>
+Date: Fri, 7 Aug 2020 15:30:52 +0000
+Subject: [PATCH] Fix field 'efi_loader_entry_one_shot_stat' has incomplete
+ type
+
+| In file included from ../../../../../../workspace/sources/systemd/src/login/logind-gperf.gperf:7:
+| ../../../../../../workspace/sources/systemd/src/login/logind.h:131:21: error: field 'efi_loader_entry_one_shot_stat' has incomplete type
+|   131 |         struct stat efi_loader_entry_one_shot_stat;
+|       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Inappropriate [musl specific]
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ src/login/logind.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/login/logind.h b/src/login/logind.h
+index e64ecce8e2..2d4007d84b 100644
+--- a/src/login/logind.h
++++ b/src/login/logind.h
+@@ -2,6 +2,9 @@
+ #pragma once
+ 
+ #include <stdbool.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
+ 
+ #include "sd-bus.h"
+ #include "sd-device.h"
diff --git a/poky/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch b/poky/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch
deleted file mode 100644
index 7b5e3e7..0000000
--- a/poky/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 156a5fd297b61bce31630d7a52c15614bf784843 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sun, 31 May 2020 18:21:09 +0200
-Subject: [PATCH 1/1] basic/user-util: always use base 10 for user/group
- numbers
-
-We would parse numbers with base prefixes as user identifiers. For example,
-"0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be
-interpreted as UID==1000. This parsing was used also in cases where either a
-user/group name or number may be specified. This means that names like
-0x2b3bfa0 would be ambiguous: they are a valid user name according to our
-documented relaxed rules, but they would also be parsed as numeric uids.
-
-This behaviour is definitely not expected by users, since tools generally only
-accept decimal numbers (e.g. id, getent passwd), while other tools only accept
-user names and thus will interpret such strings as user names without even
-attempting to convert them to numbers (su, ssh). So let's follow suit and only
-accept numbers in decimal notation. Effectively this means that we will reject
-such strings as a username/uid/groupname/gid where strict mode is used, and try
-to look up a user/group with such a name in relaxed mode.
-
-Since the function changed is fairly low-level and fairly widely used, this
-affects multiple tools: loginctl show-user/enable-linger/disable-linger foo',
-the third argument in sysusers.d, fourth and fifth arguments in tmpfiles.d,
-etc.
-
-Fixes #15985.
----
- src/basic/user-util.c     |  2 +-
- src/test/test-user-util.c | 10 ++++++++++
- 2 files changed, 11 insertions(+), 1 deletion(-)
-
---- end of commit 156a5fd297b61bce31630d7a52c15614bf784843 ---
-
-
-Add definition of safe_atou32_full() from commit b934ac3d6e7dcad114776ef30ee9098693e7ab7e
-
-CVE: CVE-2020-13776
-
-Upstream-Status: Backport [https://github.com/systemd/systemd.git]
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-
-
---- git.orig/src/basic/user-util.c
-+++ git/src/basic/user-util.c
-@@ -49,7 +49,7 @@ int parse_uid(const char *s, uid_t *ret)
-         assert(s);
- 
-         assert_cc(sizeof(uid_t) == sizeof(uint32_t));
--        r = safe_atou32(s, &uid);
-+        r = safe_atou32_full(s, 10, &uid);
-         if (r < 0)
-                 return r;
- 
---- git.orig/src/test/test-user-util.c
-+++ git/src/test/test-user-util.c
-@@ -48,9 +48,19 @@ static void test_parse_uid(void) {
- 
-         r = parse_uid("65535", &uid);
-         assert_se(r == -ENXIO);
-+        assert_se(uid == 100);
-+
-+        r = parse_uid("0x1234", &uid);
-+        assert_se(r == -EINVAL);
-+        assert_se(uid == 100);
-+
-+        r = parse_uid("01234", &uid);
-+        assert_se(r == 0);
-+        assert_se(uid == 1234);
- 
-         r = parse_uid("asdsdas", &uid);
-         assert_se(r == -EINVAL);
-+        assert_se(uid == 1234);
- }
- 
- static void test_uid_ptr(void) {
---- git.orig/src/basic/parse-util.h
-+++ git/src/basic/parse-util.h
-@@ -45,9 +45,13 @@ static inline int safe_atoux16(const cha
- 
- int safe_atoi16(const char *s, int16_t *ret);
- 
--static inline int safe_atou32(const char *s, uint32_t *ret_u) {
-+static inline int safe_atou32_full(const char *s, unsigned base, uint32_t *ret_u) {
-         assert_cc(sizeof(uint32_t) == sizeof(unsigned));
--        return safe_atou(s, (unsigned*) ret_u);
-+        return safe_atou_full(s, base, (unsigned*) ret_u);
-+}
-+
-+static inline int safe_atou32(const char *s, uint32_t *ret_u) {
-+        return safe_atou32_full(s, 0, (unsigned*) ret_u);
- }
- 
- static inline int safe_atoi32(const char *s, int32_t *ret_i) {
diff --git a/poky/meta/recipes-core/systemd/systemd_245.6.bb b/poky/meta/recipes-core/systemd/systemd_246.2.bb
similarity index 98%
rename from poky/meta/recipes-core/systemd/systemd_245.6.bb
rename to poky/meta/recipes-core/systemd/systemd_246.2.bb
index cdafb98..704a36e 100644
--- a/poky/meta/recipes-core/systemd/systemd_245.6.bb
+++ b/poky/meta/recipes-core/systemd/systemd_246.2.bb
@@ -20,7 +20,7 @@
            file://99-default.preset \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
-           file://CVE-2020-13776.patch \
+           file://0001-Use-PREFIX-ROOTPREFIX-correctly.patch \
            "
 
 # patches needed by musl
@@ -43,6 +43,9 @@
                file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
                file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \
                file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \
+               file://0021-Handle-missing-LOCK_EX.patch \
+               file://0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \
+               file://0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch \
                file://0024-test-json.c-define-M_PIl.patch \
                file://0001-do-not-disable-buffer-in-writing-files.patch \
                file://0002-src-login-brightness.c-include-sys-wait.h.patch \
@@ -605,6 +608,7 @@
                ${rootlibexecdir}/udev/v4l_id \
                ${rootlibexecdir}/udev/keymaps \
                ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
+               ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \
                ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
                ${rootlibexecdir}/udev/rules.d/60-block.rules \
                ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
diff --git a/poky/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch b/poky/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
index bd4444b..5c39fb0 100644
--- a/poky/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
+++ b/poky/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
@@ -1,4 +1,4 @@
-From 7276275d9a08d5ae268fb263027bbc60bc0ab2e8 Mon Sep 17 00:00:00 2001
+From c3a068cf24a22bea7349849ec111ae8d91a54db4 Mon Sep 17 00:00:00 2001
 From: Jeff Dike <jdike@x86_64.user-mode-linux.org>
 Date: Wed, 14 Jul 2010 14:35:52 -0400
 Subject: [PATCH] sysvinit - Remove sulogin dependency on /usr/lib*/libcrypt.a
@@ -11,24 +11,26 @@
 # - jdike@linux.intel.com
 
 ---
- src/Makefile | 9 ++-------
- 1 file changed, 2 insertions(+), 7 deletions(-)
+ src/Makefile | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
 
 diff --git a/src/Makefile b/src/Makefile
-index 1380d7f..628e77f 100644
+index 5b1a5a2..b686394 100644
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -97,13 +97,8 @@ else
+@@ -97,15 +97,8 @@ else
  endif
  
  # Additional libs for GNU libc.
--ifneq ($(wildcard /usr/lib*/libcrypt.*),)
+-ifneq ($(wildcard $(ROOT)/usr/lib*/libcrypt.*),)
 -  SULOGINLIBS	+= -lcrypt
 -endif
 -
 -# Additional libs for GNU libc / multiarch on Debian based systems.
--ifneq ($(wildcard /usr/lib/*/libcrypt.*),)
+-ifneq ($(wildcard $(ROOT)/usr/lib/*/libcrypt.*),)
+-ifneq ($(findstring -lcrypt, $(SULOGINLIBS)), -lcrypt)
 -  SULOGINLIBS	+= -lcrypt
+-endif
 +ifneq ($(LCRYPT),)
 +  SULOGINLIBS	+= $(LCRYPT)
  endif
diff --git a/poky/meta/recipes-core/sysvinit/sysvinit/install.patch b/poky/meta/recipes-core/sysvinit/sysvinit/install.patch
index 2930fb0..90563a6 100644
--- a/poky/meta/recipes-core/sysvinit/sysvinit/install.patch
+++ b/poky/meta/recipes-core/sysvinit/sysvinit/install.patch
@@ -1,4 +1,4 @@
-From b6cc66ab245ceb6bca0116dff7a41f6d7677b96a Mon Sep 17 00:00:00 2001
+From 5e35aa105e7a2e85db2a89fee4114090b1ac55be Mon Sep 17 00:00:00 2001
 From: Qing He <qing.he@intel.com>
 Date: Fri, 18 Jun 2010 09:40:30 +0800
 Subject: [PATCH] sysvinit: upgrade to version 2.88dsf
@@ -10,7 +10,7 @@
  1 file changed, 30 insertions(+), 23 deletions(-)
 
 diff --git a/src/Makefile b/src/Makefile
-index 9f9f09e..1380d7f 100644
+index 1b368dc..5b1a5a2 100644
 --- a/src/Makefile
 +++ b/src/Makefile
 @@ -77,7 +77,14 @@ else
@@ -29,7 +29,7 @@
  
  ifeq ($(WITH_SELINUX),yes)
    SELINUX_DEF	=  -DWITH_SELINUX
-@@ -189,42 +196,42 @@ clobber:	cleanobjs
+@@ -191,43 +198,43 @@ clobber:	cleanobjs
  distclean:	clobber
  
  install:	all
@@ -50,6 +50,7 @@
 +			$(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \
  		done
  		# $(INSTALL_DIR) $(ROOT)/etc/
+ 		$(INSTALL_DIR) $(ROOT)/etc/inittab.d
  		# $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/
 -		ln -sf halt $(ROOT)/sbin/reboot
 -		ln -sf halt $(ROOT)/sbin/poweroff
diff --git a/poky/meta/recipes-core/sysvinit/sysvinit_2.96.bb b/poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb
similarity index 96%
rename from poky/meta/recipes-core/sysvinit/sysvinit_2.96.bb
rename to poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb
index d2b85ed..80ab9d7 100644
--- a/poky/meta/recipes-core/sysvinit/sysvinit_2.96.bb
+++ b/poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb
@@ -21,8 +21,7 @@
            file://bootlogd.init \
            file://01_bootlogd \
            "
-SRC_URI[md5sum] = "48cebffebf2a96ab09bec14bf9976016"
-SRC_URI[sha256sum] = "2a2e26b72aa235a23ab1c8471005f890309ce1196c83fbc9413c57b9ab62b587"
+SRC_URI[sha256sum] = "2d5996857519bfd8634d2e1debabb3238fb38440f65fbfdc46420ee8bdf25110"
 
 S = "${WORKDIR}/sysvinit-${PV}"
 B = "${S}/src"
diff --git a/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
index b23355a..e2ad39f 100644
--- a/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
+++ b/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
@@ -10,7 +10,6 @@
 [Service]
 Type=oneshot
 RemainAfterExit=Yes
-StandardOutput=syslog
 TimeoutSec=0
 ExecStart=/sbin/mount-copybind @what@ @where@
 ExecStop=/bin/umount @where@
diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.34.inc b/poky/meta/recipes-devtools/binutils/binutils-2.35.inc
similarity index 68%
rename from poky/meta/recipes-devtools/binutils/binutils-2.34.inc
rename to poky/meta/recipes-devtools/binutils/binutils-2.35.inc
index f65fdb7..5ae9ec4 100644
--- a/poky/meta/recipes-devtools/binutils/binutils-2.34.inc
+++ b/poky/meta/recipes-devtools/binutils/binutils-2.35.inc
@@ -16,32 +16,30 @@
 
 # When upgrading to 2.35, please make sure there is no trailing .0, so
 # that upstream version check can work correctly.
-PV = "2.34"
-CVE_VERSION = "2.34"
+PV = "2.35"
+CVE_VERSION = "2.35"
 BINUPV = "${@binutils_branch_version(d)}"
 #BRANCH = "binutils-${BINUPV}-branch"
-BRANCH ?= "binutils-2_34-branch"
+BRANCH ?= "binutils-2_35-branch"
 
 UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
 
-SRCREV ?= "d4b50999b3b287b5f984ade2f8734aa8c9359440"
+SRCREV ?= "89a9065674a14a8bd94bb326b27d19a2f3583efb"
 BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${BRANCH};protocol=git"
 SRC_URI = "\
      ${BINUTILS_GIT_URI} \
      file://0004-configure-widen-the-regexp-for-SH-architectures.patch \
      file://0005-Point-scripts-location-to-libdir.patch \
      file://0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
-     file://0007-Use-libtool-2.4.patch \
-     file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
-     file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
-     file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
-     file://0011-Change-default-emulation-for-mips64-linux.patch \
-     file://0012-Add-support-for-Netlogic-XLP.patch \
-     file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
-     file://0014-Detect-64-bit-MIPS-targets.patch \
+     file://0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+     file://0008-warn-for-uses-of-system-directories-when-cross-linki.patch \
+     file://0009-Change-default-emulation-for-mips64-linux.patch \
+     file://0010-Add-support-for-Netlogic-XLP.patch \
+     file://0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+     file://0012-Detect-64-bit-MIPS-targets.patch \
+     file://0013-Use-libtool-2.4.patch \
+     file://0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
      file://0015-sync-with-OE-libtool-changes.patch \
      file://0016-Check-for-clang-before-checking-gcc-version.patch \
-     file://0017-binutils-drop-redundant-program_name-definition-fno-.patch \
-     file://CVE-2020-0551.patch \
 "
 S  = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.34.bb b/poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.35.bb
similarity index 100%
rename from poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.34.bb
rename to poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.35.bb
diff --git a/poky/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb b/poky/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.bb
similarity index 100%
rename from poky/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.34.bb
rename to poky/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.35.bb
diff --git a/poky/meta/recipes-devtools/binutils/binutils-cross_2.34.bb b/poky/meta/recipes-devtools/binutils/binutils-cross_2.35.bb
similarity index 100%
rename from poky/meta/recipes-devtools/binutils/binutils-cross_2.34.bb
rename to poky/meta/recipes-devtools/binutils/binutils-cross_2.35.bb
diff --git a/poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.34.bb b/poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.35.bb
similarity index 100%
rename from poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.34.bb
rename to poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.35.bb
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 14e8421..4c1d112 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,24 +1,40 @@
-From b05f0be13aadf0b26a0b39dfe7daf2c47a300338 Mon Sep 17 00:00:00 2001
+From a0b23b160d6cfa7be4437c6e623633d76395f2ad Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:58:54 +0000
-Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
+Subject: [PATCH 01/16] binutils-crosssdk: Generate relocatable SDKs
 
 This patch will modify the ELF linker scripts so that the crosssdk
 linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
 will be relocated, at SDK install time, the interpreter path can be easily
 changed by the relocating script.
 
+generate larger .interp section for gold linker as well
+
 Upstream-Status: Inappropriate [SDK specific]
 
 Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
+ gold/layout.cc        | 2 +-
  ld/genscripts.sh      | 3 +++
  ld/scripttempl/elf.sc | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
+ 3 files changed, 6 insertions(+), 3 deletions(-)
 
+diff --git a/gold/layout.cc b/gold/layout.cc
+index 13e533aaf21..b0afff16e2e 100644
+--- a/gold/layout.cc
++++ b/gold/layout.cc
+@@ -5019,7 +5019,7 @@ Layout::create_interp(const Target* target)
+       gold_assert(interp != NULL);
+     }
+ 
+-  size_t len = strlen(interp) + 1;
++  size_t len = 4096;
+ 
+   Output_section_data* odata = new Output_data_const(interp, len, 1);
+ 
 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index 03392d265c..435689ea14 100755
+index 03392d265c7..435689ea144 100755
 --- a/ld/genscripts.sh
 +++ b/ld/genscripts.sh
 @@ -304,6 +304,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -43,10 +59,10 @@
  DATA_ALIGNMENT=${DATA_ALIGNMENT_}
  RELOCATING=" "
 diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index 0b8b32a440..ee6b71075d 100644
+index eb74743e5c3..c9a8a47615f 100644
 --- a/ld/scripttempl/elf.sc
 +++ b/ld/scripttempl/elf.sc
-@@ -140,8 +140,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
+@@ -143,8 +143,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
      DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
    fi
  fi
@@ -57,3 +73,6 @@
  fi
  if test -z "$PLT"; then
    IPLT=".iplt         ${RELOCATING-0} : { *(.iplt) }"
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
index 91de94b..41dff05 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
@@ -1,7 +1,8 @@
-From 6d79f81336e7cbe727b5a51134f5d314a455379d Mon Sep 17 00:00:00 2001
+From 0d14f8f333a9b519202246ce779f3e380491826c Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 6 Mar 2017 23:37:05 -0800
-Subject: [PATCH] binutils-cross: Do not generate linker script directories
+Subject: [PATCH 02/17] binutils-cross: Do not generate linker script
+ directories
 
 We don't place target libraries within ${exec_prefix}, we'd always place these
 within the target sysroot within the standard library directories. Worse, the
@@ -22,7 +23,7 @@
  1 file changed, 25 deletions(-)
 
 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index 435689ea14..cff8a1467f 100755
+index 435689ea144..cff8a1467f9 100755
 --- a/ld/genscripts.sh
 +++ b/ld/genscripts.sh
 @@ -235,31 +235,6 @@ append_to_lib_path()
@@ -57,3 +58,6 @@
  if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
    libs=${NATIVE_LIB_DIRS}
    if [ "x${NATIVE}" = "xyes" ] ; then
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch b/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch
index 4b4d73d..28daf58 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch
@@ -1,8 +1,8 @@
-From d057b215f114f6158b4010ab44a19cae9dcc8386 Mon Sep 17 00:00:00 2001
+From 3bbec749ec9fe681ade6812c48c541a752fcffd5 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Wed, 19 Feb 2020 09:51:16 -0800
-Subject: [PATCH] binutils-nativesdk: Search for alternative ld.so.conf in SDK
- installation
+Subject: [PATCH 03/17] binutils-nativesdk: Search for alternative ld.so.conf
+ in SDK installation
 
 We need binutils to look at our ld.so.conf file within the SDK to ensure
 we search the SDK's libdirs as well as those from the host system.
@@ -29,7 +29,7 @@
  5 files changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 4a9b8404b7..1c132d3ce4 100644
+index 02c4fc16395..a5762227f0a 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
 @@ -42,7 +42,8 @@ ZLIBINC = @zlibinc@
@@ -43,10 +43,10 @@
  NO_WERROR = @NO_WERROR@
  AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 46d9b14077..e453bc1b33 100644
+index 2fe12e14f63..8f0c83ac8d2 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
-@@ -555,7 +555,8 @@ ZLIB = @zlibdir@ -lz
+@@ -548,7 +548,8 @@ ZLIB = @zlibdir@ -lz
  ZLIBINC = @zlibinc@
  ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
  	   -DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
@@ -55,25 +55,25 @@
 +           -DSYSCONFDIR="\"$(sysconfdir)\""
  
  AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
- @ENABLE_PLUGINS_FALSE@PLUGIN_C = 
+ 
 diff --git a/ld/ldelf.c b/ld/ldelf.c
-index 2e27cf48a8..a095d6aac5 100644
+index bada3ade2d7..b4784009d7a 100644
 --- a/ld/ldelf.c
 +++ b/ld/ldelf.c
-@@ -907,7 +907,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
+@@ -911,7 +911,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
  
        info.path = NULL;
        info.len = info.alloc = 0;
 -      tmppath = concat (ld_sysroot, prefix, "/etc/ld.so.conf",
-+      tmppath = concat (ld_sysconfdir, "/ld.so.conf",
++      tmppath = concat (ld_sysconfdir, "/etc/ld.so.conf",
  			(const char *) NULL);
        if (!ldelf_parse_ld_so_conf (&info, tmppath))
  	{
 diff --git a/ld/ldmain.c b/ld/ldmain.c
-index c4af10f4e9..da1ad17763 100644
+index 08be9030cb5..f5c5a336320 100644
 --- a/ld/ldmain.c
 +++ b/ld/ldmain.c
-@@ -69,6 +69,7 @@ char *program_name;
+@@ -70,6 +70,7 @@ char *program_name;
  
  /* The prefix for system library directories.  */
  const char *ld_sysroot;
@@ -82,7 +82,7 @@
  /* The canonical representation of ld_sysroot.  */
  char *ld_canon_sysroot;
 diff --git a/ld/ldmain.h b/ld/ldmain.h
-index 0f05821d1e..54c36a94ce 100644
+index ac7db5720d5..1cbe1771912 100644
 --- a/ld/ldmain.h
 +++ b/ld/ldmain.h
 @@ -23,6 +23,7 @@
@@ -93,3 +93,6 @@
  extern char *ld_canon_sysroot;
  extern int ld_canon_sysroot_len;
  extern FILE *saved_script_handle;
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0004-configure-widen-the-regexp-for-SH-architectures.patch b/poky/meta/recipes-devtools/binutils/binutils/0004-configure-widen-the-regexp-for-SH-architectures.patch
index d10a144..2381c7b 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0004-configure-widen-the-regexp-for-SH-architectures.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0004-configure-widen-the-regexp-for-SH-architectures.patch
@@ -1,7 +1,7 @@
-From f7ad8a44c10f01e03680f093fd7af71c9f5e8606 Mon Sep 17 00:00:00 2001
+From 361c2c313196c095d12d17cecf0a069107dd629b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:07:33 +0000
-Subject: [PATCH] configure: widen the regexp for SH architectures
+Subject: [PATCH 04/17] configure: widen the regexp for SH architectures
 
 gprof needs to know about uclibc
 
@@ -14,10 +14,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index 91dc42f6c7..7c1b747e7c 100755
+index 54d0339ab9e..6782f8b6ab8 100755
 --- a/configure
 +++ b/configure
-@@ -3915,7 +3915,7 @@ case "${target}" in
+@@ -3937,7 +3937,7 @@ case "${target}" in
    nvptx*-*-*)
      noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
      ;;
@@ -27,10 +27,10 @@
        sh*-*-elf)
           ;;
 diff --git a/configure.ac b/configure.ac
-index 4bd869a63a..7187b34dfc 100644
+index a910c4fd6ba..55beb1dea46 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1159,7 +1159,7 @@ case "${target}" in
+@@ -1178,7 +1178,7 @@ case "${target}" in
    nvptx*-*-*)
      noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
      ;;
@@ -39,3 +39,6 @@
      case "${target}" in
        sh*-*-elf)
           ;;
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch b/poky/meta/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch
index 3ba0ba6..c31a0bc 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0005-Point-scripts-location-to-libdir.patch
@@ -1,7 +1,7 @@
-From 08b088b7dd3d9707ed66948a7271ffb438eeddf5 Mon Sep 17 00:00:00 2001
+From 39b478b7e52fb1b892a392f3c3750b9023cfabc8 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:09:58 +0000
-Subject: [PATCH] Point scripts location to libdir
+Subject: [PATCH 05/17] Point scripts location to libdir
 
 Upstream-Status: Inappropriate [debian patch]
 
@@ -12,10 +12,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 1c132d3ce4..8d82cf2e16 100644
+index a5762227f0a..e1c665898f3 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
-@@ -64,7 +64,7 @@ endif
+@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
  # We put the scripts in the directory $(scriptdir)/ldscripts.
  # We can't put the scripts in $(datadir) because the SEARCH_DIR
  # directives need to be different for native and cross linkers.
@@ -25,10 +25,10 @@
  EMUL = @EMUL@
  EMULATION_OFILES = @EMULATION_OFILES@
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index e453bc1b33..2dcd72f809 100644
+index 8f0c83ac8d2..acc24ec4130 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
-@@ -573,7 +573,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+@@ -556,7 +556,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
  # We put the scripts in the directory $(scriptdir)/ldscripts.
  # We can't put the scripts in $(datadir) because the SEARCH_DIR
  # directives need to be different for native and cross linkers.
@@ -37,3 +37,6 @@
  BASEDIR = $(srcdir)/..
  BFDDIR = $(BASEDIR)/bfd
  INCDIR = $(BASEDIR)/include
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/poky/meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index d920729..654b64f 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,7 +1,8 @@
-From 13791636abf518f0db209dc51c29445d80421f2e Mon Sep 17 00:00:00 2001
+From 59640ddf11104a604ccf7c078a48359d711c2f9c Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:27:17 +0000
-Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
+Subject: [PATCH 06/17] Only generate an RPATH entry if LD_RUN_PATH is not
+ empty
 
 for cases where -rpath isn't specified. debian (#151024)
 
@@ -14,10 +15,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/ld/ldelf.c b/ld/ldelf.c
-index a095d6aac5..a2455a8793 100644
+index b4784009d7a..541772f4604 100644
 --- a/ld/ldelf.c
 +++ b/ld/ldelf.c
-@@ -1229,6 +1229,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
+@@ -1247,6 +1247,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
  		  && command_line.rpath == NULL)
  		{
  		  path = (const char *) getenv ("LD_RUN_PATH");
@@ -26,7 +27,7 @@
  		  if (path
  		      && ldelf_search_needed (path, &n, force,
  					      is_linux, elfsize))
-@@ -1573,6 +1575,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
+@@ -1605,6 +1607,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
    rpath = command_line.rpath;
    if (rpath == NULL)
      rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -35,3 +36,6 @@
  
    for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
      if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/poky/meta/recipes-devtools/binutils/binutils/0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
similarity index 79%
rename from poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
rename to poky/meta/recipes-devtools/binutils/binutils/0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
index b0e94ab..7f8fc9a 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -1,8 +1,8 @@
-From e36a4e05f900bbe6a8d744a93f3a407bc55c96f7 Mon Sep 17 00:00:00 2001
+From 2b81508b9af76db292cd756432b03035cb8157e0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:39:01 +0000
-Subject: [PATCH] don't let the distro compiler point to the wrong installation
- location
+Subject: [PATCH 07/17] don't let the distro compiler point to the wrong
+ installation location
 
 Thanks to RP for helping find the source code causing the issue.
 
@@ -17,10 +17,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index fe738d0db4..27d818f253 100644
+index 895f701bcd0..97a53f15bb6 100644
 --- a/libiberty/Makefile.in
 +++ b/libiberty/Makefile.in
-@@ -365,7 +365,8 @@ install-strip: install
+@@ -367,7 +367,8 @@ install-strip: install
  # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
  # default multilib, so we have to take CFLAGS into account as well,
  # since it will be passed the multilib flags.
@@ -30,3 +30,6 @@
  install_to_libdir: all
  	if test -n "${target_header_dir}"; then \
  		${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/poky/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
similarity index 82%
rename from poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
rename to poky/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
index 11a8110..2356c6a 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,7 +1,7 @@
-From 7b24f81e04c9d00d96de7dbd250beade6d2c6e44 Mon Sep 17 00:00:00 2001
+From 413075afbdb16e7cc05511682ca9e3c880acb5a7 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 15 Jan 2016 06:31:09 +0000
-Subject: [PATCH] warn for uses of system directories when cross linking
+Subject: [PATCH 08/17] warn for uses of system directories when cross linking
 
 2008-07-02  Joseph Myers  <joseph@codesourcery.com>
 
@@ -57,16 +57,16 @@
  ld/ld.h         |  8 ++++++++
  ld/ld.texi      | 12 ++++++++++++
  ld/ldfile.c     | 17 +++++++++++++++++
- ld/ldlex.h      |  2 ++
+ ld/ldlex.h      |  5 +++++
  ld/ldmain.c     |  2 ++
- ld/lexsup.c     | 15 +++++++++++++++
- 9 files changed, 85 insertions(+)
+ ld/lexsup.c     | 27 +++++++++++++++++++++++++++
+ 9 files changed, 100 insertions(+)
 
 diff --git a/ld/config.in b/ld/config.in
-index d93c9b0830..5da2742bea 100644
+index f1712107367..308e0173c16 100644
 --- a/ld/config.in
 +++ b/ld/config.in
-@@ -31,6 +31,9 @@
+@@ -40,6 +40,9 @@
     language is requested. */
  #undef ENABLE_NLS
  
@@ -77,7 +77,7 @@
  #undef EXTRA_SHLIB_EXTENSION
  
 diff --git a/ld/configure b/ld/configure
-index 811134a503..f8c17c19ae 100755
+index f08ce9969ea..1c872c0db5f 100755
 --- a/ld/configure
 +++ b/ld/configure
 @@ -826,6 +826,7 @@ with_lib_path
@@ -88,7 +88,7 @@
  enable_gold
  enable_got
  enable_compressed_debug_sections
-@@ -1491,6 +1492,8 @@ Optional Features:
+@@ -1493,6 +1494,8 @@ Optional Features:
    --disable-largefile     omit support for large files
    --enable-targets        alternative target configurations
    --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
@@ -97,7 +97,7 @@
    --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
    --enable-got=<type>     GOT handling scheme (target, single, negative,
                            multigot)
-@@ -15788,6 +15791,19 @@ fi
+@@ -15793,6 +15796,19 @@ fi
  
  
  
@@ -118,7 +118,7 @@
  if test "${enable_gold+set}" = set; then :
    enableval=$enable_gold; case "${enableval}" in
 diff --git a/ld/configure.ac b/ld/configure.ac
-index b5e849d84a..22e022ec03 100644
+index 5a4938afdb0..dbbbde74b04 100644
 --- a/ld/configure.ac
 +++ b/ld/configure.ac
 @@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
@@ -139,7 +139,7 @@
  dnl "install_as_default" is set to false if gold is the default linker.
  dnl "installed_linker" is the installed BFD linker name.
 diff --git a/ld/ld.h b/ld/ld.h
-index 71fd781267..5c7843100b 100644
+index 1790dc81a66..73f832eb169 100644
 --- a/ld/ld.h
 +++ b/ld/ld.h
 @@ -166,6 +166,14 @@ typedef struct
@@ -158,10 +158,10 @@
    enum endian_enum endian;
  
 diff --git a/ld/ld.texi b/ld/ld.texi
-index eb7bcb9933..3c73d445a0 100644
+index 2a93e9456ac..3eeb70607fd 100644
 --- a/ld/ld.texi
 +++ b/ld/ld.texi
-@@ -2551,6 +2551,18 @@ string identifying the original linked file does not change.
+@@ -2655,6 +2655,18 @@ string identifying the original linked file does not change.
  
  Passing @code{none} for @var{style} disables the setting from any
  @code{--build-id} options earlier on the command line.
@@ -181,7 +181,7 @@
  
  @c man end
 diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 411f7ddf97..17db16c2cc 100644
+index e39170b5d94..fadc248a140 100644
 --- a/ld/ldfile.c
 +++ b/ld/ldfile.c
 @@ -117,6 +117,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@@ -209,23 +209,26 @@
  
  /* Try to open a BFD for a lang_input_statement.  */
 diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 5287f19a7f..55096e4fc9 100644
+index 5ea083ebeb3..941dc5f3dc8 100644
 --- a/ld/ldlex.h
 +++ b/ld/ldlex.h
-@@ -150,6 +150,8 @@ enum option_values
-   OPTION_FORCE_GROUP_ALLOCATION,
-   OPTION_PRINT_MAP_DISCARDED,
-   OPTION_NO_PRINT_MAP_DISCARDED,
+@@ -155,6 +155,11 @@ enum option_values
+   OPTION_NON_CONTIGUOUS_REGIONS,
+   OPTION_NON_CONTIGUOUS_REGIONS_WARNINGS,
+   OPTION_DEPENDENCY_FILE,
++  OPTION_CTF_VARIABLES,
++  OPTION_NO_CTF_VARIABLES,
++  OPTION_CTF_SHARE_TYPES,
 +  OPTION_NO_POISON_SYSTEM_DIRECTORIES,
 +  OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
  };
  
  /* The initial parser states.  */
 diff --git a/ld/ldmain.c b/ld/ldmain.c
-index da1ad17763..12d0b07d8a 100644
+index f5c5a336320..516ba0360e2 100644
 --- a/ld/ldmain.c
 +++ b/ld/ldmain.c
-@@ -274,6 +274,8 @@ main (int argc, char **argv)
+@@ -322,6 +322,8 @@ main (int argc, char **argv)
    command_line.warn_mismatch = TRUE;
    command_line.warn_search_mismatch = TRUE;
    command_line.check_section_addresses = -1;
@@ -235,13 +238,25 @@
    /* We initialize DEMANGLING based on the environment variable
       COLLECT_NO_DEMANGLE.  The gcc collect2 program will demangle the
 diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 3d15cc491d..0e8b4f2b7a 100644
+index 58c6c078325..879e7bb7658 100644
 --- a/ld/lexsup.c
 +++ b/ld/lexsup.c
-@@ -550,6 +550,14 @@ static const struct ld_option ld_options[] =
+@@ -572,6 +572,26 @@ static const struct ld_option ld_options[] =
    { {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
      '\0', NULL, N_("Do not show discarded sections in map file output"),
      TWO_DASHES },
++  { {"ctf-variables", no_argument, NULL, OPTION_CTF_VARIABLES},
++    '\0', NULL, N_("Emit names and types of static variables in CTF"),
++    TWO_DASHES },
++  { {"no-ctf-variables", no_argument, NULL, OPTION_NO_CTF_VARIABLES},
++    '\0', NULL, N_("Do not emit names and types of static variables in CTF"),
++    TWO_DASHES },
++  { {"ctf-share-types=<method>", required_argument, NULL,
++     OPTION_CTF_SHARE_TYPES},
++    '\0', NULL, N_("How to share CTF types between translation units.\n"
++		   "                                <method> is: share-unconflicted (default),\n"
++		   "                                             share-duplicated"),
++    TWO_DASHES },
 +  { {"no-poison-system-directories", no_argument, NULL,
 +     OPTION_NO_POISON_SYSTEM_DIRECTORIES},
 +    '\0', NULL, N_("Do not warn for -L options using system directories"),
@@ -253,7 +268,7 @@
  };
  
  #define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -1603,6 +1611,13 @@ parse_args (unsigned argc, char **argv)
+@@ -1632,6 +1652,13 @@ parse_args (unsigned argc, char **argv)
  
  	case OPTION_PRINT_MAP_DISCARDED:
  	  config.print_map_discarded = TRUE;
@@ -265,5 +280,8 @@
 +	case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
 +	  command_line.error_poison_system_directories = TRUE;
  	  break;
- 	}
-     }
+ 
+ 	case OPTION_DEPENDENCY_FILE:
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/poky/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch
similarity index 87%
rename from poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
rename to poky/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch
index c49b8e8..fb5276e 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch
@@ -1,7 +1,7 @@
-From 2182791a453f34bee6968b3e72848608cf7d7abe Mon Sep 17 00:00:00 2001
+From 13a67e9040c01abd284fe506471e0eab668ee3dc Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:44:14 +0000
-Subject: [PATCH] Change default emulation for mips64*-*-linux
+Subject: [PATCH 09/17] Change default emulation for mips64*-*-linux
 
 we change the default emulations to be N64 instead of N32
 
@@ -14,10 +14,10 @@
  2 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/bfd/config.bfd b/bfd/config.bfd
-index b96931f52e..847f9f0ba9 100644
+index 14523caf0c5..e5233cd1f7e 100644
 --- a/bfd/config.bfd
 +++ b/bfd/config.bfd
-@@ -911,12 +911,12 @@ case "${targ}" in
+@@ -894,12 +894,12 @@ case "${targ}" in
      targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
      ;;
    mips64*el-*-linux*)
@@ -35,10 +35,10 @@
    mips*el-*-linux*)
      targ_defvec=mips_elf32_trad_le_vec
 diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 23194e357f..f4f0eaf9b2 100644
+index 87c7d9a4cad..9b4bf2ca964 100644
 --- a/ld/configure.tgt
 +++ b/ld/configure.tgt
-@@ -541,12 +541,12 @@ mips*-*-vxworks*)	targ_emul=elf32ebmipvxworks
+@@ -531,12 +531,12 @@ mips*-*-vxworks*)	targ_emul=elf32ebmipvxworks
  			;;
  mips*-*-windiss)	targ_emul=elf32mipswindiss
  			;;
@@ -55,3 +55,6 @@
  			targ_extra_libpath=$targ_extra_emuls
  			;;
  mips*el-*-linux-*)	targ_emul=elf32ltsmip
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/poky/meta/recipes-devtools/binutils/binutils/0010-Add-support-for-Netlogic-XLP.patch
similarity index 93%
rename from poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
rename to poky/meta/recipes-devtools/binutils/binutils/0010-Add-support-for-Netlogic-XLP.patch
index c32867a..277db4e 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0010-Add-support-for-Netlogic-XLP.patch
@@ -1,7 +1,7 @@
-From a0237ec2d1e58bd35c236df39dd5a06504c6d2ed Mon Sep 17 00:00:00 2001
+From 69ab45c16f80f18fa78121f6e774750b9e9a200b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 14 Feb 2016 17:06:19 +0000
-Subject: [PATCH] Add support for Netlogic XLP
+Subject: [PATCH 10/17] Add support for Netlogic XLP
 
 Patch From: Nebu Philips <nphilips@netlogicmicro.com>
 
@@ -35,10 +35,10 @@
  15 files changed, 65 insertions(+), 21 deletions(-)
 
 diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index fa3a9746b6..5078024fd5 100644
+index d352a1a3e44..2e2c3c1af86 100644
 --- a/bfd/aoutx.h
 +++ b/bfd/aoutx.h
-@@ -799,6 +799,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
+@@ -810,6 +810,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
  	case bfd_mach_mipsisa64r6:
  	case bfd_mach_mips_sb1:
  	case bfd_mach_mips_xlr:
@@ -47,7 +47,7 @@
  	  arch_flags = M_MIPS2;
  	  break;
 diff --git a/bfd/archures.c b/bfd/archures.c
-index 232103817c..b2b3b8c124 100644
+index 551ec8732f0..2665b378623 100644
 --- a/bfd/archures.c
 +++ b/bfd/archures.c
 @@ -185,6 +185,7 @@ DESCRIPTION
@@ -59,10 +59,10 @@
  .#define bfd_mach_mipsisa32r2		33
  .#define bfd_mach_mipsisa32r3		34
 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index 7c13bc8c91..2e453c50c1 100644
+index 35ef4d755bb..48db00af80b 100644
 --- a/bfd/bfd-in2.h
 +++ b/bfd/bfd-in2.h
-@@ -1568,6 +1568,7 @@ enum bfd_architecture
+@@ -1585,6 +1585,7 @@ enum bfd_architecture
  #define bfd_mach_mips_octeon3          6503
  #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'.  */
  #define bfd_mach_mips_interaptiv_mr2   736550   /* decimal 'IA2'.  */
@@ -71,10 +71,10 @@
  #define bfd_mach_mipsisa32r2           33
  #define bfd_mach_mipsisa32r3           34
 diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 847f9f0ba9..a12707f827 100644
+index e5233cd1f7e..2e4ae6bbdff 100644
 --- a/bfd/config.bfd
 +++ b/bfd/config.bfd
-@@ -894,6 +894,11 @@ case "${targ}" in
+@@ -877,6 +877,11 @@ case "${targ}" in
      targ_defvec=mips_elf32_le_vec
      targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
      ;;
@@ -87,7 +87,7 @@
      targ_defvec=mips_elf32_be_vec
      targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
 diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index 802acb45f1..fd9ec4c0ad 100644
+index 802acb45f1e..fd9ec4c0ad4 100644
 --- a/bfd/cpu-mips.c
 +++ b/bfd/cpu-mips.c
 @@ -108,7 +108,8 @@ enum
@@ -111,10 +111,10 @@
  
  /* The default architecture is mips:3000, but with a machine number of
 diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index d7e3aed3b6..7baeee9ee3 100644
+index 160febec94c..4c9499cc2cf 100644
 --- a/bfd/elfxx-mips.c
 +++ b/bfd/elfxx-mips.c
-@@ -6999,6 +6999,9 @@ _bfd_elf_mips_mach (flagword flags)
+@@ -6982,6 +6982,9 @@ _bfd_elf_mips_mach (flagword flags)
      case E_MIPS_MACH_IAMR2:
        return bfd_mach_mips_interaptiv_mr2;
  
@@ -124,7 +124,7 @@
      default:
        switch (flags & EF_MIPS_ARCH)
  	{
-@@ -12355,6 +12358,10 @@ mips_set_isa_flags (bfd *abfd)
+@@ -12356,6 +12359,10 @@ mips_set_isa_flags (bfd *abfd)
        val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
        break;
  
@@ -135,7 +135,7 @@
      case bfd_mach_mipsisa32:
        val = E_MIPS_ARCH_32;
        break;
-@@ -14379,6 +14386,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
+@@ -14373,6 +14380,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
    { bfd_mach_mips_gs264e, bfd_mach_mips_gs464e },
    { bfd_mach_mips_gs464e, bfd_mach_mips_gs464 },
    { bfd_mach_mips_gs464, bfd_mach_mipsisa64r2 },
@@ -144,10 +144,10 @@
    /* MIPS64 extensions.  */
    { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
 diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 6b5bebe743..d15a7828db 100644
+index 6057515a89b..ea119b0b254 100644
 --- a/binutils/readelf.c
 +++ b/binutils/readelf.c
-@@ -3440,6 +3440,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
+@@ -3483,6 +3483,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
  	    case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
  	    case E_MIPS_MACH_XLR:  strcat (buf, ", xlr"); break;
  	    case E_MIPS_MACH_IAMR2:  strcat (buf, ", interaptiv-mr2"); break;
@@ -156,7 +156,7 @@
  	    /* We simply ignore the field in this case to avoid confusion:
  	       MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
 diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index fc6898834e..2c7151ccdb 100644
+index 31acb77d78a..0ead168d51e 100644
 --- a/gas/config/tc-mips.c
 +++ b/gas/config/tc-mips.c
 @@ -568,6 +568,7 @@ static int mips_32bitmode = 0;
@@ -175,7 +175,7 @@
     )
  
  /* Whether the processor uses hardware interlocks to protect reads
-@@ -20135,7 +20137,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
+@@ -20174,7 +20176,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
    /* Broadcom XLP.
       XLP is mostly like XLR, with the prominent exception that it is
       MIPS64R2 rather than MIPS64.  */
@@ -185,7 +185,7 @@
    /* MIPS 64 Release 6.  */
    { "i6400",	      0, ASE_VIRT | ASE_MSA,	ISA_MIPS64R6, CPU_MIPS64R6},
 diff --git a/gas/configure b/gas/configure
-index 60c1a055ae..59d6d11215 100755
+index 5bccfd9d1b7..d4b13e6fc8b 100755
 --- a/gas/configure
 +++ b/gas/configure
 @@ -12722,6 +12722,9 @@ _ACEOF
@@ -199,7 +199,7 @@
  	    mips_cpu=r3900
  	    ;;
 diff --git a/gas/configure.ac b/gas/configure.ac
-index 6f32e55a1a..11c2e0d273 100644
+index b65108fecb2..ce1f2dad9bc 100644
 --- a/gas/configure.ac
 +++ b/gas/configure.ac
 @@ -325,6 +325,9 @@ changequote([,])dnl
@@ -213,7 +213,7 @@
  	    mips_cpu=r3900
  	    ;;
 diff --git a/include/elf/mips.h b/include/elf/mips.h
-index d116b036b6..dceeb3f156 100644
+index cc08ebd4318..bb518575ce1 100644
 --- a/include/elf/mips.h
 +++ b/include/elf/mips.h
 @@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@@ -225,7 +225,7 @@
  #define E_MIPS_MACH_OCTEON3	0x008e0000
  #define E_MIPS_MACH_5400	0x00910000
 diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index fd031f3758..a96a44df84 100644
+index fd031f37588..a96a44df840 100644
 --- a/include/opcode/mips.h
 +++ b/include/opcode/mips.h
 @@ -1260,6 +1260,8 @@ static const unsigned int mips_isa_table[] = {
@@ -256,10 +256,10 @@
        return FALSE;
      }
 diff --git a/ld/configure.tgt b/ld/configure.tgt
-index f4f0eaf9b2..0da3eca19c 100644
+index 9b4bf2ca964..f6d7171dff7 100644
 --- a/ld/configure.tgt
 +++ b/ld/configure.tgt
-@@ -520,6 +520,9 @@ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
+@@ -510,6 +510,9 @@ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
  			targ_emul=elf32btsmip
  			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
  			;;
@@ -270,7 +270,7 @@
  			targ_extra_emuls="elf32lr5900"
  			targ_extra_libpath=$targ_extra_emuls
 diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 755bbe294b..ce22ef683a 100644
+index 755bbe294bd..ce22ef683a6 100644
 --- a/opcodes/mips-dis.c
 +++ b/opcodes/mips-dis.c
 @@ -674,13 +674,11 @@ const struct mips_arch_choice mips_arch_choices[] =
@@ -293,7 +293,7 @@
    /* This entry, mips16, is here only for ISA/processor selection; do
       not print its name.  */
 diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index 5270aeefa8..d17dc78cd7 100644
+index 5270aeefa80..d17dc78cd71 100644
 --- a/opcodes/mips-opc.c
 +++ b/opcodes/mips-opc.c
 @@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
@@ -404,3 +404,6 @@
  {"swc0",		"E,o(b)",	0xe0000000, 0xfc000000,	RD_3|RD_C0|SM,		0,		I1,		0,	IOCT|IOCTP|IOCT2|I37 },
  {"swc0",		"E,A(b)",	0,    (int) M_SWC0_AB,	INSN_MACRO,		0,		I1,		0,	IOCT|IOCTP|IOCT2|I37 },
  {"swc1",		"T,o(b)",	0xe4000000, 0xfc000000,	RD_1|RD_3|SM|FP_S,	0,		I1,		0,	0 },
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/poky/meta/recipes-devtools/binutils/binutils/0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
new file mode 100644
index 0000000..10c3d80
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/0011-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -0,0 +1,37 @@
+From 7836f8aa56ef0f18c8658dc7e4952a9d097ba7e8 Mon Sep 17 00:00:00 2001
+From: Zhenhua Luo <zhenhua.luo@nxp.com>
+Date: Sat, 11 Jun 2016 22:08:29 -0500
+Subject: [PATCH 11/17] fix the incorrect assembling for ppc wait mnemonic
+
+Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
+
+Upstream-Status: Pending
+---
+ opcodes/ppc-opc.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
+index 5e20d617664..4c9656ecf08 100644
+--- a/opcodes/ppc-opc.c
++++ b/opcodes/ppc-opc.c
+@@ -6265,8 +6265,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+ {"waitasec",	X(31,30),      XRTRARB_MASK, POWER8,	POWER9,		{0}},
+ {"waitrsv",	XWCPL(31,30,1,0),0xffffffff, POWER10,	0,		{0}},
+ {"pause_short",	XWCPL(31,30,2,0),0xffffffff, POWER10,	0,		{0}},
+-{"wait",	X(31,30),	XWCPL_MASK,  POWER10,	0,		{WC, PL}},
+-{"wait",	X(31,30),	XWC_MASK,    POWER9,	POWER10,	{WC}},
+ 
+ {"lwepx",	X(31,31),	X_MASK,	  E500MC|PPCA2, 0,		{RT, RA0, RB}},
+ 
+@@ -6326,7 +6324,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+ 
+ {"waitrsv",	X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0,		{0}},
+ {"waitimpl",	X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0,		{0}},
+-{"wait",	X(31,62),	XWC_MASK,    E500MC|PPCA2, 0,		{WC}},
++{"wait",	X(31,62),	XWC_MASK,    E500MC|PPCA2|POWER9|POWER10, 0,	{WC}},
+ 
+ {"dcbstep",	XRT(31,63,0),	XRT_MASK,    E500MC|PPCA2, 0,		{RA0, RB}},
+ 
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch b/poky/meta/recipes-devtools/binutils/binutils/0012-Detect-64-bit-MIPS-targets.patch
similarity index 86%
rename from poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
rename to poky/meta/recipes-devtools/binutils/binutils/0012-Detect-64-bit-MIPS-targets.patch
index 6acde1f..ef8b253 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0012-Detect-64-bit-MIPS-targets.patch
@@ -1,7 +1,7 @@
-From 2f7f2389764ef1d699f6ad32057314024b7e84e7 Mon Sep 17 00:00:00 2001
+From dbff6bdf2123f5495b8be930304d9aa5e88006a7 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 31 Mar 2017 11:42:03 -0700
-Subject: [PATCH] Detect 64-bit MIPS targets
+Subject: [PATCH 12/17] Detect 64-bit MIPS targets
 
 Add mips64 target triplets and default to N64
 
@@ -14,7 +14,7 @@
  1 file changed, 14 insertions(+)
 
 diff --git a/gold/configure.tgt b/gold/configure.tgt
-index aa7ec552ae..470515062e 100644
+index aa7ec552aec..470515062e4 100644
 --- a/gold/configure.tgt
 +++ b/gold/configure.tgt
 @@ -153,6 +153,13 @@ aarch64*-*)
@@ -45,3 +45,6 @@
  mips*-*-*)
   targ_obj=mips
   targ_machine=EM_MIPS
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch b/poky/meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch
similarity index 90%
rename from poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
rename to poky/meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch
index 89da62f..987a96f 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch
@@ -1,7 +1,7 @@
-From b8fafd8ce6c47c9a551ed796176d884a34930086 Mon Sep 17 00:00:00 2001
+From 7e2ddee8704c9c3b73760dd9464b18fade563d85 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 14 Feb 2016 17:04:07 +0000
-Subject: [PATCH 07/15] Use libtool 2.4
+Subject: [PATCH 13/17] Use libtool 2.4
 
 get libtool sysroot support
 
@@ -22,10 +22,11 @@
  ltversion.m4       |   12 +-
  lt~obsolete.m4     |    2 +-
  opcodes/configure  | 1320 +++++++++++++++-----
- 13 files changed, 9939 insertions(+), 3700 deletions(-)
+ zlib/configure     | 1320 +++++++++++++++-----
+ 14 files changed, 10931 insertions(+), 4028 deletions(-)
 
 diff --git a/bfd/configure b/bfd/configure
-index bc576b7894a..cd036638081 100755
+index 0340ed541b5..2012656b3b7 100755
 --- a/bfd/configure
 +++ b/bfd/configure
 @@ -704,6 +704,9 @@ OTOOL
@@ -1350,7 +1351,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -14554,7 +15209,7 @@ SHARED_LDFLAGS=
+@@ -14578,7 +15233,7 @@ SHARED_LDFLAGS=
  if test "$enable_shared" = "yes"; then
    x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
    if test -n "$x"; then
@@ -1359,7 +1360,7 @@
    fi
  
    case "${host}" in
-@@ -17176,13 +17831,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -17197,13 +17852,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -1380,7 +1381,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -17197,14 +17859,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -17218,14 +17880,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -1399,7 +1400,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -17237,12 +17902,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -17258,12 +17923,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -1413,7 +1414,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -17297,8 +17962,13 @@ reload_flag \
+@@ -17318,8 +17983,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -1427,7 +1428,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -17308,12 +17978,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -17329,12 +17999,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -1443,7 +1444,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -17329,7 +18001,6 @@ no_undefined_flag \
+@@ -17350,7 +18022,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -1451,7 +1452,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -17365,6 +18036,7 @@ module_cmds \
+@@ -17386,6 +18057,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -1459,7 +1460,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -18153,7 +18825,8 @@ $as_echo X"$file" |
+@@ -18174,7 +18846,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -1469,7 +1470,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -18256,19 +18929,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -18277,19 +18950,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -1513,7 +1514,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -18298,6 +18994,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -18319,6 +19015,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -1526,7 +1527,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -18307,6 +19009,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -18328,6 +19030,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -1536,7 +1537,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -18421,12 +19126,12 @@ with_gcc=$GCC
+@@ -18442,12 +19147,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -1552,7 +1553,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -18513,9 +19218,6 @@ inherit_rpath=$inherit_rpath
+@@ -18534,9 +19239,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -1562,7 +1563,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -18531,6 +19233,9 @@ include_expsyms=$lt_include_expsyms
+@@ -18552,6 +19254,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -1572,7 +1573,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -18563,210 +19268,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -18584,210 +19289,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -1947,10 +1948,10 @@
    chmod +x "$ofile"
  
 diff --git a/bfd/configure.ac b/bfd/configure.ac
-index c5bfbd5d129..e666b1cc106 100644
+index 8e86f8399ce..e8700c9d4d2 100644
 --- a/bfd/configure.ac
 +++ b/bfd/configure.ac
-@@ -290,7 +290,7 @@ changequote(,)dnl
+@@ -314,7 +314,7 @@ changequote(,)dnl
    x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
  changequote([,])dnl
    if test -n "$x"; then
@@ -1960,10 +1961,10 @@
  
    case "${host}" in
 diff --git a/binutils/configure b/binutils/configure
-index a8dfd4bd68c..82316496953 100755
+index 89c99abfeba..d3289a5efcd 100755
 --- a/binutils/configure
 +++ b/binutils/configure
-@@ -690,8 +690,11 @@ OTOOL
+@@ -692,8 +692,11 @@ OTOOL
  LIPO
  NMEDIT
  DSYMUTIL
@@ -1975,7 +1976,7 @@
  OBJDUMP
  LN_S
  NM
-@@ -808,6 +811,7 @@ enable_static
+@@ -810,6 +813,7 @@ enable_static
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -1983,7 +1984,7 @@
  enable_libtool_lock
  enable_plugins
  enable_largefile
-@@ -1485,6 +1489,8 @@ Optional Packages:
+@@ -1490,6 +1494,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -1992,7 +1993,7 @@
    --with-debuginfod       Enable debuginfo lookups with debuginfod
                            (auto/yes/no)
    --with-system-zlib      use installed libz
-@@ -5461,8 +5467,8 @@ esac
+@@ -5467,8 +5473,8 @@ esac
  
  
  
@@ -2003,7 +2004,7 @@
  
  
  
-@@ -5502,7 +5508,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5508,7 +5514,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -2012,7 +2013,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6188,8 +6194,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6194,8 +6200,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -2023,7 +2024,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -6238,6 +6244,80 @@ esac
+@@ -6244,6 +6250,80 @@ esac
  
  
  
@@ -2104,7 +2105,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if ${lt_cv_ld_reload_flag+:} false; then :
-@@ -6254,6 +6334,11 @@ case $reload_flag in
+@@ -6260,6 +6340,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -2116,7 +2117,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6422,7 +6507,8 @@ mingw* | pw32*)
+@@ -6428,7 +6513,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -2126,7 +2127,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -6576,6 +6662,21 @@ esac
+@@ -6582,6 +6668,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -2148,7 +2149,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6591,9 +6692,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6597,9 +6698,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -2313,7 +2314,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_AR+:} false; then :
-@@ -6609,7 +6863,7 @@ do
+@@ -6615,7 +6869,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -2322,7 +2323,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6629,11 +6883,15 @@ $as_echo "no" >&6; }
+@@ -6635,11 +6889,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -2341,7 +2342,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_ac_ct_AR+:} false; then :
-@@ -6649,7 +6907,7 @@ do
+@@ -6655,7 +6913,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -2350,7 +2351,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6668,6 +6926,10 @@ else
+@@ -6674,6 +6932,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -2361,7 +2362,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -6679,12 +6941,10 @@ ac_tool_warned=yes ;;
+@@ -6685,12 +6947,10 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -2376,7 +2377,7 @@
  
  
  
-@@ -6696,6 +6956,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6702,6 +6962,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
  
  
  
@@ -2441,7 +2442,7 @@
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -7030,8 +7348,8 @@ esac
+@@ -7036,8 +7354,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -2452,7 +2453,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -7067,6 +7385,7 @@ for ac_symprfx in "" "_"; do
+@@ -7073,6 +7391,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -2460,7 +2461,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -7108,6 +7427,18 @@ _LT_EOF
+@@ -7114,6 +7433,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -2479,7 +2480,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -7119,7 +7450,7 @@ _LT_EOF
+@@ -7125,7 +7456,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -2488,7 +2489,7 @@
    const char *name;
    void       *address;
  }
-@@ -7145,8 +7476,8 @@ static const void *lt_preloaded_setup() {
+@@ -7151,8 +7482,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -2499,7 +2500,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7156,8 +7487,8 @@ _LT_EOF
+@@ -7162,8 +7493,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -2510,7 +2511,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -7194,6 +7525,21 @@ else
+@@ -7200,6 +7531,21 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -2532,7 +2533,7 @@
  
  
  
-@@ -7210,6 +7556,40 @@ fi
+@@ -7216,6 +7562,40 @@ fi
  
  
  
@@ -2573,7 +2574,7 @@
  
  
  
-@@ -7421,6 +7801,123 @@ esac
+@@ -7427,6 +7807,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -2697,7 +2698,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -7984,6 +8481,8 @@ _LT_EOF
+@@ -7990,6 +8487,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -2706,7 +2707,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8179,7 +8678,8 @@ fi
+@@ -8185,7 +8684,8 @@ fi
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -2716,7 +2717,7 @@
  
  
  
-@@ -8268,7 +8768,7 @@ aix3*)
+@@ -8274,7 +8774,7 @@ aix3*)
  esac
  
  # Global variables:
@@ -2725,7 +2726,7 @@
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8566,8 +9066,6 @@ fi
+@@ -8572,8 +9072,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -2734,7 +2735,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -8733,6 +9231,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8739,6 +9237,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -2747,7 +2748,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -8795,7 +9299,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8801,7 +9305,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -2756,7 +2757,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -8852,13 +9356,17 @@ case $host_os in
+@@ -8858,13 +9362,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -2780,7 +2781,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -8919,6 +9427,11 @@ fi
+@@ -8925,6 +9433,11 @@ fi
  
  
  
@@ -2792,7 +2793,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -9269,7 +9782,8 @@ _LT_EOF
+@@ -9275,7 +9788,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -2802,7 +2803,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9368,12 +9882,12 @@ _LT_EOF
+@@ -9374,12 +9888,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -2817,7 +2818,7 @@
  	  fi
  	  ;;
  	esac
-@@ -9387,8 +9901,8 @@ _LT_EOF
+@@ -9393,8 +9907,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -2828,7 +2829,7 @@
        fi
        ;;
  
-@@ -9406,8 +9920,8 @@ _LT_EOF
+@@ -9412,8 +9926,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2839,7 +2840,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9453,8 +9967,8 @@ _LT_EOF
+@@ -9459,8 +9973,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2850,7 +2851,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9584,7 +10098,13 @@ _LT_EOF
+@@ -9590,7 +10104,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -2865,7 +2866,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9597,22 +10117,29 @@ main ()
+@@ -9603,22 +10123,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -2908,7 +2909,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9624,7 +10151,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9630,7 +10157,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -2923,7 +2924,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9637,22 +10170,29 @@ main ()
+@@ -9643,22 +10176,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -2966,7 +2967,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -9697,20 +10237,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9703,20 +10243,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
        # no search path for DLLs.
@@ -3044,7 +3045,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -9771,7 +10354,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9777,7 +10360,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -3053,7 +3054,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -9779,7 +10362,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9785,7 +10368,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -3062,7 +3063,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -9795,7 +10378,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9801,7 +10384,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -3071,7 +3072,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -9819,10 +10402,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9825,10 +10408,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -3084,7 +3085,7 @@
  	  ;;
  	esac
        else
-@@ -9901,23 +10484,36 @@ fi
+@@ -9907,23 +10490,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -3129,7 +3130,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -10002,7 +10598,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10008,7 +10604,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -3138,7 +3139,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -10021,9 +10617,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10027,9 +10623,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -3150,7 +3151,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -10599,8 +11195,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10605,8 +11201,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -3162,7 +3163,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -10633,13 +11230,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10639,13 +11236,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -3235,7 +3236,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -10731,7 +11386,7 @@ haiku*)
+@@ -10737,7 +11392,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -3244,16 +3245,16 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -11527,7 +12182,7 @@ else
+@@ -11533,7 +12188,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11530 "configure"
+-#line 11536 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11571,10 +12226,10 @@ else
+@@ -11577,10 +12232,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3266,16 +3267,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11633,7 +12288,7 @@ else
+@@ -11639,7 +12294,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11636 "configure"
+-#line 11642 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11677,10 +12332,10 @@ else
+@@ -11683,10 +12338,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3288,7 +3289,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -16024,13 +16679,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -16076,13 +16731,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -3309,7 +3310,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -16045,14 +16707,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -16097,14 +16759,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -3328,7 +3329,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -16085,12 +16750,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -16137,12 +16802,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -3342,7 +3343,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -16145,8 +16810,13 @@ reload_flag \
+@@ -16197,8 +16862,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -3356,7 +3357,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -16156,12 +16826,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -16208,12 +16878,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -3372,7 +3373,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -16177,7 +16849,6 @@ no_undefined_flag \
+@@ -16229,7 +16901,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -3380,7 +3381,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -16213,6 +16884,7 @@ module_cmds \
+@@ -16265,6 +16936,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -3388,7 +3389,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -16979,7 +17651,8 @@ $as_echo X"$file" |
+@@ -17031,7 +17703,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -3398,7 +3399,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -17082,19 +17755,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -17134,19 +17807,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -3442,7 +3443,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -17124,6 +17820,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -17176,6 +17872,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -3455,7 +3456,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -17133,6 +17835,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -17185,6 +17887,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -3465,7 +3466,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -17247,12 +17952,12 @@ with_gcc=$GCC
+@@ -17299,12 +18004,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -3481,7 +3482,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -17339,9 +18044,6 @@ inherit_rpath=$inherit_rpath
+@@ -17391,9 +18096,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -3491,7 +3492,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -17357,6 +18059,9 @@ include_expsyms=$lt_include_expsyms
+@@ -17409,6 +18111,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -3501,7 +3502,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -17389,210 +18094,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -17441,210 +18146,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -3876,7 +3877,7 @@
    chmod +x "$ofile"
  
 diff --git a/gas/configure b/gas/configure
-index 60c1a055ae2..0e0ce4c0e23 100755
+index d4b13e6fc8b..dd5224c5c81 100755
 --- a/gas/configure
 +++ b/gas/configure
 @@ -681,8 +681,11 @@ OTOOL
@@ -5204,7 +5205,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15928,13 +16583,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15981,13 +16636,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -5225,7 +5226,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15949,14 +16611,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -16002,14 +16664,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -5244,7 +5245,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15989,12 +16654,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -16042,12 +16707,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -5258,7 +5259,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -16049,8 +16714,13 @@ reload_flag \
+@@ -16102,8 +16767,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -5272,7 +5273,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -16060,12 +16730,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -16113,12 +16783,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -5288,7 +5289,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -16081,7 +16753,6 @@ no_undefined_flag \
+@@ -16134,7 +16806,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -5296,7 +5297,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -16117,6 +16788,7 @@ module_cmds \
+@@ -16170,6 +16841,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -5304,7 +5305,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -16890,7 +17562,8 @@ $as_echo X"$file" |
+@@ -16943,7 +17615,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -5314,7 +5315,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -16993,19 +17666,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -17046,19 +17719,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -5358,7 +5359,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -17035,6 +17731,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -17088,6 +17784,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -5371,7 +5372,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -17044,6 +17746,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -17097,6 +17799,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -5381,7 +5382,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -17158,12 +17863,12 @@ with_gcc=$GCC
+@@ -17211,12 +17916,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -5397,7 +5398,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -17250,9 +17955,6 @@ inherit_rpath=$inherit_rpath
+@@ -17303,9 +18008,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -5407,7 +5408,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -17268,6 +17970,9 @@ include_expsyms=$lt_include_expsyms
+@@ -17321,6 +18023,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -5417,7 +5418,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -17300,210 +18005,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -17353,210 +18058,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -5792,7 +5793,7 @@
    chmod +x "$ofile"
  
 diff --git a/gprof/configure b/gprof/configure
-index c23692e5c3d..9f936a5b03d 100755
+index 3cf41b79116..e5d57f52912 100755
 --- a/gprof/configure
 +++ b/gprof/configure
 @@ -662,8 +662,11 @@ OTOOL
@@ -7707,7 +7708,7 @@
    chmod +x "$ofile"
  
 diff --git a/ld/configure b/ld/configure
-index 811134a503b..f432f4637d0 100755
+index 1c872c0db5f..fe938e6c99f 100755
 --- a/ld/configure
 +++ b/ld/configure
 @@ -691,8 +691,11 @@ OTOOL
@@ -7730,7 +7731,7 @@
  enable_libtool_lock
  enable_plugins
  enable_largefile
-@@ -1512,6 +1516,8 @@ Optional Packages:
+@@ -1520,6 +1524,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -7739,7 +7740,7 @@
    --with-lib-path=dir1:dir2...  set default LIB_PATH
    --with-sysroot=DIR Search for usr/lib et al within DIR.
    --with-system-zlib      use installed libz
-@@ -5965,8 +5971,8 @@ esac
+@@ -5973,8 +5979,8 @@ esac
  
  
  
@@ -7750,7 +7751,7 @@
  
  
  
-@@ -6006,7 +6012,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -6014,7 +6020,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -7759,7 +7760,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6692,8 +6698,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6700,8 +6706,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -7770,7 +7771,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -6742,6 +6748,80 @@ esac
+@@ -6750,6 +6756,80 @@ esac
  
  
  
@@ -7851,7 +7852,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if ${lt_cv_ld_reload_flag+:} false; then :
-@@ -6758,6 +6838,11 @@ case $reload_flag in
+@@ -6766,6 +6846,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -7863,7 +7864,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6926,7 +7011,8 @@ mingw* | pw32*)
+@@ -6934,7 +7019,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -7873,7 +7874,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -7080,6 +7166,21 @@ esac
+@@ -7088,6 +7174,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -7895,7 +7896,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -7095,9 +7196,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -7103,9 +7204,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -8060,7 +8061,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_AR+:} false; then :
-@@ -7113,7 +7367,7 @@ do
+@@ -7121,7 +7375,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -8069,7 +8070,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -7133,11 +7387,15 @@ $as_echo "no" >&6; }
+@@ -7141,11 +7395,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -8088,7 +8089,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_ac_ct_AR+:} false; then :
-@@ -7153,7 +7411,7 @@ do
+@@ -7161,7 +7419,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -8097,7 +8098,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -7172,6 +7430,10 @@ else
+@@ -7180,6 +7438,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -8108,7 +8109,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -7183,12 +7445,12 @@ ac_tool_warned=yes ;;
+@@ -7191,12 +7453,12 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -8125,7 +8126,7 @@
  
  
  
-@@ -7198,6 +7460,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -7206,6 +7468,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
  
  
  
@@ -8188,7 +8189,7 @@
  
  
  if test -n "$ac_tool_prefix"; then
-@@ -7534,8 +7852,8 @@ esac
+@@ -7542,8 +7860,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -8199,7 +8200,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -7571,6 +7889,7 @@ for ac_symprfx in "" "_"; do
+@@ -7579,6 +7897,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -8207,7 +8208,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -7612,6 +7931,18 @@ _LT_EOF
+@@ -7620,6 +7939,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -8226,7 +8227,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -7623,7 +7954,7 @@ _LT_EOF
+@@ -7631,7 +7962,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -8235,7 +8236,7 @@
    const char *name;
    void       *address;
  }
-@@ -7649,8 +7980,8 @@ static const void *lt_preloaded_setup() {
+@@ -7657,8 +7988,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -8246,7 +8247,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7660,8 +7991,8 @@ _LT_EOF
+@@ -7668,8 +7999,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -8257,7 +8258,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -7698,6 +8029,19 @@ else
+@@ -7706,6 +8037,19 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -8277,7 +8278,7 @@
  
  
  
-@@ -7714,6 +8058,42 @@ fi
+@@ -7722,6 +8066,42 @@ fi
  
  
  
@@ -8320,7 +8321,7 @@
  
  
  
-@@ -7925,6 +8305,123 @@ esac
+@@ -7933,6 +8313,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -8444,7 +8445,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -8488,6 +8985,8 @@ _LT_EOF
+@@ -8496,6 +8993,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -8453,7 +8454,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8556,6 +9055,16 @@ done
+@@ -8564,6 +9063,16 @@ done
  
  
  
@@ -8470,7 +8471,7 @@
  
  
  # Set options
-@@ -8684,7 +9193,8 @@ fi
+@@ -8692,7 +9201,8 @@ fi
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -8480,7 +8481,7 @@
  
  
  
-@@ -8773,7 +9283,7 @@ aix3*)
+@@ -8781,7 +9291,7 @@ aix3*)
  esac
  
  # Global variables:
@@ -8489,7 +8490,7 @@
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -9071,8 +9581,6 @@ fi
+@@ -9079,8 +9589,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -8498,7 +8499,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -9238,6 +9746,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -9246,6 +9754,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -8511,7 +8512,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -9300,7 +9814,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -9308,7 +9822,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -8520,7 +8521,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -9357,13 +9871,17 @@ case $host_os in
+@@ -9365,13 +9879,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -8544,7 +8545,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -9424,6 +9942,11 @@ fi
+@@ -9432,6 +9950,11 @@ fi
  
  
  
@@ -8556,7 +8557,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -9774,7 +10297,8 @@ _LT_EOF
+@@ -9782,7 +10305,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -8566,7 +8567,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9873,12 +10397,12 @@ _LT_EOF
+@@ -9881,12 +10405,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -8581,7 +8582,7 @@
  	  fi
  	  ;;
  	esac
-@@ -9892,8 +10416,8 @@ _LT_EOF
+@@ -9900,8 +10424,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -8592,7 +8593,7 @@
        fi
        ;;
  
-@@ -9911,8 +10435,8 @@ _LT_EOF
+@@ -9919,8 +10443,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8603,7 +8604,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9958,8 +10482,8 @@ _LT_EOF
+@@ -9966,8 +10490,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8614,7 +8615,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -10089,7 +10613,13 @@ _LT_EOF
+@@ -10097,7 +10621,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -8629,7 +8630,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -10102,22 +10632,29 @@ main ()
+@@ -10110,22 +10640,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -8672,7 +8673,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -10129,7 +10666,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10137,7 +10674,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -8687,7 +8688,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -10142,22 +10685,29 @@ main ()
+@@ -10150,22 +10693,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -8730,7 +8731,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -10201,21 +10751,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10209,21 +10759,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # When not using gcc, we currently assume that we are using
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -8810,7 +8811,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -10276,7 +10869,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10284,7 +10877,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -8819,7 +8820,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -10284,7 +10877,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10292,7 +10885,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -8828,7 +8829,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -10300,7 +10893,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10308,7 +10901,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -8837,7 +8838,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -10324,10 +10917,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10332,10 +10925,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -8850,7 +8851,7 @@
  	  ;;
  	esac
        else
-@@ -10406,23 +10999,36 @@ fi
+@@ -10414,23 +11007,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -8895,7 +8896,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -10507,7 +11113,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10515,7 +11121,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -8904,7 +8905,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -10526,9 +11132,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10534,9 +11140,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -8916,7 +8917,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -11104,8 +11710,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -11112,8 +11718,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -8928,7 +8929,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -11138,13 +11745,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -11146,13 +11753,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -9001,7 +9002,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -11236,7 +11901,7 @@ haiku*)
+@@ -11244,7 +11909,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -9010,16 +9011,16 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -12032,7 +12697,7 @@ else
+@@ -12040,7 +12705,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 12035 "configure"
+-#line 12040 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -12076,10 +12741,10 @@ else
+@@ -12084,10 +12749,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9032,16 +9033,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12138,7 +12803,7 @@ else
+@@ -12146,7 +12811,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 12141 "configure"
+-#line 12146 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -12182,10 +12847,10 @@ else
+@@ -12190,10 +12855,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9054,7 +9055,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12577,6 +13242,7 @@ $RM -r conftest*
+@@ -12585,6 +13250,7 @@ $RM -r conftest*
  
    # Allow CC to be a program name with arguments.
    lt_save_CC=$CC
@@ -9062,7 +9063,7 @@
    lt_save_LD=$LD
    lt_save_GCC=$GCC
    GCC=$GXX
-@@ -12594,6 +13260,7 @@ $RM -r conftest*
+@@ -12602,6 +13268,7 @@ $RM -r conftest*
    fi
    test -z "${LDCXX+set}" || LD=$LDCXX
    CC=${CXX-"c++"}
@@ -9070,7 +9071,7 @@
    compiler=$CC
    compiler_CXX=$CC
    for cc_temp in $compiler""; do
-@@ -12876,7 +13543,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -12884,7 +13551,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
            allow_undefined_flag_CXX='-berok'
            # Determine the default libpath from the value encoded in an empty
            # executable.
@@ -9085,7 +9086,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -12889,22 +13562,29 @@ main ()
+@@ -12897,22 +13570,29 @@ main ()
  _ACEOF
  if ac_fn_cxx_try_link "$LINENO"; then :
  
@@ -9128,7 +9129,7 @@
  
            hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
  
-@@ -12917,7 +13597,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12925,7 +13605,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
            else
  	    # Determine the default libpath from the value encoded in an
  	    # empty executable.
@@ -9143,7 +9144,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -12930,22 +13616,29 @@ main ()
+@@ -12938,22 +13624,29 @@ main ()
  _ACEOF
  if ac_fn_cxx_try_link "$LINENO"; then :
  
@@ -9186,7 +9187,7 @@
  
  	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
  	    # Warning - without using the other run time loading flags,
-@@ -12988,29 +13681,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12996,29 +13689,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
          ;;
  
        cygwin* | mingw* | pw32* | cegcc*)
@@ -9285,7 +9286,7 @@
        darwin* | rhapsody*)
  
  
-@@ -13116,7 +13855,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13124,7 +13863,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
              ;;
            *)
              if test "$GXX" = yes; then
@@ -9294,7 +9295,7 @@
              else
                # FIXME: insert proper C++ library support
                ld_shlibs_CXX=no
-@@ -13187,10 +13926,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13195,10 +13934,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  	            ;;
  	          ia64*)
@@ -9307,7 +9308,7 @@
  	            ;;
  	        esac
  	      fi
-@@ -13231,9 +13970,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13239,9 +13978,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
            *)
  	    if test "$GXX" = yes; then
  	      if test "$with_gnu_ld" = no; then
@@ -9319,7 +9320,7 @@
  	      fi
  	    fi
  	    link_all_deplibs_CXX=yes
-@@ -13303,20 +14042,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13311,20 +14050,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	      prelink_cmds_CXX='tpldir=Template.dir~
  		rm -rf $tpldir~
  		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -9344,7 +9345,7 @@
  	      ;;
  	    *) # Version 6 and above use weak symbols
  	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -13511,7 +14250,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13519,7 +14258,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  		  ;;
  	        *)
@@ -9353,7 +9354,7 @@
  		  ;;
  	      esac
  
-@@ -13557,7 +14296,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13565,7 +14304,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
        solaris*)
          case $cc_basename in
@@ -9362,7 +9363,7 @@
  	    # Sun C++ 4.2, 5.x and Centerline C++
              archive_cmds_need_lc_CXX=yes
  	    no_undefined_flag_CXX=' -zdefs'
-@@ -13598,9 +14337,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13606,9 +14345,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
  	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -9374,7 +9375,7 @@
  
  	        # Commands to make compiler produce verbose output that lists
  	        # what "hidden" libraries, object files and flags are used when
-@@ -13735,6 +14474,13 @@ private:
+@@ -13743,6 +14482,13 @@ private:
  };
  _LT_EOF
  
@@ -9388,7 +9389,7 @@
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    (eval $ac_compile) 2>&5
    ac_status=$?
-@@ -13748,7 +14494,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13756,7 +14502,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    pre_test_object_deps_done=no
  
    for p in `eval "$output_verbose_link_cmd"`; do
@@ -9397,7 +9398,7 @@
  
      -L* | -R* | -l*)
         # Some compilers place space between "-{L,R}" and the path.
-@@ -13757,13 +14503,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13765,13 +14511,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
            test $p = "-R"; then
  	 prev=$p
  	 continue
@@ -9424,7 +9425,7 @@
  	   # Internal compiler library paths should come after those
  	   # provided the user.  The postdeps already come after the
  	   # user supplied libs so there is no need to process them.
-@@ -13783,8 +14538,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13791,8 +14546,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
  	 fi
         fi
@@ -9435,7 +9436,7 @@
      *.$objext)
         # This assumes that the test object file only shows up
         # once in the compiler output.
-@@ -13820,6 +14577,7 @@ else
+@@ -13828,6 +14585,7 @@ else
  fi
  
  $RM -f confest.$objext
@@ -9443,7 +9444,7 @@
  
  # PORTME: override above test on systems where it is broken
  case $host_os in
-@@ -13855,7 +14613,7 @@ linux*)
+@@ -13863,7 +14621,7 @@ linux*)
  
  solaris*)
    case $cc_basename in
@@ -9452,7 +9453,7 @@
      # The more standards-conforming stlport4 library is
      # incompatible with the Cstd library. Avoid specifying
      # it if it's in CXXFLAGS. Ignore libCrun as
-@@ -13920,8 +14678,6 @@ fi
+@@ -13928,8 +14686,6 @@ fi
  lt_prog_compiler_pic_CXX=
  lt_prog_compiler_static_CXX=
  
@@ -9461,7 +9462,7 @@
  
    # C++ specific cases for pic, static, wl, etc.
    if test "$GXX" = yes; then
-@@ -14026,6 +14782,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -14034,6 +14790,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	  ;;
  	esac
  	;;
@@ -9473,7 +9474,7 @@
        dgux*)
  	case $cc_basename in
  	  ec++*)
-@@ -14178,7 +14939,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -14186,7 +14947,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	;;
        solaris*)
  	case $cc_basename in
@@ -9482,7 +9483,7 @@
  	    # Sun C++ 4.2, 5.x and Centerline C++
  	    lt_prog_compiler_pic_CXX='-KPIC'
  	    lt_prog_compiler_static_CXX='-Bstatic'
-@@ -14243,10 +15004,17 @@ case $host_os in
+@@ -14251,10 +15012,17 @@ case $host_os in
      lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
      ;;
  esac
@@ -9503,7 +9504,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -14304,6 +15072,8 @@ fi
+@@ -14312,6 +15080,8 @@ fi
  
  
  
@@ -9512,7 +9513,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -14481,6 +15251,7 @@ fi
+@@ -14489,6 +15259,7 @@ fi
  $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
  
    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -9520,7 +9521,7 @@
    case $host_os in
    aix[4-9]*)
      # If we're using GNU nm, then we don't want the "-C" option.
-@@ -14495,15 +15266,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -14503,15 +15274,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
      ;;
    pw32*)
      export_symbols_cmds_CXX="$ltdll_cmds"
@@ -9546,7 +9547,7 @@
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
  $as_echo "$ld_shlibs_CXX" >&6; }
-@@ -14766,8 +15542,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14774,8 +15550,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -9558,7 +9559,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -14799,13 +15576,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14807,13 +15584,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -9631,7 +9632,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -14896,7 +15731,7 @@ haiku*)
+@@ -14904,7 +15739,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -9640,7 +9641,7 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -15355,6 +16190,7 @@ fi
+@@ -15363,6 +16198,7 @@ fi
    fi # test -n "$compiler"
  
    CC=$lt_save_CC
@@ -9648,7 +9649,7 @@
    LDCXX=$LD
    LD=$lt_save_LD
    GCC=$lt_save_GCC
-@@ -18477,13 +19313,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -18554,13 +19390,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -9669,7 +9670,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -18498,14 +19341,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -18575,14 +19418,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -9688,7 +9689,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -18538,12 +19384,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -18615,12 +19461,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -9702,7 +9703,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -18582,8 +19428,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
+@@ -18659,8 +19505,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
  compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
  GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
  lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9712,7 +9713,7 @@
  lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
  lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
  archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18610,12 +19456,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
+@@ -18687,12 +19533,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
  hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
  inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9726,7 +9727,7 @@
  file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
  hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
  compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18653,8 +19499,13 @@ reload_flag \
+@@ -18730,8 +19576,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -9740,7 +9741,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -18664,12 +19515,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -18741,12 +19592,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -9756,7 +9757,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -18685,7 +19538,6 @@ no_undefined_flag \
+@@ -18762,7 +19615,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -9764,7 +9765,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -18707,8 +19559,8 @@ LD_CXX \
+@@ -18784,8 +19636,8 @@ LD_CXX \
  reload_flag_CXX \
  compiler_CXX \
  lt_prog_compiler_no_builtin_flag_CXX \
@@ -9774,7 +9775,7 @@
  lt_prog_compiler_static_CXX \
  lt_cv_prog_compiler_c_o_CXX \
  export_dynamic_flag_spec_CXX \
-@@ -18720,7 +19572,6 @@ no_undefined_flag_CXX \
+@@ -18797,7 +19649,6 @@ no_undefined_flag_CXX \
  hardcode_libdir_flag_spec_CXX \
  hardcode_libdir_flag_spec_ld_CXX \
  hardcode_libdir_separator_CXX \
@@ -9782,7 +9783,7 @@
  exclude_expsyms_CXX \
  include_expsyms_CXX \
  file_list_spec_CXX \
-@@ -18754,6 +19605,7 @@ module_cmds \
+@@ -18831,6 +19682,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -9790,7 +9791,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -18768,7 +19620,8 @@ archive_expsym_cmds_CXX \
+@@ -18845,7 +19697,8 @@ archive_expsym_cmds_CXX \
  module_cmds_CXX \
  module_expsym_cmds_CXX \
  export_symbols_cmds_CXX \
@@ -9800,7 +9801,7 @@
      case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
      *[\\\\\\\`\\"\\\$]*)
        eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-@@ -19533,7 +20386,8 @@ $as_echo X"$file" |
+@@ -19610,7 +20463,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -9810,7 +9811,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -19636,19 +20490,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -19713,19 +20567,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -9854,7 +9855,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -19678,6 +20555,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -19755,6 +20632,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -9867,7 +9868,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -19687,6 +20570,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -19764,6 +20647,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -9877,7 +9878,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -19801,12 +20687,12 @@ with_gcc=$GCC
+@@ -19878,12 +20764,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -9893,7 +9894,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -19893,9 +20779,6 @@ inherit_rpath=$inherit_rpath
+@@ -19970,9 +20856,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -9903,7 +9904,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -19911,6 +20794,9 @@ include_expsyms=$lt_include_expsyms
+@@ -19988,6 +20871,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -9913,7 +9914,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -19957,210 +20843,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -20034,210 +20920,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -10287,7 +10288,7 @@
      (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    chmod +x "$ofile"
  
-@@ -20188,12 +21033,12 @@ with_gcc=$GCC_CXX
+@@ -20265,12 +21110,12 @@ with_gcc=$GCC_CXX
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
  
@@ -10303,7 +10304,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static_CXX
  
-@@ -20280,9 +21125,6 @@ inherit_rpath=$inherit_rpath_CXX
+@@ -20357,9 +21202,6 @@ inherit_rpath=$inherit_rpath_CXX
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs_CXX
  
@@ -10313,7 +10314,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols_CXX
  
-@@ -20298,6 +21140,9 @@ include_expsyms=$lt_include_expsyms_CXX
+@@ -20375,6 +21217,9 @@ include_expsyms=$lt_include_expsyms_CXX
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds_CXX
  
@@ -10324,7 +10325,7 @@
  file_list_spec=$lt_file_list_spec_CXX
  
 diff --git a/libctf/configure b/libctf/configure
-index e5493b31691..9977e4f7a42 100755
+index 1dc1b65fac3..c5c2f36bbc0 100755
 --- a/libctf/configure
 +++ b/libctf/configure
 @@ -663,6 +663,8 @@ OTOOL
@@ -10336,7 +10337,7 @@
  OBJDUMP
  LN_S
  NM
-@@ -778,6 +780,7 @@ enable_static
+@@ -790,6 +792,7 @@ enable_static
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -10344,7 +10345,7 @@
  enable_libtool_lock
  enable_largefile
  enable_werror_always
-@@ -1436,6 +1439,8 @@ Optional Packages:
+@@ -1448,6 +1451,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -10353,7 +10354,7 @@
    --with-system-zlib      use installed libz
  
  Some influential environment variables:
-@@ -5324,8 +5329,8 @@ esac
+@@ -5406,8 +5411,8 @@ esac
  
  
  
@@ -10364,7 +10365,7 @@
  
  
  
-@@ -5436,7 +5441,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5518,7 +5523,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -10373,7 +10374,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6122,8 +6127,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6204,8 +6209,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -10384,7 +10385,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -6172,6 +6177,80 @@ esac
+@@ -6254,6 +6259,80 @@ esac
  
  
  
@@ -10465,7 +10466,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if ${lt_cv_ld_reload_flag+:} false; then :
-@@ -6188,6 +6267,11 @@ case $reload_flag in
+@@ -6270,6 +6349,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -10477,7 +10478,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6356,7 +6440,8 @@ mingw* | pw32*)
+@@ -6438,7 +6522,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -10487,7 +10488,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -6510,6 +6595,21 @@ esac
+@@ -6592,6 +6677,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -10509,7 +10510,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6525,9 +6625,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6607,9 +6707,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -10674,7 +10675,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_AR+:} false; then :
-@@ -6543,7 +6796,7 @@ do
+@@ -6625,7 +6878,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -10683,7 +10684,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6563,11 +6816,15 @@ $as_echo "no" >&6; }
+@@ -6645,11 +6898,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -10702,7 +10703,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if ${ac_cv_prog_ac_ct_AR+:} false; then :
-@@ -6583,7 +6840,7 @@ do
+@@ -6665,7 +6922,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
@@ -10711,7 +10712,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6602,6 +6859,10 @@ else
+@@ -6684,6 +6941,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -10722,7 +10723,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -6613,16 +6874,72 @@ ac_tool_warned=yes ;;
+@@ -6695,16 +6956,72 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -10799,7 +10800,7 @@
  
  
  
-@@ -6964,8 +7281,8 @@ esac
+@@ -7046,8 +7363,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -10810,7 +10811,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -7001,6 +7318,7 @@ for ac_symprfx in "" "_"; do
+@@ -7083,6 +7400,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -10818,7 +10819,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -7042,6 +7360,18 @@ _LT_EOF
+@@ -7124,6 +7442,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -10837,7 +10838,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -7053,7 +7383,7 @@ _LT_EOF
+@@ -7135,7 +7465,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -10846,7 +10847,7 @@
    const char *name;
    void       *address;
  }
-@@ -7079,8 +7409,8 @@ static const void *lt_preloaded_setup() {
+@@ -7161,8 +7491,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -10857,7 +10858,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7090,8 +7420,8 @@ _LT_EOF
+@@ -7172,8 +7502,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -10868,7 +10869,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -7128,6 +7458,16 @@ else
+@@ -7210,6 +7540,16 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -10885,7 +10886,7 @@
  
  
  
-@@ -7144,6 +7484,45 @@ fi
+@@ -7226,6 +7566,45 @@ fi
  
  
  
@@ -10931,7 +10932,7 @@
  
  
  
-@@ -7355,6 +7734,123 @@ esac
+@@ -7437,6 +7816,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -11055,7 +11056,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -7918,6 +8414,8 @@ _LT_EOF
+@@ -8000,6 +8496,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -11064,7 +11065,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8083,7 +8581,8 @@ fi
+@@ -8165,7 +8663,8 @@ fi
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -11074,7 +11075,7 @@
  
  
  
-@@ -8172,7 +8671,7 @@ aix3*)
+@@ -8254,7 +8753,7 @@ aix3*)
  esac
  
  # Global variables:
@@ -11083,7 +11084,7 @@
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8470,8 +8969,6 @@ fi
+@@ -8552,8 +9051,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -11092,7 +11093,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -8637,6 +9134,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8719,6 +9216,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -11105,7 +11106,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -8699,7 +9202,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8781,7 +9284,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -11114,7 +11115,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -8756,13 +9259,17 @@ case $host_os in
+@@ -8838,13 +9341,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -11138,7 +11139,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -8823,6 +9330,11 @@ fi
+@@ -8905,6 +9412,11 @@ fi
  
  
  
@@ -11150,7 +11151,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -9173,7 +9685,8 @@ _LT_EOF
+@@ -9255,7 +9767,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -11160,7 +11161,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9272,12 +9785,12 @@ _LT_EOF
+@@ -9354,12 +9867,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -11175,7 +11176,7 @@
  	  fi
  	  ;;
  	esac
-@@ -9291,8 +9804,8 @@ _LT_EOF
+@@ -9373,8 +9886,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -11186,7 +11187,7 @@
        fi
        ;;
  
-@@ -9310,8 +9823,8 @@ _LT_EOF
+@@ -9392,8 +9905,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -11197,7 +11198,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9357,8 +9870,8 @@ _LT_EOF
+@@ -9439,8 +9952,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -11208,7 +11209,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9488,7 +10001,13 @@ _LT_EOF
+@@ -9570,7 +10083,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -11223,7 +11224,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9501,22 +10020,29 @@ main ()
+@@ -9583,22 +10102,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -11266,7 +11267,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9528,7 +10054,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9610,7 +10136,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -11281,7 +11282,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9541,22 +10073,29 @@ main ()
+@@ -9623,22 +10155,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -11324,7 +11325,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -9601,20 +10140,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9683,20 +10222,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
        # no search path for DLLs.
@@ -11402,7 +11403,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -9675,7 +10257,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9757,7 +10339,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -11411,7 +11412,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -9683,7 +10265,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9765,7 +10347,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -11420,7 +11421,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -9699,7 +10281,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9781,7 +10363,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -11429,7 +11430,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -9723,10 +10305,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9805,10 +10387,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -11442,7 +11443,7 @@
  	  ;;
  	esac
        else
-@@ -9805,23 +10387,36 @@ fi
+@@ -9887,23 +10469,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -11487,7 +11488,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9906,7 +10501,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9988,7 +10583,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -11496,7 +11497,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -9925,9 +10520,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10007,9 +10602,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -11508,7 +11509,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -10503,8 +11098,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10585,8 +11180,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -11520,7 +11521,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -10537,13 +11133,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10619,13 +11215,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -11593,7 +11594,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -10635,7 +11289,7 @@ haiku*)
+@@ -10717,7 +11371,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -11602,16 +11603,16 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -11431,7 +12085,7 @@ else
+@@ -11513,7 +12167,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11434 "configure"
+-#line 11516 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11475,10 +12129,10 @@ else
+@@ -11557,10 +12211,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -11624,16 +11625,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11537,7 +12191,7 @@ else
+@@ -11619,7 +12273,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11540 "configure"
+-#line 11622 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11581,10 +12235,10 @@ else
+@@ -11663,10 +12317,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -11646,7 +11647,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -13994,13 +14648,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -14110,13 +14764,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -11667,7 +11668,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -14015,14 +14676,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -14131,14 +14792,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -11686,7 +11687,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -14055,12 +14719,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -14171,12 +14835,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -11700,7 +11701,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -14115,8 +14779,13 @@ reload_flag \
+@@ -14231,8 +14895,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -11714,7 +11715,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -14126,12 +14795,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -14242,12 +14911,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -11730,7 +11731,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -14147,7 +14818,6 @@ no_undefined_flag \
+@@ -14263,7 +14934,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -11738,7 +11739,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -14183,6 +14853,7 @@ module_cmds \
+@@ -14299,6 +14969,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -11746,7 +11747,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -14939,7 +15610,8 @@ $as_echo X"$file" |
+@@ -15055,7 +15726,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -11756,7 +11757,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -15042,19 +15714,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -15158,19 +15830,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -11800,7 +11801,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -15084,6 +15779,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -15200,6 +15895,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -11813,7 +11814,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -15093,6 +15794,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -15209,6 +15910,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -11823,7 +11824,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -15207,12 +15911,12 @@ with_gcc=$GCC
+@@ -15323,12 +16027,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -11839,7 +11840,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -15299,9 +16003,6 @@ inherit_rpath=$inherit_rpath
+@@ -15415,9 +16119,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -11849,7 +11850,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -15317,6 +16018,9 @@ include_expsyms=$lt_include_expsyms
+@@ -15433,6 +16134,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -11859,7 +11860,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -15349,210 +16053,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -15465,210 +16169,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -19317,7 +19318,7 @@
  # These exist entirely to fool aclocal when bootstrapping libtool.
  #
 diff --git a/opcodes/configure b/opcodes/configure
-index 4723dcdc1e8..006ccdaa458 100755
+index 8d1e561c942..a0291dfbfa7 100755
 --- a/opcodes/configure
 +++ b/opcodes/configure
 @@ -680,6 +680,9 @@ OTOOL
@@ -21229,6 +21230,1924 @@
      (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    chmod +x "$ofile"
  
+diff --git a/zlib/configure b/zlib/configure
+index de6fa7e9960..cce448b6a53 100755
+--- a/zlib/configure
++++ b/zlib/configure
+@@ -646,8 +646,11 @@ OTOOL
+ LIPO
+ NMEDIT
+ DSYMUTIL
++MANIFEST_TOOL
+ RANLIB
++ac_ct_AR
+ AR
++DLLTOOL
+ OBJDUMP
+ LN_S
+ NM
+@@ -774,6 +777,7 @@ enable_static
+ with_pic
+ enable_fast_install
+ with_gnu_ld
++with_libtool_sysroot
+ enable_libtool_lock
+ enable_host_shared
+ '
+@@ -1428,6 +1432,8 @@ Optional Packages:
+   --with-pic              try to use only PIC/non-PIC objects [default=use
+                           both]
+   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
++  --with-libtool-sysroot=DIR Search for dependent libraries within DIR
++                        (or the compiler's sysroot if not specified).
+ 
+ Some influential environment variables:
+   CC          C compiler command
+@@ -4147,8 +4153,8 @@ esac
+ 
+ 
+ 
+-macro_version='2.2.7a'
+-macro_revision='1.3134'
++macro_version='2.4'
++macro_revision='1.3293'
+ 
+ 
+ 
+@@ -4188,7 +4194,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+ $as_echo_n "checking how to print strings... " >&6; }
+ # Test print first, because it will be a builtin if present.
+-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+   ECHO='print -r --'
+ elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+@@ -5004,8 +5010,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+ # Try some XSI features
+ xsi_shell=no
+ ( _lt_dummy="a/b/c"
+-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+-      = c,a/b,, \
++  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
++      = c,a/b,b/c, \
+     && eval 'test $(( 1 + 1 )) -eq 2 \
+     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+   && xsi_shell=yes
+@@ -5054,6 +5060,80 @@ esac
+ 
+ 
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
++$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
++if ${lt_cv_to_host_file_cmd+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $host in
++  *-*-mingw* )
++    case $build in
++      *-*-mingw* ) # actually msys
++        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
++        ;;
++      *-*-cygwin* )
++        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
++        ;;
++      * ) # otherwise, assume *nix
++        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
++        ;;
++    esac
++    ;;
++  *-*-cygwin* )
++    case $build in
++      *-*-mingw* ) # actually msys
++        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
++        ;;
++      *-*-cygwin* )
++        lt_cv_to_host_file_cmd=func_convert_file_noop
++        ;;
++      * ) # otherwise, assume *nix
++        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
++        ;;
++    esac
++    ;;
++  * ) # unhandled hosts (and "normal" native builds)
++    lt_cv_to_host_file_cmd=func_convert_file_noop
++    ;;
++esac
++
++fi
++
++to_host_file_cmd=$lt_cv_to_host_file_cmd
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
++$as_echo "$lt_cv_to_host_file_cmd" >&6; }
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
++if ${lt_cv_to_tool_file_cmd+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  #assume ordinary cross tools, or native build.
++lt_cv_to_tool_file_cmd=func_convert_file_noop
++case $host in
++  *-*-mingw* )
++    case $build in
++      *-*-mingw* ) # actually msys
++        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
++        ;;
++    esac
++    ;;
++esac
++
++fi
++
++to_tool_file_cmd=$lt_cv_to_tool_file_cmd
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
++$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
++
++
++
++
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+ $as_echo_n "checking for $LD option to reload object files... " >&6; }
+ if ${lt_cv_ld_reload_flag+:} false; then :
+@@ -5070,6 +5150,11 @@ case $reload_flag in
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
++  cygwin* | mingw* | pw32* | cegcc*)
++    if test "$GCC" != yes; then
++      reload_cmds=false
++    fi
++    ;;
+   darwin*)
+     if test "$GCC" = yes; then
+       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+@@ -5238,7 +5323,8 @@ mingw* | pw32*)
+     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+     lt_cv_file_magic_cmd='func_win32_libid'
+   else
+-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
++    # Keep this pattern in sync with the one in func_win32_libid.
++    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+     lt_cv_file_magic_cmd='$OBJDUMP -f'
+   fi
+   ;;
+@@ -5392,6 +5478,21 @@ esac
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+ $as_echo "$lt_cv_deplibs_check_method" >&6; }
++
++file_magic_glob=
++want_nocaseglob=no
++if test "$build" = "$host"; then
++  case $host_os in
++  mingw* | pw32*)
++    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
++      want_nocaseglob=yes
++    else
++      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
++    fi
++    ;;
++  esac
++fi
++
+ file_magic_cmd=$lt_cv_file_magic_cmd
+ deplibs_check_method=$lt_cv_deplibs_check_method
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -5405,11 +5506,165 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+ 
+ 
+ 
++
++
++
++
++
++
++
++
++
++
+ 
+ 
+ if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}ar; ac_word=$2
++  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
++set dummy ${ac_tool_prefix}dlltool; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_DLLTOOL+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$DLLTOOL"; then
++  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++DLLTOOL=$ac_cv_prog_DLLTOOL
++if test -n "$DLLTOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
++$as_echo "$DLLTOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_DLLTOOL"; then
++  ac_ct_DLLTOOL=$DLLTOOL
++  # Extract the first word of "dlltool", so it can be a program name with args.
++set dummy dlltool; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_DLLTOOL"; then
++  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
++if test -n "$ac_ct_DLLTOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
++$as_echo "$ac_ct_DLLTOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_DLLTOOL" = x; then
++    DLLTOOL="false"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    DLLTOOL=$ac_ct_DLLTOOL
++  fi
++else
++  DLLTOOL="$ac_cv_prog_DLLTOOL"
++fi
++
++test -z "$DLLTOOL" && DLLTOOL=dlltool
++
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
++$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_sharedlib_from_linklib_cmd='unknown'
++
++case $host_os in
++cygwin* | mingw* | pw32* | cegcc*)
++  # two different shell functions defined in ltmain.sh
++  # decide which to use based on capabilities of $DLLTOOL
++  case `$DLLTOOL --help 2>&1` in
++  *--identify-strict*)
++    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
++    ;;
++  *)
++    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
++    ;;
++  esac
++  ;;
++*)
++  # fallback: assume linklib IS sharedlib
++  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
++  ;;
++esac
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
++
++
++
++
++
++
++
++
++if test -n "$ac_tool_prefix"; then
++  for ac_prog in ar
++  do
++    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if ${ac_cv_prog_AR+:} false; then :
+@@ -5425,7 +5680,7 @@ do
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+-    ac_cv_prog_AR="${ac_tool_prefix}ar"
++    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+@@ -5445,11 +5700,15 @@ $as_echo "no" >&6; }
+ fi
+ 
+ 
++    test -n "$AR" && break
++  done
+ fi
+-if test -z "$ac_cv_prog_AR"; then
++if test -z "$AR"; then
+   ac_ct_AR=$AR
+-  # Extract the first word of "ar", so it can be a program name with args.
+-set dummy ar; ac_word=$2
++  for ac_prog in ar
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if ${ac_cv_prog_ac_ct_AR+:} false; then :
+@@ -5465,7 +5724,7 @@ do
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+-    ac_cv_prog_ac_ct_AR="ar"
++    ac_cv_prog_ac_ct_AR="$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+@@ -5484,6 +5743,10 @@ else
+ $as_echo "no" >&6; }
+ fi
+ 
++
++  test -n "$ac_ct_AR" && break
++done
++
+   if test "x$ac_ct_AR" = x; then
+     AR="false"
+   else
+@@ -5495,16 +5758,72 @@ ac_tool_warned=yes ;;
+ esac
+     AR=$ac_ct_AR
+   fi
+-else
+-  AR="$ac_cv_prog_AR"
+ fi
+ 
+-test -z "$AR" && AR=ar
+-test -z "$AR_FLAGS" && AR_FLAGS=cru
++: ${AR=ar}
++: ${AR_FLAGS=cru}
++
++
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
++$as_echo_n "checking for archiver @FILE support... " >&6; }
++if ${lt_cv_ar_at_file+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_ar_at_file=no
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
+ 
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  echo conftest.$ac_objext > conftest.lst
++      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
++      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
++  (eval $lt_ar_try) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++      if test "$ac_status" -eq 0; then
++	# Ensure the archiver fails upon bogus file names.
++	rm -f conftest.$ac_objext libconftest.a
++	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
++  (eval $lt_ar_try) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++	if test "$ac_status" -ne 0; then
++          lt_cv_ar_at_file=@
++        fi
++      fi
++      rm -f conftest.* libconftest.a
+ 
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
++$as_echo "$lt_cv_ar_at_file" >&6; }
+ 
++if test "x$lt_cv_ar_at_file" = xno; then
++  archiver_list_spec=
++else
++  archiver_list_spec=$lt_cv_ar_at_file
++fi
+ 
+ 
+ 
+@@ -5846,8 +6165,8 @@ esac
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ 
+ # Transform an extracted symbol line into symbol name and symbol address
+-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+ 
+ # Handle CRLF in mingw tool chain
+ opt_cr=
+@@ -5883,6 +6202,7 @@ for ac_symprfx in "" "_"; do
+   else
+     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+   fi
++  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+ 
+   # Check to see that the pipe works correctly.
+   pipe_works=no
+@@ -5924,6 +6244,18 @@ _LT_EOF
+       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ 	  cat <<_LT_EOF > conftest.$ac_ext
++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
++/* DATA imports from DLLs on WIN32 con't be const, because runtime
++   relocations are performed -- see ld's documentation on pseudo-relocs.  */
++# define LT_DLSYM_CONST
++#elif defined(__osf__)
++/* This system does not cope well with relocations in const data.  */
++# define LT_DLSYM_CONST
++#else
++# define LT_DLSYM_CONST const
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -5935,7 +6267,7 @@ _LT_EOF
+ 	  cat <<_LT_EOF >> conftest.$ac_ext
+ 
+ /* The mapping between symbol names and symbols.  */
+-const struct {
++LT_DLSYM_CONST struct {
+   const char *name;
+   void       *address;
+ }
+@@ -5961,8 +6293,8 @@ static const void *lt_preloaded_setup() {
+ _LT_EOF
+ 	  # Now try linking the two files.
+ 	  mv conftest.$ac_objext conftstm.$ac_objext
+-	  lt_save_LIBS="$LIBS"
+-	  lt_save_CFLAGS="$CFLAGS"
++	  lt_globsym_save_LIBS=$LIBS
++	  lt_globsym_save_CFLAGS=$CFLAGS
+ 	  LIBS="conftstm.$ac_objext"
+ 	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+@@ -5972,8 +6304,8 @@ _LT_EOF
+   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ 	    pipe_works=yes
+ 	  fi
+-	  LIBS="$lt_save_LIBS"
+-	  CFLAGS="$lt_save_CFLAGS"
++	  LIBS=$lt_globsym_save_LIBS
++	  CFLAGS=$lt_globsym_save_CFLAGS
+ 	else
+ 	  echo "cannot find nm_test_func in $nlist" >&5
+ 	fi
+@@ -6010,6 +6342,19 @@ else
+ $as_echo "ok" >&6; }
+ fi
+ 
++# Response file support.
++if test "$lt_cv_nm_interface" = "MS dumpbin"; then
++  nm_file_list_spec='@'
++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
++  nm_file_list_spec='@'
++fi
++
++
++
++
++
++
++
+ 
+ 
+ 
+@@ -6027,6 +6372,41 @@ fi
+ 
+ 
+ 
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
++$as_echo_n "checking for sysroot... " >&6; }
++
++# Check whether --with-libtool-sysroot was given.
++if test "${with_libtool_sysroot+set}" = set; then :
++  withval=$with_libtool_sysroot;
++else
++  with_libtool_sysroot=no
++fi
++
++
++lt_sysroot=
++case ${with_libtool_sysroot} in #(
++ yes)
++   if test "$GCC" = yes; then
++     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
++   fi
++   ;; #(
++ /*)
++   lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
++   ;; #(
++ no|'')
++   ;; #(
++ *)
++   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
++$as_echo "${with_libtool_sysroot}" >&6; }
++   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
++   ;;
++esac
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
++$as_echo "${lt_sysroot:-no}" >&6; }
+ 
+ 
+ 
+@@ -6241,6 +6621,123 @@ esac
+ 
+ need_locks="$enable_libtool_lock"
+ 
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
++set dummy ${ac_tool_prefix}mt; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$MANIFEST_TOOL"; then
++  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
++if test -n "$MANIFEST_TOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
++$as_echo "$MANIFEST_TOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
++  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
++  # Extract the first word of "mt", so it can be a program name with args.
++set dummy mt; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_MANIFEST_TOOL"; then
++  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
++if test -n "$ac_ct_MANIFEST_TOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_MANIFEST_TOOL" = x; then
++    MANIFEST_TOOL=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
++  fi
++else
++  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
++fi
++
++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
++if ${lt_cv_path_mainfest_tool+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_path_mainfest_tool=no
++  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
++  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
++  cat conftest.err >&5
++  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
++    lt_cv_path_mainfest_tool=yes
++  fi
++  rm -f conftest*
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
++$as_echo "$lt_cv_path_mainfest_tool" >&6; }
++if test "x$lt_cv_path_mainfest_tool" != xyes; then
++  MANIFEST_TOOL=:
++fi
++
++
++
++
++
+ 
+   case $host_os in
+     rhapsody* | darwin*)
+@@ -6807,6 +7304,8 @@ _LT_EOF
+       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+       echo "$AR cru libconftest.a conftest.o" >&5
+       $AR cru libconftest.a conftest.o 2>&5
++      echo "$RANLIB libconftest.a" >&5
++      $RANLIB libconftest.a 2>&5
+       cat > conftest.c << _LT_EOF
+ int main() { return 0;}
+ _LT_EOF
+@@ -7269,7 +7768,8 @@ fi
+ LIBTOOL_DEPS="$ltmain"
+ 
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) $(top_builddir)'
++LIBTOOL="$LIBTOOL/${host_alias}-libtool"
+ 
+ 
+ 
+@@ -7358,7 +7858,7 @@ aix3*)
+ esac
+ 
+ # Global variables:
+-ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+ 
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+@@ -7656,8 +8156,6 @@ fi
+ lt_prog_compiler_pic=
+ lt_prog_compiler_static=
+ 
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+ 
+   if test "$GCC" = yes; then
+     lt_prog_compiler_wl='-Wl,'
+@@ -7823,6 +8321,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+ 	lt_prog_compiler_pic='--shared'
+ 	lt_prog_compiler_static='--static'
+ 	;;
++      nagfor*)
++	# NAG Fortran compiler
++	lt_prog_compiler_wl='-Wl,-Wl,,'
++	lt_prog_compiler_pic='-PIC'
++	lt_prog_compiler_static='-Bstatic'
++	;;
+       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+         # Portland Group compilers (*not* the Pentium gcc compiler,
+ 	# which looks to be a dead project)
+@@ -7885,7 +8389,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-Bstatic'
+       case $cc_basename in
+-      f77* | f90* | f95*)
++      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ 	lt_prog_compiler_wl='-Qoption ld ';;
+       *)
+ 	lt_prog_compiler_wl='-Wl,';;
+@@ -7942,13 +8446,17 @@ case $host_os in
+     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+     ;;
+ esac
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+-$as_echo "$lt_prog_compiler_pic" >&6; }
+-
+-
+-
+-
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
++$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
++if ${lt_cv_prog_compiler_pic+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
++$as_echo "$lt_cv_prog_compiler_pic" >&6; }
++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+ 
+ #
+ # Check to make sure the PIC flag actually works.
+@@ -8009,6 +8517,11 @@ fi
+ 
+ 
+ 
++
++
++
++
++
+ #
+ # Check to make sure the static flag actually works.
+ #
+@@ -8359,7 +8872,8 @@ _LT_EOF
+       allow_undefined_flag=unsupported
+       always_export_symbols=no
+       enable_shared_with_static_runtimes=yes
+-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
++      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
++      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ 
+       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+@@ -8458,12 +8972,12 @@ _LT_EOF
+ 	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ 	  hardcode_libdir_flag_spec=
+ 	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+-	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
++	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ 	  if test "x$supports_anon_versioning" = xyes; then
+ 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ 	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ 	      echo "local: *; };" >> $output_objdir/$libname.ver~
+-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
++	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ 	  fi
+ 	  ;;
+ 	esac
+@@ -8477,8 +8991,8 @@ _LT_EOF
+ 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ 	wlarc=
+       else
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       fi
+       ;;
+ 
+@@ -8496,8 +9010,8 @@ _LT_EOF
+ 
+ _LT_EOF
+       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+ 	ld_shlibs=no
+       fi
+@@ -8543,8 +9057,8 @@ _LT_EOF
+ 
+     *)
+       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+ 	ld_shlibs=no
+       fi
+@@ -8674,7 +9188,13 @@ _LT_EOF
+ 	allow_undefined_flag='-berok'
+         # Determine the default libpath from the value encoded in an
+         # empty executable.
+-        if test x$gcc_no_link = xyes; then
++        if test "${lt_cv_aix_libpath+set}" = set; then
++  aix_libpath=$lt_cv_aix_libpath
++else
++  if ${lt_cv_aix_libpath_+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test x$gcc_no_link = xyes; then
+   as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -8690,22 +9210,29 @@ main ()
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ 
+-lt_aix_libpath_sed='
+-    /Import File Strings/,/^$/ {
+-	/^0/ {
+-	    s/^0  *\(.*\)$/\1/
+-	    p
+-	}
+-    }'
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-# Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then
+-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-fi
++  lt_aix_libpath_sed='
++      /Import File Strings/,/^$/ {
++	  /^0/ {
++	      s/^0  *\([^ ]*\) *$/\1/
++	      p
++	  }
++      }'
++  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  # Check for a 64-bit object if we didn't find anything.
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  fi
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_="/usr/lib:/lib"
++  fi
++
++fi
++
++  aix_libpath=$lt_cv_aix_libpath_
++fi
+ 
+         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+         archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+@@ -8717,7 +9244,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 	else
+ 	 # Determine the default libpath from the value encoded in an
+ 	 # empty executable.
+-	 if test x$gcc_no_link = xyes; then
++	 if test "${lt_cv_aix_libpath+set}" = set; then
++  aix_libpath=$lt_cv_aix_libpath
++else
++  if ${lt_cv_aix_libpath_+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test x$gcc_no_link = xyes; then
+   as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -8733,22 +9266,29 @@ main ()
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ 
+-lt_aix_libpath_sed='
+-    /Import File Strings/,/^$/ {
+-	/^0/ {
+-	    s/^0  *\(.*\)$/\1/
+-	    p
+-	}
+-    }'
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-# Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then
+-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-fi
++  lt_aix_libpath_sed='
++      /Import File Strings/,/^$/ {
++	  /^0/ {
++	      s/^0  *\([^ ]*\) *$/\1/
++	      p
++	  }
++      }'
++  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  # Check for a 64-bit object if we didn't find anything.
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  fi
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_="/usr/lib:/lib"
++  fi
++
++fi
++
++  aix_libpath=$lt_cv_aix_libpath_
++fi
+ 
+ 	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ 	  # Warning - without using the other run time loading flags,
+@@ -8793,20 +9333,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+       # Microsoft Visual C++.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+       # no search path for DLLs.
+-      hardcode_libdir_flag_spec=' '
+-      allow_undefined_flag=unsupported
+-      # Tell ltmain to make .lib files, not .a files.
+-      libext=lib
+-      # Tell ltmain to make .dll files, not .so files.
+-      shrext_cmds=".dll"
+-      # FIXME: Setting linknames here is a bad hack.
+-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+-      # The linker will automatically build a .lib file if we build a DLL.
+-      old_archive_from_new_cmds='true'
+-      # FIXME: Should let the user specify the lib program.
+-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+-      fix_srcfile_path='`cygpath -w "$srcfile"`'
+-      enable_shared_with_static_runtimes=yes
++      case $cc_basename in
++      cl*)
++	# Native MSVC
++	hardcode_libdir_flag_spec=' '
++	allow_undefined_flag=unsupported
++	always_export_symbols=yes
++	file_list_spec='@'
++	# Tell ltmain to make .lib files, not .a files.
++	libext=lib
++	# Tell ltmain to make .dll files, not .so files.
++	shrext_cmds=".dll"
++	# FIXME: Setting linknames here is a bad hack.
++	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
++	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
++	  else
++	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
++	  fi~
++	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
++	  linknames='
++	# The linker will not automatically build a static lib if we build a DLL.
++	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
++	enable_shared_with_static_runtimes=yes
++	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
++	# Don't use ranlib
++	old_postinstall_cmds='chmod 644 $oldlib'
++	postlink_cmds='lt_outputfile="@OUTPUT@"~
++	  lt_tool_outputfile="@TOOL_OUTPUT@"~
++	  case $lt_outputfile in
++	    *.exe|*.EXE) ;;
++	    *)
++	      lt_outputfile="$lt_outputfile.exe"
++	      lt_tool_outputfile="$lt_tool_outputfile.exe"
++	      ;;
++	  esac~
++	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
++	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
++	    $RM "$lt_outputfile.manifest";
++	  fi'
++	;;
++      *)
++	# Assume MSVC wrapper
++	hardcode_libdir_flag_spec=' '
++	allow_undefined_flag=unsupported
++	# Tell ltmain to make .lib files, not .a files.
++	libext=lib
++	# Tell ltmain to make .dll files, not .so files.
++	shrext_cmds=".dll"
++	# FIXME: Setting linknames here is a bad hack.
++	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
++	# The linker will automatically build a .lib file if we build a DLL.
++	old_archive_from_new_cmds='true'
++	# FIXME: Should let the user specify the lib program.
++	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
++	enable_shared_with_static_runtimes=yes
++	;;
++      esac
+       ;;
+ 
+     darwin* | rhapsody*)
+@@ -8867,7 +9450,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+     freebsd* | dragonfly*)
+-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
++      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec='-R$libdir'
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
+@@ -8875,7 +9458,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 
+     hpux9*)
+       if test "$GCC" = yes; then
+-	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       else
+ 	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       fi
+@@ -8891,7 +9474,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 
+     hpux10*)
+       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++	archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+       else
+ 	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+       fi
+@@ -8915,10 +9498,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	ia64*)
+-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	*)
+-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	esac
+       else
+@@ -8997,26 +9580,39 @@ fi
+ 
+     irix5* | irix6* | nonstopux*)
+       if test "$GCC" = yes; then
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 	# Try to use the -exported_symbol ld option, if it does not
+ 	# work, assume that -exports_file does not work either and
+ 	# implicitly export all symbols.
+-        save_LDFLAGS="$LDFLAGS"
+-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+-        if test x$gcc_no_link = xyes; then
++	# This should be the same for all languages, so no per-tag cache variable.
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
++if ${lt_cv_irix_exported_symbol+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  save_LDFLAGS="$LDFLAGS"
++	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
++	   if test x$gcc_no_link = xyes; then
+   as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-int foo(void) {}
++int foo (void) { return 0; }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+-
++  lt_cv_irix_exported_symbol=yes
++else
++  lt_cv_irix_exported_symbol=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+-        LDFLAGS="$save_LDFLAGS"
++           LDFLAGS="$save_LDFLAGS"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
++$as_echo "$lt_cv_irix_exported_symbol" >&6; }
++	if test "$lt_cv_irix_exported_symbol" = yes; then
++          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
++	fi
+       else
+ 	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ 	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+@@ -9101,7 +9697,7 @@ rm -f core conftest.err conftest.$ac_objext \
+     osf4* | osf5*)	# as osf3* with the addition of -msym flag
+       if test "$GCC" = yes; then
+ 	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++	archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+       else
+ 	allow_undefined_flag=' -expect_unresolved \*'
+@@ -9120,9 +9716,9 @@ rm -f core conftest.err conftest.$ac_objext \
+       no_undefined_flag=' -z defs'
+       if test "$GCC" = yes; then
+ 	wlarc='${wl}'
+-	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++	archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+       else
+ 	case `$CC -V 2>&1` in
+ 	*"Compilers 5.0"*)
+@@ -9698,8 +10294,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+   need_version=no
+   need_lib_prefix=no
+ 
+-  case $GCC,$host_os in
+-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
++  case $GCC,$cc_basename in
++  yes,*)
++    # gcc
+     library_names_spec='$libname.dll.a'
+     # DLL is installed to $(libdir)/../bin by postinstall_cmds
+     postinstall_cmds='base_file=`basename \${file}`~
+@@ -9732,13 +10329,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       ;;
+     esac
++    dynamic_linker='Win32 ld.exe'
++    ;;
++
++  *,cl*)
++    # Native MSVC
++    libname_spec='$name'
++    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
++    library_names_spec='${libname}.dll.lib'
++
++    case $build_os in
++    mingw*)
++      sys_lib_search_path_spec=
++      lt_save_ifs=$IFS
++      IFS=';'
++      for lt_path in $LIB
++      do
++        IFS=$lt_save_ifs
++        # Let DOS variable expansion print the short 8.3 style file name.
++        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
++        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
++      done
++      IFS=$lt_save_ifs
++      # Convert to MSYS style.
++      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
++      ;;
++    cygwin*)
++      # Convert to unix form, then to dos form, then back to unix form
++      # but this time dos style (no spaces!) so that the unix form looks
++      # like /cygdrive/c/PROGRA~1:/cygdr...
++      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
++      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
++      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
++      ;;
++    *)
++      sys_lib_search_path_spec="$LIB"
++      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
++        # It is most probably a Windows format PATH.
++        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++      else
++        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
++      fi
++      # FIXME: find the short name or the path components, as spaces are
++      # common. (e.g. "Program Files" -> "PROGRA~1")
++      ;;
++    esac
++
++    # DLL is installed to $(libdir)/../bin by postinstall_cmds
++    postinstall_cmds='base_file=`basename \${file}`~
++      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
++      dldir=$destdir/`dirname \$dlpath`~
++      test -d \$dldir || mkdir -p \$dldir~
++      $install_prog $dir/$dlname \$dldir/$dlname'
++    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
++      dlpath=$dir/\$dldll~
++       $RM \$dlpath'
++    shlibpath_overrides_runpath=yes
++    dynamic_linker='Win32 link.exe'
+     ;;
+ 
+   *)
++    # Assume MSVC wrapper
+     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
++    dynamic_linker='Win32 ld.exe'
+     ;;
+   esac
+-  dynamic_linker='Win32 ld.exe'
+   # FIXME: first we should search . and the directory the executable is in
+   shlibpath_var=PATH
+   ;;
+@@ -9830,7 +10485,7 @@ haiku*)
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
++  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+   hardcode_into_libs=yes
+   ;;
+ 
+@@ -10644,7 +11299,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 10647 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -10688,10 +11343,10 @@ else
+ /* When -fvisbility=hidden is used, assume the code has been annotated
+    correspondingly for the symbols needed.  */
+ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+-void fnord () __attribute__((visibility("default")));
++int fnord () __attribute__((visibility("default")));
+ #endif
+ 
+-void fnord () { int i=42; }
++int fnord () { return 42; }
+ int main ()
+ {
+   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+@@ -10750,7 +11405,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 10753 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -10794,10 +11449,10 @@ else
+ /* When -fvisbility=hidden is used, assume the code has been annotated
+    correspondingly for the symbols needed.  */
+ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+-void fnord () __attribute__((visibility("default")));
++int fnord () __attribute__((visibility("default")));
+ #endif
+ 
+-void fnord () { int i=42; }
++int fnord () { return 42; }
+ int main ()
+ {
+   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+@@ -12267,13 +12922,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+ lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+ lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+ reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+ reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+ OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+ deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+ file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+ AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+ AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+ STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+ RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+ old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+@@ -12288,14 +12950,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+ lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+ objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+ MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+ lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+ lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+ lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+ lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+ need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+ DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+ NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+ LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+@@ -12328,12 +12993,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+ hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+ inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+ link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
+ always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+ export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+ exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+ include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+ prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+ file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+ variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+ need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+@@ -12388,8 +13053,13 @@ reload_flag \
+ OBJDUMP \
+ deplibs_check_method \
+ file_magic_cmd \
++file_magic_glob \
++want_nocaseglob \
++DLLTOOL \
++sharedlib_from_linklib_cmd \
+ AR \
+ AR_FLAGS \
++archiver_list_spec \
+ STRIP \
+ RANLIB \
+ CC \
+@@ -12399,12 +13069,14 @@ lt_cv_sys_global_symbol_pipe \
+ lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
++nm_file_list_spec \
+ lt_prog_compiler_no_builtin_flag \
+-lt_prog_compiler_wl \
+ lt_prog_compiler_pic \
++lt_prog_compiler_wl \
+ lt_prog_compiler_static \
+ lt_cv_prog_compiler_c_o \
+ need_locks \
++MANIFEST_TOOL \
+ DSYMUTIL \
+ NMEDIT \
+ LIPO \
+@@ -12420,7 +13092,6 @@ no_undefined_flag \
+ hardcode_libdir_flag_spec \
+ hardcode_libdir_flag_spec_ld \
+ hardcode_libdir_separator \
+-fix_srcfile_path \
+ exclude_expsyms \
+ include_expsyms \
+ file_list_spec \
+@@ -12456,6 +13127,7 @@ module_cmds \
+ module_expsym_cmds \
+ export_symbols_cmds \
+ prelink_cmds \
++postlink_cmds \
+ postinstall_cmds \
+ postuninstall_cmds \
+ finish_cmds \
+@@ -13054,7 +13726,8 @@ $as_echo X"$file" |
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ #
+ #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+-#                 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
++#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
++#                 Inc.
+ #   Written by Gordon Matzigkeit, 1996
+ #
+ #   This file is part of GNU Libtool.
+@@ -13157,19 +13830,42 @@ SP2NL=$lt_lt_SP2NL
+ # turn newlines into spaces.
+ NL2SP=$lt_lt_NL2SP
+ 
++# convert \$build file names to \$host format.
++to_host_file_cmd=$lt_cv_to_host_file_cmd
++
++# convert \$build files to toolchain format.
++to_tool_file_cmd=$lt_cv_to_tool_file_cmd
++
+ # An object symbol dumper.
+ OBJDUMP=$lt_OBJDUMP
+ 
+ # Method to check whether dependent libraries are shared objects.
+ deplibs_check_method=$lt_deplibs_check_method
+ 
+-# Command to use when deplibs_check_method == "file_magic".
++# Command to use when deplibs_check_method = "file_magic".
+ file_magic_cmd=$lt_file_magic_cmd
+ 
++# How to find potential files when deplibs_check_method = "file_magic".
++file_magic_glob=$lt_file_magic_glob
++
++# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
++want_nocaseglob=$lt_want_nocaseglob
++
++# DLL creation program.
++DLLTOOL=$lt_DLLTOOL
++
++# Command to associate shared and link libraries.
++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
++
+ # The archiver.
+ AR=$lt_AR
++
++# Flags to create an archive.
+ AR_FLAGS=$lt_AR_FLAGS
+ 
++# How to feed a file listing to the archiver.
++archiver_list_spec=$lt_archiver_list_spec
++
+ # A symbol stripping program.
+ STRIP=$lt_STRIP
+ 
+@@ -13199,6 +13895,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+ # Transform the output of nm in a C name address pair when lib prefix is needed.
+ global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+ 
++# Specify filename containing input files for \$NM.
++nm_file_list_spec=$lt_nm_file_list_spec
++
++# The root where to search for dependent libraries,and in which our libraries should be installed.
++lt_sysroot=$lt_sysroot
++
+ # The name of the directory that contains temporary libtool files.
+ objdir=$objdir
+ 
+@@ -13208,6 +13910,9 @@ MAGIC_CMD=$MAGIC_CMD
+ # Must we lock files when doing compilation?
+ need_locks=$lt_need_locks
+ 
++# Manifest tool.
++MANIFEST_TOOL=$lt_MANIFEST_TOOL
++
+ # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+ DSYMUTIL=$lt_DSYMUTIL
+ 
+@@ -13322,12 +14027,12 @@ with_gcc=$GCC
+ # Compiler flag to turn off builtin functions.
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+ 
+-# How to pass a linker flag through the compiler.
+-wl=$lt_lt_prog_compiler_wl
+-
+ # Additional compiler flags for building library objects.
+ pic_flag=$lt_lt_prog_compiler_pic
+ 
++# How to pass a linker flag through the compiler.
++wl=$lt_lt_prog_compiler_wl
++
+ # Compiler flag to prevent dynamic linking.
+ link_static_flag=$lt_lt_prog_compiler_static
+ 
+@@ -13414,9 +14119,6 @@ inherit_rpath=$inherit_rpath
+ # Whether libtool must link a program against all its dependency libraries.
+ link_all_deplibs=$link_all_deplibs
+ 
+-# Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path=$lt_fix_srcfile_path
+-
+ # Set to "yes" if exported symbols are required.
+ always_export_symbols=$always_export_symbols
+ 
+@@ -13432,6 +14134,9 @@ include_expsyms=$lt_include_expsyms
+ # Commands necessary for linking programs (against libraries) with templates.
+ prelink_cmds=$lt_prelink_cmds
+ 
++# Commands necessary for finishing linking programs.
++postlink_cmds=$lt_postlink_cmds
++
+ # Specify filename containing input files.
+ file_list_spec=$lt_file_list_spec
+ 
+@@ -13464,210 +14169,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+   # text mode, it properly converts lines to CR/LF.  This bash problem
+   # is reportedly fixed, but why not run on old versions too?
+-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+-    || (rm -f "$cfgfile"; exit 1)
+-
+-  case $xsi_shell in
+-  yes)
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_dirname file append nondir_replacement
+-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+-# otherwise set result to NONDIR_REPLACEMENT.
+-func_dirname ()
+-{
+-  case ${1} in
+-    */*) func_dirname_result="${1%/*}${2}" ;;
+-    *  ) func_dirname_result="${3}" ;;
+-  esac
+-}
+-
+-# func_basename file
+-func_basename ()
+-{
+-  func_basename_result="${1##*/}"
+-}
+-
+-# func_dirname_and_basename file append nondir_replacement
+-# perform func_basename and func_dirname in a single function
+-# call:
+-#   dirname:  Compute the dirname of FILE.  If nonempty,
+-#             add APPEND to the result, otherwise set result
+-#             to NONDIR_REPLACEMENT.
+-#             value returned in "$func_dirname_result"
+-#   basename: Compute filename of FILE.
+-#             value retuned in "$func_basename_result"
+-# Implementation must be kept synchronized with func_dirname
+-# and func_basename. For efficiency, we do not delegate to
+-# those functions but instead duplicate the functionality here.
+-func_dirname_and_basename ()
+-{
+-  case ${1} in
+-    */*) func_dirname_result="${1%/*}${2}" ;;
+-    *  ) func_dirname_result="${3}" ;;
+-  esac
+-  func_basename_result="${1##*/}"
+-}
+-
+-# func_stripname prefix suffix name
+-# strip PREFIX and SUFFIX off of NAME.
+-# PREFIX and SUFFIX must not contain globbing or regex special
+-# characters, hashes, percent signs, but SUFFIX may contain a leading
+-# dot (in which case that matches only a dot).
+-func_stripname ()
+-{
+-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+-  # positional parameters, so assign one to ordinary parameter first.
+-  func_stripname_result=${3}
+-  func_stripname_result=${func_stripname_result#"${1}"}
+-  func_stripname_result=${func_stripname_result%"${2}"}
+-}
+-
+-# func_opt_split
+-func_opt_split ()
+-{
+-  func_opt_split_opt=${1%%=*}
+-  func_opt_split_arg=${1#*=}
+-}
+-
+-# func_lo2o object
+-func_lo2o ()
+-{
+-  case ${1} in
+-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+-    *)    func_lo2o_result=${1} ;;
+-  esac
+-}
+-
+-# func_xform libobj-or-source
+-func_xform ()
+-{
+-  func_xform_result=${1%.*}.lo
+-}
+-
+-# func_arith arithmetic-term...
+-func_arith ()
+-{
+-  func_arith_result=$(( $* ))
+-}
+-
+-# func_len string
+-# STRING may not start with a hyphen.
+-func_len ()
+-{
+-  func_len_result=${#1}
+-}
+-
+-_LT_EOF
+-    ;;
+-  *) # Bourne compatible functions.
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_dirname file append nondir_replacement
+-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+-# otherwise set result to NONDIR_REPLACEMENT.
+-func_dirname ()
+-{
+-  # Extract subdirectory from the argument.
+-  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+-  if test "X$func_dirname_result" = "X${1}"; then
+-    func_dirname_result="${3}"
+-  else
+-    func_dirname_result="$func_dirname_result${2}"
+-  fi
+-}
+-
+-# func_basename file
+-func_basename ()
+-{
+-  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+-}
+-
+-
+-# func_stripname prefix suffix name
+-# strip PREFIX and SUFFIX off of NAME.
+-# PREFIX and SUFFIX must not contain globbing or regex special
+-# characters, hashes, percent signs, but SUFFIX may contain a leading
+-# dot (in which case that matches only a dot).
+-# func_strip_suffix prefix name
+-func_stripname ()
+-{
+-  case ${2} in
+-    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+-    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+-  esac
+-}
+-
+-# sed scripts:
+-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+-my_sed_long_arg='1s/^-[^=]*=//'
+-
+-# func_opt_split
+-func_opt_split ()
+-{
+-  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
+-  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
+-}
+-
+-# func_lo2o object
+-func_lo2o ()
+-{
+-  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+-}
+-
+-# func_xform libobj-or-source
+-func_xform ()
+-{
+-  func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+-}
+-
+-# func_arith arithmetic-term...
+-func_arith ()
+-{
+-  func_arith_result=`expr "$@"`
+-}
+-
+-# func_len string
+-# STRING may not start with a hyphen.
+-func_len ()
+-{
+-  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+-}
+-
+-_LT_EOF
+-esac
+-
+-case $lt_shell_append in
+-  yes)
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_append var value
+-# Append VALUE to the end of shell variable VAR.
+-func_append ()
+-{
+-  eval "$1+=\$2"
+-}
+-_LT_EOF
+-    ;;
+-  *)
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_append var value
+-# Append VALUE to the end of shell variable VAR.
+-func_append ()
+-{
+-  eval "$1=\$$1\$2"
+-}
+-
+-_LT_EOF
+-    ;;
+-  esac
+-
+-
+-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+-    || (rm -f "$cfgfile"; exit 1)
+-
+-  mv -f "$cfgfile" "$ofile" ||
++  sed '$q' "$ltmain" >> "$cfgfile" \
++     || (rm -f "$cfgfile"; exit 1)
++
++  if test x"$xsi_shell" = xyes; then
++  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
++func_dirname ()\
++{\
++\    case ${1} in\
++\      */*) func_dirname_result="${1%/*}${2}" ;;\
++\      *  ) func_dirname_result="${3}" ;;\
++\    esac\
++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_basename ()$/,/^} # func_basename /c\
++func_basename ()\
++{\
++\    func_basename_result="${1##*/}"\
++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
++func_dirname_and_basename ()\
++{\
++\    case ${1} in\
++\      */*) func_dirname_result="${1%/*}${2}" ;;\
++\      *  ) func_dirname_result="${3}" ;;\
++\    esac\
++\    func_basename_result="${1##*/}"\
++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
++func_stripname ()\
++{\
++\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
++\    # positional parameters, so assign one to ordinary parameter first.\
++\    func_stripname_result=${3}\
++\    func_stripname_result=${func_stripname_result#"${1}"}\
++\    func_stripname_result=${func_stripname_result%"${2}"}\
++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
++func_split_long_opt ()\
++{\
++\    func_split_long_opt_name=${1%%=*}\
++\    func_split_long_opt_arg=${1#*=}\
++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
++func_split_short_opt ()\
++{\
++\    func_split_short_opt_arg=${1#??}\
++\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
++func_lo2o ()\
++{\
++\    case ${1} in\
++\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
++\      *)    func_lo2o_result=${1} ;;\
++\    esac\
++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_xform ()$/,/^} # func_xform /c\
++func_xform ()\
++{\
++    func_xform_result=${1%.*}.lo\
++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_arith ()$/,/^} # func_arith /c\
++func_arith ()\
++{\
++    func_arith_result=$(( $* ))\
++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_len ()$/,/^} # func_len /c\
++func_len ()\
++{\
++    func_len_result=${#1}\
++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++fi
++
++if test x"$lt_shell_append" = xyes; then
++  sed -e '/^func_append ()$/,/^} # func_append /c\
++func_append ()\
++{\
++    eval "${1}+=\\${2}"\
++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
++func_append_quoted ()\
++{\
++\    func_quote_for_eval "${2}"\
++\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  # Save a `func_append' function call where possible by direct use of '+='
++  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
++    && mv -f "$cfgfile.tmp" "$cfgfile" \
++      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++  test 0 -eq $? || _lt_function_replace_fail=:
++else
++  # Save a `func_append' function call even when '+=' is not available
++  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
++    && mv -f "$cfgfile.tmp" "$cfgfile" \
++      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++  test 0 -eq $? || _lt_function_replace_fail=:
++fi
++
++if test x"$_lt_function_replace_fail" = x":"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
++fi
++
++
++   mv -f "$cfgfile" "$ofile" ||
+     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+   chmod +x "$ofile"
+ 
 -- 
-2.26.0
+2.28.0
 
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
deleted file mode 100644
index 463de80..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From ef4ad1cb9ff1b5a871ffa792a71b3ad6d14eb3dc Mon Sep 17 00:00:00 2001
-From: Zhenhua Luo <zhenhua.luo@nxp.com>
-Date: Sat, 11 Jun 2016 22:08:29 -0500
-Subject: [PATCH] fix the incorrect assembling for ppc wait mnemonic
-
-Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
-
-Upstream-Status: Pending
----
- opcodes/ppc-opc.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
-index 7ef91d819b..145953d3c4 100644
---- a/opcodes/ppc-opc.c
-+++ b/opcodes/ppc-opc.c
-@@ -5709,7 +5709,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
- {"ldepx",	X(31,29),	X_MASK,	  E500MC|PPCA2, 0,		{RT, RA0, RB}},
- 
- {"waitasec",	X(31,30),      XRTRARB_MASK, POWER8,	POWER9,		{0}},
--{"wait",	X(31,30),	XWC_MASK,    POWER9,	0,		{WC}},
- 
- {"lwepx",	X(31,31),	X_MASK,	  E500MC|PPCA2, 0,		{RT, RA0, RB}},
- 
-@@ -5763,7 +5762,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
- 
- {"waitrsv",	X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0,		{0}},
- {"waitimpl",	X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0,		{0}},
--{"wait",	X(31,62),	XWC_MASK,    E500MC|PPCA2, 0,		{WC}},
-+{"wait",	X(31,62),	XWC_MASK,    E500MC|PPCA2|POWER9, 0,	{WC}},
- 
- {"dcbstep",	XRT(31,63,0),	XRT_MASK,    E500MC|PPCA2, 0,		{RA0, RB}},
- 
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/poky/meta/recipes-devtools/binutils/binutils/0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
similarity index 89%
rename from poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
rename to poky/meta/recipes-devtools/binutils/binutils/0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
index f4f1a06..69a2383 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -1,7 +1,7 @@
-From 70f3f2d9e912ea777fa113e02cdbc3465a66e40d Mon Sep 17 00:00:00 2001
+From f791a5d84475c02356f16679b7f4ee9c9c3408aa Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:42:38 +0000
-Subject: [PATCH] Fix rpath in libtool when sysroot is enabled
+Subject: [PATCH 14/17] Fix rpath in libtool when sysroot is enabled
 
 Enabling sysroot support in libtool exposed a bug where the final
 library had an RPATH encoded into it which still pointed to the
@@ -19,7 +19,7 @@
  1 file changed, 8 insertions(+), 2 deletions(-)
 
 diff --git a/ltmain.sh b/ltmain.sh
-index 70e856e065..11ee684ccc 100644
+index 70e856e0659..11ee684cccf 100644
 --- a/ltmain.sh
 +++ b/ltmain.sh
 @@ -8035,9 +8035,11 @@ EOF
@@ -47,3 +47,6 @@
  	  if test -n "$hardcode_libdir_separator"; then
  	    if test -z "$hardcode_libdirs"; then
  	      hardcode_libdirs="$libdir"
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch b/poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
index a794719..e848f14 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
@@ -1,7 +1,7 @@
-From 392d474a72d37b669f53ab9f0fa913b958af93f6 Mon Sep 17 00:00:00 2001
+From e087f96e219d47c4d2244c3f32397e56d41bfdec Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Mon, 6 Mar 2017 23:33:27 -0800
-Subject: [PATCH] sync with OE libtool changes
+Subject: [PATCH 15/17] sync with OE libtool changes
 
 Apply these patches from our libtool patches as not only are redundant RPATHs a
 waste of space but they can cause incorrect linking when native packages are
@@ -26,7 +26,7 @@
  1 file changed, 28 insertions(+), 6 deletions(-)
 
 diff --git a/ltmain.sh b/ltmain.sh
-index 11ee684ccc..3b19ac1532 100644
+index 11ee684cccf..3b19ac15328 100644
 --- a/ltmain.sh
 +++ b/ltmain.sh
 @@ -8053,8 +8053,16 @@ EOF
@@ -84,3 +84,6 @@
  	  fi
  	elif test -n "$runpath_var"; then
  	  case "$finalize_perm_rpath " in
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch b/poky/meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch
index c694b42..400b798 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/0016-Check-for-clang-before-checking-gcc-version.patch
@@ -1,7 +1,7 @@
-From 67590a44c1256491fa674426f0170d5d05377d05 Mon Sep 17 00:00:00 2001
+From ae5a7d622dc9addb2ca9fc85889c45964c025a9c Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 15 Apr 2020 14:17:20 -0700
-Subject: [PATCH 16/16] Check for clang before checking gcc version
+Subject: [PATCH 16/17] Check for clang before checking gcc version
 
 Clang advertises itself to be gcc 4.2.1, so when compiling this test
 here fails since gcc < 4.4.5 did not support -static-libstdc++ but thats
@@ -18,10 +18,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index 590b03c2da0..46f116fdb54 100755
+index 6782f8b6ab8..72f5766b363 100755
 --- a/configure
 +++ b/configure
-@@ -5140,7 +5140,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+@@ -5143,7 +5143,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
@@ -31,10 +31,10 @@
  #endif
  int main() {}
 diff --git a/configure.ac b/configure.ac
-index d3f85e6f5d5..c0eb1343121 100644
+index 55beb1dea46..3f9e613e2d9 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1309,7 +1309,7 @@ if test "$GCC" = yes; then
+@@ -1312,7 +1312,7 @@ if test "$GCC" = yes; then
    AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
    AC_LANG_PUSH(C++)
    AC_LINK_IFELSE([AC_LANG_SOURCE([
@@ -44,5 +44,5 @@
  #endif
  int main() {}])],
 -- 
-2.26.1
+2.28.0
 
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0017-binutils-drop-redundant-program_name-definition-fno-.patch b/poky/meta/recipes-devtools/binutils/binutils/0017-binutils-drop-redundant-program_name-definition-fno-.patch
deleted file mode 100644
index be59f9d..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0017-binutils-drop-redundant-program_name-definition-fno-.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 57a3e055605b28a9449b1b27eda7125737c42b00 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <siarheit@google.com>
-Date: Sat, 1 Feb 2020 23:16:11 +0000
-Subject: [PATCH] binutils: drop redundant 'program_name' definition
- (-fno-common)
-
-	* coffdump.c (program_name): Drop redundant definition.
-	* srconv.c (program_name): Likewise
-	* sysdump.c (program_name): Likewise
-
-Upstream-Status: Backport (commit 0b398d69ac)
-Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
----
- binutils/coffdump.c | 2 --
- binutils/srconv.c   | 2 --
- binutils/sysdump.c  | 2 --
- 3 files changed, 6 deletions(-)
-
-diff --git a/binutils/coffdump.c b/binutils/coffdump.c
-index 531a4e46c3..336da57ca2 100644
---- a/binutils/coffdump.c
-+++ b/binutils/coffdump.c
-@@ -456,8 +456,6 @@ coff_dump (struct coff_ofile *ptr)
-     dump_coff_section (ptr->sections + i);
- }
- 
--char * program_name;
--
- static void
- show_usage (FILE *file, int status)
- {
-diff --git a/binutils/srconv.c b/binutils/srconv.c
-index 5742b16759..f071794f0a 100644
---- a/binutils/srconv.c
-+++ b/binutils/srconv.c
-@@ -1687,8 +1687,6 @@ prescan (struct coff_ofile *otree)
-     }
- }
- 
--char *program_name;
--
- ATTRIBUTE_NORETURN static void
- show_usage (FILE *ffile, int status)
- {
-diff --git a/binutils/sysdump.c b/binutils/sysdump.c
-index d433e71ed9..7eebbd61d3 100644
---- a/binutils/sysdump.c
-+++ b/binutils/sysdump.c
-@@ -633,8 +633,6 @@ module (void)
-     }
- }
- 
--char *program_name;
--
- ATTRIBUTE_NORETURN static void
- show_usage (FILE *ffile, int status)
- {
--- 
-2.26.2
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2020-0551.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2020-0551.patch
deleted file mode 100644
index 53e3caf..0000000
--- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2020-0551.patch
+++ /dev/null
@@ -1,549 +0,0 @@
-From ae531041c7c5956672342f89c486a011c84f027f Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Wed, 11 Mar 2020 09:46:19 -0700
-Subject: [PATCH 1/1] i386: Generate lfence with load/indirect branch/ret
- [CVE-2020-0551]
-
-Add 3 command-line options to generate lfence for load, indirect near
-branch and ret to help mitigate:
-
-https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00334.html
-http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0551
-
-1. -mlfence-after-load=[no|yes]:
-  -mlfence-after-load=yes generates lfence after load instructions.
-2. -mlfence-before-indirect-branch=[none|all|memory|register]:
-  a. -mlfence-before-indirect-branch=all generates lfence before indirect
-  near branches via register and a warning before indirect near branches
-  via memory.
-  b. -mlfence-before-indirect-branch=memory issue a warning before
-  indirect near branches via memory.
-  c. -mlfence-before-indirect-branch=register generates lfence before
-  indirect near branches via register.
-Note that lfence won't be generated before indirect near branches via
-register with -mlfence-after-load=yes since lfence will be generated
-after loading branch target register.
-3. -mlfence-before-ret=[none|or|not]
-  a. -mlfence-before-ret=or generates or with lfence before ret.
-  b. -mlfence-before-ret=not generates not with lfence before ret.
-
-A warning will be issued and lfence won't be generated before indirect
-near branch and ret if the previous item is a prefix or a constant
-directive, which may be used to hardcode an instruction, since there
-is no clear instruction boundary.
-
-	* config/tc-i386.c (lfence_after_load): New.
-	(lfence_before_indirect_branch_kind): New.
-	(lfence_before_indirect_branch): New.
-	(lfence_before_ret_kind): New.
-	(lfence_before_ret): New.
-	(last_insn): New.
-	(load_insn_p): New.
-	(insert_lfence_after): New.
-	(insert_lfence_before): New.
-	(md_assemble): Call insert_lfence_before and insert_lfence_after.
-	Set last_insn.
-	(OPTION_MLFENCE_AFTER_LOAD): New.
-	(OPTION_MLFENCE_BEFORE_INDIRECT_BRANCH): New.
-	(OPTION_MLFENCE_BEFORE_RET): New.
-	(md_longopts): Add -mlfence-after-load=,
-	-mlfence-before-indirect-branch= and -mlfence-before-ret=.
-	(md_parse_option): Handle -mlfence-after-load=,
-	-mlfence-before-indirect-branch= and -mlfence-before-ret=.
-	(md_show_usage): Display -mlfence-after-load=,
-	-mlfence-before-indirect-branch= and -mlfence-before-ret=.
-	(i386_cons_align): New.
-	* config/tc-i386.h (i386_cons_align): New.
-	(md_cons_align): New.
-	* doc/c-i386.texi: Document -mlfence-after-load=,
-	-mlfence-before-indirect-branch= and -mlfence-before-ret=.
-
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae531041c7c5956672342f89c486a011c84f027f]
-CVE: CVE-2020-0551
----
-diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
-index b020f39c863..09063f784b7 100644
---- a/gas/config/tc-i386.c
-+++ b/gas/config/tc-i386.c
-@@ -629,7 +629,29 @@ static int omit_lock_prefix = 0;
-    "lock addl $0, (%{re}sp)".  */
- static int avoid_fence = 0;
- 
--/* Type of the previous instruction.  */
-+/* 1 if lfence should be inserted after every load.  */
-+static int lfence_after_load = 0;
-+
-+/* Non-zero if lfence should be inserted before indirect branch.  */
-+static enum lfence_before_indirect_branch_kind
-+  {
-+    lfence_branch_none = 0,
-+    lfence_branch_register,
-+    lfence_branch_memory,
-+    lfence_branch_all
-+  }
-+lfence_before_indirect_branch;
-+
-+/* Non-zero if lfence should be inserted before ret.  */
-+static enum lfence_before_ret_kind
-+  {
-+    lfence_before_ret_none = 0,
-+    lfence_before_ret_not,
-+    lfence_before_ret_or
-+  }
-+lfence_before_ret;
-+
-+/* Types of previous instruction is .byte or prefix.  */
- static struct
-   {
-     segT seg;
-@@ -4311,6 +4333,283 @@ optimize_encoding (void)
-     }
- }
- 
-+/* Return non-zero for load instruction.  */
-+
-+static int
-+load_insn_p (void)
-+{
-+  unsigned int dest;
-+  int any_vex_p = is_any_vex_encoding (&i.tm);
-+  unsigned int base_opcode = i.tm.base_opcode | 1;
-+
-+  if (!any_vex_p)
-+    {
-+      /* lea  */
-+      if (i.tm.base_opcode == 0x8d)
-+	return 0;
-+
-+      /* pop  */
-+      if ((i.tm.base_opcode & ~7) == 0x58
-+	  || (i.tm.base_opcode == 0x8f && i.tm.extension_opcode == 0))
-+	return 1;
-+
-+      /* movs, cmps, lods, scas.  */
-+      if ((i.tm.base_opcode | 0xb) == 0xaf)
-+	return 1;
-+
-+      /* outs */
-+      if (base_opcode == 0x6f)
-+	return 1;
-+    }
-+
-+  /* No memory operand.  */
-+  if (!i.mem_operands)
-+    return 0;
-+
-+  if (any_vex_p)
-+    {
-+      /* vldmxcsr.  */
-+      if (i.tm.base_opcode == 0xae
-+	  && i.tm.opcode_modifier.vex
-+	  && i.tm.opcode_modifier.vexopcode == VEX0F
-+	  && i.tm.extension_opcode == 2)
-+	return 1;
-+    }
-+  else
-+    {
-+      /* test, not, neg, mul, imul, div, idiv.  */
-+      if ((i.tm.base_opcode == 0xf6 || i.tm.base_opcode == 0xf7)
-+	  && i.tm.extension_opcode != 1)
-+	return 1;
-+
-+      /* inc, dec.  */
-+      if (base_opcode == 0xff && i.tm.extension_opcode <= 1)
-+	return 1;
-+
-+      /* add, or, adc, sbb, and, sub, xor, cmp.  */
-+      if (i.tm.base_opcode >= 0x80 && i.tm.base_opcode <= 0x83)
-+	return 1;
-+
-+      /* bt, bts, btr, btc.  */
-+      if (i.tm.base_opcode == 0xfba
-+	  && (i.tm.extension_opcode >= 4 && i.tm.extension_opcode <= 7))
-+	return 1;
-+
-+      /* rol, ror, rcl, rcr, shl/sal, shr, sar. */
-+      if ((base_opcode == 0xc1
-+	   || (i.tm.base_opcode >= 0xd0 && i.tm.base_opcode <= 0xd3))
-+	  && i.tm.extension_opcode != 6)
-+	return 1;
-+
-+      /* cmpxchg8b, cmpxchg16b, xrstors.  */
-+      if (i.tm.base_opcode == 0xfc7
-+	  && (i.tm.extension_opcode == 1 || i.tm.extension_opcode == 3))
-+	return 1;
-+
-+      /* fxrstor, ldmxcsr, xrstor.  */
-+      if (i.tm.base_opcode == 0xfae
-+	  && (i.tm.extension_opcode == 1
-+	      || i.tm.extension_opcode == 2
-+	      || i.tm.extension_opcode == 5))
-+	return 1;
-+
-+      /* lgdt, lidt, lmsw.  */
-+      if (i.tm.base_opcode == 0xf01
-+	  && (i.tm.extension_opcode == 2
-+	      || i.tm.extension_opcode == 3
-+	      || i.tm.extension_opcode == 6))
-+	return 1;
-+
-+      /* vmptrld */
-+      if (i.tm.base_opcode == 0xfc7
-+	  && i.tm.extension_opcode == 6)
-+	return 1;
-+
-+      /* Check for x87 instructions.  */
-+      if (i.tm.base_opcode >= 0xd8 && i.tm.base_opcode <= 0xdf)
-+	{
-+	  /* Skip fst, fstp, fstenv, fstcw.  */
-+	  if (i.tm.base_opcode == 0xd9
-+	      && (i.tm.extension_opcode == 2
-+		  || i.tm.extension_opcode == 3
-+		  || i.tm.extension_opcode == 6
-+		  || i.tm.extension_opcode == 7))
-+	    return 0;
-+
-+	  /* Skip fisttp, fist, fistp, fstp.  */
-+	  if (i.tm.base_opcode == 0xdb
-+	      && (i.tm.extension_opcode == 1
-+		  || i.tm.extension_opcode == 2
-+		  || i.tm.extension_opcode == 3
-+		  || i.tm.extension_opcode == 7))
-+	    return 0;
-+
-+	  /* Skip fisttp, fst, fstp, fsave, fstsw.  */
-+	  if (i.tm.base_opcode == 0xdd
-+	      && (i.tm.extension_opcode == 1
-+		  || i.tm.extension_opcode == 2
-+		  || i.tm.extension_opcode == 3
-+		  || i.tm.extension_opcode == 6
-+		  || i.tm.extension_opcode == 7))
-+	    return 0;
-+
-+	  /* Skip fisttp, fist, fistp, fbstp, fistp.  */
-+	  if (i.tm.base_opcode == 0xdf
-+	      && (i.tm.extension_opcode == 1
-+		  || i.tm.extension_opcode == 2
-+		  || i.tm.extension_opcode == 3
-+		  || i.tm.extension_opcode == 6
-+		  || i.tm.extension_opcode == 7))
-+	    return 0;
-+
-+	  return 1;
-+	}
-+    }
-+
-+  dest = i.operands - 1;
-+
-+  /* Check fake imm8 operand and 3 source operands.  */
-+  if ((i.tm.opcode_modifier.immext
-+       || i.tm.opcode_modifier.vexsources == VEX3SOURCES)
-+      && i.types[dest].bitfield.imm8)
-+    dest--;
-+
-+  /* add, or, adc, sbb, and, sub, xor, cmp, test, xchg, xadd  */
-+  if (!any_vex_p
-+      && (base_opcode == 0x1
-+	  || base_opcode == 0x9
-+	  || base_opcode == 0x11
-+	  || base_opcode == 0x19
-+	  || base_opcode == 0x21
-+	  || base_opcode == 0x29
-+	  || base_opcode == 0x31
-+	  || base_opcode == 0x39
-+	  || (i.tm.base_opcode >= 0x84 && i.tm.base_opcode <= 0x87)
-+	  || base_opcode == 0xfc1))
-+    return 1;
-+
-+  /* Check for load instruction.  */
-+  return (i.types[dest].bitfield.class != ClassNone
-+	  || i.types[dest].bitfield.instance == Accum);
-+}
-+
-+/* Output lfence, 0xfaee8, after instruction.  */
-+
-+static void
-+insert_lfence_after (void)
-+{
-+  if (lfence_after_load && load_insn_p ())
-+    {
-+      char *p = frag_more (3);
-+      *p++ = 0xf;
-+      *p++ = 0xae;
-+      *p = 0xe8;
-+    }
-+}
-+
-+/* Output lfence, 0xfaee8, before instruction.  */
-+
-+static void
-+insert_lfence_before (void)
-+{
-+  char *p;
-+
-+  if (is_any_vex_encoding (&i.tm))
-+    return;
-+
-+  if (i.tm.base_opcode == 0xff
-+      && (i.tm.extension_opcode == 2 || i.tm.extension_opcode == 4))
-+    {
-+      /* Insert lfence before indirect branch if needed.  */
-+
-+      if (lfence_before_indirect_branch == lfence_branch_none)
-+	return;
-+
-+      if (i.operands != 1)
-+	abort ();
-+
-+      if (i.reg_operands == 1)
-+	{
-+	  /* Indirect branch via register.  Don't insert lfence with
-+	     -mlfence-after-load=yes.  */
-+	  if (lfence_after_load
-+	      || lfence_before_indirect_branch == lfence_branch_memory)
-+	    return;
-+	}
-+      else if (i.mem_operands == 1
-+	       && lfence_before_indirect_branch != lfence_branch_register)
-+	{
-+	  as_warn (_("indirect `%s` with memory operand should be avoided"),
-+		   i.tm.name);
-+	  return;
-+	}
-+      else
-+	return;
-+
-+      if (last_insn.kind != last_insn_other
-+	  && last_insn.seg == now_seg)
-+	{
-+	  as_warn_where (last_insn.file, last_insn.line,
-+			 _("`%s` skips -mlfence-before-indirect-branch on `%s`"),
-+			 last_insn.name, i.tm.name);
-+	  return;
-+	}
-+
-+      p = frag_more (3);
-+      *p++ = 0xf;
-+      *p++ = 0xae;
-+      *p = 0xe8;
-+      return;
-+    }
-+
-+  /* Output or/not and lfence before ret.  */
-+  if (lfence_before_ret != lfence_before_ret_none
-+      && (i.tm.base_opcode == 0xc2
-+	  || i.tm.base_opcode == 0xc3
-+	  || i.tm.base_opcode == 0xca
-+	  || i.tm.base_opcode == 0xcb))
-+    {
-+      if (last_insn.kind != last_insn_other
-+	  && last_insn.seg == now_seg)
-+	{
-+	  as_warn_where (last_insn.file, last_insn.line,
-+			 _("`%s` skips -mlfence-before-ret on `%s`"),
-+			 last_insn.name, i.tm.name);
-+	  return;
-+	}
-+      if (lfence_before_ret == lfence_before_ret_or)
-+	{
-+	  /* orl: 0x830c2400.  */
-+	  p = frag_more ((flag_code == CODE_64BIT ? 1 : 0) + 4 + 3);
-+	  if (flag_code == CODE_64BIT)
-+	    *p++ = 0x48;
-+	  *p++ = 0x83;
-+	  *p++ = 0xc;
-+	  *p++ = 0x24;
-+	  *p++ = 0x0;
-+	}
-+      else
-+	{
-+	  p = frag_more ((flag_code == CODE_64BIT ? 2 : 0) + 6 + 3);
-+	  /* notl: 0xf71424.  */
-+	  if (flag_code == CODE_64BIT)
-+	    *p++ = 0x48;
-+	  *p++ = 0xf7;
-+	  *p++ = 0x14;
-+	  *p++ = 0x24;
-+	  /* notl: 0xf71424.  */
-+	  if (flag_code == CODE_64BIT)
-+	    *p++ = 0x48;
-+	  *p++ = 0xf7;
-+	  *p++ = 0x14;
-+	  *p++ = 0x24;
-+	}
-+      *p++ = 0xf;
-+      *p++ = 0xae;
-+      *p = 0xe8;
-+    }
-+}
-+
- /* This is the guts of the machine-dependent assembler.  LINE points to a
-    machine dependent instruction.  This function is supposed to emit
-    the frags/bytes it assembles to.  */
-@@ -4628,9 +4927,13 @@ md_assemble (char *line)
-   if (i.rex != 0)
-     add_prefix (REX_OPCODE | i.rex);
- 
-+  insert_lfence_before ();
-+
-   /* We are ready to output the insn.  */
-   output_insn ();
- 
-+  insert_lfence_after ();
-+
-   last_insn.seg = now_seg;
- 
-   if (i.tm.opcode_modifier.isprefix)
-@@ -12250,6 +12553,9 @@ const char *md_shortopts = "qnO::";
- #define OPTION_MALIGN_BRANCH_PREFIX_SIZE (OPTION_MD_BASE + 28)
- #define OPTION_MALIGN_BRANCH (OPTION_MD_BASE + 29)
- #define OPTION_MBRANCHES_WITH_32B_BOUNDARIES (OPTION_MD_BASE + 30)
-+#define OPTION_MLFENCE_AFTER_LOAD (OPTION_MD_BASE + 31)
-+#define OPTION_MLFENCE_BEFORE_INDIRECT_BRANCH (OPTION_MD_BASE + 32)
-+#define OPTION_MLFENCE_BEFORE_RET (OPTION_MD_BASE + 33)
- 
- struct option md_longopts[] =
- {
-@@ -12289,6 +12595,10 @@ struct option md_longopts[] =
-   {"malign-branch-prefix-size", required_argument, NULL, OPTION_MALIGN_BRANCH_PREFIX_SIZE},
-   {"malign-branch", required_argument, NULL, OPTION_MALIGN_BRANCH},
-   {"mbranches-within-32B-boundaries", no_argument, NULL, OPTION_MBRANCHES_WITH_32B_BOUNDARIES},
-+  {"mlfence-after-load", required_argument, NULL, OPTION_MLFENCE_AFTER_LOAD},
-+  {"mlfence-before-indirect-branch", required_argument, NULL,
-+   OPTION_MLFENCE_BEFORE_INDIRECT_BRANCH},
-+  {"mlfence-before-ret", required_argument, NULL, OPTION_MLFENCE_BEFORE_RET},
-   {"mamd64", no_argument, NULL, OPTION_MAMD64},
-   {"mintel64", no_argument, NULL, OPTION_MINTEL64},
-   {NULL, no_argument, NULL, 0}
-@@ -12668,6 +12978,41 @@ md_parse_option (int c, const char *arg)
-         as_fatal (_("invalid -mfence-as-lock-add= option: `%s'"), arg);
-       break;
- 
-+    case OPTION_MLFENCE_AFTER_LOAD:
-+      if (strcasecmp (arg, "yes") == 0)
-+	lfence_after_load = 1;
-+      else if (strcasecmp (arg, "no") == 0)
-+	lfence_after_load = 0;
-+      else
-+        as_fatal (_("invalid -mlfence-after-load= option: `%s'"), arg);
-+      break;
-+
-+    case OPTION_MLFENCE_BEFORE_INDIRECT_BRANCH:
-+      if (strcasecmp (arg, "all") == 0)
-+	lfence_before_indirect_branch = lfence_branch_all;
-+      else if (strcasecmp (arg, "memory") == 0)
-+	lfence_before_indirect_branch = lfence_branch_memory;
-+      else if (strcasecmp (arg, "register") == 0)
-+	lfence_before_indirect_branch = lfence_branch_register;
-+      else if (strcasecmp (arg, "none") == 0)
-+	lfence_before_indirect_branch = lfence_branch_none;
-+      else
-+        as_fatal (_("invalid -mlfence-before-indirect-branch= option: `%s'"),
-+		  arg);
-+      break;
-+
-+    case OPTION_MLFENCE_BEFORE_RET:
-+      if (strcasecmp (arg, "or") == 0)
-+	lfence_before_ret = lfence_before_ret_or;
-+      else if (strcasecmp (arg, "not") == 0)
-+	lfence_before_ret = lfence_before_ret_not;
-+      else if (strcasecmp (arg, "none") == 0)
-+	lfence_before_ret = lfence_before_ret_none;
-+      else
-+        as_fatal (_("invalid -mlfence-before-ret= option: `%s'"),
-+		  arg);
-+      break;
-+
-     case OPTION_MRELAX_RELOCATIONS:
-       if (strcasecmp (arg, "yes") == 0)
-         generate_relax_relocations = 1;
-@@ -13025,6 +13370,15 @@ md_show_usage (FILE *stream)
-   -mbranches-within-32B-boundaries\n\
-                           align branches within 32 byte boundary\n"));
-   fprintf (stream, _("\
-+  -mlfence-after-load=[no|yes] (default: no)\n\
-+                          generate lfence after load\n"));
-+  fprintf (stream, _("\
-+  -mlfence-before-indirect-branch=[none|all|register|memory] (default: none)\n\
-+                          generate lfence before indirect near branch\n"));
-+  fprintf (stream, _("\
-+  -mlfence-before-ret=[none|or|not] (default: none)\n\
-+                          generate lfence before ret\n"));
-+  fprintf (stream, _("\
-   -mamd64                 accept only AMD64 ISA [default]\n"));
-   fprintf (stream, _("\
-   -mintel64               accept only Intel64 ISA\n"));
-@@ -13254,6 +13608,16 @@ i386_cons_align (int ignore ATTRIBUTE_UNUSED)
-       last_insn.kind = last_insn_directive;
-       last_insn.name = "constant directive";
-       last_insn.file = as_where (&last_insn.line);
-+      if (lfence_before_ret != lfence_before_ret_none)
-+	{
-+	  if (lfence_before_indirect_branch != lfence_branch_none)
-+	    as_warn (_("constant directive skips -mlfence-before-ret "
-+		       "and -mlfence-before-indirect-branch"));
-+	  else
-+	    as_warn (_("constant directive skips -mlfence-before-ret"));
-+	}
-+      else if (lfence_before_indirect_branch != lfence_branch_none)
-+	as_warn (_("constant directive skips -mlfence-before-indirect-branch"));
-     }
- }
- 
-diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
-index c536759cb38..1dd99f91bb0 100644
---- a/gas/doc/c-i386.texi
-+++ b/gas/doc/c-i386.texi
-@@ -464,6 +464,49 @@ on an instruction.  It is equivalent to
- @option{-malign-branch-prefix-size=5}.
- The default doesn't align branches.
- 
-+@cindex @samp{-mlfence-after-load=} option, i386
-+@cindex @samp{-mlfence-after-load=} option, x86-64
-+@item -mlfence-after-load=@var{no}
-+@itemx -mlfence-after-load=@var{yes}
-+These options control whether the assembler should generate lfence
-+after load instructions.  @option{-mlfence-after-load=@var{yes}} will
-+generate lfence.  @option{-mlfence-after-load=@var{no}} will not generate
-+lfence, which is the default.
-+
-+@cindex @samp{-mlfence-before-indirect-branch=} option, i386
-+@cindex @samp{-mlfence-before-indirect-branch=} option, x86-64
-+@item -mlfence-before-indirect-branch=@var{none}
-+@item -mlfence-before-indirect-branch=@var{all}
-+@item -mlfence-before-indirect-branch=@var{register}
-+@itemx -mlfence-before-indirect-branch=@var{memory}
-+These options control whether the assembler should generate lfence
-+after indirect near branch instructions.
-+@option{-mlfence-before-indirect-branch=@var{all}} will generate lfence
-+after indirect near branch via register and issue a warning before
-+indirect near branch via memory.
-+@option{-mlfence-before-indirect-branch=@var{register}} will generate
-+lfence after indirect near branch via register.
-+@option{-mlfence-before-indirect-branch=@var{memory}} will issue a
-+warning before indirect near branch via memory.
-+@option{-mlfence-before-indirect-branch=@var{none}} will not generate
-+lfence nor issue warning, which is the default.  Note that lfence won't
-+be generated before indirect near branch via register with
-+@option{-mlfence-after-load=@var{yes}} since lfence will be generated
-+after loading branch target register.
-+
-+@cindex @samp{-mlfence-before-ret=} option, i386
-+@cindex @samp{-mlfence-before-ret=} option, x86-64
-+@item -mlfence-before-ret=@var{none}
-+@item -mlfence-before-ret=@var{or}
-+@itemx -mlfence-before-ret=@var{not}
-+These options control whether the assembler should generate lfence
-+before ret.  @option{-mlfence-before-ret=@var{or}} will generate
-+generate or instruction with lfence.
-+@option{-mlfence-before-ret=@var{not}} will generate not instruction
-+with lfence.
-+@option{-mlfence-before-ret=@var{none}} will not generate lfence,
-+which is the default.
-+
- @cindex @samp{-mx86-used-note=} option, i386
- @cindex @samp{-mx86-used-note=} option, x86-64
- @item -mx86-used-note=@var{no}
--- 
-2.18.2
diff --git a/poky/meta/recipes-devtools/binutils/binutils_2.34.bb b/poky/meta/recipes-devtools/binutils/binutils_2.35.bb
similarity index 100%
rename from poky/meta/recipes-devtools/binutils/binutils_2.34.bb
rename to poky/meta/recipes-devtools/binutils/binutils_2.35.bb
diff --git a/poky/meta/recipes-devtools/build-compare/build-compare_git.bb b/poky/meta/recipes-devtools/build-compare/build-compare_git.bb
deleted file mode 100644
index 74a954d..0000000
--- a/poky/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Build Result Compare Script"
-DESCRIPTION = "This package contains scripts to find out if the build result\
-differs to a former build."
-HOMEPAGE = "https://github.com/openSUSE/build-compare"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "git://github.com/openSUSE/build-compare.git"
-
-# Date matches entry in build-compare.changes and date of SRCREV.
-#
-SRCREV = "102d844ce052c6dec6c56ee1d471bde72a1b4633"
-PE = "1"
-PV = "2020.05.29+git${SRCPV}"
-UPSTREAM_CHECK_COMMITS = "1"
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install() {
-    install -d ${D}/${bindir}
-    install -m 755 functions.sh ${D}/${bindir}
-    install -m 755 pkg-diff.sh ${D}/${bindir}
-    install -m 755 same-build-result.sh ${D}/${bindir}
-    install -m 755 srpm-check.sh ${D}/${bindir}
-}
-
-RDEPENDS_${PN} += "bash"
diff --git a/poky/meta/recipes-devtools/ccache/ccache_3.7.10.bb b/poky/meta/recipes-devtools/ccache/ccache_3.7.11.bb
similarity index 91%
rename from poky/meta/recipes-devtools/ccache/ccache_3.7.10.bb
rename to poky/meta/recipes-devtools/ccache/ccache_3.7.11.bb
index 852583d..fd004f4 100644
--- a/poky/meta/recipes-devtools/ccache/ccache_3.7.10.bb
+++ b/poky/meta/recipes-devtools/ccache/ccache_3.7.11.bb
@@ -12,7 +12,7 @@
 DEPENDS = "zlib"
 
 SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
-SRC_URI[sha256sum] = "447ddf21a5f0ffa6b6d26839ae876a6d17d0d7e3533926cdf78ecd11dad793f8"
+SRC_URI[sha256sum] = "34309a59d4b6b6b33756366aa9d3144a4655587be9f914476b4c0e2d36365f01"
 
 UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
 
diff --git a/poky/meta/recipes-devtools/distcc/distcc_3.3.3.bb b/poky/meta/recipes-devtools/distcc/distcc_3.3.3.bb
index c52f136..d92b9c3 100644
--- a/poky/meta/recipes-devtools/distcc/distcc_3.3.3.bb
+++ b/poky/meta/recipes-devtools/distcc/distcc_3.3.3.bb
@@ -17,6 +17,7 @@
 SRC_URI = "git://github.com/distcc/distcc.git \
            file://fix-gnome.patch \
            file://separatebuilddir.patch \
+           file://0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch \
            file://default \
            file://distcc \
            file://distcc.service"
diff --git a/poky/meta/recipes-devtools/distcc/files/0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch b/poky/meta/recipes-devtools/distcc/files/0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch
new file mode 100644
index 0000000..86c07c1
--- /dev/null
+++ b/poky/meta/recipes-devtools/distcc/files/0001-Fix-build-with-gcc-10-which-defaults-to-fno-common-c.patch
@@ -0,0 +1,34 @@
+From 98530865795300008fe06bb647a6fc2dddfc7967 Mon Sep 17 00:00:00 2001
+From: Romain Geissler <romain.geissler@amadeus.com>
+Date: Mon, 27 Jan 2020 09:28:43 +0000
+Subject: [PATCH] Fix build with gcc 10 which defaults to -fno-common (cf
+ https://gcc.gnu.org/gcc-10/porting_to.html)
+
+This fixes the following link error I see when I use the latest gcc 10
+git branch:
+/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/serve.o:(.bss+0x0): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
+/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/stats.o:(.data+0x20): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
+collect2: error: ld returned 1 exit status
+
+Upstream-Status: Backport [https://github.com/distcc/distcc/pull/373]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/stats.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/stats.h b/src/stats.h
+index 9bde285..74d4690 100644
+--- a/src/stats.h
++++ b/src/stats.h
+@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD,
+                 STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT,
+                 STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX };
+ 
+-const char *stats_text[20];
++extern const char *stats_text[20];
+ 
+ int  dcc_stats_init(void);
+ void dcc_stats_init_kid(void);
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-devtools/flex/flex/check-funcs.patch b/poky/meta/recipes-devtools/flex/flex/check-funcs.patch
index 037ca81..762275e 100644
--- a/poky/meta/recipes-devtools/flex/flex/check-funcs.patch
+++ b/poky/meta/recipes-devtools/flex/flex/check-funcs.patch
@@ -1,10 +1,4 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From c42de062bbdc7c31d7181c10a74202d493280ada Mon Sep 17 00:00:00 2001
-From: Explorer09 <explorer09@gmail.com>
-Date: Tue, 27 Feb 2018 09:10:12 +0800
-Subject: [PATCH] build: Move dnl comments out of AC_CHECK_FUNCS
+Subject: build: Move dnl comments out of AC_CHECK_FUNCS
 
 Due to a bug, autoheader (2.69) will treat M4 dnl comments in a quoted
 argument of AC_CHECK_FUNCS as function tokens and generate a lot of
@@ -20,28 +14,20 @@
 
 As a workaround, let's move comments out of AC_CHECK_FUNCS.
 
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
 Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
+Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
 ---
- configure.ac | 29 +++++++++++++----------------
- 1 file changed, 13 insertions(+), 16 deletions(-)
+ configure.ac | 28 +++++++++++++---------------
+ 1 file changed, 13 insertions(+), 15 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 55e774b0..d0f3b7da 100644
+index 55e774b..5ea3a93 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -166,6 +166,7 @@ strtol dnl
- AC_CHECK_FUNCS([dnl
- pow dnl           Used only by "examples/manual/expr"
- setlocale dnl     Needed only if NLS is enabled
-+reallocarr dnl    NetBSD function. Use reallocarray if not available.
- reallocarray dnl  OpenBSD function. We have replacement if not available.
- ])
- 
-diff --git a/configure.ac b/configure.ac
-index 3c977a4e..9c53590f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -158,22 +158,19 @@ AC_FUNC_REALLOC
+@@ -153,21 +153,19 @@ AC_FUNC_REALLOC
  AS_IF([test "$cross_compiling" = yes],
     AC_MSG_WARN([result $ac_cv_func_realloc_0_nonnull guessed because of cross compilation]))
  
@@ -58,7 +44,6 @@
 -AC_CHECK_FUNCS([dnl
 -pow dnl           Used only by "examples/manual/expr"
 -setlocale dnl     Needed only if NLS is enabled
--reallocarr dnl    NetBSD function. Use reallocarray if not available.
 -reallocarray dnl  OpenBSD function. We have replacement if not available.
 -])
 +dnl Autoheader (<= 2.69) bug: "dnl" comments in a quoted argument of
@@ -77,3 +62,6 @@
  
  AC_CONFIG_FILES(
  Makefile
+-- 
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0036-Enable-CET-in-cross-compiler-if-possible.patch b/poky/meta/recipes-devtools/gcc/gcc-10.1/0036-Enable-CET-in-cross-compiler-if-possible.patch
deleted file mode 100644
index af80642..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc-10.1/0036-Enable-CET-in-cross-compiler-if-possible.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 87a5ace658f2294b025e0420ef03ade1f45d926c Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Fri, 8 May 2020 06:11:05 -0700
-Subject: [PATCH] Enable CET in cross compiler if possible
-
-Don't perform CET run-time check for host when cross compiling.  Instead,
-enable CET in cross compiler if possible so that it will run on both CET
-and non-CET hosts.
-
-config/
-
-	PR bootstrap/94998
-	* cet.m4 (GCC_CET_HOST_FLAGS): Enable CET in cross compiler if
-	possible.
-
-libiberty/
-
-	PR bootstrap/94998
-	* configure: Regenerated.
-
-lto-plugin/
-
-	PR bootstrap/94998
-	* configure: Regenerated.
-
-Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/gcc/patch/20200508131105.170077-1-hjl.tools@gmail.com/]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- config/cet.m4        | 18 ++++++++++++------
- libiberty/configure  | 12 +++++++++---
- lto-plugin/configure | 16 +++++++++++-----
- 3 files changed, 32 insertions(+), 14 deletions(-)
-
-diff --git a/config/cet.m4 b/config/cet.m4
-index ea616b728a9..d9608699cd5 100644
---- a/config/cet.m4
-+++ b/config/cet.m4
-@@ -111,7 +111,8 @@ if test x$may_have_cet = xyes; then
- fi
- 
- if test x$may_have_cet = xyes; then
--  AC_TRY_RUN([
-+  if test x$cross_compiling = xno; then
-+    AC_TRY_RUN([
- static void
- foo (void)
- {
-@@ -137,12 +138,17 @@ main ()
-   bar ();
-   return 0;
- }
--  ],
--  [have_cet=no],
--  [have_cet=yes])
--  if test x$enable_cet = xno -a x$have_cet = xyes; then
--    AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
-+    ],
-+    [have_cet=no],
-+    [have_cet=yes])
-+    if test x$enable_cet = xno -a x$have_cet = xyes; then
-+      AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
-+    fi
-   fi
-+else
-+  # Enable CET in cross compiler if possible so that it will run on both
-+  # CET and non-CET hosts.
-+  have_cet=yes
- fi
- if test x$enable_cet = xyes; then
-   $1="-fcf-protection"
-diff --git a/libiberty/configure b/libiberty/configure
-index bb76cf1b823..3f82c5bb865 100755
---- a/libiberty/configure
-+++ b/libiberty/configure
-@@ -5375,7 +5375,8 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- 
- if test x$may_have_cet = xyes; then
--  if test "$cross_compiling" = yes; then :
-+  if test x$cross_compiling = xno; then
-+    if test "$cross_compiling" = yes; then :
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- as_fn_error $? "cannot run test program while cross compiling
-@@ -5420,9 +5421,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-   conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
--  if test x$enable_cet = xno -a x$have_cet = xyes; then
--    as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
-+    if test x$enable_cet = xno -a x$have_cet = xyes; then
-+      as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
-+    fi
-   fi
-+else
-+  # Enable CET in cross compiler if possible so that it will run on both
-+  # CET and non-CET hosts.
-+  have_cet=yes
- fi
- if test x$enable_cet = xyes; then
-   CET_HOST_FLAGS="-fcf-protection"
-diff --git a/lto-plugin/configure b/lto-plugin/configure
-index 1baf6cc70b8..36c6ecc5875 100755
---- a/lto-plugin/configure
-+++ b/lto-plugin/configure
-@@ -5768,7 +5768,8 @@ rm -f core conftest.err conftest.$ac_objext \
- fi
- 
- if test x$may_have_cet = xyes; then
--  if test "$cross_compiling" = yes; then :
-+  if test x$cross_compiling = xno; then
-+    if test "$cross_compiling" = yes; then :
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- as_fn_error $? "cannot run test program while cross compiling
-@@ -5813,9 +5814,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-   conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
--  if test x$enable_cet = xno -a x$have_cet = xyes; then
--    as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
-+    if test x$enable_cet = xno -a x$have_cet = xyes; then
-+      as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
-+    fi
-   fi
-+else
-+  # Enable CET in cross compiler if possible so that it will run on both
-+  # CET and non-CET hosts.
-+  have_cet=yes
- fi
- if test x$enable_cet = xyes; then
-   CET_HOST_FLAGS="-fcf-protection"
-@@ -11941,7 +11947,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 11944 "configure"
-+#line 11950 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -12047,7 +12053,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 12050 "configure"
-+#line 12056 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/pr96130.patch b/poky/meta/recipes-devtools/gcc/gcc-10.1/pr96130.patch
deleted file mode 100644
index f0e6f85..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc-10.1/pr96130.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 0d03c0ee5213703ec6d9ffa632fa5298d83adaaa Mon Sep 17 00:00:00 2001
-From: Jakub Jelinek <jakub@redhat.com>
-Date: Mon, 13 Jul 2020 18:25:53 +0200
-Subject: [PATCH] ipa-fnsummary: Fix ICE with switch predicates [PR96130]
-
-The following testcase ICEs since r10-3199.
-There is a switch with default label, where the controlling expression has
-range just 0..7 and there are case labels for all those 8 values, but
-nothing has yet optimized away the default.
-Since r10-3199, set_switch_stmt_execution_predicate sets the switch to
-default label's edge's predicate to a false predicate and then
-compute_bb_predicates propagates the predicates through the cfg, but false
-predicates aren't really added.  The caller of compute_bb_predicates
-in one place handles NULL bb->aux as false predicate:
-      if (fbi.info)
-	{
-	  if (bb->aux)
-	    bb_predicate = *(predicate *) bb->aux;
-	  else
-	    bb_predicate = false;
-	}
-      else
-	bb_predicate = true;
-but then in two further spots that the patch below is changing
-it assumes bb->aux must be non-NULL.  Those two spots are guarded by a
-condition that is only true if fbi.info is non-NULL, so I think the right
-fix is to treat NULL aux as false predicate in those spots too.
-
-2020-07-13  Jakub Jelinek  <jakub@redhat.com>
-
-	PR ipa/96130
-	* ipa-fnsummary.c (analyze_function_body): Treat NULL bb->aux
-	as false predicate.
-
-	* gcc.dg/torture/pr96130.c: New test.
-
-(cherry picked from commit 776e48e0931db69f158f40e5cb8e15463d879a42)
----
- gcc/ipa-fnsummary.c                    | 10 ++++++++--
- gcc/testsuite/gcc.dg/torture/pr96130.c | 26 ++++++++++++++++++++++++++
- 2 files changed, 34 insertions(+), 2 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/torture/pr96130.c
-
-diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
-index 045a0ecf766..55a0b272a96 100644
---- a/gcc/ipa-fnsummary.c
-+++ b/gcc/ipa-fnsummary.c
-@@ -2766,7 +2766,10 @@ analyze_function_body (struct cgraph_node *node, bool early)
- 	  edge ex;
- 	  unsigned int j;
- 	  class tree_niter_desc niter_desc;
--	  bb_predicate = *(predicate *) loop->header->aux;
-+	  if (loop->header->aux)
-+	    bb_predicate = *(predicate *) loop->header->aux;
-+	  else
-+	    bb_predicate = false;
- 
- 	  exits = get_loop_exit_edges (loop);
- 	  FOR_EACH_VEC_ELT (exits, j, ex)
-@@ -2799,7 +2802,10 @@ analyze_function_body (struct cgraph_node *node, bool early)
- 	  for (unsigned i = 0; i < loop->num_nodes; i++)
- 	    {
- 	      gimple_stmt_iterator gsi;
--	      bb_predicate = *(predicate *) body[i]->aux;
-+	      if (body[i]->aux)
-+		bb_predicate = *(predicate *) body[i]->aux;
-+	      else
-+		bb_predicate = false;
- 	      for (gsi = gsi_start_bb (body[i]); !gsi_end_p (gsi);
- 		   gsi_next (&gsi))
- 		{
-diff --git a/gcc/testsuite/gcc.dg/torture/pr96130.c b/gcc/testsuite/gcc.dg/torture/pr96130.c
-new file mode 100644
-index 00000000000..f722b9ad2a9
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/torture/pr96130.c
-@@ -0,0 +1,26 @@
-+/* PR ipa/96130 */
-+/* { dg-do compile } */
-+
-+struct S { unsigned j : 3; };
-+int k, l, m;
-+
-+void
-+foo (struct S x)
-+{
-+  while (l != 5)
-+    switch (x.j)
-+      {
-+      case 1:
-+      case 3:
-+      case 4:
-+      case 6:
-+      case 2:
-+      case 5:
-+	l = m;
-+      case 7:
-+      case 0:
-+	k = 0;
-+      default:
-+	break;
-+      }
-+}
--- 
-2.18.4
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1.inc b/poky/meta/recipes-devtools/gcc/gcc-10.2.inc
similarity index 91%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1.inc
rename to poky/meta/recipes-devtools/gcc/gcc-10.2.inc
index 5f31030..7625af5 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-10.1.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-10.2.inc
@@ -2,13 +2,13 @@
 
 # Third digit in PV should be incremented after a minor release
 
-PV = "10.1.0"
+PV = "10.2.0"
 
 # BINV should be incremented to a revision after a minor gcc release
 
-BINV = "10.1.0"
+BINV = "10.2.0"
 
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-10.1:${FILE_DIRNAME}/gcc-10.1/backport:"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
 
 DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
@@ -63,15 +63,14 @@
            file://0033-Re-introduce-spe-commandline-options.patch \
            file://0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
            file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
-           file://0036-Enable-CET-in-cross-compiler-if-possible.patch \
-           file://0037-mingw32-Enable-operation_not_supported.patch \
-           file://0038-libatomic-Do-not-enforce-march-on-aarch64.patch \
+           file://0036-mingw32-Enable-operation_not_supported.patch \
+           file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
            file://0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch \
            file://0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch \
            file://0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch \
-           file://pr96130.patch \
+           file://0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch \
 "
-SRC_URI[sha256sum] = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2"
+SRC_URI[sha256sum] = "b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c"
 
 S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
 # For dev release snapshotting
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 553ef7f..db17ae4 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -106,7 +106,7 @@
 	rm -f ${D}${bindir}/*c++
 
 	# We don't care about the gcc-<version> copies
-	rm -f ${D}${bindir}/*gcc-?.?*
+	rm -f ${D}${bindir}/*gcc-${BINV}*
 
 	# Cleanup empty directories which are not shipped
 	# we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_10.1.bb b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-cross-canadian_10.1.bb
rename to poky/meta/recipes-devtools/gcc/gcc-cross-canadian_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross_10.1.bb b/poky/meta/recipes-devtools/gcc/gcc-cross_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-cross_10.1.bb
rename to poky/meta/recipes-devtools/gcc/gcc-cross_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-crosssdk_10.1.bb b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-crosssdk_10.1.bb
rename to poky/meta/recipes-devtools/gcc/gcc-crosssdk_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index df1432e..9dcce26 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -138,6 +138,10 @@
 		ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext
 	fi
 
+	if [ "${TARGET_ARCH}" == "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then
+		ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32
+	fi
+
 	if [ "${TCLIBC}" != "glibc" ]; then
 		case "${TARGET_OS}" in
 			"linux-musl" | "linux-*spe") extra_target_os="linux";;
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime_10.1.bb b/poky/meta/recipes-devtools/gcc/gcc-runtime_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-runtime_10.1.bb
rename to poky/meta/recipes-devtools/gcc/gcc-runtime_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers_10.1.bb b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-sanitizers_10.1.bb
rename to poky/meta/recipes-devtools/gcc/gcc-sanitizers_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-source_10.1.bb b/poky/meta/recipes-devtools/gcc/gcc-source_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-source_10.1.bb
rename to poky/meta/recipes-devtools/gcc/gcc-source_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch
new file mode 100644
index 0000000..c060acc
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch
@@ -0,0 +1,66 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From fd2ec4542fd2975e6d3f2f1c1a2639945a84f9e1 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Mon, 3 Aug 2020 22:55:28 +0200
+Subject: [PATCH] aarch64: Fix up __aarch64_cas16_acq_rel fallback
+
+As mentioned in the PR, the fallback path when LSE is unavailable writes
+incorrect registers to the memory if the previous content compares equal
+to x0, x1 - it writes copy of x0, x1 from the start of function, but it
+should write x2, x3.
+
+2020-08-03  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/96402
+	* config/aarch64/lse.S (__aarch64_cas16_acq_rel): Use x2, x3 instead
+	of x(tmp0), x(tmp1) in STXP arguments.
+
+	* gcc.target/aarch64/pr96402.c: New test.
+
+(cherry picked from commit 90b43856fdff7d96d93d22970eca8a86c56e0ddc)
+---
+ gcc/testsuite/gcc.target/aarch64/pr96402.c | 16 ++++++++++++++++
+ libgcc/config/aarch64/lse.S                |  2 +-
+ 2 files changed, 17 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/aarch64/pr96402.c
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/pr96402.c b/gcc/testsuite/gcc.target/aarch64/pr96402.c
+new file mode 100644
+index 00000000000..fa2dddfac15
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/aarch64/pr96402.c
+@@ -0,0 +1,16 @@
++/* PR target/96402 */
++/* { dg-do run { target int128 } } */
++/* { dg-options "-moutline-atomics" } */
++
++int
++main ()
++{
++  __int128 a = 0;
++  __sync_val_compare_and_swap (&a, (__int128) 0, (__int128) 1);
++  if (a != 1)
++    __builtin_abort ();
++  __sync_val_compare_and_swap (&a, (__int128) 1, (((__int128) 0xdeadbeeffeedbac1ULL) << 64) | 0xabadcafe00c0ffeeULL);
++  if (a != ((((__int128) 0xdeadbeeffeedbac1ULL) << 64) | 0xabadcafe00c0ffeeULL))
++    __builtin_abort ();
++  return 0;
++}
+diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S
+index 64691c601c1..c8fbfbce4fd 100644
+--- a/libgcc/config/aarch64/lse.S
++++ b/libgcc/config/aarch64/lse.S
+@@ -203,7 +203,7 @@ STARTFN	NAME(cas)
+ 	cmp		x0, x(tmp0)
+ 	ccmp		x1, x(tmp1), #0, eq
+ 	bne		1f
+-	STXP		w(tmp2), x(tmp0), x(tmp1), [x4]
++	STXP		w(tmp2), x2, x3, [x4]
+ 	cbnz		w(tmp2), 0b
+ 1:	ret
+ 
+-- 
+2.26.2
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0002-gcc-poison-system-directories.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0002-gcc-poison-system-directories.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0004-64-bit-multilib-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0004-64-bit-multilib-hack.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0005-optional-libstdc.patch b/poky/meta/recipes-devtools/gcc/gcc/0005-optional-libstdc.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0005-optional-libstdc.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0005-optional-libstdc.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0006-COLLECT_GCC_OPTIONS.patch b/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0006-COLLECT_GCC_OPTIONS.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/poky/meta/recipes-devtools/gcc/gcc/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0008-fortran-cross-compile-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0008-fortran-cross-compile-hack.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0009-cpp-honor-sysroot.patch b/poky/meta/recipes-devtools/gcc/gcc/0009-cpp-honor-sysroot.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0009-cpp-honor-sysroot.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0009-cpp-honor-sysroot.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0010-MIPS64-Default-to-N64-ABI.patch b/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0010-MIPS64-Default-to-N64-ABI.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/poky/meta/recipes-devtools/gcc/gcc/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0012-gcc-Fix-argument-list-too-long-error.patch b/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
similarity index 80%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0012-gcc-Fix-argument-list-too-long-error.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
index acbd75f..88e1715 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-10.1/0012-gcc-Fix-argument-list-too-long-error.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
@@ -17,6 +17,10 @@
 Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
+RP: gcc then added *.h and *.def additions to this list, breaking the original
+fix. Add the sort to the original gcc code, leaving the tr+sort to fix the original
+issue but include the new files too as reported by Zhuang <qiuguang.zqg@alibaba-inc.com>
+
 Upstream-Status: Pending
 ---
  gcc/Makefile.in | 2 +-
@@ -31,7 +35,7 @@
  # 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))"; \
++	headers=`echo $(sort $(PLUGIN_HEADERS)) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
  	srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
  	for file in $$headers; do \
  	  if [ -f $$file ] ; then \
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0013-Disable-sdt.patch b/poky/meta/recipes-devtools/gcc/gcc/0013-Disable-sdt.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0013-Disable-sdt.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0013-Disable-sdt.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0014-libtool.patch b/poky/meta/recipes-devtools/gcc/gcc/0014-libtool.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0014-libtool.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0014-libtool.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/poky/meta/recipes-devtools/gcc/gcc/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/poky/meta/recipes-devtools/gcc/gcc/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/poky/meta/recipes-devtools/gcc/gcc/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0018-export-CPP.patch b/poky/meta/recipes-devtools/gcc/gcc/0018-export-CPP.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0018-export-CPP.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0018-export-CPP.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0019-Ensure-target-gcc-headers-can-be-included.patch b/poky/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0019-Ensure-target-gcc-headers-can-be-included.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/poky/meta/recipes-devtools/gcc/gcc/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/poky/meta/recipes-devtools/gcc/gcc/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0022-aarch64-Add-support-for-musl-ldso.patch b/poky/meta/recipes-devtools/gcc/gcc/0022-aarch64-Add-support-for-musl-ldso.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0022-aarch64-Add-support-for-musl-ldso.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0022-aarch64-Add-support-for-musl-ldso.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/poky/meta/recipes-devtools/gcc/gcc/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0024-handle-sysroot-support-for-nativesdk-gcc.patch b/poky/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0024-handle-sysroot-support-for-nativesdk-gcc.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/poky/meta/recipes-devtools/gcc/gcc/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0026-Fix-various-_FOR_BUILD-and-related-variables.patch b/poky/meta/recipes-devtools/gcc/gcc/0026-Fix-various-_FOR_BUILD-and-related-variables.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0026-Fix-various-_FOR_BUILD-and-related-variables.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0026-Fix-various-_FOR_BUILD-and-related-variables.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/poky/meta/recipes-devtools/gcc/gcc/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/poky/meta/recipes-devtools/gcc/gcc/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/poky/meta/recipes-devtools/gcc/gcc/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0030-sync-gcc-stddef.h-with-musl.patch b/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0030-sync-gcc-stddef.h-with-musl.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch b/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0032-Fix-for-testsuite-failure.patch b/poky/meta/recipes-devtools/gcc/gcc/0032-Fix-for-testsuite-failure.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0032-Fix-for-testsuite-failure.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0032-Fix-for-testsuite-failure.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0033-Re-introduce-spe-commandline-options.patch b/poky/meta/recipes-devtools/gcc/gcc/0033-Re-introduce-spe-commandline-options.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0033-Re-introduce-spe-commandline-options.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0033-Re-introduce-spe-commandline-options.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/poky/meta/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch b/poky/meta/recipes-devtools/gcc/gcc/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0037-mingw32-Enable-operation_not_supported.patch b/poky/meta/recipes-devtools/gcc/gcc/0036-mingw32-Enable-operation_not_supported.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0037-mingw32-Enable-operation_not_supported.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0036-mingw32-Enable-operation_not_supported.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.1/0038-libatomic-Do-not-enforce-march-on-aarch64.patch b/poky/meta/recipes-devtools/gcc/gcc/0037-libatomic-Do-not-enforce-march-on-aarch64.patch
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc-10.1/0038-libatomic-Do-not-enforce-march-on-aarch64.patch
rename to poky/meta/recipes-devtools/gcc/gcc/0037-libatomic-Do-not-enforce-march-on-aarch64.patch
diff --git a/poky/meta/recipes-devtools/gcc/gcc_10.1.bb b/poky/meta/recipes-devtools/gcc/gcc_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/gcc_10.1.bb
rename to poky/meta/recipes-devtools/gcc/gcc_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc-initial_10.1.bb b/poky/meta/recipes-devtools/gcc/libgcc-initial_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/libgcc-initial_10.1.bb
rename to poky/meta/recipes-devtools/gcc/libgcc-initial_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc_10.1.bb b/poky/meta/recipes-devtools/gcc/libgcc_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/libgcc_10.1.bb
rename to poky/meta/recipes-devtools/gcc/libgcc_10.2.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran_10.1.bb b/poky/meta/recipes-devtools/gcc/libgfortran_10.2.bb
similarity index 100%
rename from poky/meta/recipes-devtools/gcc/libgfortran_10.1.bb
rename to poky/meta/recipes-devtools/gcc/libgfortran_10.2.bb
diff --git a/poky/meta/recipes-devtools/git/git_2.27.0.bb b/poky/meta/recipes-devtools/git/git_2.27.0.bb
deleted file mode 100644
index 8022659..0000000
--- a/poky/meta/recipes-devtools/git/git_2.27.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
-                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
-                 "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.sha256sum] = "77ded85cbe42b1ffdc2578b460a1ef5d23bcbc6683eabcafbb0d394dffe2e787"
-SRC_URI[manpages.sha256sum] = "414e4b17133e54d846f6bfa2479f9757c50e16c013eb76167a492ae5409b8947"
-
diff --git a/poky/meta/recipes-devtools/git/git_2.28.0.bb b/poky/meta/recipes-devtools/git/git_2.28.0.bb
new file mode 100644
index 0000000..e90787d
--- /dev/null
+++ b/poky/meta/recipes-devtools/git/git_2.28.0.bb
@@ -0,0 +1,9 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+                 "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.sha256sum] = "f914c60a874d466c1e18467c864a910dd4ea22281ba6d4d58077cb0c3f115170"
+SRC_URI[manpages.sha256sum] = "3cfca28a88d5b8112ea42322b797a500a14d0acddea391aed0462aff1ab11bf7"
diff --git a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 54eb5e4..200b1f1 100644
--- a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -8,8 +8,8 @@
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-SRCREV = "696cd4a4eab1ee9fefbb7e38dbab291d741d0c5a"
-PV = "20200621+git${SRCPV}"
+SRCREV = "2593751ef276497e312d7c4ce7fd049614c7bf80"
+PV = "20200721+git${SRCPV}"
 
 SRC_URI = "git://git.savannah.gnu.org/config.git \
            file://gnu-configize.in"
diff --git a/poky/meta/recipes-devtools/go/go-1.14.inc b/poky/meta/recipes-devtools/go/go-1.14.inc
index 1050116..8f8ed89 100644
--- a/poky/meta/recipes-devtools/go/go-1.14.inc
+++ b/poky/meta/recipes-devtools/go/go-1.14.inc
@@ -1,7 +1,7 @@
 require go-common.inc
 
 GO_BASEVERSION = "1.14"
-GO_MINOR = ".4"
+GO_MINOR = ".7"
 PV .= "${GO_MINOR}"
 FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
 
@@ -18,4 +18,4 @@
     file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
 "
 SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
-SRC_URI[main.sha256sum] = "7011af3bbc2ac108d1b82ea8abb87b2e63f78844f0259be20cde4d42c5c40584"
+SRC_URI[main.sha256sum] = "064392433563660c73186991c0a315787688e7c38a561e26647686f89b6c30e3"
diff --git a/poky/meta/recipes-devtools/go/go-binary-native_1.14.4.bb b/poky/meta/recipes-devtools/go/go-binary-native_1.14.7.bb
similarity index 83%
rename from poky/meta/recipes-devtools/go/go-binary-native_1.14.4.bb
rename to poky/meta/recipes-devtools/go/go-binary-native_1.14.7.bb
index 72c9889..3452ca4 100644
--- a/poky/meta/recipes-devtools/go/go-binary-native_1.14.4.bb
+++ b/poky/meta/recipes-devtools/go/go-binary-native_1.14.7.bb
@@ -8,8 +8,8 @@
 PROVIDES = "go-native"
 
 SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
-SRC_URI[go_linux_amd64.sha256sum] = "aed845e4185a0b2a3c3d5e1d0a35491702c55889192bb9c30e67a3de6849c067"
-SRC_URI[go_linux_arm64.sha256sum] = "05dc46ada4e23a1f58e72349f7c366aae2e9c7a7f1e7653095538bc5bba5e077"
+SRC_URI[go_linux_amd64.sha256sum] = "4a7fa60f323ee1416a4b1425aefc37ea359e9d64df19c326a58953a97ad41ea5"
+SRC_URI[go_linux_arm64.sha256sum] = "fe5b6f6e441f3cb7b53ebf1a010bbebcb720ac98124984cfe2e51d72b8a58c71"
 
 UPSTREAM_CHECK_URI = "https://golang.org/dl/"
 UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/poky/meta/recipes-devtools/json-c/json-c/CVE-2020-12762.patch b/poky/meta/recipes-devtools/json-c/json-c/CVE-2020-12762.patch
deleted file mode 100644
index a45cfb6..0000000
--- a/poky/meta/recipes-devtools/json-c/json-c/CVE-2020-12762.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 099016b7e8d70a6d5dd814e788bba08d33d48426 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Mon, 4 May 2020 19:41:16 +0200
-Subject: [PATCH 1/3] Protect array_list_del_idx against size_t overflow.
-
-If the assignment of stop overflows due to idx and count being
-larger than SIZE_T_MAX in sum, out of boundary access could happen.
-
-It takes invalid usage of this function for this to happen, but
-I decided to add this check so array_list_del_idx is as safe against
-bad usage as the other arraylist functions.
-
-Upstream-Status: Backport [https://github.com/json-c/json-c/commit/31243e4d1204ef78be34b0fcae73221eee6b83be]
-CVE: CVE-2020-12762
-Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
-
----
- arraylist.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arraylist.c b/arraylist.c
-index 12ad8af6d3..e5524aca75 100644
---- a/arraylist.c
-+++ b/arraylist.c
-@@ -136,6 +136,9 @@ int array_list_del_idx(struct array_list *arr, size_t idx, size_t count)
- {
- 	size_t i, stop;
- 
-+	/* Avoid overflow in calculation with large indices. */
-+	if (idx > SIZE_T_MAX - count)
-+		return -1;
- 	stop = idx + count;
- 	if (idx >= arr->length || stop > arr->length)
- 		return -1;
-
-From 77d935b7ae7871a1940cd827e850e6063044ec45 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Mon, 4 May 2020 19:46:45 +0200
-Subject: [PATCH 2/3] Prevent division by zero in linkhash.
-
-If a linkhash with a size of zero is created, then modulo operations
-are prone to division by zero operations.
-
-Purely protective measure against bad usage.
----
- linkhash.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/linkhash.c b/linkhash.c
-index 7ea58c0abf..f05cc38030 100644
---- a/linkhash.c
-+++ b/linkhash.c
-@@ -12,6 +12,7 @@
- 
- #include "config.h"
- 
-+#include <assert.h>
- #include <limits.h>
- #include <stdarg.h>
- #include <stddef.h>
-@@ -499,6 +500,8 @@ struct lh_table *lh_table_new(int size, lh_entry_free_fn *free_fn, lh_hash_fn *h
- 	int i;
- 	struct lh_table *t;
- 
-+	/* Allocate space for elements to avoid divisions by zero. */
-+	assert(size > 0);
- 	t = (struct lh_table *)calloc(1, sizeof(struct lh_table));
- 	if (!t)
- 		return NULL;
-
-From d07b91014986900a3a75f306d302e13e005e9d67 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Mon, 4 May 2020 19:47:25 +0200
-Subject: [PATCH 3/3] Fix integer overflows.
-
-The data structures linkhash and printbuf are limited to 2 GB in size
-due to a signed integer being used to track their current size.
-
-If too much data is added, then size variable can overflow, which is
-an undefined behaviour in C programming language.
-
-Assuming that a signed int overflow just leads to a negative value,
-like it happens on many sytems (Linux i686/amd64 with gcc), then
-printbuf is vulnerable to an out of boundary write on 64 bit systems.
----
- linkhash.c |  7 +++++--
- printbuf.c | 19 ++++++++++++++++---
- 2 files changed, 21 insertions(+), 5 deletions(-)
-
-diff --git a/linkhash.c b/linkhash.c
-index f05cc38030..51e90b13a2 100644
---- a/linkhash.c
-+++ b/linkhash.c
-@@ -580,9 +580,12 @@ int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, con
- {
- 	unsigned long n;
- 
--	if (t->count >= t->size * LH_LOAD_FACTOR)
--		if (lh_table_resize(t, t->size * 2) != 0)
-+	if (t->count >= t->size * LH_LOAD_FACTOR) {
-+		/* Avoid signed integer overflow with large tables. */
-+		int new_size = INT_MAX / 2 < t->size ? t->size * 2 : INT_MAX;
-+		if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0)
- 			return -1;
-+	}
- 
- 	n = h % t->size;
- 
-diff --git a/printbuf.c b/printbuf.c
-index 976c12dde5..00822fac4f 100644
---- a/printbuf.c
-+++ b/printbuf.c
-@@ -15,6 +15,7 @@
- 
- #include "config.h"
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -65,10 +66,16 @@ static int printbuf_extend(struct printbuf *p, int min_size)
- 
- 	if (p->size >= min_size)
- 		return 0;
--
--	new_size = p->size * 2;
--	if (new_size < min_size + 8)
-+	/* Prevent signed integer overflows with large buffers. */
-+	if (min_size > INT_MAX - 8)
-+		return -1;
-+	if (p->size > INT_MAX / 2)
- 		new_size = min_size + 8;
-+	else {
-+		new_size = p->size * 2;
-+		if (new_size < min_size + 8)
-+			new_size = min_size + 8;
-+	}
- #ifdef PRINTBUF_DEBUG
- 	MC_DEBUG("printbuf_memappend: realloc "
- 	         "bpos=%d min_size=%d old_size=%d new_size=%d\n",
-@@ -83,6 +90,9 @@ static int printbuf_extend(struct printbuf *p, int min_size)
- 
- int printbuf_memappend(struct printbuf *p, const char *buf, int size)
- {
-+	/* Prevent signed integer overflows with large buffers. */
-+	if (size > INT_MAX - p->bpos - 1)
-+		return -1;
- 	if (p->size <= p->bpos + size + 1)
- 	{
- 		if (printbuf_extend(p, p->bpos + size + 1) < 0)
-@@ -100,6 +110,9 @@ int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len)
- 
- 	if (offset == -1)
- 		offset = pb->bpos;
-+	/* Prevent signed integer overflows with large buffers. */
-+	if (len > INT_MAX - offset)
-+		return -1;
- 	size_needed = offset + len;
- 	if (pb->size < size_needed)
- 	{
diff --git a/poky/meta/recipes-devtools/json-c/json-c_0.14.bb b/poky/meta/recipes-devtools/json-c/json-c_0.15.bb
similarity index 80%
rename from poky/meta/recipes-devtools/json-c/json-c_0.14.bb
rename to poky/meta/recipes-devtools/json-c/json-c_0.15.bb
index 1d501d1..2968590 100644
--- a/poky/meta/recipes-devtools/json-c/json-c_0.14.bb
+++ b/poky/meta/recipes-devtools/json-c/json-c_0.15.bb
@@ -4,11 +4,9 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
 
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
-           file://CVE-2020-12762.patch \
-"
+SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz"
 
-SRC_URI[sha256sum] = "b377de08c9b23ca3b37d9a9828107dff1de5ce208ff4ebb35005a794f30c6870"
+SRC_URI[sha256sum] = "b8d80a1ddb718b3ba7492916237bbf86609e9709fb007e7f7d4322f02341a4c6"
 
 UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
 UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch b/poky/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch
new file mode 100644
index 0000000..e3784cc
--- /dev/null
+++ b/poky/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch
@@ -0,0 +1,26 @@
+libdnf: allow reproducible binary builds
+
+Use a dummy directory for test data if not built WITH_TESTS.  Allow for overriding
+TESTDATADIR, since the default is guaranteed to be wrong for target builds.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -133,7 +133,12 @@ add_definitions(-DG_LOG_DOMAIN=\\"libdnf
+ add_definitions(-D_FILE_OFFSET_BITS=64)
+ 
+ # tests
+-add_definitions(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\")
++if(NOT WITH_TESTS)
++  set(TEST_DATA_DIR "/notests")
++elseif(NOT DEFINED TEST_DATA_DIR)
++  set(TEST_DATA_DIR "${CMAKE_SOURCE_DIR}/data/tests")
++endif()
++add_definitions(-DTESTDATADIR=\\"${TEST_DATA_DIR}\\")
+ 
+ # librhsm
+ if(ENABLE_RHSM_SUPPORT)
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb
index 947b2f2..37991e6 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb
+++ b/poky/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb
@@ -8,6 +8,7 @@
            file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
            file://0001-Add-WITH_TESTS-option.patch \
            file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \
+           file://enable_test_data_dir_set.patch \
            "
 
 SRCREV = "46a28d0cf09277fffc11392e5e362a2eda0d53a8"
diff --git a/poky/meta/recipes-devtools/llvm/llvm_git.bb b/poky/meta/recipes-devtools/llvm/llvm_git.bb
index d24ed76..4c2d490 100644
--- a/poky/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -19,7 +19,7 @@
 
 PROVIDES += "llvm${PV}"
 
-MAJOR_VERSION = "9"
+MAJOR_VERSION = "10"
 MINOR_VERSION = "0"
 PATCH_VERSION = "1"
 
@@ -29,7 +29,7 @@
 LLVM_DIR = "llvm${LLVM_RELEASE}"
 
 BRANCH = "release/${MAJOR_VERSION}.x"
-SRCREV = "c1a0a213378a458fbea1a5c77b315c7dce08fd05"
+SRCREV = "ef32c611aa214dea855364efd7ba451ec5ec3f74"
 SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH} \
            file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \
            file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
diff --git a/poky/meta/recipes-devtools/meson/meson.inc b/poky/meta/recipes-devtools/meson/meson.inc
index ffa17b3..607093a 100644
--- a/poky/meta/recipes-devtools/meson/meson.inc
+++ b/poky/meta/recipes-devtools/meson/meson.inc
@@ -16,7 +16,7 @@
            file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
            file://0001-gnome.py-prefix-g-i-paths-with-PKG_CONFIG_SYSROOT_DI.patch \
            "
-SRC_URI[sha256sum] = "f2bdf4cf0694e696b48261cdd14380fb1d0fe33d24744d8b2df0c12f33ebb662"
+SRC_URI[sha256sum] = "0a1ae2bfe2ae14ac47593537f93290fb79e9b775c55b4c53c282bc3ca3745b35"
 
 SRC_URI_append_class-native = " \
     file://0001-Make-CPU-family-warnings-fatal.patch \
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 39b1af5..623e329 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,7 +1,7 @@
-From 62c415eedb62905de76e2e0bbd156a947705cab2 Mon Sep 17 00:00:00 2001
+From 5624b5835af747b601780ad14646f9c1fb854931 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Tue, 3 Jul 2018 13:59:09 +0100
-Subject: [PATCH] Make CPU family warnings fatal
+Subject: [PATCH 1/2] Make CPU family warnings fatal
 
 Upstream-Status: Inappropriate [OE specific]
 Signed-off-by: Ross Burton <ross.burton@intel.com>
@@ -12,23 +12,23 @@
  2 files changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 17058df..18bbf86 100644
+index 219b62e..d1be65b 100644
 --- a/mesonbuild/envconfig.py
 +++ b/mesonbuild/envconfig.py
-@@ -225,7 +225,7 @@ class MachineInfo:
+@@ -199,7 +199,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)
+-            mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family))
++            raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
 
          endian = literal['endian']
          if endian not in ('little', 'big'):
 diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index a2f78a4..59fcb07 100644
+index bf09a88..8eabe78 100644
 --- a/mesonbuild/environment.py
 +++ b/mesonbuild/environment.py
-@@ -364,9 +364,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+@@ -375,9 +375,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
          trial = 'parisc'
 
      if trial not in known_cpu_families:
@@ -39,3 +39,6 @@
 
      return trial
 
+--
+2.24.0
+
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-gnome.py-prefix-g-i-paths-with-PKG_CONFIG_SYSROOT_DI.patch b/poky/meta/recipes-devtools/meson/meson/0001-gnome.py-prefix-g-i-paths-with-PKG_CONFIG_SYSROOT_DI.patch
index 35c18f0..a1f8422 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-gnome.py-prefix-g-i-paths-with-PKG_CONFIG_SYSROOT_DI.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-gnome.py-prefix-g-i-paths-with-PKG_CONFIG_SYSROOT_DI.patch
@@ -1,4 +1,4 @@
-From 7be634fa9705d0367f48a91305f9acb642ff0a11 Mon Sep 17 00:00:00 2001
+From 64aa6718c290e150dafd8da83f31cb08af00af0e Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 27 May 2020 16:43:05 +0000
 Subject: [PATCH] gnome.py: prefix g-i paths with PKG_CONFIG_SYSROOT_DIR
@@ -9,33 +9,29 @@
 
 Upstream-Status: Pending
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
- mesonbuild/modules/gnome.py | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
+ mesonbuild/modules/gnome.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index 89d5d5d..d75f2e5 100644
+index 52016f4..2b72ee4 100644
 --- a/mesonbuild/modules/gnome.py
 +++ b/mesonbuild/modules/gnome.py
-@@ -739,17 +739,17 @@ class GnomeModule(ExtensionModule):
-         if giscanner.found():
-             giscanner_path = giscanner.get_command()[0]
-             if not any(x in giscanner_path for x in gi_util_dirs_check):
--                giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
-+                giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
-         else:
--            giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
-+            giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
- 
-         gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
-         if gicompiler.found():
-             gicompiler_path = gicompiler.get_command()[0]
-             if not any(x in gicompiler_path for x in gi_util_dirs_check):
--                gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
-+                gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
-         else:
--            gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
-+            gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
- 
-         ns = kwargs.pop('namespace')
-         nsversion = kwargs.pop('nsversion')
+@@ -410,14 +410,14 @@ class GnomeModule(ExtensionModule):
+             if giscanner is not None:
+                 self.giscanner = ExternalProgram.from_entry('g-ir-scanner', giscanner)
+             elif self.gir_dep.type_name == 'pkgconfig':
+-                self.giscanner = ExternalProgram('g_ir_scanner', self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {}))
++                self.giscanner = ExternalProgram('g_ir_scanner', os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {}))
+             else:
+                 self.giscanner = self.interpreter.find_program_impl('g-ir-scanner')
+             gicompiler = state.environment.lookup_binary_entry(MachineChoice.HOST, 'g-ir-compiler')
+             if gicompiler is not None:
+                 self.gicompiler = ExternalProgram.from_entry('g-ir-compiler', gicompiler)
+             elif self.gir_dep.type_name == 'pkgconfig':
+-                self.gicompiler = ExternalProgram('g_ir_compiler', self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {}))
++                self.gicompiler = ExternalProgram('g_ir_compiler', os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {}))
+             else:
+                 self.gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
+         return self.gir_dep, self.giscanner, self.gicompiler
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
index a25c392..c0ad01e 100644
--- 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
@@ -1,4 +1,4 @@
-From 1d178fb2928d325e339b15972890ceced863d3ec Mon Sep 17 00:00:00 2001
+From 214e559d394491b1376e4cc370f75151117a3f83 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
@@ -10,15 +10,16 @@
 
 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
+index 2f0c644..d2aa565 100644
 --- a/mesonbuild/modules/python.py
 +++ b/mesonbuild/modules/python.py
-@@ -254,7 +254,7 @@ import sysconfig
+@@ -251,7 +251,7 @@ INTROSPECT_COMMAND = '''import sysconfig
  import json
  import sys
  
@@ -27,8 +28,8 @@
  
  def links_against_libpython():
      from distutils.core import Distribution, Extension
-@@ -279,12 +279,11 @@ class PythonInstallation(ExternalProgramHolder):
-         ExternalProgramHolder.__init__(self, python)
+@@ -276,12 +276,11 @@ class PythonInstallation(ExternalProgramHolder):
+         ExternalProgramHolder.__init__(self, python, interpreter.subproject)
          self.interpreter = interpreter
          self.subproject = self.interpreter.subproject
 -        prefix = self.interpreter.environment.coredata.get_builtin_option('prefix')
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 bb06d99..dce463e 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 d976d5a8abd6d42edf794d2a4c211fc6697fb14c Mon Sep 17 00:00:00 2001
+From 4b283d545152092fec12b9d80219161d11002c72 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
@@ -13,7 +13,7 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 18bbf86..e76315e 100644
+index dc20616..f54adcd 100644
 --- a/mesonbuild/envconfig.py
 +++ b/mesonbuild/envconfig.py
 @@ -36,6 +36,7 @@ _T = T.TypeVar('_T')
diff --git a/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch b/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
index 38e50d7..4653a72 100644
--- a/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
+++ b/poky/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch
@@ -1,4 +1,4 @@
-From 3af10fa8cd4e97181288d72227dea712290fd5e6 Mon Sep 17 00:00:00 2001
+From 9e3fcf192c1ca068d310c648c311f9d850214421 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Fri, 23 Nov 2018 15:28:28 +0000
 Subject: [PATCH] meson: Disable rpath stripping at install time
@@ -16,17 +16,17 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
-index ace0569..85bd8df 100644
+index 0be01fe..5406cab 100644
 --- a/mesonbuild/minstall.py
 +++ b/mesonbuild/minstall.py
-@@ -508,8 +508,11 @@ class Installer:
+@@ -512,8 +512,11 @@ class Installer:
              if file_copied:
                  self.did_install_something = True
                  try:
--                    depfixer.fix_rpath(outname, install_rpath, final_path,
+-                    depfixer.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path,
 -                                       install_name_mappings, verbose=False)
 +                    if install_rpath:
-+                        depfixer.fix_rpath(outname, install_rpath, final_path,
++                        depfixer.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path,
 +                                           install_name_mappings, verbose=False)
 +                    else:
 +                        print("RPATH changes at install time disabled")
diff --git a/poky/meta/recipes-devtools/meson/meson_0.54.3.bb b/poky/meta/recipes-devtools/meson/meson_0.55.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/meson/meson_0.54.3.bb
rename to poky/meta/recipes-devtools/meson/meson_0.55.0.bb
diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.54.3.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/meson/nativesdk-meson_0.54.3.bb
rename to poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.0.bb
diff --git a/poky/meta/recipes-devtools/nasm/nasm/0001-fix-pa_add_headers.m4-for-development-versions-of-au.patch b/poky/meta/recipes-devtools/nasm/nasm/0001-fix-pa_add_headers.m4-for-development-versions-of-au.patch
deleted file mode 100644
index b52dc5b..0000000
--- a/poky/meta/recipes-devtools/nasm/nasm/0001-fix-pa_add_headers.m4-for-development-versions-of-au.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 287964d54b64bed833adba307e1d920f8fcf0cbc Mon Sep 17 00:00:00 2001
-From: Ozkan Sezer <sezero@users.sourceforge.net>
-Date: Wed, 7 Aug 2019 15:50:50 +0300
-Subject: [PATCH] fix pa_add_headers.m4 for development versions of autoconf
- (bug 3392471)
-
-Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
----
- autoconf/m4/pa_add_headers.m4 | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 1af2dd5d..6ce3e6c1 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -169,7 +169,8 @@ dnl --------------------------------------------------------------------------
- AC_DEFUN(_PA_ADD_HEADER,
- [AC_CHECK_HEADERS([$1],[ac_includes_default="$ac_includes_default
- #include <$1>"
--])])
-+])
-+])
- 
- AC_DEFUN(PA_ADD_HEADERS,
- [m4_map_args_w([$1],[_PA_ADD_HEADER(],[)])])
diff --git a/poky/meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch b/poky/meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch
index d94fd32..0ede8a8 100644
--- a/poky/meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch
+++ b/poky/meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch
@@ -1,12 +1,13 @@
-From 8a204171004fa0d7d21389530c744d215e99efb0 Mon Sep 17 00:00:00 2001
+From 1c5023002bad3a5b0bbc181fdb324160beace733 Mon Sep 17 00:00:00 2001
 From: Joshua Watt <JPEWhacker@gmail.com>
 Date: Tue, 19 Nov 2019 12:47:30 -0600
-Subject: [PATCH 1/2] stdlib: Add strlcat
+Subject: [PATCH] stdlib: Add strlcat
 
 Adds strlcat which can be used to safely concatenate strings
 
 Upstream-Status: Submitted [https://bugzilla.nasm.us/show_bug.cgi?id=3392635]
 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+
 ---
  Makefile.in        |  2 +-
  configure.ac       |  2 ++
@@ -16,10 +17,10 @@
  create mode 100644 stdlib/strlcat.c
 
 diff --git a/Makefile.in b/Makefile.in
-index 32ef3d91..ff7eb447 100644
+index bfae1f8..156dc4c 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -93,7 +93,7 @@ NASM =	asm/nasm.$(O)
+@@ -101,7 +101,7 @@ NASM =	asm/nasm.$(O)
  NDISASM = disasm/ndisasm.$(O)
  
  LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
@@ -27,20 +28,20 @@
 +	stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) stdlib/strlcat.$(O) \
  	\
  	nasmlib/ver.$(O) \
- 	nasmlib/crc64.$(O) nasmlib/malloc.$(O) nasmlib/errfile.$(O) \
+ 	nasmlib/alloc.$(O) nasmlib/asprintf.$(O) nasmlib/errfile.$(O) \
 diff --git a/configure.ac b/configure.ac
-index 38b3b596..b4e88778 100644
+index 7b72769..14fd033 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -152,6 +152,7 @@ AC_CHECK_FUNCS([vsnprintf _vsnprintf])
- AC_CHECK_FUNCS([snprintf _snprintf])
+@@ -234,6 +234,7 @@ PA_FUNC_SNPRINTF
+ PA_FUNC_VSNPRINTF
  AC_CHECK_FUNCS([strlcpy])
  AC_CHECK_FUNCS([strrchrnul])
 +AC_CHECK_FUNCS([strlcat])
  
  dnl These types are POSIX-specific, and Windows does it differently...
  AC_CHECK_TYPES([struct _stati64])
-@@ -170,6 +171,7 @@ AC_CHECK_DECLS(strsep)
+@@ -253,6 +254,7 @@ AC_CHECK_DECLS(strsep)
  AC_CHECK_DECLS(strlcpy)
  AC_CHECK_DECLS(strnlen)
  AC_CHECK_DECLS(strrchrnul)
@@ -49,10 +50,10 @@
  dnl Check for missing types
  AC_TYPE_UINTPTR_T
 diff --git a/include/compiler.h b/include/compiler.h
-index 4178c98e..8153d297 100644
+index b4fd3a8..7fb4821 100644
 --- a/include/compiler.h
 +++ b/include/compiler.h
-@@ -159,6 +159,10 @@ size_t strlcpy(char *, const char *, size_t);
+@@ -169,6 +169,10 @@ size_t strlcpy(char *, const char *, size_t);
  char *strrchrnul(const char *, int);
  #endif
  
@@ -65,7 +66,7 @@
  #  include <stdbool.h>
 diff --git a/stdlib/strlcat.c b/stdlib/strlcat.c
 new file mode 100644
-index 00000000..7084d460
+index 0000000..7084d46
 --- /dev/null
 +++ b/stdlib/strlcat.c
 @@ -0,0 +1,43 @@
@@ -112,6 +113,3 @@
 +
 +#endif
 +
--- 
-2.23.0
-
diff --git a/poky/meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch b/poky/meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch
index bbfae2e..f788e0f 100644
--- a/poky/meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch
+++ b/poky/meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch
@@ -1,7 +1,7 @@
-From fa677c1caf6b8192971920cf5c1aa8cb33c74605 Mon Sep 17 00:00:00 2001
+From bb4e42ad3a0cdd23a1d1797e6299c76b474867c0 Mon Sep 17 00:00:00 2001
 From: Joshua Watt <JPEWhacker@gmail.com>
 Date: Tue, 19 Nov 2019 13:12:17 -0600
-Subject: [PATCH 2/2] Add --debug-prefix-map option
+Subject: [PATCH] Add --debug-prefix-map option
 
 Adds an option to remap file prefixes in output object files. This is
 analogous to the "-fdebug-prefix-map" option in GCC, and allows files to
@@ -9,47 +9,48 @@
 
 Upstream-Status: Submitted [https://bugzilla.nasm.us/show_bug.cgi?id=3392635]
 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+
 ---
- asm/nasm.c              | 28 ++++++++++++++++++++++++++--
+ asm/nasm.c              | 26 +++++++++++++++++++++++++-
  include/nasmlib.h       |  9 +++++++++
  nasm.txt                |  4 ++++
  nasmlib/filename.c      | 20 ++++++++++++++++++++
  output/outas86.c        |  4 +++-
  output/outcoff.c        |  4 ++--
- output/outelf.c         |  8 ++++----
+ output/outelf.c         |  2 +-
  output/outieee.c        |  2 +-
  output/outobj.c         |  2 +-
  stdlib/strlcat.c        |  2 +-
  test/elfdebugprefix.asm |  6 ++++++
  test/performtest.pl     | 12 ++++++++++--
- 12 files changed, 87 insertions(+), 14 deletions(-)
+ 12 files changed, 83 insertions(+), 10 deletions(-)
  create mode 100644 test/elfdebugprefix.asm
 
 diff --git a/asm/nasm.c b/asm/nasm.c
-index 1c5a5fc5..5d45103c 100644
+index a0e1719..fc6c62e 100644
 --- a/asm/nasm.c
 +++ b/asm/nasm.c
-@@ -841,7 +841,8 @@ enum text_options {
-     OPT_BEFORE,
+@@ -938,7 +938,8 @@ enum text_options {
      OPT_LIMIT,
      OPT_KEEP_ALL,
--    OPT_NO_LINE
-+    OPT_NO_LINE,
+     OPT_NO_LINE,
+-    OPT_DEBUG
++    OPT_DEBUG,
 +    OPT_DEBUG_PREFIX_MAP
  };
- struct textargs {
-     const char *label;
-@@ -866,6 +867,7 @@ static const struct textargs textopts[] = {
-     {"limit-",   OPT_LIMIT,   true, 0},
-     {"keep-all", OPT_KEEP_ALL, false, 0},
-     {"no-line",  OPT_NO_LINE, false, 0},
+ enum need_arg {
+     ARG_NO,
+@@ -970,6 +971,7 @@ static const struct textargs textopts[] = {
+     {"keep-all", OPT_KEEP_ALL, ARG_NO, 0},
+     {"no-line",  OPT_NO_LINE, ARG_NO, 0},
+     {"debug",    OPT_DEBUG, ARG_MAYBE, 0},
 +    {"debug-prefix-map", OPT_DEBUG_PREFIX_MAP, true, 0},
-     {NULL, OPT_BOGUS, false, 0}
+     {NULL, OPT_BOGUS, ARG_NO, 0}
  };
  
-@@ -1217,6 +1219,26 @@ static bool process_arg(char *p, char *q, int pass)
-                 case OPT_NO_LINE:
-                     pp_noline = true;
+@@ -1332,6 +1334,26 @@ static bool process_arg(char *p, char *q, int pass)
+                 case OPT_DEBUG:
+                     debug_nasm = param ? strtoul(param, NULL, 10) : debug_nasm+1;
                      break;
 +                case OPT_DEBUG_PREFIX_MAP: {
 +                    struct debug_prefix_list *d;
@@ -72,24 +73,22 @@
 +                    }
 +                    break;
                  case OPT_HELP:
-                     help(0);
+                     help(stdout);
                      exit(0);
-@@ -2010,7 +2032,9 @@ static void help(const char xopt)
-          "   --lpostfix str append the given string to all other symbols\n"
-          "   --keep-all     output files will not be removed even if an error happens\n"
-          "   --no-line      ignore %%line directives in input\n"
--         "   --limit-X val  set execution limit X\n");
-+         "   --limit-X val  set execution limit X\n"
-+         "   --debug-prefix-map base=dest\n"
-+         "                  remap paths starting with 'base' to 'dest' in output files\n");
+@@ -2297,6 +2319,8 @@ static void help(FILE *out)
+         "    -w-x          disable warning x (also -Wno-x)\n"
+         "    -w[+-]error   promote all warnings to errors (also -Werror)\n"
+         "    -w[+-]error=x promote warning x to errors (also -Werror=x)\n"
++        "   --debug-prefix-map base=dest\n"
++        "                  remap paths starting with 'base' to 'dest' in output files\n"
+         , out);
  
-     for (i = 0; i <= LIMIT_MAX; i++) {
-         printf("                     %-15s %s (default ",
+     fprintf(out, "       %-20s %s\n",
 diff --git a/include/nasmlib.h b/include/nasmlib.h
-index e57d0e6d..cf921547 100644
+index e9bfbcc..98fc653 100644
 --- a/include/nasmlib.h
 +++ b/include/nasmlib.h
-@@ -195,10 +195,19 @@ int64_t readstrnum(char *str, int length, bool *warn);
+@@ -250,10 +250,19 @@ int64_t readstrnum(char *str, int length, bool *warn);
   */
  int32_t seg_alloc(void);
  
@@ -110,7 +109,7 @@
  /*
   * Utility macros...
 diff --git a/nasm.txt b/nasm.txt
-index a28202f9..443c06b2 100644
+index cc7fa27..d3485c9 100644
 --- a/nasm.txt
 +++ b/nasm.txt
 @@ -147,6 +147,10 @@ OPTIONS
@@ -125,7 +124,7 @@
  ------
  This man page does not fully describe the syntax of *nasm*'s assembly language,
 diff --git a/nasmlib/filename.c b/nasmlib/filename.c
-index 172ae0bc..fda2be41 100644
+index 172ae0b..fda2be4 100644
 --- a/nasmlib/filename.c
 +++ b/nasmlib/filename.c
 @@ -39,6 +39,8 @@
@@ -160,10 +159,10 @@
 +    return dest;
 +}
 diff --git a/output/outas86.c b/output/outas86.c
-index 3f9867b9..d5f4f966 100644
+index 54b22f8..c4a412c 100644
 --- a/output/outas86.c
 +++ b/output/outas86.c
-@@ -113,6 +113,8 @@ static void as86_sect_write(struct Section *, const uint8_t *,
+@@ -110,6 +110,8 @@ static void as86_sect_write(struct Section *, const uint8_t *,
  
  static void as86_init(void)
  {
@@ -172,7 +171,7 @@
      stext.data = saa_init(1L);
      stext.datalen = 0L;
      stext.head = stext.last = NULL;
-@@ -134,7 +136,7 @@ static void as86_init(void)
+@@ -131,7 +133,7 @@ static void as86_init(void)
      strslen = 0;
  
      /* as86 module name = input file minus extension */
@@ -182,10 +181,10 @@
  
  static void as86_cleanup(void)
 diff --git a/output/outcoff.c b/output/outcoff.c
-index a2fd302c..bcf576fb 100644
+index bcd9ff3..15bfcf3 100644
 --- a/output/outcoff.c
 +++ b/output/outcoff.c
-@@ -1070,14 +1070,14 @@ static void coff_symbol(char *name, int32_t strpos, int32_t value,
+@@ -1095,14 +1095,14 @@ static void coff_symbol(char *name, int32_t strpos, int32_t value,
  
  static void coff_write_symbols(void)
  {
@@ -203,48 +202,23 @@
  
      /*
 diff --git a/output/outelf.c b/output/outelf.c
-index de99d076..203b5dc0 100644
+index 61af020..1292958 100644
 --- a/output/outelf.c
 +++ b/output/outelf.c
-@@ -1,5 +1,5 @@
- /* ----------------------------------------------------------------------- *
-- *   
-+ *
-  *   Copyright 1996-2017 The NASM Authors - All Rights Reserved
-  *   See the file AUTHORS included with the NASM distribution for
-  *   the specific copyright holders.
-@@ -14,7 +14,7 @@
-  *     copyright notice, this list of conditions and the following
-  *     disclaimer in the documentation and/or other materials provided
-  *     with the distribution.
-- *     
-+ *
-  *     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-  *     CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-  *     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-@@ -315,7 +315,7 @@ elf_directive(enum directive directive, char *value, int pass)
+@@ -553,7 +553,7 @@ static void elf_init(void)
+     };
+     const char * const *p;
  
- static void elf_init(void)
- {
 -    strlcpy(elf_module, inname, sizeof(elf_module));
 +    filename_debug_remap(elf_module, inname, sizeof(elf_module));
      sects = NULL;
      nsects = sectlen = 0;
      syms = saa_init((int32_t)sizeof(struct elf_symbol));
-@@ -868,7 +868,7 @@ static void elf32_out(int32_t segto, const void *data,
-                       " segment base references");
-             } else {
-                 if (wrt == NO_SEG) {
--                    /* 
-+                    /*
-                      * The if() is a hack to deal with compilers which
-                      * don't handle switch() statements with 64-bit
-                      * expressions.
 diff --git a/output/outieee.c b/output/outieee.c
-index 3a28942d..f61824e4 100644
+index 4cc0f0f..2468724 100644
 --- a/output/outieee.c
 +++ b/output/outieee.c
-@@ -209,7 +209,7 @@ static void ieee_unqualified_name(char *, char *);
+@@ -207,7 +207,7 @@ static void ieee_unqualified_name(char *, char *);
   */
  static void ieee_init(void)
  {
@@ -254,10 +228,10 @@
      fpubhead = NULL;
      fpubtail = &fpubhead;
 diff --git a/output/outobj.c b/output/outobj.c
-index b4f2c499..55bba4a1 100644
+index 0d4d311..d8dd6a0 100644
 --- a/output/outobj.c
 +++ b/output/outobj.c
-@@ -640,7 +640,7 @@ static enum directive_result obj_directive(enum directive, char *, int);
+@@ -638,7 +638,7 @@ static enum directive_result obj_directive(enum directive, char *);
  
  static void obj_init(void)
  {
@@ -267,7 +241,7 @@
      any_segs = false;
      fpubhead = NULL;
 diff --git a/stdlib/strlcat.c b/stdlib/strlcat.c
-index 7084d460..ee93dea3 100644
+index 7084d46..ee93dea 100644
 --- a/stdlib/strlcat.c
 +++ b/stdlib/strlcat.c
 @@ -29,7 +29,7 @@ size_t strlcat(char *dest, const char *src, size_t size)
@@ -281,7 +255,7 @@
      /* destination was not NULL terminated. Return the initial size */
 diff --git a/test/elfdebugprefix.asm b/test/elfdebugprefix.asm
 new file mode 100644
-index 00000000..a67ba29c
+index 0000000..a67ba29
 --- /dev/null
 +++ b/test/elfdebugprefix.asm
 @@ -0,0 +1,6 @@
@@ -292,7 +266,7 @@
 +	  ret
 +
 diff --git a/test/performtest.pl b/test/performtest.pl
-index f7865b39..096f9604 100755
+index f7865b3..096f960 100755
 --- a/test/performtest.pl
 +++ b/test/performtest.pl
 @@ -42,14 +42,22 @@ sub perform {
@@ -320,6 +294,3 @@
          #Move the output to the test dir
          mkpath("$outputdir/$testname/$subname");
          foreach(split / /,$files) {
--- 
-2.23.0
-
diff --git a/poky/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch b/poky/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch
deleted file mode 100644
index 6e3f909..0000000
--- a/poky/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 3079f7966dbed4497e36d5067cbfd896a90358cb Mon Sep 17 00:00:00 2001
-From: Cyrill Gorcunov <gorcunov@gmail.com>
-Date: Wed, 14 Nov 2018 10:03:42 +0300
-Subject: [PATCH] preproc: Fix malformed parameter count
-
-readnum returns 64bit number which may become
-a negative integer upon conversion which in
-turn lead to out of bound array access.
-
-Fix it by explicit conversion with bounds check
-
- | POC6:2: error: parameter count `2222222222' is out of bounds [0; 2147483647]
-
-https://bugzilla.nasm.us/show_bug.cgi?id=3392528
-
-Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-
-Upstream-Status: Backport
-CVE: CVE-2018-19755
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- asm/preproc.c | 43 +++++++++++++++++++++----------------------
- 1 file changed, 21 insertions(+), 22 deletions(-)
-
-diff --git a/asm/preproc.c b/asm/preproc.c
-index b6afee3..e5ad05a 100644
---- a/asm/preproc.c
-+++ b/asm/preproc.c
-@@ -1650,6 +1650,23 @@ smacro_defined(Context * ctx, const char *name, int nparam, SMacro ** defn,
-     return false;
- }
- 
-+/* param should be a natural number [0; INT_MAX] */
-+static int read_param_count(const char *str)
-+{
-+    int result;
-+    bool err;
-+
-+    result = readnum(str, &err);
-+    if (result < 0 || result > INT_MAX) {
-+        result = 0;
-+        nasm_error(ERR_NONFATAL, "parameter count `%s' is out of bounds [%d; %d]",
-+                   str, 0, INT_MAX);
-+    } else if (err) {
-+        nasm_error(ERR_NONFATAL, "unable to parse parameter count `%s'", str);
-+    }
-+    return result;
-+}
-+
- /*
-  * Count and mark off the parameters in a multi-line macro call.
-  * This is called both from within the multi-line macro expansion
-@@ -1871,11 +1888,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
-                   pp_directives[ct]);
-         } else {
-             searching.nparam_min = searching.nparam_max =
--                readnum(tline->text, &j);
--            if (j)
--                nasm_error(ERR_NONFATAL,
--                      "unable to parse parameter count `%s'",
--                      tline->text);
-+                read_param_count(tline->text);
-         }
-         if (tline && tok_is_(tline->next, "-")) {
-             tline = tline->next->next;
-@@ -1886,11 +1899,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
-                       "`%s' expects a parameter count after `-'",
-                       pp_directives[ct]);
-             else {
--                searching.nparam_max = readnum(tline->text, &j);
--                if (j)
--                    nasm_error(ERR_NONFATAL,
--                          "unable to parse parameter count `%s'",
--                          tline->text);
-+                searching.nparam_max = read_param_count(tline->text);
-                 if (searching.nparam_min > searching.nparam_max) {
-                     nasm_error(ERR_NONFATAL,
-                           "minimum parameter count exceeds maximum");
-@@ -2079,8 +2088,6 @@ static void undef_smacro(Context *ctx, const char *mname)
-  */
- static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
- {
--    bool err;
--
-     tline = tline->next;
-     skip_white_(tline);
-     tline = expand_id(tline);
-@@ -2103,11 +2110,7 @@ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
-     if (!tok_type_(tline, TOK_NUMBER)) {
-         nasm_error(ERR_NONFATAL, "`%s' expects a parameter count", directive);
-     } else {
--        def->nparam_min = def->nparam_max =
--            readnum(tline->text, &err);
--        if (err)
--            nasm_error(ERR_NONFATAL,
--                  "unable to parse parameter count `%s'", tline->text);
-+        def->nparam_min = def->nparam_max = read_param_count(tline->text);
-     }
-     if (tline && tok_is_(tline->next, "-")) {
-         tline = tline->next->next;
-@@ -2117,11 +2120,7 @@ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
-             nasm_error(ERR_NONFATAL,
-                   "`%s' expects a parameter count after `-'", directive);
-         } else {
--            def->nparam_max = readnum(tline->text, &err);
--            if (err) {
--                nasm_error(ERR_NONFATAL, "unable to parse parameter count `%s'",
--                      tline->text);
--            }
-+            def->nparam_max = read_param_count(tline->text);
-             if (def->nparam_min > def->nparam_max) {
-                 nasm_error(ERR_NONFATAL, "minimum parameter count exceeds maximum");
-                 def->nparam_max = def->nparam_min;
--- 
-2.10.5.GIT
-
diff --git a/poky/meta/recipes-devtools/nasm/nasm/CVE-2019-14248.patch b/poky/meta/recipes-devtools/nasm/nasm/CVE-2019-14248.patch
deleted file mode 100644
index d45d2cb..0000000
--- a/poky/meta/recipes-devtools/nasm/nasm/CVE-2019-14248.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 93d41d82963b2cfd0b24c906f5a8daf53281b559 Mon Sep 17 00:00:00 2001
-From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
-Date: Fri, 16 Aug 2019 01:12:54 -0700
-Subject: [PATCH] BR 3392576: don't segfault on a bad %pragma limit
-
-Don't segfault on a bad %pragma limit. Instead treat a NULL pointer as
-an empty string.
-
-Reported-by: Ren Kimura <rkx1209dev@gmail.com>
-Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-
-CVE: CVE-2019-14248
-Upstream-Status: Backport [https://repo.or.cz/nasm.git/commit/93d41d82963b2cfd0b24c906f5a8daf53281b559]
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- asm/nasm.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/asm/nasm.c b/asm/nasm.c
-index c84d675..65116ab 100644
---- a/asm/nasm.c
-+++ b/asm/nasm.c
-@@ -212,6 +212,11 @@ nasm_set_limit(const char *limit, const char *valstr)
-     bool rn_error;
-     int errlevel;
- 
-+    if (!limit)
-+        limit = "";
-+    if (!valstr)
-+        valstr = "";
-+
-     for (i = 0; i <= LIMIT_MAX; i++) {
-         if (!nasm_stricmp(limit, limit_info[i].name))
-             break;
-@@ -204,7 +209,7 @@ nasm_set_limit(const char *limit, const char *valstr)
-             errlevel = ERR_WARNING|ERR_NOFILE|ERR_USAGE;
-         else
-             errlevel = ERR_WARNING|ERR_PASS1|WARN_UNKNOWN_PRAGMA;
--        nasm_error(errlevel, "unknown limit: `%s'", limit);
-+        nasm_error(errlevel, "invalid limit value: `%s'", valstr);
-         return DIRR_ERROR;
-     }
- 
diff --git a/poky/meta/recipes-devtools/nasm/nasm_2.14.02.bb b/poky/meta/recipes-devtools/nasm/nasm_2.14.02.bb
deleted file mode 100644
index c40be8f..0000000
--- a/poky/meta/recipes-devtools/nasm/nasm_2.14.02.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "General-purpose x86 assembler"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
-
-SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
-           file://CVE-2018-19755.patch \
-           file://CVE-2019-14248.patch \
-           file://0001-stdlib-Add-strlcat.patch \
-           file://0002-Add-debug-prefix-map-option.patch \
-           file://0001-fix-pa_add_headers.m4-for-development-versions-of-au.patch \
-           "
-
-SRC_URI[md5sum] = "3f489aa48ad2aa1f967dc5e293bbd06f"
-SRC_URI[sha256sum] = "34fd26c70a277a9fdd54cb5ecf389badedaf48047b269d1008fbc819b24e80bc"
-
-# brokensep since this uses autoconf but not automake
-inherit autotools-brokensep
-
-EXTRA_AUTORECONF += "--exclude=aclocal"
-
-BBCLASSEXTEND = "native"
-
-DEPENDS = "groff-native"
-
-CVE_PRODUCT = "netwide_assembler"
diff --git a/poky/meta/recipes-devtools/nasm/nasm_2.15.03.bb b/poky/meta/recipes-devtools/nasm/nasm_2.15.03.bb
new file mode 100644
index 0000000..5c4e28d
--- /dev/null
+++ b/poky/meta/recipes-devtools/nasm/nasm_2.15.03.bb
@@ -0,0 +1,21 @@
+SUMMARY = "General-purpose x86 assembler"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
+
+SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
+           file://0001-stdlib-Add-strlcat.patch \
+           file://0002-Add-debug-prefix-map-option.patch \
+           "
+
+SRC_URI[sha256sum] = "04e7343d9bf112bffa9fda86f6c7c8b120c2ccd700b882e2db9f57484b1bd778"
+
+EXTRA_AUTORECONF_append = " -I autoconf/m4"
+
+inherit autotools
+
+BBCLASSEXTEND = "native"
+
+DEPENDS = "groff-native"
+
+CVE_PRODUCT = "netwide_assembler"
diff --git a/poky/meta/recipes-devtools/perl/files/perl-cross-makefile.patch b/poky/meta/recipes-devtools/perl/files/perl-cross-makefile.patch
new file mode 100644
index 0000000..5d3f998
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/files/perl-cross-makefile.patch
@@ -0,0 +1,29 @@
+Makefile: Avoid continual rebuilds of miniperl and associated races 
+
+In the Yocto Project, when we run "make install" we notice miniperl
+rebuilding multiple times. Usually this is harmless however sometimes
+race issues occur such as miniperl not being executable.
+
+The issue is that crosspatch is a phony target so it always rebuilds.
+Adding this as a dependency of miniperl means miniperl always rebuilds
+too.
+
+Avoid this by injecting a direct dependency avoiding the phony target.
+miniperl is then only rebuilt when its input changes as desired.
+
+Signed-off-by: Richard Purdie richard.purdie@linuxfoundation.org
+Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/95]
+
+Index: perl-5.32.0/Makefile
+===================================================================
+--- perl-5.32.0.orig/Makefile
++++ perl-5.32.0/Makefile
+@@ -56,7 +56,7 @@ crosspatch: $(CROSSPATCHED)
+ 
+ # A minor fix for buildroot, force crosspatching when running "make perl modules"
+ # instead of "make all".
+-miniperlmain$O: crosspatch
++miniperlmain$O: $(CROSSPATCHED)
+ 
+ # Original versions are not saved anymore; patch generally takes care of this,
+ # and if that fails, reaching for the source tarball is the safest option.
diff --git a/poky/meta/recipes-devtools/perl/perl_5.32.0.bb b/poky/meta/recipes-devtools/perl/perl_5.32.0.bb
index 1adfd90..bba8263 100644
--- a/poky/meta/recipes-devtools/perl/perl_5.32.0.bb
+++ b/poky/meta/recipes-devtools/perl/perl_5.32.0.bb
@@ -20,6 +20,7 @@
            file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
            file://0002-Constant-Fix-up-shebang.patch \
            file://determinism.patch  \
+           file://perl-cross-makefile.patch \
            "
 SRC_URI_append_class-native = " \
            file://perl-configpm-switch.patch \
@@ -138,6 +139,11 @@
     # Fix up shared library
     rm ${D}/${libdir}/perl5/${PV}/*/CORE/libperl.so
     ln -sf ../../../../libperl.so.${PERL_LIB_VER} $(echo ${D}/${libdir}/perl5/${PV}/*/CORE)/libperl.so
+
+    # Try to catch Bug #13946
+    if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
+        bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
+    fi
 }
 
 do_install_append_class-target() {
diff --git a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
index 201e357..86c9363 100644
--- a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
+++ b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
@@ -1,4 +1,4 @@
-From 234c3da52da09b28db5b2c4d33ebe9c800c461ac Mon Sep 17 00:00:00 2001
+From 768e1f2f14c9f1b3f9bd0e017c3f6183b45616e8 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Tue, 17 Jul 2018 10:13:38 +0800
 Subject: [PATCH] conditionally do not fetch code by easy_install
@@ -9,16 +9,15 @@
 Upstream-Status: Inappropriate [oe specific]
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
 ---
  setuptools/command/easy_install.py | 5 +++++
  1 file changed, 5 insertions(+)
 
 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
-index 5a9576f..f5961cb 100644
+index bcbd4f58..6455afda 100644
 --- a/setuptools/command/easy_install.py
 +++ b/setuptools/command/easy_install.py
-@@ -656,6 +656,11 @@ class easy_install(Command):
+@@ -653,6 +653,11 @@ class easy_install(Command):
              os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))
  
      def easy_install(self, spec, deps=False):
@@ -27,6 +26,9 @@
 +                      "Please add its native recipe to DEPENDS." % spec)
 +            return None
 +
-         if not self.editable:
-             self.install_site_py()
- 
+         with self._tmpdir() as tmpdir:
+             if not isinstance(spec, Requirement):
+                 if URL_SCHEME(spec):
+-- 
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools_47.3.1.bb b/poky/meta/recipes-devtools/python/python3-setuptools_47.3.1.bb
deleted file mode 100644
index 0dc1ed8..0000000
--- a/poky/meta/recipes-devtools/python/python3-setuptools_47.3.1.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require python-setuptools.inc
-inherit setuptools3
-
-do_install_append() {
-    mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
-}
diff --git a/poky/meta/recipes-devtools/python/python-setuptools.inc b/poky/meta/recipes-devtools/python/python3-setuptools_49.3.1.bb
similarity index 89%
rename from poky/meta/recipes-devtools/python/python-setuptools.inc
rename to poky/meta/recipes-devtools/python/python3-setuptools_49.3.1.bb
index ecf1205..1c500e4 100644
--- a/poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/poky/meta/recipes-devtools/python/python3-setuptools_49.3.1.bb
@@ -6,13 +6,13 @@
 
 PYPI_PACKAGE_EXT = "zip"
 
-inherit pypi
+inherit pypi setuptools3
 
 SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
 
 SRC_URI += "file://0001-change-shebang-to-python3.patch"
 
-SRC_URI[sha256sum] = "843037738d1e34e8b326b5e061f474aca6ef9d7ece41329afbc8aac6195a3920"
+SRC_URI[sha256sum] = "1c7b51fba5d83160d540d18b2bf08fd546357488adf9ddbca08cc1e997bd5c18"
 
 DEPENDS += "${PYTHON_PN}"
 
@@ -36,10 +36,15 @@
   ${PYTHON_PN}-unittest \
   ${PYTHON_PN}-xml \
 "
+
 do_install_prepend() {
     install -d ${D}${PYTHON_SITEPACKAGES_DIR}
 }
 
+do_install_append() {
+    mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+}
+
 BBCLASSEXTEND = "native nativesdk"
 
 # The pkg-resources module can be used by itself, without the package downloader
diff --git a/poky/meta/recipes-devtools/python/python3/0001-configure.ac-define-a-path-for-profile-data.patch b/poky/meta/recipes-devtools/python/python3/0001-configure.ac-define-a-path-for-profile-data.patch
deleted file mode 100644
index ee3d645..0000000
--- a/poky/meta/recipes-devtools/python/python3/0001-configure.ac-define-a-path-for-profile-data.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 5e94e315119117898ce1a2798641848f61d796b1 Mon Sep 17 00:00:00 2001
-From: Mingli Yu <mingli.yu@windriver.com>
-Date: Thu, 9 Jul 2020 07:58:44 +0000
-Subject: [PATCH] configure.ac: define a path for profile data
-
-There comes below error when use ccache 3.7.10 to compile python3
-and check [1] for more details.
- | Python-3.8.3/Modules/_contextvarsmodule.c:43:1: error: source locations for function 'PyInit__contextvars' have changed, the profile data may be out of date [-Werror=coverage-mismatch]
-
-That's because the logic for profile directory changes a little in
-[2] after ccache upgrades to 3.7.10.
-
-So define a profile directory path accordingly to fix the above error.
-
-[1] https://github.com/ccache/ccache/issues/615
-[2] https://github.com/ccache/ccache/commit/91a2954eb47b4a106e2be6cf611917b895108e35
-
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/21408]
-
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 08fe397..bb15bda 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1332,8 +1332,8 @@ case $cc_basename in
-         fi
-         ;;
-       *)
--        PGO_PROF_GEN_FLAG="-fprofile-generate"
--        PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
-+        PGO_PROF_GEN_FLAG="-fprofile-generate=$(pwd)"
-+        PGO_PROF_USE_FLAG="-fprofile-use=$(pwd) -fprofile-correction"
-         LLVM_PROF_MERGER="true"
-         LLVM_PROF_FILE=""
-         ;;
--- 
-2.26.2
-
diff --git a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
index fd12baa..6806f23 100644
--- a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -9,6 +9,7 @@
 debug=False
 
 import sys
+import os
 
 # We can get a list of the modules which are currently required to run python
 # so we run python-core and get its modules, we then import what we need
@@ -48,8 +49,19 @@
 if(debug==True):
     log = open('log_%s' % current_module,'w')
     log.write('Module %s generated the following dependencies:\n' % current_module)
-try: 
-    importlib.import_module('%s' % current_module)
+try:
+    m = importlib.import_module(current_module)
+    # handle python packages which may not include all modules in the __init__
+    if os.path.basename(m.__file__) == "__init__.py":
+        modulepath = os.path.dirname(m.__file__)
+        for i in os.listdir(modulepath):
+            if i.startswith("_") or not(i.endswith(".py")):
+                continue
+            submodule = "{}.{}".format(current_module, i[:-3])
+            try:
+                importlib.import_module(submodule)
+            except:
+                pass # ignore all import or other exceptions raised during import
 except ImportError as e:
     if (debug==True):
         log.write('Module was not found')
@@ -107,6 +119,8 @@
         dep_path = dep_path.replace(soabi,'*')
         print (dep_path)
         continue
+    if "_sysconfigdata" in dep_path:
+        dep_path = dep_path.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
 
     if (debug==True):
         log.write(dep_path+'\n')
@@ -140,6 +154,8 @@
             log.write(cached)
         cached = fix_path(cached)
         cached = cached.replace(cpython_tag,'*')
+        if "_sysconfigdata" in cached:
+            cached = cached.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
         print (cached)
 
 if debug==True:
diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
index 3bcc9b8..69aecb7 100644
--- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -285,7 +285,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/operator.py",
             "${libdir}/python${PYTHON_MAJMIN}/optparse.py",
             "${libdir}/python${PYTHON_MAJMIN}/os.py",
-	    "${libdir}/python${PYTHON_MAJMIN}/pathlib.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pathlib.py",
             "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
             "${libdir}/python${PYTHON_MAJMIN}/platform.py",
             "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
@@ -313,6 +313,8 @@
             "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
             "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
             "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/parse.py",
             "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
             "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
             "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]"
@@ -324,7 +326,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/abc.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc",
@@ -359,7 +361,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/operator.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/optparse.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/os.*.pyc",
-	    "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pathlib.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pathlib.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
@@ -397,7 +399,9 @@
             "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__",
             "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/abc.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/machinery.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc"
+            "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__/parse.*.pyc"
         ]
     },
     "crypt": {
@@ -427,7 +431,10 @@
     "ctypes": {
         "summary": "Python C types support",
         "rdepends": [
-            "core"
+            "core",
+            "crypt",
+            "io",
+            "math"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/ctypes",
@@ -537,7 +544,10 @@
     "distutils": {
         "summary": "Python Distribution Utilities",
         "rdepends": [
-            "core"
+            "compression",
+            "core",
+            "email",
+            "stringold"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/distutils"
@@ -548,7 +558,6 @@
         "summary": "Python framework for running examples in docstrings",
         "rdepends": [
             "asyncio",
-            "compression",
             "core",
             "debugger",
             "difflib",
@@ -577,7 +586,9 @@
             "datetime",
             "io",
             "math",
-            "netclient"
+            "mime",
+            "netclient",
+            "stringold"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/email",
@@ -648,7 +659,6 @@
     "io": {
         "summary": "Python low-level I/O",
         "rdepends": [
-            "compression",
             "core",
             "crypt",
             "math",
@@ -690,7 +700,11 @@
         "summary": "Python logging support",
         "rdepends": [
             "core",
-            "stringold"
+            "io",
+            "netserver",
+            "pickle",
+            "stringold",
+            "threading"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/logging"
@@ -824,11 +838,18 @@
         "summary": "Python multiprocessing support",
         "rdepends": [
             "core",
+            "crypt",
+            "ctypes",
             "io",
-            "pickle"
+            "math",
+            "mmap",
+            "netclient",
+            "pickle",
+            "threading"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multiprocessing.*.so",
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixshmem.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/multiprocessing"
         ],
         "cached": []
@@ -855,10 +876,9 @@
             "${libdir}/python${PYTHON_MAJMIN}/mimetypes.py",
             "${libdir}/python${PYTHON_MAJMIN}/nntplib.py",
             "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
+            "${libdir}/python${PYTHON_MAJMIN}/secrets.py",
             "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
             "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
             "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
         ],
         "cached": [
@@ -868,6 +888,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/nntplib.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/telnetlib.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc"
@@ -876,7 +897,6 @@
     "netserver": {
         "summary": "Python Internet Protocol servers",
         "rdepends": [
-            "compression",
             "core",
             "crypt",
             "datetime",
@@ -992,8 +1012,7 @@
     "pydoc": {
         "summary": "Python interactive help support",
         "rdepends": [
-            "core",
-            "netclient"
+            "core"
         ],
         "files": [
             "${bindir}/pydoc*",
@@ -1017,7 +1036,6 @@
     "shell": {
         "summary": "Python shell-like functionality",
         "rdepends": [
-            "compression",
             "core",
             "stringold"
         ],
@@ -1150,7 +1168,6 @@
         "summary": "Python unit testing framework",
         "rdepends": [
             "asyncio",
-            "compression",
             "core",
             "difflib",
             "io",
@@ -1185,7 +1202,6 @@
     "venv": {
         "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.",
         "rdepends": [
-            "compression",
             "core",
             "logging",
             "stringold"
@@ -1211,7 +1227,21 @@
     "xmlrpc": {
         "summary": "Python XML-RPC support",
         "rdepends": [
+            "compression",
             "core",
+            "crypt",
+            "datetime",
+            "email",
+            "fcntl",
+            "html",
+            "io",
+            "math",
+            "mime",
+            "netclient",
+            "netserver",
+            "numbers",
+            "pydoc",
+            "stringold",
             "xml"
         ],
         "files": [
diff --git a/poky/meta/recipes-devtools/python/python3_3.8.3.bb b/poky/meta/recipes-devtools/python/python3_3.8.5.bb
similarity index 98%
rename from poky/meta/recipes-devtools/python/python3_3.8.3.bb
rename to poky/meta/recipes-devtools/python/python3_3.8.5.bb
index 7e0f35c..cabe5dc 100644
--- a/poky/meta/recipes-devtools/python/python3_3.8.3.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.8.5.bb
@@ -32,7 +32,6 @@
            file://0001-configure.ac-fix-LIBPL.patch \
            file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \
            file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
-           file://0001-configure.ac-define-a-path-for-profile-data.patch \
            "
 
 SRC_URI_append_class-native = " \
@@ -41,8 +40,8 @@
            file://0001-Don-t-search-system-for-headers-libraries.patch \
            "
 
-SRC_URI[md5sum] = "3000cf50aaa413052aef82fd2122ca78"
-SRC_URI[sha256sum] = "dfab5ec723c218082fe3d5d7ae17ecbdebffa9a1aea4d64aa3a2ecdd2e795864"
+SRC_URI[md5sum] = "35b5a3d0254c1c59be9736373d429db7"
+SRC_URI[sha256sum] = "e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0"
 
 # exclude pre-releases for both python 2.x and 3.x
 UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
diff --git a/poky/meta/recipes-devtools/qemu/qemu-native.inc b/poky/meta/recipes-devtools/qemu/qemu-native.inc
index dcf140e..aa5c9b9 100644
--- a/poky/meta/recipes-devtools/qemu/qemu-native.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu-native.inc
@@ -2,10 +2,6 @@
 
 require qemu.inc
 
-SRC_URI_append = " \
-            file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \
-            "
-
 EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
 
 LDFLAGS_append = " -fuse-ld=bfd"
diff --git a/poky/meta/recipes-devtools/qemu/qemu-native_5.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu-native_5.1.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/qemu/qemu-native_5.0.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu-native_5.1.0.bb
diff --git a/poky/meta/recipes-devtools/qemu/qemu-system-native_5.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu-system-native_5.1.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/qemu/qemu-system-native_5.0.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu-system-native_5.1.0.bb
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index b1c822b..5599382 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -29,18 +29,11 @@
            file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
            file://0001-Add-enable-disable-udev.patch \
 	   file://0001-qemu-Do-not-include-file-if-not-exists.patch \
-	   file://CVE-2020-13361.patch \
 	   file://find_datadir.patch \
-	   file://CVE-2020-10761.patch \
-	   file://CVE-2020-13362.patch \
-	   file://CVE-2020-13659.patch \
-	   file://CVE-2020-13800.patch \
-	   file://CVE-2020-13791.patch \
 	   "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
-SRC_URI[md5sum] = "ede6005d7143fe994dd089d31dc2cf6c"
-SRC_URI[sha256sum] = "2f13a92a0fa5c8b69ff0796b59b86b080bbb92ebad5d301a7724dd06b5e78cb6"
+SRC_URI[sha256sum] = "c9174eb5933d9eb5e61f541cd6d1184cd3118dfe4c5c4955bc1bdc4d390fa4e5"
 
 COMPATIBLE_HOST_mipsarchn32 = "null"
 COMPATIBLE_HOST_mipsarchn64 = "null"
@@ -64,6 +57,7 @@
 	       -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
         sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \
             ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env 
+	sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
 }
 
 # QEMU_TARGETS is overridable variable
@@ -163,7 +157,7 @@
 PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
 PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
 PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib"
-PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa"
+PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,virtual/libgl"
 PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
 PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
 PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
index 40d83fc..1304ee3 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
@@ -12,13 +12,13 @@
  configure | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/configure b/configure
-index 36646e7b..48912a94 100755
---- a/configure
-+++ b/configure
-@@ -1601,6 +1601,10 @@ for opt do
+Index: qemu-5.1.0/configure
+===================================================================
+--- qemu-5.1.0.orig/configure
++++ qemu-5.1.0/configure
+@@ -1640,6 +1640,10 @@ for opt do
    ;;
-   --gdb=*) gdb_bin="$optarg"
+   --disable-libdaxctl) libdaxctl=no
    ;;
 +  --enable-libudev) libudev="yes"
 +  ;;
@@ -27,6 +27,3 @@
    *)
        echo "ERROR: unknown option $opt"
        echo "Try '$0 --help' for more information"
--- 
-2.24.0
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
index ae89ae0..46c9da0 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
@@ -20,11 +20,11 @@
  hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 93 insertions(+), 1 deletion(-)
 
-diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
-index 8ed57b3b..1502928b 100644
---- a/hw/usb/dev-wacom.c
-+++ b/hw/usb/dev-wacom.c
-@@ -74,6 +74,89 @@ static const USBDescStrings desc_strings = {
+Index: qemu-5.1.0/hw/usb/dev-wacom.c
+===================================================================
+--- qemu-5.1.0.orig/hw/usb/dev-wacom.c
++++ qemu-5.1.0/hw/usb/dev-wacom.c
+@@ -74,6 +74,89 @@ static const USBDescStrings desc_strings
      [STR_SERIALNUMBER]     = "1",
  };
  
@@ -114,7 +114,7 @@
  static const USBDescIface desc_iface_wacom = {
      .bInterfaceNumber              = 0,
      .bNumEndpoints                 = 1,
-@@ -91,7 +174,7 @@ static const USBDescIface desc_iface_wacom = {
+@@ -91,7 +174,7 @@ static const USBDescIface desc_iface_wac
                  0x00,          /*  u8  country_code */
                  0x01,          /*  u8  num_descriptors */
                  0x22,          /*  u8  type: Report */
@@ -123,7 +123,7 @@
              },
          },
      },
-@@ -271,6 +354,15 @@ static void usb_wacom_handle_control(USBDevice *dev, USBPacket *p,
+@@ -271,6 +354,15 @@ static void usb_wacom_handle_control(USB
      }
  
      switch (request) {
@@ -139,6 +139,3 @@
      case WACOM_SET_REPORT:
          if (s->mouse_grabbed) {
              qemu_remove_mouse_event_handler(s->eh_entry);
--- 
-2.24.0
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch
index 6e38d81..678e059 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch
@@ -15,10 +15,10 @@
  linux-user/syscall.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index d6f8cc97..a61420e7 100644
---- a/linux-user/syscall.c
-+++ b/linux-user/syscall.c
+Index: qemu-5.1.0/linux-user/syscall.c
+===================================================================
+--- qemu-5.1.0.orig/linux-user/syscall.c
++++ qemu-5.1.0/linux-user/syscall.c
 @@ -109,7 +109,9 @@
  #include <linux/blkpg.h>
  #include <netpacket/packet.h>
@@ -28,7 +28,4 @@
 +#endif
  #include <linux/rtc.h>
  #include <sound/asound.h>
- #include "linux_loop.h"
--- 
-2.24.0
-
+ #ifdef HAVE_DRM_H
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0002-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
index 3d26887..f379948 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0002-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
@@ -16,11 +16,11 @@
  tests/Makefile.include | 8 ++++++++
  1 file changed, 8 insertions(+)
 
-diff --git a/tests/Makefile.include b/tests/Makefile.include
-index 51de6762..1ea4d322 100644
---- a/tests/Makefile.include
-+++ b/tests/Makefile.include
-@@ -941,4 +941,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+Index: qemu-5.1.0/tests/Makefile.include
+===================================================================
+--- qemu-5.1.0.orig/tests/Makefile.include
++++ qemu-5.1.0/tests/Makefile.include
+@@ -982,4 +982,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
  -include $(wildcard tests/qtest/*.d)
  -include $(wildcard tests/qtest/libqos/*.d)
  
@@ -33,6 +33,3 @@
 +	done
 +
  endif
--- 
-2.24.0
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index 012d60d..33cef42 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -15,13 +15,13 @@
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 
 ---
- hw/mips/mips_malta.c | 2 +-
+ hw/mips/malta.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
-index 92e9ca5b..3a7f3954 100644
---- a/hw/mips/mips_malta.c
-+++ b/hw/mips/mips_malta.c
+Index: qemu-5.1.0/hw/mips/malta.c
+===================================================================
+--- qemu-5.1.0.orig/hw/mips/malta.c
++++ qemu-5.1.0/hw/mips/malta.c
 @@ -59,7 +59,7 @@
  
  #define ENVP_ADDR           0x80002000l
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch b/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
index bc30397..71f537f 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
@@ -12,11 +12,11 @@
  configure | 9 ---------
  1 file changed, 9 deletions(-)
 
-diff --git a/configure b/configure
-index 6099be1d..a766017b 100755
---- a/configure
-+++ b/configure
-@@ -5390,15 +5390,6 @@ fi
+Index: qemu-5.1.0/configure
+===================================================================
+--- qemu-5.1.0.orig/configure
++++ qemu-5.1.0/configure
+@@ -5751,15 +5751,6 @@ fi
  # check if we have valgrind/valgrind.h
  
  valgrind_h=no
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch b/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
index 2c5b241..02ebbee 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
@@ -11,11 +11,11 @@
  configure | 4 ----
  1 file changed, 4 deletions(-)
 
-diff --git a/configure b/configure
-index 83c65439..6bdf488c 100755
---- a/configure
-+++ b/configure
-@@ -6251,10 +6251,6 @@ write_c_skeleton
+Index: qemu-5.1.0/configure
+===================================================================
+--- qemu-5.1.0.orig/configure
++++ qemu-5.1.0/configure
+@@ -6515,10 +6515,6 @@ write_c_skeleton
  if test "$gcov" = "yes" ; then
    QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS"
    QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS"
@@ -26,6 +26,3 @@
  fi
  
  if test "$have_asan" = "yes"; then
--- 
-2.24.0
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch b/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
index 0810ae8..98fd5e9 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
@@ -51,11 +51,11 @@
  qapi/char.json        |   5 +++
  3 files changed, 109 insertions(+)
 
-diff --git a/chardev/char-socket.c b/chardev/char-socket.c
-index 185fe38d..54fa4234 100644
---- a/chardev/char-socket.c
-+++ b/chardev/char-socket.c
-@@ -1288,6 +1288,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
+Index: qemu-5.1.0/chardev/char-socket.c
+===================================================================
+--- qemu-5.1.0.orig/chardev/char-socket.c
++++ qemu-5.1.0/chardev/char-socket.c
+@@ -1292,6 +1292,67 @@ static bool qmp_chardev_validate_socket(
      return true;
  }
  
@@ -123,7 +123,7 @@
  
  static void qmp_chardev_open_socket(Chardev *chr,
                                      ChardevBackend *backend,
-@@ -1296,6 +1357,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
+@@ -1300,6 +1361,9 @@ static void qmp_chardev_open_socket(Char
  {
      SocketChardev *s = SOCKET_CHARDEV(chr);
      ChardevSocket *sock = backend->u.socket.data;
@@ -133,7 +133,7 @@
      bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
      bool is_listen      = sock->has_server  ? sock->server  : true;
      bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
-@@ -1361,6 +1425,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
+@@ -1365,6 +1429,14 @@ static void qmp_chardev_open_socket(Char
  
      update_disconnected_filename(s);
  
@@ -148,13 +148,15 @@
      if (s->is_listen) {
          if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
                                             is_waitconnect, errp) < 0) {
-@@ -1380,9 +1452,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
+@@ -1384,11 +1456,27 @@ static void qemu_chr_parse_socket(QemuOp
      const char *host = qemu_opt_get(opts, "host");
      const char *port = qemu_opt_get(opts, "port");
      const char *fd = qemu_opt_get(opts, "fd");
 +#ifndef _WIN32
 +    const char *cmd = qemu_opt_get(opts, "cmd");
 +#endif
+     bool tight = qemu_opt_get_bool(opts, "tight", true);
+     bool abstract = qemu_opt_get_bool(opts, "abstract", false);
      SocketAddressLegacy *addr;
      ChardevSocket *sock;
  
@@ -171,19 +173,19 @@
 +        }
 +    } else
 +#endif
-+
      if ((!!path + !!fd + !!host) != 1) {
          error_setg(errp,
                     "Exactly one of 'path', 'fd' or 'host' required");
-@@ -1425,12 +1514,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
+@@ -1431,12 +1519,24 @@ static void qemu_chr_parse_socket(QemuOp
      sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
      sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
  
+-    addr = g_new0(SocketAddressLegacy, 1);
 +#ifndef _WIN32
 +    sock->cmd = g_strdup(cmd);
 +#endif
 +
-     addr = g_new0(SocketAddressLegacy, 1);
++     addr = g_new0(SocketAddressLegacy, 1);
 +#ifndef _WIN32
 +    if (path || cmd) {
 +#else
@@ -197,28 +199,28 @@
 +#else
          q_unix->path = g_strdup(path);
 +#endif
+         q_unix->tight = tight;
+         q_unix->abstract = abstract;
      } else if (host) {
-         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 7b6b2cb1..0c2ca64b 100644
---- a/chardev/char.c
-+++ b/chardev/char.c
-@@ -837,6 +837,9 @@ QemuOptsList qemu_chardev_opts = {
-         },{
+Index: qemu-5.1.0/chardev/char.c
+===================================================================
+--- qemu-5.1.0.orig/chardev/char.c
++++ qemu-5.1.0/chardev/char.c
+@@ -826,6 +826,9 @@ QemuOptsList qemu_chardev_opts = {
              .name = "path",
              .type = QEMU_OPT_STRING,
-+        },{
+         },{
 +            .name = "cmd",
 +            .type = QEMU_OPT_STRING,
-         },{
++        },{
              .name = "host",
              .type = QEMU_OPT_STRING,
-diff --git a/qapi/char.json b/qapi/char.json
-index a6e81ac7..517962c6 100644
---- a/qapi/char.json
-+++ b/qapi/char.json
-@@ -247,6 +247,10 @@
+         },{
+Index: qemu-5.1.0/qapi/char.json
+===================================================================
+--- qemu-5.1.0.orig/qapi/char.json
++++ qemu-5.1.0/qapi/char.json
+@@ -250,6 +250,10 @@
  #
  # @addr: socket address to listen on (server=true)
  #        or connect to (server=false)
@@ -229,7 +231,7 @@
  # @tls-creds: the ID of the TLS credentials object (since 2.6)
  # @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 @@
+@@ -276,6 +280,7 @@
  ##
  { 'struct': 'ChardevSocket',
    'data': { 'addr': 'SocketAddressLegacy',
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch b/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
index 89baad9..034ac57 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
@@ -29,11 +29,11 @@
  hw/intc/apic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index 2a74f7b4..4d5da365 100644
---- a/hw/intc/apic.c
-+++ b/hw/intc/apic.c
-@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
+Index: qemu-5.1.0/hw/intc/apic.c
+===================================================================
+--- qemu-5.1.0.orig/hw/intc/apic.c
++++ qemu-5.1.0/hw/intc/apic.c
+@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *de
      APICCommonState *s = APIC(dev);
      uint32_t lvt0;
  
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/poky/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
index 30bb4dd..d20f04e 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -18,11 +18,11 @@
  linux-user/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/linux-user/main.c b/linux-user/main.c
-index 6ff7851e..ebff0485 100644
---- a/linux-user/main.c
-+++ b/linux-user/main.c
-@@ -78,7 +78,7 @@ int have_guest_base;
+Index: qemu-5.1.0/linux-user/main.c
+===================================================================
+--- qemu-5.1.0.orig/linux-user/main.c
++++ qemu-5.1.0/linux-user/main.c
+@@ -92,7 +92,7 @@ static int last_log_mask;
        (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
  /* There are a number of places where we assign reserved_va to a variable
     of type abi_ulong and expect it to fit.  Avoid the last page.  */
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch b/poky/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
index eef3f3f..f2a4498 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
@@ -28,29 +28,29 @@
  linux-user/syscall.c    |  5 +----
  4 files changed, 10 insertions(+), 23 deletions(-)
 
-diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
-index 49384bb6..93b12519 100644
---- a/include/exec/cpu-all.h
-+++ b/include/exec/cpu-all.h
-@@ -162,12 +162,8 @@ extern unsigned long guest_base;
- extern int have_guest_base;
- extern unsigned long reserved_va;
- 
--#if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS
--#define GUEST_ADDR_MAX (~0ul)
--#else
--#define GUEST_ADDR_MAX (reserved_va ? reserved_va - 1 : \
+Index: qemu-5.1.0/include/exec/cpu-all.h
+===================================================================
+--- qemu-5.1.0.orig/include/exec/cpu-all.h
++++ qemu-5.1.0/include/exec/cpu-all.h
+@@ -176,11 +176,8 @@ extern unsigned long reserved_va;
+  * avoid setting bits at the top of guest addresses that might need
+  * to be used for tags.
+  */
+-#define GUEST_ADDR_MAX_                                                 \
+-    ((MIN_CONST(TARGET_VIRT_ADDR_SPACE_BITS, TARGET_ABI_BITS) <= 32) ?  \
+-     UINT32_MAX : ~0ul)
+-#define GUEST_ADDR_MAX    (reserved_va ? reserved_va - 1 : GUEST_ADDR_MAX_)
+-
 +#define GUEST_ADDR_MAX (reserved_va ? reserved_va : \
-                                     (1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1)
--#endif
++                                     (1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1)
  #else
  
  #include "exec/hwaddr.h"
-diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
-index 53de1975..cf19ed2e 100644
---- a/include/exec/cpu_ldst.h
-+++ b/include/exec/cpu_ldst.h
-@@ -70,7 +70,10 @@ typedef uint64_t abi_ptr;
+Index: qemu-5.1.0/include/exec/cpu_ldst.h
+===================================================================
+--- qemu-5.1.0.orig/include/exec/cpu_ldst.h
++++ qemu-5.1.0/include/exec/cpu_ldst.h
+@@ -75,7 +75,10 @@ typedef uint64_t abi_ptr;
  #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS
  #define guest_addr_valid(x) (1)
  #else
@@ -62,11 +62,11 @@
  #endif
  #define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base)
  
-diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index e3780337..1d4aba95 100644
---- a/linux-user/mmap.c
-+++ b/linux-user/mmap.c
-@@ -71,7 +71,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
+Index: qemu-5.1.0/linux-user/mmap.c
+===================================================================
+--- qemu-5.1.0.orig/linux-user/mmap.c
++++ qemu-5.1.0/linux-user/mmap.c
+@@ -71,7 +71,7 @@ int target_mprotect(abi_ulong start, abi
          return -TARGET_EINVAL;
      len = TARGET_PAGE_ALIGN(len);
      end = start + len;
@@ -75,18 +75,18 @@
          return -TARGET_ENOMEM;
      }
      prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
-@@ -467,8 +467,8 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
+@@ -467,8 +467,8 @@ abi_long target_mmap(abi_ulong start, ab
           * 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)) {
+-        if (end < start || !guest_range_valid(start, len)) {
 -            errno = ENOMEM;
-+        if ((unsigned long)start + len - 1 > (abi_ulong) -1) {
++        if (end < start || ((unsigned long)start + len - 1 > (abi_ulong) -1)) {
 +            errno = EINVAL;
              goto fail;
          }
  
-@@ -604,10 +604,8 @@ int target_munmap(abi_ulong start, abi_ulong len)
+@@ -604,10 +604,8 @@ int target_munmap(abi_ulong start, abi_u
      if (start & ~TARGET_PAGE_MASK)
          return -TARGET_EINVAL;
      len = TARGET_PAGE_ALIGN(len);
@@ -98,7 +98,7 @@
      mmap_lock();
      end = start + len;
      real_start = start & qemu_host_page_mask;
-@@ -662,13 +660,6 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
+@@ -662,13 +660,6 @@ abi_long target_mremap(abi_ulong old_add
      int prot;
      void *host_addr;
  
@@ -112,11 +112,11 @@
      mmap_lock();
  
      if (flags & MREMAP_FIXED) {
-diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index 05f03919..d6f8cc97 100644
---- a/linux-user/syscall.c
-+++ b/linux-user/syscall.c
-@@ -4287,9 +4287,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env,
+Index: qemu-5.1.0/linux-user/syscall.c
+===================================================================
+--- qemu-5.1.0.orig/linux-user/syscall.c
++++ qemu-5.1.0/linux-user/syscall.c
+@@ -4336,9 +4336,6 @@ static inline abi_ulong do_shmat(CPUArch
              return -TARGET_EINVAL;
          }
      }
@@ -126,7 +126,7 @@
  
      mmap_lock();
  
-@@ -7247,7 +7244,7 @@ static int open_self_maps(void *cpu_env, int fd)
+@@ -7376,7 +7373,7 @@ static int open_self_maps(void *cpu_env,
              const char *path;
  
              max = h2g_valid(max - 1) ?
@@ -135,6 +135,3 @@
  
              if (page_check_range(h2g(min), max - min, flags) == -1) {
                  continue;
--- 
-2.24.0
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
index 34df78b..d7e3fff 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -14,11 +14,11 @@
  configure | 48 ++++++++++++++++++++++++++++++++++++++++--------
  1 file changed, 40 insertions(+), 8 deletions(-)
 
-diff --git a/configure b/configure
-index 72f11aca..cac271ce 100755
---- a/configure
-+++ b/configure
-@@ -2875,6 +2875,30 @@ has_libgcrypt() {
+Index: qemu-5.1.0/configure
+===================================================================
+--- qemu-5.1.0.orig/configure
++++ qemu-5.1.0/configure
+@@ -3084,6 +3084,30 @@ has_libgcrypt() {
      return 0
  }
  
@@ -49,7 +49,7 @@
  
  if test "$nettle" != "no"; then
      pass="no"
-@@ -2915,7 +2939,14 @@ fi
+@@ -3124,7 +3148,14 @@ fi
  
  if test "$gcrypt" != "no"; then
      pass="no"
@@ -65,7 +65,7 @@
          gcrypt_cflags=$(libgcrypt-config --cflags)
          gcrypt_libs=$(libgcrypt-config --libs)
          # Debian has removed -lgpg-error from libgcrypt-config
-@@ -2925,15 +2956,16 @@ if test "$gcrypt" != "no"; then
+@@ -3134,15 +3165,16 @@ if test "$gcrypt" != "no"; then
          then
              gcrypt_libs="$gcrypt_libs -lgpg-error"
          fi
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/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
deleted file mode 100644
index e5ebfc1..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-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.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Add custom_debug.h with function for print backtrace information.
-When pthread_kill fails in qemu_cpu_kick_thread display backtrace and
-current cpu information.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
----
- cpus.c         |  5 +++++
- custom_debug.h | 24 ++++++++++++++++++++++++
- 2 files changed, 29 insertions(+)
- create mode 100644 custom_debug.h
-
-diff --git a/cpus.c b/cpus.c
-index e83f72b4..e6e2576e 100644
---- a/cpus.c
-+++ b/cpus.c
-@@ -1769,6 +1769,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
-     return NULL;
- }
- 
-+#include "custom_debug.h"
-+
- static void qemu_cpu_kick_thread(CPUState *cpu)
- {
- #ifndef _WIN32
-@@ -1781,6 +1783,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
-     err = pthread_kill(cpu->thread->thread, SIG_IPI);
-     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, 0);
-+        backtrace_print();
-         exit(1);
-     }
- #else /* _WIN32 */
-diff --git a/custom_debug.h b/custom_debug.h
-new file mode 100644
-index 00000000..f029e455
---- /dev/null
-+++ b/custom_debug.h
-@@ -0,0 +1,24 @@
-+#include <execinfo.h>
-+#include <stdio.h>
-+#define BACKTRACE_MAX 128
-+static void backtrace_print(void)
-+{
-+	int nfuncs = 0;
-+	void *buf[BACKTRACE_MAX];
-+	char **symbols;
-+	int i;
-+
-+	nfuncs = backtrace(buf, BACKTRACE_MAX);
-+
-+	symbols = backtrace_symbols(buf, nfuncs);
-+	if (symbols == NULL) {
-+		fprintf(stderr, "backtrace_print failed to get symbols");
-+		return;
-+	}
-+
-+	fprintf(stderr, "Backtrace ...\n");
-+	for (i = 0; i < nfuncs; i++)
-+		fprintf(stderr, "%s\n", symbols[i]);
-+
-+	free(symbols);
-+}
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-10761.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-10761.patch
deleted file mode 100644
index 19f26ae..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-10761.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From 5c4fe018c025740fef4a0a4421e8162db0c3eefd Mon Sep 17 00:00:00 2001
-From: Eric Blake <eblake@redhat.com>
-Date: Mon, 8 Jun 2020 13:26:37 -0500
-Subject: [PATCH] nbd/server: Avoid long error message assertions
- CVE-2020-10761
-
-Ever since commit 36683283 (v2.8), the server code asserts that error
-strings sent to the client are well-formed per the protocol by not
-exceeding the maximum string length of 4096.  At the time the server
-first started sending error messages, the assertion could not be
-triggered, because messages were completely under our control.
-However, over the years, we have added latent scenarios where a client
-could trigger the server to attempt an error message that would
-include the client's information if it passed other checks first:
-
-- requesting NBD_OPT_INFO/GO on an export name that is not present
-  (commit 0cfae925 in v2.12 echoes the name)
-
-- requesting NBD_OPT_LIST/SET_META_CONTEXT on an export name that is
-  not present (commit e7b1948d in v2.12 echoes the name)
-
-At the time, those were still safe because we flagged names larger
-than 256 bytes with a different message; but that changed in commit
-93676c88 (v4.2) when we raised the name limit to 4096 to match the NBD
-string limit.  (That commit also failed to change the magic number
-4096 in nbd_negotiate_send_rep_err to the just-introduced named
-constant.)  So with that commit, long client names appended to server
-text can now trigger the assertion, and thus be used as a denial of
-service attack against a server.  As a mitigating factor, if the
-server requires TLS, the client cannot trigger the problematic paths
-unless it first supplies TLS credentials, and such trusted clients are
-less likely to try to intentionally crash the server.
-
-We may later want to further sanitize the user-supplied strings we
-place into our error messages, such as scrubbing out control
-characters, but that is less important to the CVE fix, so it can be a
-later patch to the new nbd_sanitize_name.
-
-Consideration was given to changing the assertion in
-nbd_negotiate_send_rep_verr to instead merely log a server error and
-truncate the message, to avoid leaving a latent path that could
-trigger a future CVE DoS on any new error message.  However, this
-merely complicates the code for something that is already (correctly)
-flagging coding errors, and now that we are aware of the long message
-pitfall, we are less likely to introduce such errors in the future,
-which would make such error handling dead code.
-
-Reported-by: Xueqiang Wei <xuwei@redhat.com>
-CC: qemu-stable@nongnu.org
-Fixes: https://bugzilla.redhat.com/1843684 CVE-2020-10761
-Fixes: 93676c88d7
-Signed-off-by: Eric Blake <eblake@redhat.com>
-Message-Id: <20200610163741.3745251-2-eblake@redhat.com>
-Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
-
-Upstream-Status: Backport  [https://github.com/qemu/qemu/commit/5c4fe018c025740fef4a0a4421e8162db0c3eefd]
-CVE: CVE-2020-10761
-Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
-
----
- nbd/server.c               | 23 ++++++++++++++++++++---
- tests/qemu-iotests/143     |  4 ++++
- tests/qemu-iotests/143.out |  2 ++
- 3 files changed, 26 insertions(+), 3 deletions(-)
-
-diff --git a/nbd/server.c b/nbd/server.c
-index 02b1ed08014..20754e9ebc3 100644
---- a/nbd/server.c
-+++ b/nbd/server.c
-@@ -217,7 +217,7 @@ nbd_negotiate_send_rep_verr(NBDClient *client, uint32_t type,
- 
-     msg = g_strdup_vprintf(fmt, va);
-     len = strlen(msg);
--    assert(len < 4096);
-+    assert(len < NBD_MAX_STRING_SIZE);
-     trace_nbd_negotiate_send_rep_err(msg);
-     ret = nbd_negotiate_send_rep_len(client, type, len, errp);
-     if (ret < 0) {
-@@ -231,6 +231,19 @@ nbd_negotiate_send_rep_verr(NBDClient *client, uint32_t type,
-     return 0;
- }
- 
-+/*
-+ * Return a malloc'd copy of @name suitable for use in an error reply.
-+ */
-+static char *
-+nbd_sanitize_name(const char *name)
-+{
-+    if (strnlen(name, 80) < 80) {
-+        return g_strdup(name);
-+    }
-+    /* XXX Should we also try to sanitize any control characters? */
-+    return g_strdup_printf("%.80s...", name);
-+}
-+
- /* Send an error reply.
-  * Return -errno on error, 0 on success. */
- static int GCC_FMT_ATTR(4, 5)
-@@ -595,9 +608,11 @@ static int nbd_negotiate_handle_info(NBDClient *client, Error **errp)
- 
-     exp = nbd_export_find(name);
-     if (!exp) {
-+        g_autofree char *sane_name = nbd_sanitize_name(name);
-+
-         return nbd_negotiate_send_rep_err(client, NBD_REP_ERR_UNKNOWN,
-                                           errp, "export '%s' not present",
--                                          name);
-+                                          sane_name);
-     }
- 
-     /* Don't bother sending NBD_INFO_NAME unless client requested it */
-@@ -995,8 +1010,10 @@ static int nbd_negotiate_meta_queries(NBDClient *client,
- 
-     meta->exp = nbd_export_find(export_name);
-     if (meta->exp == NULL) {
-+        g_autofree char *sane_name = nbd_sanitize_name(export_name);
-+
-         return nbd_opt_drop(client, NBD_REP_ERR_UNKNOWN, errp,
--                            "export '%s' not present", export_name);
-+                            "export '%s' not present", sane_name);
-     }
- 
-     ret = nbd_opt_read(client, &nb_queries, sizeof(nb_queries), errp);
-diff --git a/tests/qemu-iotests/143 b/tests/qemu-iotests/143
-index f649b361950..d2349903b1b 100755
---- a/tests/qemu-iotests/143
-+++ b/tests/qemu-iotests/143
-@@ -58,6 +58,10 @@ _send_qemu_cmd $QEMU_HANDLE \
- $QEMU_IO_PROG -f raw -c quit \
-     "nbd+unix:///no_such_export?socket=$SOCK_DIR/nbd" 2>&1 \
-     | _filter_qemu_io | _filter_nbd
-+# Likewise, with longest possible name permitted in NBD protocol
-+$QEMU_IO_PROG -f raw -c quit \
-+    "nbd+unix:///$(printf %4096d 1 | tr ' ' a)?socket=$SOCK_DIR/nbd" 2>&1 \
-+    | _filter_qemu_io | _filter_nbd | sed 's/aaaa*aa/aa--aa/'
- 
- _send_qemu_cmd $QEMU_HANDLE \
-     "{ 'execute': 'quit' }" \
-diff --git a/tests/qemu-iotests/143.out b/tests/qemu-iotests/143.out
-index 1f4001c6013..fc9c0a761fa 100644
---- a/tests/qemu-iotests/143.out
-+++ b/tests/qemu-iotests/143.out
-@@ -5,6 +5,8 @@ QA output created by 143
- {"return": {}}
- qemu-io: can't open device nbd+unix:///no_such_export?socket=SOCK_DIR/nbd: Requested export not available
- server reported: export 'no_such_export' not present
-+qemu-io: can't open device nbd+unix:///aa--aa1?socket=SOCK_DIR/nbd: Requested export not available
-+server reported: export 'aa--aa...' not present
- { 'execute': 'quit' }
- {"return": {}}
- {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13361.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13361.patch
deleted file mode 100644
index e0acc70..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13361.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 369ff955a8497988d079c4e3fa1e93c2570c1c69 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Fri, 15 May 2020 01:36:08 +0530
-Subject: [PATCH] es1370: check total frame count against current frame
-
-A guest user may set channel frame count via es1370_write()
-such that, in es1370_transfer_audio(), total frame count
-'size' is lesser than the number of frames that are processed
-'cnt'.
-
-    int cnt = d->frame_cnt >> 16;
-    int size = d->frame_cnt & 0xffff;
-
-if (size < cnt), it results in incorrect calculations leading
-to OOB access issue(s). Add check to avoid it.
-
-Reported-by: Ren Ding <rding@gatech.edu>
-Reported-by: Hanqing Zhao <hanqing@gatech.edu>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Message-id: 20200514200608.1744203-1-ppandit@redhat.com
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-
-Upstream-Status: Backport [https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg03983.html]
-CVE: CVE-2020-13361
-Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
----
- hw/audio/es1370.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
-index 89c4dabcd44..5f8a83ff562 100644
---- a/hw/audio/es1370.c
-+++ b/hw/audio/es1370.c
-@@ -643,6 +643,9 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel,
-     int csc_bytes = (csc + 1) << d->shift;
-     int cnt = d->frame_cnt >> 16;
-     int size = d->frame_cnt & 0xffff;
-+    if (size < cnt) {
-+        return;
-+    }
-     int left = ((size - cnt + 1) << 2) + d->leftover;
-     int transferred = 0;
-     int temp = MIN (max, MIN (left, csc_bytes));
-@@ -651,7 +654,7 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel,
-     addr += (cnt << 2) + d->leftover;
- 
-     if (index == ADC_CHANNEL) {
--        while (temp) {
-+        while (temp > 0) {
-             int acquired, to_copy;
- 
-             to_copy = MIN ((size_t) temp, sizeof (tmpbuf));
-@@ -669,7 +672,7 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel,
-     else {
-         SWVoiceOut *voice = s->dac_voice[index];
- 
--        while (temp) {
-+        while (temp > 0) {
-             int copied, to_copy;
- 
-             to_copy = MIN ((size_t) temp, sizeof (tmpbuf));
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13362.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13362.patch
deleted file mode 100644
index af8d4ba..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13362.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From f50ab86a2620bd7e8507af865b164655ee921661 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 14 May 2020 00:55:38 +0530
-Subject: [PATCH] megasas: use unsigned type for reply_queue_head and check
- index
-
-A guest user may set 'reply_queue_head' field of MegasasState to
-a negative value. Later in 'megasas_lookup_frame' it is used to
-index into s->frames[] array. Use unsigned type to avoid OOB
-access issue.
-
-Also check that 'index' value stays within s->frames[] bounds
-through the while() loop in 'megasas_lookup_frame' to avoid OOB
-access.
-
-Reported-by: Ren Ding <rding@gatech.edu>
-Reported-by: Hanqing Zhao <hanqing@gatech.edu>
-Reported-by: Alexander Bulekov <alxndr@bu.edu>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Acked-by: Alexander Bulekov <alxndr@bu.edu>
-Message-Id: <20200513192540.1583887-2-ppandit@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
-Upstream-Status: Backport [f50ab86a2620bd7e8507af865b164655ee921661]
-CVE: CVE-2020-13362
-Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
----
- hw/scsi/megasas.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
-index af18c88b65..6ce598cd69 100644
---- a/hw/scsi/megasas.c
-+++ b/hw/scsi/megasas.c
-@@ -112,7 +112,7 @@ typedef struct MegasasState {
-     uint64_t reply_queue_pa;
-     void *reply_queue;
-     int reply_queue_len;
--    int reply_queue_head;
-+    uint16_t reply_queue_head;
-     int reply_queue_tail;
-     uint64_t consumer_pa;
-     uint64_t producer_pa;
-@@ -445,7 +445,7 @@ static MegasasCmd *megasas_lookup_frame(MegasasState *s,
- 
-     index = s->reply_queue_head;
- 
--    while (num < s->fw_cmds) {
-+    while (num < s->fw_cmds && index < MEGASAS_MAX_FRAMES) {
-         if (s->frames[index].pa && s->frames[index].pa == frame) {
-             cmd = &s->frames[index];
-             break;
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13659.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13659.patch
deleted file mode 100644
index 4d12ae8..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13659.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 77f55eac6c433e23e82a1b88b2d74f385c4c7d82 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Tue, 26 May 2020 16:47:43 +0530
-Subject: [PATCH] exec: set map length to zero when returning NULL
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When mapping physical memory into host's virtual address space,
-'address_space_map' may return NULL if BounceBuffer is in_use.
-Set and return '*plen = 0' to avoid later NULL pointer dereference.
-
-Reported-by: Alexander Bulekov <alxndr@bu.edu>
-Fixes: https://bugs.launchpad.net/qemu/+bug/1878259
-Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
-Suggested-by: Peter Maydell <peter.maydell@linaro.org>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Message-Id: <20200526111743.428367-1-ppandit@redhat.com>
-Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
-Upstream-Status: Backport [77f55eac6c433e23e82a1b88b2d74f385c4c7d82]
-CVE: CVE-2020-13659
-Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
----
- exec.c                | 1 +
- include/exec/memory.h | 3 ++-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/exec.c b/exec.c
-index 9cbde85d8c..778263f1c6 100644
---- a/exec.c
-+++ b/exec.c
-@@ -3540,6 +3540,7 @@ void *address_space_map(AddressSpace *as,
- 
-     if (!memory_access_is_direct(mr, is_write)) {
-         if (atomic_xchg(&bounce.in_use, true)) {
-+            *plen = 0;
-             return NULL;
-         }
-         /* Avoid unbounded allocations */
-diff --git a/include/exec/memory.h b/include/exec/memory.h
-index bd7fdd6081..af8ca7824e 100644
---- a/include/exec/memory.h
-+++ b/include/exec/memory.h
-@@ -2314,7 +2314,8 @@ bool address_space_access_valid(AddressSpace *as, hwaddr addr, hwaddr len,
- /* address_space_map: map a physical memory region into a host virtual address
-  *
-  * May map a subset of the requested range, given by and returned in @plen.
-- * May return %NULL if resources needed to perform the mapping are exhausted.
-+ * May return %NULL and set *@plen to zero(0), if resources needed to perform
-+ * the mapping are exhausted.
-  * Use only for reads OR writes - not for read-modify-write operations.
-  * Use cpu_register_map_client() to know when retrying the map operation is
-  * likely to succeed.
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch
deleted file mode 100644
index 049dab9..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From f7d6a635fa3b7797f9d072e280f065bf3cfcd24d Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 4 Jun 2020 17:05:25 +0530
-Subject: [PATCH] pci: assert configuration access is within bounds
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-While accessing PCI configuration bytes, assert that
-'address + len' is within PCI configuration space.
-
-Generally it is within bounds. This is more of a defensive
-assert, in case a buggy device was to send 'address' which
-may go out of bounds.
-
-Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Message-Id: <20200604113525.58898-1-ppandit@redhat.com>
-Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
-Upstream-Status: Backport [f7d6a635fa3b7797f9d072e280f065bf3cfcd24d]
-CVE: CVE-2020-13791
-Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
----
- hw/pci/pci.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/hw/pci/pci.c b/hw/pci/pci.c
-index 70c66965f5..7bf2ae6d92 100644
---- a/hw/pci/pci.c
-+++ b/hw/pci/pci.c
-@@ -1381,6 +1381,8 @@ uint32_t pci_default_read_config(PCIDevice *d,
- {
-     uint32_t val = 0;
- 
-+    assert(address + len <= pci_config_size(d));
-+
-     if (pci_is_express_downstream_port(d) &&
-         ranges_overlap(address, len, d->exp.exp_cap + PCI_EXP_LNKSTA, 2)) {
-         pcie_sync_bridge_lnk(d);
-@@ -1394,6 +1396,8 @@ void pci_default_write_config(PCIDevice *d, uint32_t addr, uint32_t val_in, int
-     int i, was_irq_disabled = pci_irq_disabled(d);
-     uint32_t val = val_in;
- 
-+    assert(addr + l <= pci_config_size(d));
-+
-     for (i = 0; i < l; val >>= 8, ++i) {
-         uint8_t wmask = d->wmask[addr + i];
-         uint8_t w1cmask = d->w1cmask[addr + i];
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13800.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13800.patch
deleted file mode 100644
index 52bfafb..0000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2020-13800.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From a98610c429d52db0937c1e48659428929835c455 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 4 Jun 2020 14:38:30 +0530
-Subject: [PATCH] ati-vga: check mm_index before recursive call
- (CVE-2020-13800)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-While accessing VGA registers via ati_mm_read/write routines,
-a guest may set 's->regs.mm_index' such that it leads to infinite
-recursion. Check mm_index value to avoid such recursion. Log an
-error message for wrong values.
-
-Reported-by: Ren Ding <rding@gatech.edu>
-Reported-by: Hanqing Zhao <hanqing@gatech.edu>
-Reported-by: Yi Ren <c4tren@gmail.com>
-Message-id: 20200604090830.33885-1-ppandit@redhat.com
-Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>
-Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-
-Upstream-Status: Backport [a98610c429d52db0937c1e48659428929835c455]
-CVE: CVE-2020-13800
-Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
----
- hw/display/ati.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/hw/display/ati.c b/hw/display/ati.c
-index 065f197678..67604e68de 100644
---- a/hw/display/ati.c
-+++ b/hw/display/ati.c
-@@ -285,8 +285,11 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr, unsigned int size)
-             if (idx <= s->vga.vram_size - size) {
-                 val = ldn_le_p(s->vga.vram_ptr + idx, size);
-             }
--        } else {
-+        } else if (s->regs.mm_index > MM_DATA + 3) {
-             val = ati_mm_read(s, s->regs.mm_index + addr - MM_DATA, size);
-+        } else {
-+            qemu_log_mask(LOG_GUEST_ERROR,
-+                "ati_mm_read: mm_index too small: %u\n", s->regs.mm_index);
-         }
-         break;
-     case BIOS_0_SCRATCH ... BUS_CNTL - 1:
-@@ -520,8 +523,11 @@ static void ati_mm_write(void *opaque, hwaddr addr,
-             if (idx <= s->vga.vram_size - size) {
-                 stn_le_p(s->vga.vram_ptr + idx, size, data);
-             }
--        } else {
-+        } else if (s->regs.mm_index > MM_DATA + 3) {
-             ati_mm_write(s, s->regs.mm_index + addr - MM_DATA, data, size);
-+        } else {
-+            qemu_log_mask(LOG_GUEST_ERROR,
-+                "ati_mm_write: mm_index too small: %u\n", s->regs.mm_index);
-         }
-         break;
-     case BIOS_0_SCRATCH ... BUS_CNTL - 1:
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/find_datadir.patch b/poky/meta/recipes-devtools/qemu/qemu/find_datadir.patch
index 74e9ba5..9a4c112 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/find_datadir.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/find_datadir.patch
@@ -9,8 +9,10 @@
 Signed-off-by: Joe Slater <joe.slater@windriver.com>
 
 
---- a/os-posix.c
-+++ b/os-posix.c
+Index: qemu-5.1.0/os-posix.c
+===================================================================
+--- qemu-5.1.0.orig/os-posix.c
++++ qemu-5.1.0/os-posix.c
 @@ -82,8 +82,9 @@ void os_setup_signal_handling(void)
  
  /*
@@ -19,10 +21,10 @@
   * When running from the build tree this will be "$bindir/../pc-bios".
 - * Otherwise, this is CONFIG_QEMU_DATADIR.
 + * Otherwise, this is CONFIG_QEMU_DATADIR as constructed by configure.
-  */
- char *os_find_datadir(void)
- {
-@@ -93,6 +94,12 @@ char *os_find_datadir(void)
+  *
+  * The caller must use g_free() to free the returned data when it is
+  * no longer required.
+@@ -96,6 +97,12 @@ char *os_find_datadir(void)
      exec_dir = qemu_get_exec_dir();
      g_return_val_if_fail(exec_dir != NULL, NULL);
  
diff --git a/poky/meta/recipes-devtools/qemu/qemu_5.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu_5.1.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/qemu/qemu_5.0.0.bb
rename to poky/meta/recipes-devtools/qemu/qemu_5.1.0.bb
diff --git a/poky/meta/recipes-devtools/rpm/files/environment.d-rpm.sh b/poky/meta/recipes-devtools/rpm/files/environment.d-rpm.sh
new file mode 100644
index 0000000..9b669a1
--- /dev/null
+++ b/poky/meta/recipes-devtools/rpm/files/environment.d-rpm.sh
@@ -0,0 +1 @@
+export RPM_CONFIGDIR="$OECORE_NATIVE_SYSROOT/usr/lib/rpm"
diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb b/poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb
index b5a0ac9..c925863 100644
--- a/poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb
+++ b/poky/meta/recipes-devtools/rpm/rpm_4.15.1.bb
@@ -25,6 +25,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
 
 SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
+           file://environment.d-rpm.sh \
            file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
            file://0001-Do-not-read-config-files-from-HOME.patch \
            file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
@@ -112,6 +113,9 @@
         done
 
         rm -rf ${D}/var
+
+        mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
+        install -m 644 ${WORKDIR}/environment.d-rpm.sh ${D}${SDKPATHNATIVE}/environment-setup.d/rpm.sh
 }
 
 # Rpm's make install creates var/tmp which clashes with base-files packaging
@@ -129,6 +133,7 @@
 
 FILES_${PN} += "${libdir}/rpm-plugins/*.so \
                "
+FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/rpm.sh"
 
 FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
                     "
diff --git a/poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch b/poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch
index 038a672..4ba7665 100644
--- a/poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch
+++ b/poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch
@@ -1,4 +1,4 @@
-From 5ae38baadd40a996da3d19a147f37e7f1f3355bf Mon Sep 17 00:00:00 2001
+From 1f29584e57f5fda09970c66f3b94f4720e09c1bb Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Tue, 12 Apr 2016 15:51:54 +0100
 Subject: [PATCH] rsync: remove upstream's rebuild logic
@@ -10,14 +10,14 @@
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
 ---
- Makefile.in | 50 --------------------------------------------------
- 1 file changed, 50 deletions(-)
+ Makefile.in | 54 -----------------------------------------------------
+ 1 file changed, 54 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
-index 31ddc43..41c9a93 100644
+index 672fcc4..c12d8d4 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -167,56 +167,6 @@ gen: conf proto.h man
+@@ -168,60 +168,6 @@ gen: conf proto.h man
  gensend: gen
  	rsync -aic $(GENFILES) $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/
  
@@ -56,6 +56,10 @@
 -	./config.status --recheck
 -	./config.status
 -
+-.PHONY: restatus
+-restatus:
+-	./config.status
+-
 -Makefile: Makefile.in config.status configure.sh config.h.in
 -	@if test -f Makefile; then cp -p Makefile Makefile.old; else touch Makefile.old; fi
 -	@./config.status
diff --git a/poky/meta/recipes-devtools/rsync/rsync_3.2.1.bb b/poky/meta/recipes-devtools/rsync/rsync_3.2.2.bb
similarity index 95%
rename from poky/meta/recipes-devtools/rsync/rsync_3.2.1.bb
rename to poky/meta/recipes-devtools/rsync/rsync_3.2.2.bb
index ea6b1ce..182628f 100644
--- a/poky/meta/recipes-devtools/rsync/rsync_3.2.1.bb
+++ b/poky/meta/recipes-devtools/rsync/rsync_3.2.2.bb
@@ -14,7 +14,7 @@
            file://makefile-no-rebuild.patch \
            "
 
-SRC_URI[sha256sum] = "95f2dd62979b500a99b34c1a6453a0787ada0330e4bec7fcffad37b9062d58d3"
+SRC_URI[sha256sum] = "644bd3841779507665211fd7db8359c8a10670c57e305b4aab61b4e40037afa8"
 
 # -16548 required for v3.1.3pre1. Already in v3.1.3.
 CVE_CHECK_WHITELIST += " CVE-2017-16548 "
diff --git a/poky/meta/recipes-devtools/strace/strace_5.7.bb b/poky/meta/recipes-devtools/strace/strace_5.8.bb
similarity index 95%
rename from poky/meta/recipes-devtools/strace/strace_5.7.bb
rename to poky/meta/recipes-devtools/strace/strace_5.8.bb
index c184d03..70d5940 100644
--- a/poky/meta/recipes-devtools/strace/strace_5.7.bb
+++ b/poky/meta/recipes-devtools/strace/strace_5.8.bb
@@ -15,7 +15,7 @@
            file://uintptr_t.patch \
            file://0001-strace-fix-reproducibilty-issues.patch \
            "
-SRC_URI[sha256sum] = "b284b59f9bcd95b9728cea5bd5c0edc5ebe360af73dc76fbf6334f11c777ccd8"
+SRC_URI[sha256sum] = "df4a669f7fff9cc302784085bd4b72fab216a426a3f72c892b28a537b71e7aa9"
 
 inherit autotools ptest
 
diff --git a/poky/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch b/poky/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
deleted file mode 100644
index ac9dc8c..0000000
--- a/poky/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 2460d7b79f7e90dcfeebde5e9c53d9b6798a1f3c Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Tue, 21 Feb 2012 17:12:50 +0100
-Subject: [PATCH] git-version-gen: don't append -dirty if we're not in git
- repo
-
-* for example if we have some dirty directory and we unpack clean vala tarball in it, then it will append -dirty
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Inappropriate [OE-Specific]
----
- build-aux/git-version-gen |   25 ++++++++++++++-----------
- 1 files changed, 14 insertions(+), 11 deletions(-)
-
-diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
-index 0fa6faa..1d1f9d2 100755
---- a/build-aux/git-version-gen
-+++ b/build-aux/git-version-gen
-@@ -126,18 +126,21 @@ fi
- 
- v=`echo "$v" |sed 's/^v//'`
- 
--# Don't declare a version "dirty" merely because a time stamp has changed.
--git status > /dev/null 2>&1
-+if test -d .git
-+then
-+	# Don't declare a version "dirty" merely because a time stamp has changed.
-+	git status > /dev/null 2>&1
- 
--dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
--case "$dirty" in
--    '') ;;
--    *) # Append the suffix only if there isn't one already.
--	case $v in
--	  *-dirty) ;;
--	  *) v="$v-dirty" ;;
--	esac ;;
--esac
-+	dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
-+	case "$dirty" in
-+	    '') ;;
-+	    *) # Append the suffix only if there isn't one already.
-+		case $v in
-+		  *-dirty) ;;
-+		  *) v="$v-dirty" ;;
-+		esac ;;
-+	esac
-+fi
- 
- # Omit the trailing newline, so that m4_esyscmd can use the result directly.
- echo "$v" | tr -d '\012'
--- 
-1.7.8.4
-
diff --git a/poky/meta/recipes-devtools/vala/vala_0.48.6.bb b/poky/meta/recipes-devtools/vala/vala_0.48.6.bb
deleted file mode 100644
index 9dace13..0000000
--- a/poky/meta/recipes-devtools/vala/vala_0.48.6.bb
+++ /dev/null
@@ -1,7 +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 \
-           "
-
-SRC_URI[sha256sum] = "d18d08ed030ce0e0f044f4c15c9df3c25b15beaf8700e45e43b736a6debf9707"
diff --git a/poky/meta/recipes-devtools/vala/vala_0.48.7.bb b/poky/meta/recipes-devtools/vala/vala_0.48.7.bb
new file mode 100644
index 0000000..2e61db1
--- /dev/null
+++ b/poky/meta/recipes-devtools/vala/vala_0.48.7.bb
@@ -0,0 +1,5 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch"
+
+SRC_URI[sha256sum] = "28de33e28da24500cc1675c3a6ced1301c9a6a5e6dd06193569001f9ce9a5c53"
diff --git a/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
index 8ecfde1..75a3841 100644
--- a/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
+++ b/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
@@ -1,4 +1,4 @@
-From 1c6c017e56ec536f5cceacdb02092777d390debb Mon Sep 17 00:00:00 2001
+From afecc8791f904dc1893858d68a642b491356c74b Mon Sep 17 00:00:00 2001
 From: Tudor Florea <tudor.florea@enea.com>
 Date: Wed, 28 May 2014 18:59:54 +0200
 Subject: [PATCH] ethtool: use serial-tests config needed by ptest.
@@ -15,11 +15,11 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index 1169b7f..ed82524 100644
+index 19223f7..8a58d15 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
- AC_INIT(ethtool, 5.7, netdev@vger.kernel.org)
+ AC_INIT(ethtool, 5.8, netdev@vger.kernel.org)
  AC_PREREQ(2.52)
  AC_CONFIG_SRCDIR([ethtool.c])
 -AM_INIT_AUTOMAKE([gnu subdir-objects])
diff --git a/poky/meta/recipes-extended/ethtool/ethtool_5.7.bb b/poky/meta/recipes-extended/ethtool/ethtool_5.8.bb
similarity index 83%
rename from poky/meta/recipes-extended/ethtool/ethtool_5.7.bb
rename to poky/meta/recipes-extended/ethtool/ethtool_5.8.bb
index d9fc30c..0403f0e 100644
--- a/poky/meta/recipes-extended/ethtool/ethtool_5.7.bb
+++ b/poky/meta/recipes-extended/ethtool/ethtool_5.8.bb
@@ -11,7 +11,7 @@
            file://avoid_parallel_tests.patch \
            "
 
-SRC_URI[sha256sum] = "c2e16f8bf510c5822f8e25061c2533972308a421767c54abcacb1038b08bb782"
+SRC_URI[sha256sum] = "91e8bbda48a7fd5d374efacca542364ceb3a6c1f286f024b64ec40ccc799e125"
 
 UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/software/network/ethtool/"
 
@@ -29,7 +29,9 @@
 do_install_ptest () {
    cp ${B}/Makefile                 ${D}${PTEST_PATH}
    install ${B}/test-cmdline        ${D}${PTEST_PATH}
-   install ${B}/test-features       ${D}${PTEST_PATH}
+   if ${@bb.utils.contains('PACKAGECONFIG', 'netlink', 'false', 'true', d)}; then
+       install ${B}/test-features       ${D}${PTEST_PATH}
+   fi
    install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
    sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
 }
diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2020-15900.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2020-15900.patch
new file mode 100644
index 0000000..d7c5f03
--- /dev/null
+++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2020-15900.patch
@@ -0,0 +1,54 @@
+From 5d499272b95a6b890a1397e11d20937de000d31b Mon Sep 17 00:00:00 2001
+From: Ray Johnston <ray.johnston@artifex.com>
+Date: Wed, 22 Jul 2020 09:57:54 -0700
+Subject: [PATCH] Bug 702582, CVE 2020-15900 Memory Corruption in Ghostscript
+ 9.52
+
+Fix the 'rsearch' calculation for the 'post' size to give the correct
+size.  Previous calculation would result in a size that was too large,
+and could underflow to max uint32_t. Also fix 'rsearch' to return the
+correct 'pre' string with empty string match.
+
+A future change may 'undefine' this undocumented, non-standard operator
+during initialization as we do with the many other non-standard internal
+PostScript operators and procedures.
+
+Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5d499272b95a6b890a1397e11d20937de000d31b]
+CVE: CVE-2020-15900
+Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
+---
+ psi/zstring.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/psi/zstring.c b/psi/zstring.c
+index 33662dafa..58e1af2b3 100644
+--- a/psi/zstring.c
++++ b/psi/zstring.c
+@@ -142,13 +142,18 @@ search_impl(i_ctx_t *i_ctx_p, bool forward)
+     return 0;
+ found:
+     op->tas.type_attrs = op1->tas.type_attrs;
+-    op->value.bytes = ptr;
+-    r_set_size(op, size);
++    op->value.bytes = ptr;				/* match */
++    op->tas.rsize = size;				/* match */
+     push(2);
+-    op[-1] = *op1;
+-    r_set_size(op - 1, ptr - op[-1].value.bytes);
+-    op1->value.bytes = ptr + size;
+-    r_set_size(op1, count + (!forward ? (size - 1) : 0));
++    op[-1] = *op1;					/* pre */
++    op[-3].value.bytes = ptr + size;			/* post */
++    if (forward) {
++        op[-1].tas.rsize = ptr - op[-1].value.bytes;	/* pre */
++        op[-3].tas.rsize = count;			/* post */
++    } else {
++        op[-1].tas.rsize = count;			/* pre */
++        op[-3].tas.rsize -= count + size;		/* post */
++    }
+     make_true(op);
+     return 0;
+ }
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript_9.52.bb b/poky/meta/recipes-extended/ghostscript/ghostscript_9.52.bb
index 4cdb6e0..65135f5 100644
--- a/poky/meta/recipes-extended/ghostscript/ghostscript_9.52.bb
+++ b/poky/meta/recipes-extended/ghostscript/ghostscript_9.52.bb
@@ -34,6 +34,7 @@
 SRC_URI = "${SRC_URI_BASE} \
            file://ghostscript-9.21-prevent_recompiling.patch \
            file://cups-no-gcrypt.patch \
+           file://CVE-2020-15900.patch \
            "
 
 SRC_URI_class-native = "${SRC_URI_BASE} \
diff --git a/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
index acef5cc..671fce4 100644
--- a/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
+++ b/poky/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
@@ -1,4 +1,4 @@
-From ef1ea905831c5bcd63e04149571c10d75ff8f028 Mon Sep 17 00:00:00 2001
+From 17d57a2a923a4af53c8910a9999aebeab3f5d83a Mon Sep 17 00:00:00 2001
 From: Robert Yang <liezhi.yang@windriver.com>
 Date: Tue, 17 Feb 2015 21:08:07 -0800
 Subject: [PATCH] Act as the "mv" command when rotate log
@@ -15,10 +15,10 @@
  1 file changed, 59 insertions(+), 12 deletions(-)
 
 diff --git a/logrotate.c b/logrotate.c
-index 25902bc..afa1a90 100644
+index 45b3eb6..231371a 100644
 --- a/logrotate.c
 +++ b/logrotate.c
-@@ -1434,6 +1434,53 @@ static int findNeedRotating(struct logInfo *log, int logNum, int force)
+@@ -1463,6 +1463,53 @@ static int findNeedRotating(const struct logInfo *log, unsigned logNum, int forc
      return 0;
  }
  
@@ -72,7 +72,7 @@
  /* find the rotated file with the highest index */
  static int findLastRotated(const struct logNames *rotNames,
                             const char *fileext, const char *compext)
-@@ -1911,15 +1958,15 @@ static int prerotateSingleLog(struct logInfo *log, int logNum,
+@@ -1958,15 +2005,15 @@ static int prerotateSingleLog(const struct logInfo *log, unsigned logNum,
              }
  
              message(MESS_DEBUG,
@@ -91,7 +91,7 @@
                              oldName, newName, strerror(errno));
                      hasErrors = 1;
                  }
-@@ -2002,10 +2049,10 @@ static int rotateSingleLog(struct logInfo *log, int logNum,
+@@ -2051,10 +2098,10 @@ static int rotateSingleLog(const struct logInfo *log, unsigned logNum,
                      return 1;
                  }
  
@@ -105,7 +105,7 @@
                              log->files[logNum], tmpFilename,
                              strerror(errno));
                      hasErrors = 1;
-@@ -2014,11 +2061,11 @@ static int rotateSingleLog(struct logInfo *log, int logNum,
+@@ -2063,11 +2110,11 @@ static int rotateSingleLog(const struct logInfo *log, unsigned logNum,
                  free(tmpFilename);
              }
              else {
@@ -120,7 +120,7 @@
                              log->files[logNum], rotNames->finalName,
                              strerror(errno));
                      hasErrors = 1;
-@@ -2424,7 +2471,7 @@ static int rotateLogSet(struct logInfo *log, int force)
+@@ -2480,7 +2527,7 @@ static int rotateLogSet(const struct logInfo *log, int force)
      return hasErrors;
  }
  
@@ -129,16 +129,16 @@
  {
      struct logState *p;
      FILE *f;
-@@ -2629,7 +2676,7 @@ static int writeState(const char *stateFilename)
+@@ -2659,7 +2706,7 @@ static int writeState(const char *stateFilename)
          fclose(f);
  
      if (error == 0) {
 -        if (rename(tmpFilename, stateFilename)) {
 +        if (mvFile(tmpFilename, stateFilename, log, prev_acl)) {
+             message(MESS_ERROR, "error renaming temp state file %s to %s: %s\n",
+                     tmpFilename, stateFilename, strerror(errno));
              unlink(tmpFilename);
-             error = 1;
-             message(MESS_ERROR, "error renaming temp state file %s to %s\n",
-@@ -2987,7 +3034,7 @@ int main(int argc, const char **argv)
+@@ -3073,7 +3120,7 @@ int main(int argc, const char **argv)
          rc |= rotateLogSet(log, force);
  
      if (!debug)
diff --git a/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
index 9ba531f..d7f9a02 100644
--- a/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
+++ b/poky/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
@@ -1,4 +1,4 @@
-From a3fdf3dbdd6ecc0f2550a765dcb9bb274bce8ea8 Mon Sep 17 00:00:00 2001
+From 16c1833ade4c036b30b8761d2c4a5bd85cc65c44 Mon Sep 17 00:00:00 2001
 From: Robert Yang <liezhi.yang@windriver.com>
 Date: Tue, 8 Jan 2019 06:27:06 +0000
 Subject: [PATCH] Disable the check for different filesystems
@@ -15,10 +15,10 @@
  1 file changed, 9 deletions(-)
 
 diff --git a/config.c b/config.c
-index f027c7e..026136c 100644
+index d2488f1..1de3745 100644
 --- a/config.c
 +++ b/config.c
-@@ -1873,15 +1873,6 @@ duperror:
+@@ -1902,15 +1902,6 @@ duperror:
                              }
  
                              free(ld);
@@ -28,7 +28,7 @@
 -                                message(MESS_ERROR,
 -                                        "%s:%d olddir %s and log file %s "
 -                                        "are on different devices\n", configFile,
--                                        lineNum, newlog->oldDir, newlog->files[i]);
+-                                        lineNum, newlog->oldDir, newlog->files[j]);
 -                                goto error;
 -                            }
                          }
diff --git a/poky/meta/recipes-extended/logrotate/logrotate_3.16.0.bb b/poky/meta/recipes-extended/logrotate/logrotate_3.17.0.bb
similarity index 95%
rename from poky/meta/recipes-extended/logrotate/logrotate_3.16.0.bb
rename to poky/meta/recipes-extended/logrotate/logrotate_3.17.0.bb
index 1c9df5a..08001f3 100644
--- a/poky/meta/recipes-extended/logrotate/logrotate_3.16.0.bb
+++ b/poky/meta/recipes-extended/logrotate/logrotate_3.17.0.bb
@@ -18,8 +18,7 @@
             file://disable-check-different-filesystems.patch \
             "
 
-SRC_URI[md5sum] = "faf729e0e24bfaafaa677bc6deb46ed8"
-SRC_URI[sha256sum] = "442f6fdf61c349eeae5f76799878b88fe45a11c8863a38b618bac6988f4a7ce5"
+SRC_URI[sha256sum] = "58cc2178ff57faa3c0490181cce041345aeca6cff18dba1c5cd1398bf1c19294"
 
 PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch b/poky/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch
new file mode 100644
index 0000000..6b66503
--- /dev/null
+++ b/poky/meta/recipes-extended/ltp/ltp/0001-Remove-OOM-tests-from-runtest-mm.patch
@@ -0,0 +1,34 @@
+From 13ef88cdccfe3f58c53d57806866b91e310eb272 Mon Sep 17 00:00:00 2001
+From: "Mingde (Matthew) Zeng" <matthewzmd@gmail.com>
+Date: Wed, 29 Jul 2020 08:47:09 -0400
+Subject: [PATCH] Remove OOM tests from runtest/mm
+
+Disable OOM tests, as they might cause oeqa ssh connection lost
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com>
+
+---
+ runtest/mm | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/runtest/mm b/runtest/mm
+index a09f39c1e..76fa82754 100644
+--- a/runtest/mm
++++ b/runtest/mm
+@@ -73,12 +73,6 @@ ksm06 ksm06
+ ksm06_1 ksm06 -n 10
+ ksm06_2 ksm06 -n 10000
+
+-oom01 oom01
+-oom02 oom02
+-oom03 oom03
+-oom04 oom04
+-oom05 oom05
+-
+ swapping01 swapping01 -i 5
+
+ thp01 thp01 -I 120
+--
+2.27.0
+
diff --git a/poky/meta/recipes-extended/ltp/ltp_20200515.bb b/poky/meta/recipes-extended/ltp/ltp_20200515.bb
index b283add..0c7044d 100644
--- a/poky/meta/recipes-extended/ltp/ltp_20200515.bb
+++ b/poky/meta/recipes-extended/ltp/ltp_20200515.bb
@@ -37,6 +37,7 @@
            file://0001-ptrace01-Fix-missing-format-string.patch \
            file://0001-sigwaitinfo-Do-not-run-invalid-undefined-test-cases.patch \
            file://0001-syscalls-copy_file_range02-Expect-EFBIG-in-subcase-m.patch \
+           file://0001-Remove-OOM-tests-from-runtest-mm.patch \
            "
 
 S = "${WORKDIR}/git"
@@ -50,7 +51,7 @@
 
 PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
 EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
-EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite --with-open-posix-testsuite "
+EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite "
 # ltp network/rpc test cases ftbfs when libtirpc is found
 EXTRA_OECONF += " --without-tirpc "
 
diff --git a/poky/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch b/poky/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch
new file mode 100644
index 0000000..4c6e249
--- /dev/null
+++ b/poky/meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch
@@ -0,0 +1,35 @@
+From b65152ebc03832972115e6d98e50cb6190d01793 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
+Date: Mon, 3 Feb 2020 13:18:13 +0100
+Subject: [PATCH 1/3] Drop superfluous global variable definitions
+
+The file minicom.c, by including the minicom.h header, already defines
+the global variables 'dial_user' and 'dial_pass'. The object file
+minicom.o is always linked to dial.o. Thus the definitions in dial.c
+can be dropped.
+
+This fixes linking with gcc 10 which uses -fno-common by default,
+disallowing multiple global variable definitions.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/dial.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/dial.c b/src/dial.c
+index eada5ee..d9d481f 100644
+--- a/src/dial.c
++++ b/src/dial.c
+@@ -146,8 +146,6 @@ static int newtype;
+ /* Access to ".dialdir" denied? */
+ static int dendd = 0;
+ static char *tagged;
+-char *dial_user;
+-char *dial_pass;
+ 
+ /* Change the baud rate.  Treat all characters in the given array as if
+  * they were key presses within the comm parameters dialog (C-A P) and
+-- 
+2.24.1
+
diff --git a/poky/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch b/poky/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
new file mode 100644
index 0000000..1740051
--- /dev/null
+++ b/poky/meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
@@ -0,0 +1,37 @@
+From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
+Date: Mon, 3 Feb 2020 13:18:33 +0100
+Subject: [PATCH 2/3] Drop superfluous global variable definitions
+
+The only place where the EXTERN macro mechanism is used to define the
+global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining
+an empty EXTERN macro and including the minicom.h header). The file
+vt100.c already defines these variables. The vt100.o object file is
+always linked to minicom.o. Thus it is safe not to define the
+variables in minicom.c and only declare them in the minicom.h header.
+
+This fixes linking with gcc 10 which uses -fno-common by default,
+disallowing multiple global variable definitions.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/minicom.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/minicom.h b/src/minicom.h
+index 061c013..0f9693b 100644
+--- a/src/minicom.h
++++ b/src/minicom.h
+@@ -141,7 +141,7 @@ EXTERN int sbcolor;     /* Status Bar Background Color */
+ EXTERN int st_attr;	/* Status Bar attributes. */
+ 
+ /* jl 04.09.97 conversion tables */
+-EXTERN unsigned char vt_outmap[256], vt_inmap[256];
++extern unsigned char vt_outmap[256], vt_inmap[256];
+ 
+ /* MARK updated 02/17/95 - history buffer */
+ EXTERN int num_hist_lines;  /* History buffer size */
+-- 
+2.24.1
+
diff --git a/poky/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch b/poky/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch
new file mode 100644
index 0000000..58cd58e
--- /dev/null
+++ b/poky/meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch
@@ -0,0 +1,42 @@
+From a4fc603b3641d2efe31479116eb7ba66932901c7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
+Date: Mon, 3 Feb 2020 13:21:41 +0100
+Subject: [PATCH 3/3] Drop superfluous global variable definitions
+
+The only place where the EXTERN macro mechanism is used to define the
+global variables 'portfd_is_socket', 'portfd_is_connected' and
+'portfd_sock_addr' is minicom.c (by defining an empty EXTERN macro and
+including the minicom.h header). The source file sysdep1_s.c already
+defines these variables. The sysdep1_s.o object file is always linked
+to minicom.o. Thus it is safe to drop the definitions from minicom.c
+and only declare the variables in the minicom.h header.
+
+This fixes linking with gcc 10 which uses -fno-common by default,
+disallowing multiple global variable definitions.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/minicom.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/minicom.h b/src/minicom.h
+index 0f9693b..1e7cb8c 100644
+--- a/src/minicom.h
++++ b/src/minicom.h
+@@ -113,9 +113,9 @@ EXTERN char *dial_user;     /* Our username there */
+ EXTERN char *dial_pass;     /* Our password */
+ 
+ #ifdef USE_SOCKET
+-EXTERN int portfd_is_socket;	/* File descriptor is a unix socket */
+-EXTERN int portfd_is_connected;	/* 1 if the socket is connected */
+-EXTERN struct sockaddr_un portfd_sock_addr;	/* the unix socket address */
++extern int portfd_is_socket;	/* File descriptor is a unix socket */
++extern int portfd_is_connected;	/* 1 if the socket is connected */
++extern struct sockaddr_un portfd_sock_addr;	/* the unix socket address */
+ #define portfd_connected ((portfd_is_socket && !portfd_is_connected) \
+                            ? -1 : portfd)
+ #else
+-- 
+2.24.1
+
diff --git a/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb b/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
index 1e6f131..0303486 100644
--- a/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
+++ b/poky/meta/recipes-extended/minicom/minicom_2.7.1.bb
@@ -11,6 +11,9 @@
            file://allow.to.disable.lockdev.patch \
            file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
            file://0001-Fix-build-issus-surfaced-due-to-musl.patch \
+           file://0001-Drop-superfluous-global-variable-definitions.patch \
+           file://0002-Drop-superfluous-global-variable-definitions.patch \
+           file://0003-Drop-superfluous-global-variable-definitions.patch \
           "
 
 SRC_URI[md5sum] = "9021cb8c5445f6e6e74b2acc39962d62"
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/0001-added-ull-prefix-to-unsigned-long-long-constants-to-.patch b/poky/meta/recipes-extended/net-tools/net-tools/0001-added-ull-prefix-to-unsigned-long-long-constants-to-.patch
deleted file mode 100644
index 523d434..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/0001-added-ull-prefix-to-unsigned-long-long-constants-to-.patch
+++ /dev/null
@@ -1,381 +0,0 @@
-From eb04ef31571f6c707eacaba6846feeebfab518e6 Mon Sep 17 00:00:00 2001
-From: Bernd Eckenfels <net-tools@lina.inka.de>
-Date: Thu, 29 May 2003 02:09:14 +0000
-Subject: [PATCH] added 'ull' prefix to unsigned long long constants to make
- gcc 3.3 happy
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-Upstream-Status: Backport [https://sourceforge.net/p/net-tools/code/ci/eb04ef31571f6c707eacaba6846feeebfab518e6]
----
- lib/interface.c | 299 ++++++++++++++++++++++++++----------------------
- 1 file changed, 161 insertions(+), 138 deletions(-)
-
-diff -uNr net-tools-1.60.orig/lib/interface.c net-tools-1.60/lib/interface.c
---- net-tools-1.60.orig/lib/interface.c	2020-06-16 10:04:16.308411879 +0000
-+++ net-tools-1.60/lib/interface.c	2020-06-16 10:05:15.697264291 +0000
-@@ -23,7 +23,6 @@
- #include <string.h>
- #include <unistd.h>
- #include <ctype.h>
--#include <string.h>
- 
- #if HAVE_AFIPX
- #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
-@@ -654,6 +653,8 @@
-     const char *Rext = "B";
-     const char *Text = "B";
- 
-+    static char flags[200];
-+
- #if HAVE_AFIPX
-     static struct aftype *ipxtype = NULL;
- #endif
-@@ -685,32 +686,68 @@
-     if (hw == NULL)
- 	hw = get_hwntype(-1);
- 
--    printf(_("%-9s Link encap:%s  "), ptr->name, hw->title);
--    /* For some hardware types (eg Ash, ATM) we don't print the 
--       hardware address if it's null.  */
--    if (hw->print != NULL && (! (hw_null_address(hw, ptr->hwaddr) &&
--				  hw->suppress_null_addr)))
--	printf(_("HWaddr %s  "), hw->print(ptr->hwaddr));
--#ifdef IFF_PORTSEL
--    if (ptr->flags & IFF_PORTSEL) {
--	printf(_("Media:%s"), if_port_text[ptr->map.port][0]);
--	if (ptr->flags & IFF_AUTOMEDIA)
--	    printf(_("(auto)"));
--    }
-+    sprintf(flags, "flags=%d<", ptr->flags);
-+    /* DONT FORGET TO ADD THE FLAGS IN ife_print_short, too */
-+    if (ptr->flags == 0)
-+       strcat(flags,">");
-+    if (ptr->flags & IFF_UP)
-+       strcat(flags,_("UP,"));
-+    if (ptr->flags & IFF_BROADCAST)
-+       strcat(flags,_("BROADCAST,"));
-+    if (ptr->flags & IFF_DEBUG)
-+       strcat(flags,_("DEBUG,"));
-+    if (ptr->flags & IFF_LOOPBACK)
-+       strcat(flags,_("LOOPBACK,"));
-+    if (ptr->flags & IFF_POINTOPOINT)
-+       strcat(flags,_("POINTOPOINT,"));
-+    if (ptr->flags & IFF_NOTRAILERS)
-+       strcat(flags,_("NOTRAILERS,"));
-+    if (ptr->flags & IFF_RUNNING)
-+       strcat(flags,_("RUNNING,"));
-+    if (ptr->flags & IFF_NOARP)
-+       strcat(flags,_("NOARP,"));
-+    if (ptr->flags & IFF_PROMISC)
-+       strcat(flags,_("PROMISC,"));
-+    if (ptr->flags & IFF_ALLMULTI)
-+       strcat(flags,_("ALLMULTI,"));
-+    if (ptr->flags & IFF_SLAVE)
-+       strcat(flags,_("SLAVE,"));
-+    if (ptr->flags & IFF_MASTER)
-+       strcat(flags,_("MASTER,"));
-+    if (ptr->flags & IFF_MULTICAST)
-+       strcat(flags,_("MULTICAST,"));
-+#ifdef HAVE_DYNAMIC
-+    if (ptr->flags & IFF_DYNAMIC)
-+       strcat(flags,_("DYNAMIC,"));
-+#endif
-+    /* DONT FORGET TO ADD THE FLAGS IN ife_print_short */
-+    if (flags[strlen(flags)-1] == ',')
-+      flags[strlen(flags)-1] = '>';
-+    else
-+      flags[strlen(flags)-1] = 0;
-+      
-+
-+    printf(_("%s: %s  mtu %d  metric %d"),
-+          ptr->name, flags, ptr->mtu, ptr->metric ? ptr->metric : 1);
-+#ifdef SIOCSKEEPALIVE
-+    if (ptr->outfill || ptr->keepalive)
-+       printf(_("  outfill %d  keepalive %d"),
-+              ptr->outfill, ptr->keepalive);
- #endif
-     printf("\n");
- 
- #if HAVE_AFINET
-     if (ptr->has_ip) {
--	printf(_("          %s addr:%s "), ap->name,
-+        printf(_("        %s %s"), ap->name,
- 	       ap->sprint(&ptr->addr, 1));
--	if (ptr->flags & IFF_POINTOPOINT) {
--	    printf(_(" P-t-P:%s "), ap->sprint(&ptr->dstaddr, 1));
--	}
-+        printf(_("  netmask %s"), ap->sprint(&ptr->netmask, 1));
- 	if (ptr->flags & IFF_BROADCAST) {
--	    printf(_(" Bcast:%s "), ap->sprint(&ptr->broadaddr, 1));
-+            printf(_("  broadcast %s"), ap->sprint(&ptr->broadaddr, 1));
- 	}
--	printf(_(" Mask:%s\n"), ap->sprint(&ptr->netmask, 1));
-+       if (ptr->flags & IFF_POINTOPOINT) {
-+           printf(_("  destination %s"), ap->sprint(&ptr->dstaddr, 1));
-+       }
-+       printf("\n");
-     }
- #endif
- 
-@@ -727,29 +764,30 @@
- 			addr6p[0], addr6p[1], addr6p[2], addr6p[3],
- 			addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
- 		inet6_aftype.input(1, addr6, (struct sockaddr *) &sap);
--		printf(_("          inet6 addr: %s/%d"),
--		 inet6_aftype.sprint((struct sockaddr *) &sap, 1), plen);
--		printf(_(" Scope:"));
--		switch (scope) {
--		case 0:
--		    printf(_("Global"));
--		    break;
--		case IPV6_ADDR_LINKLOCAL:
--		    printf(_("Link"));
--		    break;
--		case IPV6_ADDR_SITELOCAL:
--		    printf(_("Site"));
--		    break;
--		case IPV6_ADDR_COMPATv4:
--		    printf(_("Compat"));
--		    break;
--		case IPV6_ADDR_LOOPBACK:
--		    printf(_("Host"));
--		    break;
--		default:
--		    printf(_("Unknown"));
-+		printf(_("        %s %s  prefixlen %d"),
-+			inet6_aftype.name, 
-+			inet6_aftype.sprint((struct sockaddr *) &sap, 1), 
-+			plen);
-+		printf(_("  scopeid 0x%x"), scope);
-+
-+		flags[0] = '<'; flags[1] = 0;
-+		if (scope & IPV6_ADDR_COMPATv4) {
-+		    	strcat(flags, _("compat,"));
-+		    	scope -= IPV6_ADDR_COMPATv4;
- 		}
--		printf("\n");
-+		if (scope == 0)
-+			strcat(flags, _("global,"));
-+		if (scope & IPV6_ADDR_LINKLOCAL)
-+			strcat(flags, _("link,"));
-+		if (scope & IPV6_ADDR_SITELOCAL)
-+			strcat(flags, _("site,"));
-+		if (scope & IPV6_ADDR_LOOPBACK)
-+			strcat(flags, _("host,"));
-+		if (flags[strlen(flags)-1] == ',')
-+			flags[strlen(flags)-1] = '>';
-+		else
-+			flags[strlen(flags)-1] = 0;
-+		printf("%s\n", flags);
- 	    }
- 	}
- 	fclose(f);
-@@ -762,17 +800,17 @@
- 
-     if (ipxtype != NULL) {
- 	if (ptr->has_ipx_bb)
--	    printf(_("          IPX/Ethernet II addr:%s\n"),
--		   ipxtype->sprint(&ptr->ipxaddr_bb, 1));
-+	    printf(_("        %s Ethernet-II   %s\n"),
-+		   ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_bb, 1));
- 	if (ptr->has_ipx_sn)
--	    printf(_("          IPX/Ethernet SNAP addr:%s\n"),
--		   ipxtype->sprint(&ptr->ipxaddr_sn, 1));
-+	    printf(_("        %s Ethernet-SNAP %s\n"),
-+		   ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_sn, 1));
- 	if (ptr->has_ipx_e2)
--	    printf(_("          IPX/Ethernet 802.2 addr:%s\n"),
--		   ipxtype->sprint(&ptr->ipxaddr_e2, 1));
-+	    printf(_("        %s Ethernet802.2 %s\n"),
-+		   ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_e2, 1));
- 	if (ptr->has_ipx_e3)
--	    printf(_("          IPX/Ethernet 802.3 addr:%s\n"),
--		   ipxtype->sprint(&ptr->ipxaddr_e3, 1));
-+	    printf(_("        %s Ethernet802.3 %s\n"),
-+		   ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_e3, 1));
-     }
- #endif
- 
-@@ -781,7 +819,7 @@
- 	ddptype = get_afntype(AF_APPLETALK);
-     if (ddptype != NULL) {
- 	if (ptr->has_ddp)
--	    printf(_("          EtherTalk Phase 2 addr:%s\n"), ddptype->sprint(&ptr->ddpaddr, 1));
-+	    printf(_("        %s %s\n"), ddptype->name, ddptype->sprint(&ptr->ddpaddr, 1));
-     }
- #endif
- 
-@@ -790,53 +828,30 @@
- 	ectype = get_afntype(AF_ECONET);
-     if (ectype != NULL) {
- 	if (ptr->has_econet)
--	    printf(_("          econet addr:%s\n"), ectype->sprint(&ptr->ecaddr, 1));
-+	    printf(_("        %s %s\n"), ectype->name, ectype->sprint(&ptr->ecaddr, 1));
-     }
- #endif
- 
--    printf("          ");
--    /* DONT FORGET TO ADD THE FLAGS IN ife_print_short, too */
--    if (ptr->flags == 0)
--	printf(_("[NO FLAGS] "));
--    if (ptr->flags & IFF_UP)
--	printf(_("UP "));
--    if (ptr->flags & IFF_BROADCAST)
--	printf(_("BROADCAST "));
--    if (ptr->flags & IFF_DEBUG)
--	printf(_("DEBUG "));
--    if (ptr->flags & IFF_LOOPBACK)
--	printf(_("LOOPBACK "));
--    if (ptr->flags & IFF_POINTOPOINT)
--	printf(_("POINTOPOINT "));
--    if (ptr->flags & IFF_NOTRAILERS)
--	printf(_("NOTRAILERS "));
--    if (ptr->flags & IFF_RUNNING)
--	printf(_("RUNNING "));
--    if (ptr->flags & IFF_NOARP)
--	printf(_("NOARP "));
--    if (ptr->flags & IFF_PROMISC)
--	printf(_("PROMISC "));
--    if (ptr->flags & IFF_ALLMULTI)
--	printf(_("ALLMULTI "));
--    if (ptr->flags & IFF_SLAVE)
--	printf(_("SLAVE "));
--    if (ptr->flags & IFF_MASTER)
--	printf(_("MASTER "));
--    if (ptr->flags & IFF_MULTICAST)
--	printf(_("MULTICAST "));
--#ifdef HAVE_DYNAMIC
--    if (ptr->flags & IFF_DYNAMIC)
--	printf(_("DYNAMIC "));
--#endif
--    /* DONT FORGET TO ADD THE FLAGS IN ife_print_short */
--    printf(_(" MTU:%d  Metric:%d"),
--	   ptr->mtu, ptr->metric ? ptr->metric : 1);
--#ifdef SIOCSKEEPALIVE
--    if (ptr->outfill || ptr->keepalive)
--	printf(_("  Outfill:%d  Keepalive:%d"),
--	       ptr->outfill, ptr->keepalive);
-+    /* For some hardware types (eg Ash, ATM) we don't print the 
-+       hardware address if it's null.  */
-+    if (hw->print != NULL && (! (hw_null_address(hw, ptr->hwaddr) &&
-+				  hw->suppress_null_addr)))
-+	printf(_("        %s %s"), hw->name, hw->print(ptr->hwaddr));
-+    else
-+	printf(_("        %s"), hw->name);
-+    if (ptr->tx_queue_len != -1)
-+    	printf(_("  txqueuelen %d"), ptr->tx_queue_len);
-+    printf("  (%s)\n", hw->title);
-+
-+#ifdef IFF_PORTSEL
-+    if (ptr->flags & IFF_PORTSEL) {
-+	printf(_("        media %s"), if_port_text[ptr->map.port][0]);
-+	if (ptr->flags & IFF_AUTOMEDIA)
-+	    printf(_("autoselect"));
-+    	printf("\n");
-+    }
- #endif
--    printf("\n");
-+
- 
-     /* If needed, display the interface statistics. */
- 
-@@ -845,19 +860,9 @@
- 	 *      not for the aliases, although strictly speaking they're shared
- 	 *      by all addresses.
- 	 */
--	printf("          ");
--
--	printf(_("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"),
--	       ptr->stats.rx_packets, ptr->stats.rx_errors,
--	       ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
--	       ptr->stats.rx_frame_errors);
--	if (can_compress)
--	    printf(_("             compressed:%lu\n"), ptr->stats.rx_compressed);
- 
- 	rx = ptr->stats.rx_bytes;  
--	tx = ptr->stats.tx_bytes;
- 	short_rx = rx * 10;  
--	short_tx = tx * 10;
- 	if (rx > 1125899906842624ull) {
- 	    short_rx /= 1125899906842624ull;
- 	    Rext = "PiB";
-@@ -874,6 +879,8 @@
- 	    short_rx /= 1024;
- 	    Rext = "KiB";
- 	}
-+        tx = ptr->stats.tx_bytes;
-+        short_tx = tx * 10;
- 	if (tx > 1125899906842624ull) {
- 	    short_tx /= 1125899906842624ull;
- 	    Text = "PiB";
-@@ -891,37 +898,50 @@
- 	    Text = "KiB";
- 	}
- 
--	printf("          ");
--	printf(_("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"),
--	       ptr->stats.tx_packets, ptr->stats.tx_errors,
--	       ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
--	       ptr->stats.tx_carrier_errors);
--	printf(_("          collisions:%lu "), ptr->stats.collisions);
--	if (can_compress)
--	    printf(_("compressed:%lu "), ptr->stats.tx_compressed);
--	if (ptr->tx_queue_len != -1)
--	    printf(_("txqueuelen:%d "), ptr->tx_queue_len);
--	printf("\n          ");
--	printf(_("RX bytes:%llu (%lu.%lu %s)  TX bytes:%llu (%lu.%lu %s)\n"),
-+	printf("        ");
-+	printf(_("RX packets %llu  bytes %llu (%lu.%lu %s)\n"), 
-+		ptr->stats.rx_packets, 
- 	       rx, (unsigned long)(short_rx / 10), 
--	       (unsigned long)(short_rx % 10), Rext, 
--	       tx, (unsigned long)(short_tx / 10), 
--	       (unsigned long)(short_tx % 10), Text);
-+	       (unsigned long)(short_rx % 10), Rext);
-+	if (can_compress) {
-+  	    printf("        ");
-+	    printf(_("RX compressed:%lu\n"), ptr->stats.rx_compressed);
-+	}
-+	printf("        ");
-+	printf(_("RX errors %lu  dropped %lu  overruns %lu  frame %lu\n"),
-+	       ptr->stats.rx_errors, ptr->stats.rx_dropped, 
-+	       ptr->stats.rx_fifo_errors, ptr->stats.rx_frame_errors);
-+
-+
-+	printf("        ");
-+	printf(_("TX packets %llu  bytes %llu (%lu.%lu %s)\n"),
-+		ptr->stats.tx_packets, 
-+	        tx, (unsigned long)(short_tx / 10), 
-+	        (unsigned long)(short_tx % 10), Text);
-+	if (can_compress) {
-+  	    printf("        ");
-+	    printf(_("TX compressed %lu\n"), ptr->stats.tx_compressed);
-+	}
-+	printf("        ");
-+	printf(_("TX errors %lu  dropped %lu overruns %lu  carrier %lu  collisions %lu\n"),
-+	       ptr->stats.tx_errors,
-+	       ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
-+	       ptr->stats.tx_carrier_errors, ptr->stats.collisions);
-     }
- 
-     if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma ||
- 	 ptr->map.base_addr >= 0x100)) {
--	printf("          ");
-+	printf("        device ");
- 	if (ptr->map.irq)
--	    printf(_("Interrupt:%d "), ptr->map.irq);
-+	    printf(_("interrupt %d  "), ptr->map.irq);
- 	if (ptr->map.base_addr >= 0x100)	/* Only print devices using it for 
- 						   I/O maps */
--	    printf(_("Base address:0x%x "), ptr->map.base_addr);
-+	    printf(_("base 0x%x  "), ptr->map.base_addr);
- 	if (ptr->map.mem_start) {
--	    printf(_("Memory:%lx-%lx "), ptr->map.mem_start, ptr->map.mem_end);
-+	    printf(_("memory 0x%lx-%lx  "), ptr->map.mem_start, ptr->map.mem_end);
- 	}
- 	if (ptr->map.dma)
--	    printf(_("DMA chan:%x "), ptr->map.dma);
-+	    printf(_("  dma 0x%x"), ptr->map.dma);
- 	printf("\n");
-     }
-     printf("\n");
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/0001-lib-inet6.c-INET6_rresolve-various-fixes.patch b/poky/meta/recipes-extended/net-tools/net-tools/0001-lib-inet6.c-INET6_rresolve-various-fixes.patch
deleted file mode 100644
index 8be45cc..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/0001-lib-inet6.c-INET6_rresolve-various-fixes.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 08abfcd923e9f37d1902db26771b1dc6731eb265 Mon Sep 17 00:00:00 2001
-From: Jiri Popelka <jpopelka@redhat.com>
-Date: Fri, 27 Sep 2013 18:40:06 +0200
-Subject: [PATCH 1/1] lib/inet6.c:INET6_rresolve() - various fixes
-
-1) Fall-back to numeric address if getnameinfo fails.
-   Reverse lookup is not mandatory, therefore its fail
-   is not an error. Just return numeric address in that case.
-   This makes netstat/route show IPv6 address instead of
-   [UNKNOWN] in case of DNS problems.
-
-2) Pass length of 'name' buffer into function.
-   'name' is a pointer and therefore sizeof(name)
-   returns size of pointer and not size of the buffer.
-   see http://stackoverflow.com/questions/14298710/c-pointers-and-arrays-sizeof-operator
-   The sizeof() usage was added with commit 604785adc,
-   so I checked all the other changes in that commit
-   and they seem to be OK.
-
-3) remove unused 's' variable
-
-Upstream-Status: Pending
-
-Signed-off-by: Shan Hai <shan.hai@windriver.com>
-Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
----
- lib/inet6.c | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
-diff --git a/lib/inet6.c b/lib/inet6.c
-index 9a484a0..2a9c459 100644
---- a/lib/inet6.c
-+++ b/lib/inet6.c
-@@ -84,10 +84,9 @@ static int INET6_resolve(char *name, struct sockaddr_in6 *sin6)
- #endif
- 
- 
--static int INET6_rresolve(char *name, struct sockaddr_in6 *sin6, int numeric)
-+static int INET6_rresolve(char *name, size_t namelen,
-+			  struct sockaddr_in6 *sin6, int numeric)
- {
--    int s;
--
-     /* Grmpf. -FvK */
-     if (sin6->sin6_family != AF_INET6) {
- #ifdef DEBUG
-@@ -98,21 +97,20 @@ static int INET6_rresolve(char *name, struct sockaddr_in6 *sin6, int numeric)
- 	return (-1);
-     }
-     if (numeric & 0x7FFF) {
--	inet_ntop( AF_INET6, &sin6->sin6_addr, name, 80);
-+	inet_ntop( AF_INET6, &sin6->sin6_addr, name, namelen);
- 	return (0);
-     }
-     if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
-         if (numeric & 0x8000)
--	    strcpy(name, "default");
-+	    safe_strncpy(name, "default", namelen);
- 	else
--	    strcpy(name, "[::]");
-+	    safe_strncpy(name, "[::]", namelen);
- 	return (0);
-     }
- 
--    if ((s = getnameinfo((struct sockaddr *) sin6, sizeof(struct sockaddr_in6),
--			 name, 255 /* !! */ , NULL, 0, 0))) {
--	fputs("getnameinfo failed\n", stderr);
--	return -1;
-+    if (getnameinfo((struct sockaddr *) sin6, sizeof(struct sockaddr_in6),
-+		    name, namelen , NULL, 0, 0)) {
-+	inet_ntop( AF_INET6, &sin6->sin6_addr, name, namelen);
-     }
-     return (0);
- }
-@@ -143,7 +141,8 @@ static char *INET6_sprint(struct sockaddr *sap, int numeric)
- 
-     if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
- 	return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff));
--    if (INET6_rresolve(buff, (struct sockaddr_in6 *) sap, numeric) != 0)
-+    if (INET6_rresolve(buff, sizeof(buff),
-+		       (struct sockaddr_in6 *) sap, numeric) != 0)
- 	return safe_strncpy(buff, _("[UNKNOWN]"), sizeof(buff));
-     return (fix_v4_address(buff, &((struct sockaddr_in6 *)sap)->sin6_addr));
- }
--- 
-1.8.5.2.233.g932f7e4
-
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/Add_missing_headers.patch b/poky/meta/recipes-extended/net-tools/net-tools/Add_missing_headers.patch
new file mode 100644
index 0000000..f15d365
--- /dev/null
+++ b/poky/meta/recipes-extended/net-tools/net-tools/Add_missing_headers.patch
@@ -0,0 +1,15 @@
+Description: Add missing headers
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- a/netstat.c
++++ b/netstat.c
+@@ -88,6 +88,7 @@
+ #include <sys/stat.h>
+ #include <net/if.h>
+ #include <dirent.h>
++#include <sys/types.h>
+ 
+ #include "net-support.h"
+ #include "pathnames.h"
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/Bug_443075-ifconfig.c-pointtopoint_spelling.patch b/poky/meta/recipes-extended/net-tools/net-tools/Bug_443075-ifconfig.c-pointtopoint_spelling.patch
new file mode 100644
index 0000000..74d7466
--- /dev/null
+++ b/poky/meta/recipes-extended/net-tools/net-tools/Bug_443075-ifconfig.c-pointtopoint_spelling.patch
@@ -0,0 +1,26 @@
+Description: Accept "pointtopoint" as a synonym for "pointopoint"
+Bug-Debian: https://bugs.debian.org/443075
+Author: Justin Pryzby <pryzbyj@libra>
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- a/ifconfig.c
++++ b/ifconfig.c
+@@ -644,14 +644,14 @@
+ 	    spp++;
+ 	    continue;
+ 	}
+-	if (!strcmp(*spp, "-pointopoint")) {
++	if (!strcmp(*spp, "-pointopoint") || !strcmp(*spp, "-pointtopoint")) {
+ 	    goterr |= clr_flag(ifr.ifr_name, IFF_POINTOPOINT);
+ 	    spp++;
+ 	    if (test_flag(ifr.ifr_name, IFF_POINTOPOINT) > 0)
+ 	    	fprintf(stderr, _("Warning: Interface %s still in POINTOPOINT mode.\n"), ifr.ifr_name);
+ 	    continue;
+ 	}
+-	if (!strcmp(*spp, "pointopoint")) {
++	if (!strcmp(*spp, "pointopoint") || !strcmp(*spp, "pointtopoint")) {
+ 	    if (*(spp + 1) != NULL) {
+ 		spp++;
+ 		safe_strncpy(host, *spp, (sizeof host));
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/Bug_541172-netstat.c-exit-codes.patch b/poky/meta/recipes-extended/net-tools/net-tools/Bug_541172-netstat.c-exit-codes.patch
new file mode 100644
index 0000000..782b94b
--- /dev/null
+++ b/poky/meta/recipes-extended/net-tools/net-tools/Bug_541172-netstat.c-exit-codes.patch
@@ -0,0 +1,22 @@
+Description: Bug#541172: netstat.c exit codes
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- a/netstat.c
++++ b/netstat.c
+@@ -2237,12 +2237,14 @@
+             parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp);
+ #else
+             ENOSUPP("netstat", "AF INET");
++            exit(1);
+ #endif
+         } else if(!strcmp(afname, "inet6")) {
+ #if HAVE_AFINET6
+             parsesnmp6(flag_raw, flag_tcp, flag_udp);
+ #else
+             ENOSUPP("netstat", "AF INET6");
++            exit(1);
+ #endif
+         } else {
+           printf(_("netstat: No statistics support for specified address family: %s\n"), afname);
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/poky/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
deleted file mode 100644
index 06f8142..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001
-From: Jiri Popelka <jpopelka@redhat.com>
-Date: Wed, 7 Dec 2011 19:14:09 +0100
-Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64
-
-Upstream-Status: Backport
-
-commit 81814dc2b14843009193efd307d814c26baa61f0 from
-git://git.code.sf.net/p/net-tools/code
-
----
- ifconfig.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/ifconfig.c b/ifconfig.c
-index bc405c6..dae8922 100644
---- a/ifconfig.c
-+++ b/ifconfig.c
-@@ -890,7 +890,9 @@ int main(int argc, char **argv)
- 		    continue;
- 		}
- 		
--		memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
-+		/* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */
-+		ip = 0;
-+		memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr));
- 		
- 		if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
- 		    fprintf(stderr, _("Interface %s not initialized\n"),
--- 
-1.7.9.5
-
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch b/poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
deleted file mode 100644
index f694d59..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-Adjust headers for non-glibc cases
-especially exposed by musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: net-tools-1.60/lib/inet6_gr.c
-===================================================================
---- net-tools-1.60.orig/lib/inet6_gr.c
-+++ net-tools-1.60/lib/inet6_gr.c
-@@ -23,7 +23,7 @@
- #include <string.h>
- #include <stdio.h>
- #include <unistd.h>
--#ifndef __GLIBC__
-+#ifdef HAVE_IPV6_ROUTE_H
- #include <netinet6/ipv6_route.h>	/* glibc doesn't have this */
- #endif
- #include "version.h"
-Index: net-tools-1.60/lib/inet6_sr.c
-===================================================================
---- net-tools-1.60.orig/lib/inet6_sr.c
-+++ net-tools-1.60/lib/inet6_sr.c
-@@ -23,10 +23,10 @@
- #include <string.h>
- #include <stdio.h>
- #include <unistd.h>
--#ifdef __GLIBC__
--#include <net/route.h>
--#else
-+#ifdef HAVE_IPV6_ROUTE_H
- #include <netinet6/ipv6_route.h>	/* glibc does not have this */
-+#else
-+#include <net/route.h>
- #endif
- #include "version.h"
- #include "net-support.h"
-Index: net-tools-1.60/lib/inet_sr.c
-===================================================================
---- net-tools-1.60.orig/lib/inet_sr.c
-+++ net-tools-1.60/lib/inet_sr.c
-@@ -26,6 +26,7 @@
- #include <string.h>
- #include <stdio.h>
- #include <unistd.h>
-+#include <asm-generic/param.h>
- #include "version.h"
- #include "net-support.h"
- #include "pathnames.h"
-Index: net-tools-1.60/lib/util-ank.c
-===================================================================
---- net-tools-1.60.orig/lib/util-ank.c
-+++ net-tools-1.60/lib/util-ank.c
-@@ -14,6 +14,7 @@
-  * Rani Assaf <rani@magic.metawire.com> 980929:	resolve addresses
-  */
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-Index: net-tools-1.60/mii-tool.c
-===================================================================
---- net-tools-1.60.orig/mii-tool.c
-+++ net-tools-1.60/mii-tool.c
-@@ -47,10 +47,6 @@ static char Version[] = "$Id: mii-tool.c
- #include <net/if.h>
- #include <linux/sockios.h>
- 
--#ifndef __GLIBC__
--#include <linux/if_arp.h>
--#include <linux/if_ether.h>
--#endif
- #include "mii.h"
- #include "version.h"
- 
-Index: net-tools-1.60/netstat.c
-===================================================================
---- net-tools-1.60.orig/netstat.c
-+++ net-tools-1.60/netstat.c
-@@ -87,6 +87,7 @@
- #include <dirent.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+#include <asm-generic/param.h>
- 
- #include "net-support.h"
- #include "pathnames.h"
-Index: net-tools-1.60/slattach.c
-===================================================================
---- net-tools-1.60.orig/slattach.c
-+++ net-tools-1.60/slattach.c
-@@ -44,6 +44,7 @@
- #include <string.h>
- #include <unistd.h>
- #include <getopt.h>
-+#include <termios.h>
- #include <linux/if_slip.h>
- 
- #if defined(__GLIBC__)
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch b/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
deleted file mode 100644
index 78daf6c..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
+++ /dev/null
@@ -1,635 +0,0 @@
-From 23276afe270009420cfbc52bffafdd25ac0817fe Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Thu, 14 Jan 2016 17:01:29 +0800
-Subject: [PATCH 1/3] net-tools: add SCTP support for netstat
-
-Upstream-Status: pending
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- netstat.c    | 411 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
- statistics.c |  68 +++++++++-
- 2 files changed, 465 insertions(+), 14 deletions(-)
-
-Index: net-tools-1.60/netstat.c
-===================================================================
---- net-tools-1.60.orig/netstat.c
-+++ net-tools-1.60/netstat.c
-@@ -58,6 +58,7 @@
-  *
-  *990420 {1.38} Tuan Hoang              removed a useless assignment from igmp_do_one()
-  *20010404 {1.39} Arnaldo Carvalho de Melo - use setlocale
-+ *20050516 {1.40} Ivan Skytte Joergensen:Added SCTP support
-  *
-  *              This program is free software; you can redistribute it
-  *              and/or  modify it under  the terms of  the GNU General
-@@ -106,7 +107,7 @@
- #endif
- 
- /* prototypes for statistics.c */
--void parsesnmp(int, int, int);
-+void parsesnmp(int, int, int, int);
- void inittab(void);
- void parsesnmp6(int, int, int);
- void inittab6(void);
-@@ -119,6 +120,28 @@ typedef enum {
-     SS_DISCONNECTING		/* in process of disconnecting  */
- } socket_state;
- 
-+#define SCTP_NSTATES  9         /* The number of states in array*/
-+
-+static const char *sctp_state[] = {
-+    N_("EMPTY"),
-+    N_("CLOSED"),
-+    N_("COOKIE_WAIT"),
-+    N_("COOKIE_ECHOED"),
-+    N_("ESTABLISHED"),
-+    N_("SHUTDOWN_PENDING"),
-+    N_("SHUTDOWN_SENT"),
-+    N_("SHUTDOWN_RECEIVED"),
-+    N_("SHUTDOWN_ACK_SENT")
-+};
-+
-+#define SCTP_NTYPES 3           /* The number of types in array */
-+
-+static const char *sctp_type[] = {
-+    N_("udp"),
-+    N_("udp-high-bw"),
-+    N_("tcp")
-+};
-+
- #define SO_ACCEPTCON    (1<<16)	/* performed a listen           */
- #define SO_WAITDATA     (1<<17)	/* wait data to read            */
- #define SO_NOSPACE      (1<<18)	/* no space to write            */
-@@ -149,6 +172,7 @@ int flag_opt = 0;
- int flag_raw = 0;
- int flag_tcp = 0;
- int flag_udp = 0;
-+int flag_sctp= 0;
- int flag_igmp= 0;
- int flag_rom = 0;
- int flag_exp = 1;
-@@ -995,6 +1019,365 @@ static int udp_info(void)
- 	       udp_do_one);
- }
- 
-+static const char *sctp_socket_type_str(int type) {
-+    if(type>=0 && type<SCTP_NTYPES)
-+	return sctp_type[type];
-+    else {
-+	static char type_str_buf[64];
-+	sprintf(type_str_buf,"UNKNOWN(%d)",type);
-+	return type_str_buf;
-+    }
-+}
-+
-+static const char *sctp_state_str(int state)
-+{
-+    if(state>=0 && state<SCTP_NSTATES)
-+	return sctp_state[state];
-+    else {
-+	static char state_str_buf[64];
-+	sprintf(state_str_buf,"UNKNOWN(%d)",state);
-+	return state_str_buf;
-+    }
-+}
-+
-+static const char *sctp_socket_state_str(int state)
-+{
-+    if(state>=0 && state<=10)
-+        return tcp_state[state];
-+    else {
-+	static char state_str_buf[64];
-+	sprintf(state_str_buf,"UNKNOWN(%d)",state);
-+	return state_str_buf;
-+    }
-+}
-+
-+static struct aftype *process_sctp_addr_str(const char *addr_str, struct sockaddr *sa)
-+{
-+    if (strchr(addr_str,':')) {
-+#if HAVE_AFINET6
-+	extern struct aftype inet6_aftype;
-+	/* Demangle what the kernel gives us */
-+	struct in6_addr in6;
-+	char addr6_str[INET6_ADDRSTRLEN];
-+	unsigned u0,u1,u2,u3,u4,u5,u6,u7;
-+	sscanf(addr_str, "%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",
-+	       &u0, &u1, &u2, &u3, &u4, &u5, &u6, &u7);
-+	in6.s6_addr16[0] = htons(u0);
-+	in6.s6_addr16[1] = htons(u1);
-+	in6.s6_addr16[2] = htons(u2);
-+	in6.s6_addr16[3] = htons(u3);
-+	in6.s6_addr16[4] = htons(u4);
-+	in6.s6_addr16[5] = htons(u5);
-+	in6.s6_addr16[6] = htons(u6);
-+	in6.s6_addr16[7] = htons(u7);
-+
-+	inet_ntop(AF_INET6, &in6, addr6_str, sizeof(addr6_str));
-+	inet6_aftype.input(1, addr6_str, sa);
-+	sa->sa_family = AF_INET6;
-+#endif
-+    } else {
-+    	((struct sockaddr_in*)sa)->sin_addr.s_addr = inet_addr(addr_str);
-+	sa->sa_family = AF_INET;
-+    }
-+    return get_afntype(sa->sa_family);
-+}
-+
-+static void sctp_eps_do_one(int lnr, char *line)
-+{
-+    char buffer[1024];
-+    int type, state, port;
-+    int uid;
-+    unsigned long inode;
-+    
-+    struct aftype *ap;
-+#if HAVE_AFINET6
-+    struct sockaddr_in6 localaddr;
-+#else
-+    struct sockaddr_in localaddr;
-+#endif
-+    const char *sty_str;
-+    const char *sst_str;
-+    const char *lport_str;
-+    const char *uid_str;
-+    const char *inode_str;
-+    const char *pladdr_str;
-+    char *laddrs_str;
-+    
-+    if(lnr == 0) {
-+	/* ENDPT     SOCK   STY SST HBKT LPORT   uid inode pladdr LADDRS*/
-+	return;
-+    }
-+    
-+    strtok(line," \t\n"); /*skip ptr*/
-+    strtok(0," \t\n");    /*skip ptr*/
-+    sty_str = strtok(0," \t\n");
-+    sst_str = strtok(0," \t\n");
-+    strtok(0," \t\n"); /*skip hash bucket*/
-+    lport_str=strtok(0," \t\n");
-+    uid_str = strtok(0," \t\n");
-+    inode_str = strtok(0," \t\n");
-+    pladdr_str = strtok(0," \t\n");
-+    laddrs_str=strtok(0,"\t\n");
-+    
-+    type = atoi(sty_str);
-+    state = atoi(sst_str);
-+    port = atoi(lport_str);
-+    uid = atoi(uid_str);
-+    inode = strtoul(inode_str,0,0);
-+    
-+    if(flag_sctp<=1) {
-+	/* only print the primary address */
-+	char local_addr[64];
-+	char local_port[16];
-+	
-+	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
-+	if(ap)
-+	    safe_strncpy(local_addr,
-+	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
-+	                 sizeof(local_addr));
-+	else
-+	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
-+	
-+	snprintf(local_port, sizeof(local_port), "%s",
-+	         get_sname(htons(port), "sctp",
-+	                   flag_not & FLAG_NUM_PORT));
-+	
-+	printf("sctp                ");
-+	sprintf(buffer,"%s:%s", local_addr, local_port);
-+	printf("%-47s", buffer);
-+    	printf(" %-12s", sctp_socket_state_str(state));
-+    } else {
-+    	/*print all addresses*/
-+	const char *this_local_addr;
-+	int first=1;
-+	char local_port[16];
-+	snprintf(local_port, sizeof(local_port), "%s",
-+		 get_sname(htons(port), "sctp",
-+			   flag_not & FLAG_NUM_PORT));
-+	for(this_local_addr=strtok(laddrs_str," \t\n");
-+	    this_local_addr;
-+	    this_local_addr=strtok(0," \t\n"))
-+	{
-+	    char local_addr[64];
-+	    ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
-+	    if(ap)
-+		safe_strncpy(local_addr,
-+		             ap->sprint((struct sockaddr *) &localaddr, flag_not),
-+		             sizeof(local_addr));
-+	    else
-+		sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
-+
-+	    if(!first) printf("\n");
-+	    if(first)
-+	        printf("sctp                ");
-+	    else
-+	        printf("                    ");
-+	    sprintf(buffer,"%s:%s", local_addr, local_port);
-+	    printf("%-47s", buffer);
-+	    printf(" %-12s", first?sctp_socket_state_str(state):"");
-+	    first = 0;
-+	}
-+    }
-+
-+    finish_this_one(uid,inode,"");
-+}
-+
-+static void sctp_assoc_do_one(int lnr, char *line)
-+{
-+    char buffer[1024];
-+    int type, state, state2, lport,rport;
-+    int uid;
-+    unsigned rxqueue,txqueue;
-+    unsigned long inode;
-+    
-+    struct aftype *ap;
-+#if HAVE_AFINET6
-+    struct sockaddr_in6 localaddr,remoteaddr;
-+#else
-+    struct sockaddr_in localaddr,remoteaddr;
-+#endif
-+    const char *sty_str;
-+    const char *sst_str;
-+    const char *st_str;
-+    const char *txqueue_str;
-+    const char *rxqueue_str;
-+    const char *lport_str,*rport_str;
-+    const char *uid_str;
-+    const char *inode_str;
-+    const char *pladdr_str;
-+    char *laddrs_str;
-+    const char *praddr_str;
-+    char *raddrs_str;
-+    
-+    if(lnr == 0) {
-+	/* ASSOC     SOCK   STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
-+	return;
-+    }
-+    
-+    strtok(line," \t\n"); /*skip ptr*/
-+    strtok(0," \t\n");    /*skip ptr*/
-+    sty_str = strtok(0," \t\n");
-+    sst_str = strtok(0," \t\n");
-+    st_str = strtok(0," \t\n");
-+    strtok(0," \t\n"); /*skip hash bucket*/
-+    txqueue_str =  strtok(0," \t\n");
-+    rxqueue_str =  strtok(0," \t\n");
-+    uid_str = strtok(0," \t\n");
-+    inode_str = strtok(0," \t\n");
-+    lport_str=strtok(0," \t\n");
-+    rport_str=strtok(0," \t\n");
-+    pladdr_str = strtok(0," \t\n");
-+    praddr_str = strtok(0," \t\n");
-+    laddrs_str=strtok(0,"<->\t\n");
-+    raddrs_str=strtok(0,"<->\t\n");
-+
-+    type = atoi(sty_str);
-+    state = atoi(sst_str);
-+    state2 = atoi(st_str);
-+    txqueue = atoi(txqueue_str);
-+    rxqueue = atoi(rxqueue_str);
-+    uid = atoi(uid_str);
-+    inode = strtoul(inode_str,0,0);
-+    lport = atoi(lport_str);
-+    rport = atoi(rport_str);
-+    
-+    if(flag_sctp<=1) {
-+	/* only print the primary addresses */
-+	char local_addr[64];
-+	char local_port[16];
-+	char remote_addr[64];
-+	char remote_port[16];
-+	
-+	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
-+	if(ap)
-+	    safe_strncpy(local_addr,
-+	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
-+	                 sizeof(local_addr));
-+	else
-+	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
-+	
-+	snprintf(local_port, sizeof(local_port), "%s",
-+	         get_sname(htons(lport), "sctp",
-+	                   flag_not & FLAG_NUM_PORT));
-+	
-+	ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
-+	if(ap)
-+	    safe_strncpy(remote_addr,
-+	                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
-+	                 sizeof(remote_addr));
-+	else
-+	    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
-+	
-+	snprintf(remote_port, sizeof(remote_port), "%s",
-+		 get_sname(htons(rport), "sctp",
-+			   flag_not & FLAG_NUM_PORT));
-+
-+	printf("sctp");
-+	printf("  %6u %6u ", rxqueue, txqueue);
-+	sprintf(buffer,"%s:%s", local_addr, local_port);
-+	printf("%-23s", buffer);
-+	printf(" ");
-+	sprintf(buffer,"%s:%s", remote_addr, remote_port);
-+	printf("%-23s", buffer);
-+    	printf(" %-12s", sctp_socket_state_str(state));
-+    } else {
-+    	/*print all addresses*/
-+	const char *this_local_addr;
-+	const char *this_remote_addr;
-+	char *ss1,*ss2;
-+	int first=1;
-+	char local_port[16];
-+	char remote_port[16];
-+	snprintf(local_port, sizeof(local_port), "%s",
-+	         get_sname(htons(lport), "sctp",
-+	                   flag_not & FLAG_NUM_PORT));
-+	snprintf(remote_port, sizeof(remote_port), "%s",
-+	         get_sname(htons(rport), "sctp",
-+	                   flag_not & FLAG_NUM_PORT));
-+
-+	this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
-+	this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
-+	while(this_local_addr || this_remote_addr) {
-+	    char local_addr[64];
-+	    char remote_addr[64];
-+	    if(this_local_addr) {
-+		ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
-+		if(ap)
-+		    safe_strncpy(local_addr,
-+		                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
-+		                 sizeof(local_addr));
-+		else
-+		    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
-+	    }
-+	    if(this_remote_addr) {
-+		ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
-+		if(ap)
-+		    safe_strncpy(remote_addr,
-+		                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
-+		                 sizeof(remote_addr));
-+		else
-+		    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
-+	    }
-+
-+	    if(!first) printf("\n");
-+	    if(first)
-+		printf("sctp  %6u %6u ", rxqueue, txqueue);
-+	    else
-+		printf("                    ");
-+	    if(this_local_addr) {
-+		if(first)
-+		    sprintf(buffer,"%s:%s", local_addr, local_port);
-+		else
-+		    sprintf(buffer,"%s", local_addr);
-+		printf("%-23s", buffer);
-+	    } else
-+	    	printf("%-23s", "");
-+	    printf(" ");
-+	    if(this_remote_addr) {
-+		if(first)
-+		    sprintf(buffer,"%s:%s", remote_addr, remote_port);
-+		else
-+		    sprintf(buffer,"%s", remote_addr);
-+		printf("%-23s", buffer);
-+	    } else
-+		printf("%-23s", "");
-+
-+	    printf(" %-12s", first?sctp_socket_state_str(state):"");
-+
-+	    first = 0;
-+	    this_local_addr=strtok_r(0," \t\n",&ss1);
-+	    this_remote_addr=strtok_r(0," \t\n",&ss2);
-+	}
-+    }
-+
-+    finish_this_one(uid,inode,"");
-+}
-+
-+static int sctp_info_eps(void)
-+{
-+#if !defined(_PATH_PROCNET_SCTP_EPS)
-+#define	_PATH_PROCNET_SCTP_EPS	"/proc/net/sctp/eps"
-+#endif
-+    INFO_GUTS(_PATH_PROCNET_SCTP_EPS, "AF INET (sctp)",
-+              sctp_eps_do_one);
-+}
-+
-+static int sctp_info_assocs(void)
-+{
-+#if !defined(_PATH_PROCNET_SCTP_ASSOCS)
-+#define	_PATH_PROCNET_SCTP_ASSOCS	"/proc/net/sctp/assocs"
-+#endif
-+    INFO_GUTS(_PATH_PROCNET_SCTP_ASSOCS, "AF INET (sctp)",
-+              sctp_assoc_do_one);
-+}
-+
-+static int sctp_info(void)
-+{
-+    if(flag_all)
-+    	sctp_info_eps();
-+    return sctp_info_assocs();
-+}
-+
- static void raw_do_one(int lnr, const char *line)
- {
-     char buffer[8192], local_addr[64], rem_addr[64];
-@@ -1558,7 +1941,7 @@ static void usage(void)
-     fprintf(stderr, _("        -F, --fib                display Forwarding Information Base (default)\n"));
-     fprintf(stderr, _("        -C, --cache              display routing cache instead of FIB\n\n"));
- 
--    fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
-+    fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-S|--sctp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
-     fprintf(stderr, _("  <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
-     fprintf(stderr, _("  List of possible address families (which support routing):\n"));
-     print_aflist(1); /* 1 = routeable */
-@@ -1583,6 +1966,7 @@ int main
- 	{"protocol", 1, 0, 'A'},
- 	{"tcp", 0, 0, 't'},
- 	{"udp", 0, 0, 'u'},
-+	{"sctp", 0, 0, 'S' },
- 	{"raw", 0, 0, 'w'},
- 	{"unix", 0, 0, 'x'},
- 	{"listening", 0, 0, 'l'},
-@@ -1613,7 +1997,7 @@ int main
-     getroute_init();		/* Set up AF routing support */
- 
-     afname[0] = '\0';
--    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuWVv?wxl64", longopts, &lop)) != EOF)
-+    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuSWVv?wxl64", longopts, &lop)) != EOF)
- 	switch (i) {
- 	case -1:
- 	    break;
-@@ -1705,10 +2089,12 @@ int main
- 	case 't':
- 	    flag_tcp++;
- 	    break;
--
- 	case 'u':
- 	    flag_udp++;
- 	    break;
-+	case 'S':
-+	    flag_sctp++;
-+	    break;
- 	case 'w':
- 	    flag_raw++;
- 	    break;
-@@ -1726,13 +2112,13 @@ int main
-     if (flag_int + flag_rou + flag_mas + flag_sta > 1)
- 	usage();
- 
--    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_raw))
--	flag_tcp = flag_udp = flag_raw = 1;
-+    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
-+	flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
- 
--    if ((flag_tcp || flag_udp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
-+    if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
-         flag_inet = flag_inet6 = 1;
- 
--    flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx
-+    flag_arg = flag_tcp + flag_udp + flag_sctp + flag_raw + flag_unx + flag_ipx
- 	+ flag_ax25 + flag_netrom + flag_igmp + flag_x25;
- 
-     if (flag_mas) {
-@@ -1760,7 +2146,7 @@ int main
-         char buf[256];
-         if (!afname[0]) {
-             inittab();
--            parsesnmp(flag_raw, flag_tcp, flag_udp);
-+            parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp);
-         } else {
-             safe_strncpy(buf, afname, sizeof(buf));
-             tmp1 = buf;
-@@ -1815,7 +2201,7 @@ int main
- 	return (i);
-     }
-     for (;;) {
--	if (!flag_arg || flag_tcp || flag_udp || flag_raw) {
-+	if (!flag_arg || flag_tcp || flag_udp || flag_sctp || flag_raw) {
- #if HAVE_AFINET
- 	    prg_cache_load();
- 	    printf(_("Active Internet connections "));	/* xxx */
-@@ -1854,6 +2240,11 @@ int main
- 	    if (i)
- 		return (i);
- 	}
-+	if (!flag_arg || flag_sctp) {
-+	    i = sctp_info();
-+	    if (i)
-+		return (i);
-+	}
- 	if (!flag_arg || flag_raw) {
- 	    i = raw_info();
- 	    if (i)
-Index: net-tools-1.60/statistics.c
-===================================================================
---- net-tools-1.60.orig/statistics.c
-+++ net-tools-1.60/statistics.c
-@@ -21,7 +21,7 @@
- #define UFWARN(x)
- #endif
- 
--int print_static,f_raw,f_tcp,f_udp,f_unknown = 1;
-+int print_static,f_raw,f_tcp,f_udp,f_sctp,f_unknown = 1;
- 
- enum State {
-     number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
-@@ -297,6 +297,27 @@ struct entry Tcpexttab[] =
-     { "TCPRenoRecoveryFail", N_("%llu classic Reno fast retransmits failed"), opt_number },
- };
- 
-+struct entry Sctptab[] =
-+{
-+    {"SctpCurrEstab", N_("%u Current Associations"), number},
-+    {"SctpActiveEstabs", N_("%u Active Associations"), number},
-+    {"SctpPassiveEstabs", N_("%u Passive Associations"), number},
-+    {"SctpAborteds", N_("%u Number of Aborteds "), number},
-+    {"SctpShutdowns", N_("%u Number of Graceful Terminations"), number},
-+    {"SctpOutOfBlues", N_("%u Number of Out of Blue packets"), number},
-+    {"SctpChecksumErrors", N_("%u Number of Packets with invalid Checksum"), number},
-+    {"SctpOutCtrlChunks", N_("%u Number of control chunks sent"), number},
-+    {"SctpOutOrderChunks", N_("%u Number of ordered chunks sent"), number},
-+    {"SctpOutUnorderChunks", N_("%u Number of Unordered chunks sent"), number},
-+    {"SctpInCtrlChunks", N_("%u Number of control chunks received"), number},
-+    {"SctpInOrderChunks", N_("%u Number of ordered chunks received"), number},
-+    {"SctpInUnorderChunks", N_("%u Number of Unordered chunks received"), number},
-+    {"SctpFragUsrMsgs", N_("%u Number of messages fragmented"), number},
-+    {"SctpReasmUsrMsgs", N_("%u Number of messages reassembled "), number},
-+    {"SctpOutSCTPPacks", N_("%u Number of SCTP packets sent"), number},
-+    {"SctpInSCTPPacks", N_("%u Number of SCTP packets received"), number},
-+};
-+
- struct tabtab {
-     char *title;
-     struct entry *tab;
-@@ -310,6 +331,7 @@ struct tabtab snmptabs[] =
-     {"Icmp", Icmptab, sizeof(Icmptab), &f_raw},
-     {"Tcp", Tcptab, sizeof(Tcptab), &f_tcp},
-     {"Udp", Udptab, sizeof(Udptab), &f_udp},
-+    {"Sctp", Sctptab, sizeof(Sctptab), &f_sctp},
-     {"TcpExt", Tcpexttab, sizeof(Tcpexttab), &f_tcp},
-     {NULL}
- };
-@@ -499,12 +521,40 @@ void process6_fd(FILE *f)
- 
- }
- 
--void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
-+/* Process a file with name-value lines (like /proc/net/sctp/snmp) */
-+void process_fd2(FILE *f, const char *filename)
-+{
-+    char buf1[1024];
-+    char *sp;
-+    struct tabtab *tab;
-+    
-+    tab = newtable(snmptabs, "Sctp");
-+    
-+    while (fgets(buf1, sizeof buf1, f)) {
-+	sp = buf1 + strcspn(buf1, " \t\n");
-+	if (!sp)
-+	    goto formaterr;
-+	*sp = '\0';
-+    	sp++;
-+
-+	sp += strspn(sp, " \t\n"); 
-+
-+	if (*sp != '\0' && *(tab->flag)) 	
-+	    printval(tab, buf1, strtoul(sp, 0, 10));
-+    }
-+  return;
-+  
-+formaterr:
-+  fprintf(stderr,_("error parsing %s\n"), filename);
-+  return;
-+}
-+
-+void parsesnmp(int flag_raw, int flag_tcp, int flag_udp, int flag_sctp)
- {
-     FILE *f;
- 
--    f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp;
--    
-+    f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp; f_sctp = flag_sctp;
-+
-     f = proc_fopen("/proc/net/snmp");
-     if (!f) {
- 	perror(_("cannot open /proc/net/snmp"));
-@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tc
-     
-         fclose(f);
-     }
-+
-+    f = fopen("/proc/net/sctp/snmp", "r");
-+    if (f) {
-+	process_fd2(f,"/proc/net/sctp/snmp");
-+	if (ferror(f))
-+	    perror("/proc/net/sctp/snmp");
-+
-+	fclose(f);
-+    }
-+
-     return;
- }
-     
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch b/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch
deleted file mode 100644
index d34e651..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 14287b594e1f02b811f889fb515c1a51b72c08d4 Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Thu, 14 Jan 2016 17:07:48 +0800
-Subject: [PATCH 2/3] net-tools: add SCTP support for netstat
-
-Upstream-Status: pending
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- netstat.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/netstat.c b/netstat.c
-index 5d1a4a1..56a15c2 100644
---- a/netstat.c
-+++ b/netstat.c
-@@ -2104,7 +2104,7 @@ int main
- 	usage();
- 
-     if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
--	flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
-+	flag_tcp = flag_udp = flag_raw = 1;
- 
-     if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
-         flag_inet = flag_inet6 = 1;
--- 
-1.8.5.2.233.g932f7e4
-
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch b/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch
deleted file mode 100644
index 8b2ecab..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch
+++ /dev/null
@@ -1,363 +0,0 @@
-From 1d386279a449a1a6b96b88a71f35bf13b14b2c2c Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Thu, 14 Jan 2016 17:11:24 +0800
-Subject: [PATCH 3/3] net-tools: add SCTP support for netstat
-
-Upstream-Status: pending
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- netstat.c | 282 ++++++++++++++++++++++++--------------------------------------
- 1 file changed, 108 insertions(+), 174 deletions(-)
-
-diff --git a/netstat.c b/netstat.c
-index 56a15c2..86adadb 100644
---- a/netstat.c
-+++ b/netstat.c
-@@ -1095,23 +1095,21 @@ static void sctp_eps_do_one(int lnr, char *line)
-     const char *lport_str;
-     const char *uid_str;
-     const char *inode_str;
--    const char *pladdr_str;
-     char *laddrs_str;
-     
-     if(lnr == 0) {
--	/* ENDPT     SOCK   STY SST HBKT LPORT   uid inode pladdr LADDRS*/
-+        /* ENDPT     SOCK   STY SST HBKT LPORT   UID INODE LADDRS */
- 	return;
-     }
-     
--    strtok(line," \t\n"); /*skip ptr*/
--    strtok(0," \t\n");    /*skip ptr*/
-+    strtok(line," \t\n"); /*skip endpt*/
-+    strtok(0," \t\n");    /*skip sock*/
-     sty_str = strtok(0," \t\n");
-     sst_str = strtok(0," \t\n");
-     strtok(0," \t\n"); /*skip hash bucket*/
-     lport_str=strtok(0," \t\n");
-     uid_str = strtok(0," \t\n");
-     inode_str = strtok(0," \t\n");
--    pladdr_str = strtok(0," \t\n");
-     laddrs_str=strtok(0,"\t\n");
-     
-     type = atoi(sty_str);
-@@ -1119,61 +1117,35 @@ static void sctp_eps_do_one(int lnr, char *line)
-     port = atoi(lport_str);
-     uid = atoi(uid_str);
-     inode = strtoul(inode_str,0,0);
--    
--    if(flag_sctp<=1) {
--	/* only print the primary address */
--	char local_addr[64];
--	char local_port[16];
--	
--	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
--	if(ap)
--	    safe_strncpy(local_addr,
--	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
--	                 sizeof(local_addr));
--	else
--	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
--	
--	snprintf(local_port, sizeof(local_port), "%s",
--	         get_sname(htons(port), "sctp",
--	                   flag_not & FLAG_NUM_PORT));
--	
--	printf("sctp                ");
--	sprintf(buffer,"%s:%s", local_addr, local_port);
--	printf("%-47s", buffer);
--    	printf(" %-12s", sctp_socket_state_str(state));
--    } else {
--    	/*print all addresses*/
--	const char *this_local_addr;
--	int first=1;
--	char local_port[16];
--	snprintf(local_port, sizeof(local_port), "%s",
--		 get_sname(htons(port), "sctp",
--			   flag_not & FLAG_NUM_PORT));
--	for(this_local_addr=strtok(laddrs_str," \t\n");
--	    this_local_addr;
--	    this_local_addr=strtok(0," \t\n"))
--	{
--	    char local_addr[64];
--	    ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
--	    if(ap)
--		safe_strncpy(local_addr,
--		             ap->sprint((struct sockaddr *) &localaddr, flag_not),
--		             sizeof(local_addr));
--	    else
--		sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
- 
--	    if(!first) printf("\n");
--	    if(first)
--	        printf("sctp                ");
--	    else
--	        printf("                    ");
--	    sprintf(buffer,"%s:%s", local_addr, local_port);
--	    printf("%-47s", buffer);
--	    printf(" %-12s", first?sctp_socket_state_str(state):"");
--	    first = 0;
--	}
-+    const char *this_local_addr;
-+    int first=1;
-+    char local_port[16];
-+    snprintf(local_port, sizeof(local_port), "%s",
-+        get_sname(htons(port), "sctp", flag_not & FLAG_NUM_PORT));
-+    for(this_local_addr=strtok(laddrs_str," \t\n");
-+        this_local_addr;
-+        this_local_addr=strtok(0," \t\n"))
-+    {
-+        char local_addr[64];
-+        ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
-+        if(ap)
-+            safe_strncpy(local_addr,
-+                ap->sprint((struct sockaddr *) &localaddr, flag_not),
-+                sizeof(local_addr));
-+        else
-+            sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
-+
-+        if(!first) printf("\n");
-+        if(first)
-+            printf("sctp                ");
-+        else
-+            printf("                    ");
-+        sprintf(buffer,"%s:%s", local_addr, local_port);
-+        printf("%-55s", buffer);
-+        printf(" %-12s", first?sctp_socket_state_str(state):"");
-+        first = 0;
-     }
--
-     finish_this_one(uid,inode,"");
- }
- 
-@@ -1199,32 +1171,29 @@ static void sctp_assoc_do_one(int lnr, char *line)
-     const char *lport_str,*rport_str;
-     const char *uid_str;
-     const char *inode_str;
--    const char *pladdr_str;
-     char *laddrs_str;
--    const char *praddr_str;
-     char *raddrs_str;
--    
-+
-     if(lnr == 0) {
--	/* ASSOC     SOCK   STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
-+	/* ASSOC     SOCK   STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT RPORT LADDRS <-> RADDRS */
- 	return;
-     }
--    
--    strtok(line," \t\n"); /*skip ptr*/
--    strtok(0," \t\n");    /*skip ptr*/
-+
-+    strtok(line," \t\n"); /*skip assoc*/
-+    strtok(0," \t\n");    /*skip sock*/
-     sty_str = strtok(0," \t\n");
-     sst_str = strtok(0," \t\n");
-     st_str = strtok(0," \t\n");
-     strtok(0," \t\n"); /*skip hash bucket*/
-+    strtok(0," \t\n"); /*skip hash assoc-id*/
-     txqueue_str =  strtok(0," \t\n");
-     rxqueue_str =  strtok(0," \t\n");
-     uid_str = strtok(0," \t\n");
-     inode_str = strtok(0," \t\n");
-     lport_str=strtok(0," \t\n");
-     rport_str=strtok(0," \t\n");
--    pladdr_str = strtok(0," \t\n");
--    praddr_str = strtok(0," \t\n");
--    laddrs_str=strtok(0,"<->\t\n");
--    raddrs_str=strtok(0,"<->\t\n");
-+    laddrs_str = strtok(0,"<->\t\n");
-+    raddrs_str = strtok(0,"<->\t\n");
- 
-     type = atoi(sty_str);
-     state = atoi(sst_str);
-@@ -1235,116 +1204,81 @@ static void sctp_assoc_do_one(int lnr, char *line)
-     inode = strtoul(inode_str,0,0);
-     lport = atoi(lport_str);
-     rport = atoi(rport_str);
--    
--    if(flag_sctp<=1) {
--	/* only print the primary addresses */
--	char local_addr[64];
--	char local_port[16];
--	char remote_addr[64];
--	char remote_port[16];
--	
--	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
--	if(ap)
--	    safe_strncpy(local_addr,
--	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
--	                 sizeof(local_addr));
--	else
--	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
--	
--	snprintf(local_port, sizeof(local_port), "%s",
--	         get_sname(htons(lport), "sctp",
--	                   flag_not & FLAG_NUM_PORT));
--	
--	ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
--	if(ap)
--	    safe_strncpy(remote_addr,
--	                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
--	                 sizeof(remote_addr));
--	else
--	    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
--	
--	snprintf(remote_port, sizeof(remote_port), "%s",
--		 get_sname(htons(rport), "sctp",
--			   flag_not & FLAG_NUM_PORT));
--
--	printf("sctp");
--	printf("  %6u %6u ", rxqueue, txqueue);
--	sprintf(buffer,"%s:%s", local_addr, local_port);
--	printf("%-23s", buffer);
--	printf(" ");
--	sprintf(buffer,"%s:%s", remote_addr, remote_port);
--	printf("%-23s", buffer);
--    	printf(" %-12s", sctp_socket_state_str(state));
--    } else {
--    	/*print all addresses*/
--	const char *this_local_addr;
--	const char *this_remote_addr;
--	char *ss1,*ss2;
--	int first=1;
--	char local_port[16];
--	char remote_port[16];
--	snprintf(local_port, sizeof(local_port), "%s",
--	         get_sname(htons(lport), "sctp",
--	                   flag_not & FLAG_NUM_PORT));
--	snprintf(remote_port, sizeof(remote_port), "%s",
--	         get_sname(htons(rport), "sctp",
--	                   flag_not & FLAG_NUM_PORT));
--
--	this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
--	this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
--	while(this_local_addr || this_remote_addr) {
--	    char local_addr[64];
--	    char remote_addr[64];
--	    if(this_local_addr) {
--		ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
--		if(ap)
--		    safe_strncpy(local_addr,
--		                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
--		                 sizeof(local_addr));
--		else
--		    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
--	    }
--	    if(this_remote_addr) {
--		ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
--		if(ap)
--		    safe_strncpy(remote_addr,
--		                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
--		                 sizeof(remote_addr));
--		else
--		    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
--	    }
- 
--	    if(!first) printf("\n");
--	    if(first)
--		printf("sctp  %6u %6u ", rxqueue, txqueue);
--	    else
--		printf("                    ");
--	    if(this_local_addr) {
--		if(first)
--		    sprintf(buffer,"%s:%s", local_addr, local_port);
-+    /*print all addresses*/
-+    const char *this_local_addr;
-+    const char *this_remote_addr;
-+    char *ss1,*ss2;
-+    int first=1;
-+    char local_port[16];
-+    char remote_port[16];
-+    snprintf(local_port, sizeof(local_port), "%s",
-+             get_sname(htons(lport), "sctp",
-+             flag_not & FLAG_NUM_PORT));
-+    snprintf(remote_port, sizeof(remote_port), "%s",
-+             get_sname(htons(rport), "sctp",
-+             flag_not & FLAG_NUM_PORT));
-+
-+    this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
-+    this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
-+    while(this_local_addr || this_remote_addr) {
-+        char local_addr[64];
-+        char remote_addr[64];
-+
-+        if(this_local_addr) {
-+            if (this_local_addr[0] == '*') {
-+                /* skip * */
-+                this_local_addr++;
-+            }
-+            ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
-+            if(ap)
-+                safe_strncpy(local_addr,
-+                    ap->sprint((struct sockaddr *) &localaddr, flag_not), sizeof(local_addr));
- 		else
--		    sprintf(buffer,"%s", local_addr);
--		printf("%-23s", buffer);
--	    } else
--	    	printf("%-23s", "");
--	    printf(" ");
--	    if(this_remote_addr) {
--		if(first)
--		    sprintf(buffer,"%s:%s", remote_addr, remote_port);
-+                    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
-+        }
-+	if(this_remote_addr) {
-+            if (this_remote_addr[0] == '*') {
-+                /* skip * */
-+                this_remote_addr++;
-+            }
-+            ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
-+            if(ap)
-+                safe_strncpy(remote_addr,
-+                    ap->sprint((struct sockaddr *) &remoteaddr, flag_not), sizeof(remote_addr));
- 		else
--		    sprintf(buffer,"%s", remote_addr);
--		printf("%-23s", buffer);
--	    } else
--		printf("%-23s", "");
--
--	    printf(" %-12s", first?sctp_socket_state_str(state):"");
-+                    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
-+       }
- 
--	    first = 0;
--	    this_local_addr=strtok_r(0," \t\n",&ss1);
--	    this_remote_addr=strtok_r(0," \t\n",&ss2);
--	}
-+       if(!first) printf("\n");
-+       if(first)
-+           printf("sctp  %6u %6u ", rxqueue, txqueue);
-+       else
-+           printf("                    ");
-+       if(this_local_addr) {
-+           if(first)
-+               sprintf(buffer,"%s:%s", local_addr, local_port);
-+           else
-+               sprintf(buffer,"%s", local_addr);
-+           printf("%-27s", buffer);
-+       } else
-+           printf("%-27s", "");
-+       printf(" ");
-+       if(this_remote_addr) {
-+           if(first)
-+               sprintf(buffer,"%s:%s", remote_addr, remote_port);
-+           else
-+               sprintf(buffer,"%s", remote_addr);
-+           printf("%-27s", buffer);
-+       } else
-+       printf("%-27s", "");
-+
-+       printf(" %-12s", first?sctp_socket_state_str(state):"");
-+
-+       first = 0;
-+       this_local_addr=strtok_r(0," \t\n",&ss1);
-+       this_remote_addr=strtok_r(0," \t\n",&ss2);
-     }
--
-     finish_this_one(uid,inode,"");
- }
- 
--- 
-1.8.5.2.233.g932f7e4
-
diff --git a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch b/poky/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
deleted file mode 100644
index 505eeb0..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 4d56645ea144a34f7cdd3e3ede6452d81fbae251 Mon Sep 17 00:00:00 2001
-From: Randy MacLeod <Randy.MacLeod@windriver.com>
-Date: Sat, 8 Oct 2016 14:42:54 +0800
-Subject: [PATCH] iptunnel.c: include linux/ip.h to fix building with linux-4.8
-
-Fix a build error when using the linux-4.8 headers that results in:
-
-In file included from
-.../sysroots/qemuarm64/usr/include/linux/if_tunnel.h:6:0,
-                  from iptunnel.c:39:
-.../qemuarm64/usr/include/linux/ip.h:85:8: error: redefinition of
-'struct iphdr'
-  struct iphdr {
-         ^~~~~
-In file included from iptunnel.c:29:0:
-.../qemuarm64/usr/include/netinet/ip.h:44:8: note: originally defined here
-  struct iphdr
-         ^~~~~
-
-Upstream-Status: Submitted [1]
-
-[1] https://sourceforge.net/p/net-tools/mailman/message/35413022/
-
-Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- iptunnel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/iptunnel.c b/iptunnel.c
-index 4943d83..acfcbc7 100644
---- a/iptunnel.c
-+++ b/iptunnel.c
-@@ -26,7 +26,6 @@
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <netinet/in.h>
--#include <netinet/ip.h>
- #include <arpa/inet.h>
- #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
- #include <net/if.h>
-@@ -36,6 +35,7 @@
- #include <linux/if_arp.h>
- #endif
- #include <linux/types.h>
-+#include <linux/ip.h>
- #include <linux/if_tunnel.h>
- 
- #include "config.h"
--- 
-2.8.3
-
diff --git a/poky/meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb b/poky/meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb
new file mode 100644
index 0000000..e977310
--- /dev/null
+++ b/poky/meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb
@@ -0,0 +1,110 @@
+SUMMARY = "Basic networking tools"
+DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system"
+HOMEPAGE = "http://net-tools.berlios.de/"
+BUGTRACKER = "http://bugs.debian.org/net-tools"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba"
+
+PV = "1.60-20181103+git${SRCPV}"
+SRCREV = "0eebece8c964e3cfa8a018f42b2e7e751a7009a0"
+SRC_URI = "git://git.code.sf.net/p/net-tools/code;protocol=https \
+    file://net-tools-config.h \
+    file://net-tools-config.make \
+    file://Add_missing_headers.patch \
+    file://Bug_443075-ifconfig.c-pointtopoint_spelling.patch \
+    file://Bug_541172-netstat.c-exit-codes.patch \
+"
+
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+S = "${WORKDIR}/git"
+
+inherit gettext
+
+# The Makefile is lame, no parallel build
+PARALLEL_MAKE = ""
+
+PACKAGECONFIG ??= "hostname arp serial plip"
+PACKAGECONFIG[hostname] = ""
+PACKAGECONFIG[arp] = ""
+PACKAGECONFIG[serial] = ""
+PACKAGECONFIG[plip] = ""
+
+do_configure() {
+	# net-tools has its own config mechanism requiring "make config"
+	# we pre-generate desired options and copy to source directory instead
+	cp ${WORKDIR}/net-tools-config.h    ${S}/config.h
+	cp ${WORKDIR}/net-tools-config.make ${S}/config.make
+
+	if [ "${USE_NLS}" = "no" ]; then
+		sed -i -e 's/^I18N=1/# I18N=1/' ${S}/config.make
+	fi
+
+	if ${@bb.utils.contains('PACKAGECONFIG', 'hostname', 'true', 'false', d)} ; then
+		echo "#define HAVE_HOSTNAME_TOOLS 1" >> ${S}/config.h
+		echo "#define HAVE_HOSTNAME_SYMLINKS 1" >> ${S}/config.h
+		echo "HAVE_HOSTNAME_TOOLS=1" >> ${S}/config.make
+		echo "HAVE_HOSTNAME_SYMLINKS=1" >> ${S}/config.make
+	fi
+	if ${@bb.utils.contains('PACKAGECONFIG', 'arp', 'true', 'false', d)} ; then
+		echo "#define HAVE_ARP_TOOLS 1" >> ${S}/config.h
+		echo "HAVE_ARP_TOOLS=1" >> ${S}/config.make
+	fi
+	if ${@bb.utils.contains('PACKAGECONFIG', 'serial', 'true', 'false', d)} ; then
+		echo "#define HAVE_SERIAL_TOOLS 1" >> ${S}/config.h
+		echo "HAVE_SERIAL_TOOLS=1" >> ${S}/config.make
+	fi
+	if ${@bb.utils.contains('PACKAGECONFIG', 'plip', 'true', 'false', d)} ; then
+		echo "#define HAVE_PLIP_TOOLS 1" >> ${S}/config.h
+		echo "HAVE_PLIP_TOOLS=1" >> ${S}/config.make
+	fi
+}
+
+do_compile() {
+	# net-tools use COPTS/LOPTS to allow adding custom options
+	oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS"
+}
+
+do_install() {
+	# We don't need COPTS or LOPTS, but let's be consistent.
+	oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS" BASEDIR=${D} INSTALLNLSDIR=${D}${datadir}/locale mandir=${mandir} install
+
+	if [ "${base_bindir}" != "/bin" ]; then
+		mkdir -p ${D}/${base_bindir}
+		mv ${D}/bin/* ${D}/${base_bindir}/
+		rmdir ${D}/bin
+	fi
+	if [ "${base_sbindir}" != "/sbin" ]; then
+		mkdir ${D}/${base_sbindir}
+		mv ${D}/sbin/* ${D}/${base_sbindir}/
+		rmdir ${D}/sbin
+	fi
+}
+
+inherit update-alternatives
+
+base_sbindir_progs = "ipmaddr iptunnel mii-tool nameif \
+    ${@bb.utils.contains('PACKAGECONFIG', 'arp', 'arp rarp', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'plip', 'plipconfig', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'serial', 'slattach', '', d)} \
+"
+base_bindir_progs  = "ifconfig netstat route \
+    ${@bb.utils.contains('PACKAGECONFIG', 'hostname', 'dnsdomainname domainname hostname nisdomainname ypdomainname', '', d)} \
+"
+
+ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
+ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'hostname', 'hostname.1 dnsdomainname.1', '', d)}"
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1"
+ALTERNATIVE_PRIORITY[hostname.1] = "10"
+
+python __anonymous() {
+    for prog in d.getVar('base_sbindir_progs').split():
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog))
+    for prog in d.getVar('base_bindir_progs').split():
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
+}
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
deleted file mode 100644
index 8bd30fc..0000000
--- a/poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
+++ /dev/null
@@ -1,132 +0,0 @@
-SUMMARY = "Basic networking tools"
-DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system"
-HOMEPAGE = "http://net-tools.berlios.de/"
-BUGTRACKER = "http://bugs.debian.org/net-tools"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
-                    file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/n/${BPN}/${BPN}_1.60.orig.tar.gz;name=tarball \
-           http://snapshot.debian.org/archive/debian//20150831T093342Z/pool/main/n/${BPN}/${BPN}_${PV}.diff.gz;apply=no;name=patch \
-           file://net-tools-config.h \
-           file://net-tools-config.make \
-           file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
-           file://musl-fixes.patch \
-           file://net-tools-1.60-sctp1.patch \
-           file://net-tools-1.60-sctp2-quiet.patch \
-           file://net-tools-1.60-sctp3-addrs.patch \
-           file://0001-lib-inet6.c-INET6_rresolve-various-fixes.patch \
-           file://net-tools-fix-building-with-linux-4.8.patch \
-           file://0001-added-ull-prefix-to-unsigned-long-long-constants-to-.patch \
-          "
-
-# for this package we're mostly interested in tracking debian patches,
-# and not in the upstream version where all development has effectively stopped
-UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
-
-S = "${WORKDIR}/net-tools-1.60"
-
-SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d"
-SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5"
-
-SRC_URI[patch.md5sum] = "ea3592f49ac8380962bc4d9b66c7e7e9"
-SRC_URI[patch.sha256sum] = "aeeeafaff68866a446f01bb639d4e0146a60af34dcd20e31a3e46585022fc76c"
-
-# the package is taken from snapshots.debian.org; that source is static and goes stale
-# so we check the latest upstream from a directory that does get updated
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/net-tools/"
-
-inherit gettext
-
-do_patch[depends] += "quilt-native:do_populate_sysroot"
-
-# The Makefile is lame, no parallel build
-PARALLEL_MAKE = ""
-
-# Unlike other Debian packages, net-tools *.diff.gz contains another series of
-# patches maintained by quilt. So manually apply them before applying other local
-# patches. Also remove all temp files before leaving, because do_patch() will pop 
-# up all previously applied patches in the start
-nettools_do_patch() {
-	cd ${S}
-	# it's important that we only pop the existing patches when they've
-	# been applied, otherwise quilt will climb the directory tree
-	# and reverse out some completely different set of patches
-	if [ -d ${S}/patches ]; then
-		# whilst this is the default directory, doing it like this
-		# defeats the directory climbing that quilt will otherwise
-		# do; note the directory must exist to defeat this, hence
-		# the test inside which we operate
-		QUILT_PATCHES=${S}/patches quilt pop -a
-	fi
-	if [ -d ${S}/.pc-nettools ]; then
-		rm -rf ${S}/.pc
-		mv ${S}/.pc-nettools ${S}/.pc
-		QUILT_PATCHES=${S}/debian/patches quilt pop -a
-		rm -rf ${S}/.pc ${S}/debian
-	fi
-	patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff	
-	QUILT_PATCHES=${S}/debian/patches quilt push -a
-	mv ${S}/.pc ${S}/.pc-nettools
-}
-
-do_unpack[cleandirs] += "${S}"
-
-# We invoke base do_patch at end, to incorporate any local patch
-python do_patch() {
-    bb.build.exec_func('nettools_do_patch', d)
-    bb.build.exec_func('patch_do_patch', d)
-}
-
-do_configure() {
-	# net-tools has its own config mechanism requiring "make config"
-	# we pre-generate desired options and copy to source directory instead
-	cp ${WORKDIR}/net-tools-config.h    ${S}/config.h
-	cp ${WORKDIR}/net-tools-config.make ${S}/config.make
-
-	if [ "${USE_NLS}" = "no" ]; then
-		sed -i -e 's/^I18N=1/# I18N=1/' ${S}/config.make
-	fi
-}
-
-do_compile() {
-	# net-tools use COPTS/LOPTS to allow adding custom options
-	oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS"
-}
-
-do_install() {
-	# We don't need COPTS or LOPTS, but let's be consistent.
-	oe_runmake COPTS="$CFLAGS" LOPTS="$LDFLAGS" BASEDIR=${D} INSTALLNLSDIR=${D}${datadir}/locale mandir=${mandir} install
-
-	if [ "${base_bindir}" != "/bin" ]; then
-		mkdir -p ${D}/${base_bindir}
-		mv ${D}/bin/* ${D}/${base_bindir}/
-		rmdir ${D}/bin
-	fi
-	if [ "${base_sbindir}" != "/sbin" ]; then
-		mkdir ${D}/${base_sbindir}
-		mv ${D}/sbin/* ${D}/${base_sbindir}/
-		rmdir ${D}/sbin
-	fi
-}
-
-inherit update-alternatives
-
-base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach"
-base_bindir_progs  = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
-
-ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
-ALTERNATIVE_${PN}-doc += "hostname.1 dnsdomainname.1"
-ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
-ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1"
-ALTERNATIVE_PRIORITY[hostname.1] = "10"
-
-python __anonymous() {
-    for prog in d.getVar('base_sbindir_progs').split():
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog))
-    for prog in d.getVar('base_bindir_progs').split():
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
-}
-ALTERNATIVE_PRIORITY = "100"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb b/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
index e321cd2..d24035b 100644
--- a/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
+++ b/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
@@ -28,4 +28,4 @@
     install -m 0755 pbzip2 ${D}${bindir}/
 }
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb b/poky/meta/recipes-extended/stress-ng/stress-ng_0.11.18.bb
similarity index 85%
rename from poky/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
rename to poky/meta/recipes-extended/stress-ng/stress-ng_0.11.18.bb
index 8ea0476..c668d8c 100644
--- a/poky/meta/recipes-extended/stress-ng/stress-ng_0.11.15.bb
+++ b/poky/meta/recipes-extended/stress-ng/stress-ng_0.11.18.bb
@@ -9,7 +9,7 @@
            file://0001-Do-not-preserve-ownership-when-installing-example-jo.patch \
            file://no_daddr_t.patch \
            "
-SRC_URI[sha256sum] = "6a333650fb5c85c5221f10d2cf890e9fc56530696e118d975fbbe96126c06963"
+SRC_URI[sha256sum] = "07c82a5c89538b5b696a79192faa70d0232352004c9e532946f7f3613d0adf23"
 
 DEPENDS = "coreutils-native"
 
@@ -22,5 +22,6 @@
 
 do_install() {
     oe_runmake DESTDIR=${D} install
+    ln -s stress-ng ${D}${bindir}/stress
 }
 
diff --git a/poky/meta/recipes-extended/sudo/sudo_1.9.1.bb b/poky/meta/recipes-extended/sudo/sudo_1.9.2.bb
similarity index 95%
rename from poky/meta/recipes-extended/sudo/sudo_1.9.1.bb
rename to poky/meta/recipes-extended/sudo/sudo_1.9.2.bb
index d6bc1a9..5756b2e 100644
--- a/poky/meta/recipes-extended/sudo/sudo_1.9.1.bb
+++ b/poky/meta/recipes-extended/sudo/sudo_1.9.2.bb
@@ -6,7 +6,7 @@
 
 PAM_SRC_URI = "file://sudo.pam"
 
-SRC_URI[sha256sum] = "294116cefe10a02773917fc7440d8384b925955bc96a6e0eaa1977c83b34adff"
+SRC_URI[sha256sum] = "7c98d201f181c47152711b9f391e0f6b5545f3ef8926298a3e8bc6288e118314"
 
 DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
diff --git a/poky/meta/recipes-gnome/gcr/gcr/0001-meson-Make-sure-gcr-oids.h-is-built.patch b/poky/meta/recipes-gnome/gcr/gcr/0001-meson-Make-sure-gcr-oids.h-is-built.patch
new file mode 100644
index 0000000..4bf5bfb
--- /dev/null
+++ b/poky/meta/recipes-gnome/gcr/gcr/0001-meson-Make-sure-gcr-oids.h-is-built.patch
@@ -0,0 +1,36 @@
+From 9fca6ae0aa7355c27d0922c561b9fbe18dde5b3d Mon Sep 17 00:00:00 2001
+From: Niels De Graef <nielsdegraef@gmail.com>
+Date: Fri, 19 Jun 2020 22:37:31 +0200
+Subject: [PATCH 1/1] meson: Make sure gcr-oids.h is built
+
+Fixes https://gitlab.gnome.org/GNOME/gcr/-/issues/48
+---
+ gcr/meson.build | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- end of original header ---
+
+Upstream-Status: Backport  [https://github.com/GNOME/gcr.git]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+diff --git a/gcr/meson.build b/gcr/meson.build
+index 199452f..06c3a63 100644
+--- a/gcr/meson.build
++++ b/gcr/meson.build
+@@ -178,7 +178,10 @@ endif
+ gcr_base_dep = declare_dependency(
+   link_with: gcr_base_lib,
+   include_directories: include_directories('..'),
+-  sources: gcr_enums_gen[1], # Make sure gcr-enum-types-base.h can be included
++  sources: [
++    gcr_enums_gen[1],
++    gcr_oids[1],
++  ],
+ )
+ 
+ if get_option('introspection')
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-gnome/gcr/gcr_3.36.0.bb b/poky/meta/recipes-gnome/gcr/gcr_3.36.0.bb
index d5a88df..ff455a6 100644
--- a/poky/meta/recipes-gnome/gcr/gcr_3.36.0.bb
+++ b/poky/meta/recipes-gnome/gcr/gcr_3.36.0.bb
@@ -18,6 +18,8 @@
 REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI += " file://0001-meson.build-correctly-set-internal-vapi-dependencies.patch"
+SRC_URI += " file://0001-meson-Make-sure-gcr-oids.h-is-built.patch"
+
 SRC_URI[archive.md5sum] = "adc65563b6b458507b9a578a8b68fb61"
 SRC_URI[archive.sha256sum] = "aaf9bed017a2263c6145c89a1a84178f9f40f238426463e4ae486694ef5f6601"
 
diff --git a/poky/meta/recipes-gnome/gnome/gconf/python3.patch b/poky/meta/recipes-gnome/gnome/gconf/python3.patch
new file mode 100644
index 0000000..7c022a2
--- /dev/null
+++ b/poky/meta/recipes-gnome/gnome/gconf/python3.patch
@@ -0,0 +1,60 @@
+gconf: use python3
+
+Convert gsettings-schema-convert to use python3.
+
+Upstream-Status: Inappropriate [gconf is deprecated]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/gsettings/gsettings-schema-convert
++++ b/gsettings/gsettings-schema-convert
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # vim: set ts=4 sw=4 et: coding=UTF-8
+ #
+ # Copyright (c) 2010, Novell, Inc.
+@@ -603,7 +603,7 @@ class SimpleSchemaParser:
+             for line in lines:
+                 current_line_nb += 1
+                 self.parse_line(line)
+-        except GSettingsSchemaConvertException, e:
++        except GSettingsSchemaConvertException as e:
+             raise GSettingsSchemaConvertException('%s:%s: %s' % (os.path.basename(self.file), current_line_nb, e))
+ 
+         return self.root
+@@ -1095,7 +1095,7 @@ def main(args):
+             try:
+                 parser = GConfSchemaParser(argfile, options.gettext_domain, options.schema_id, options.keep_underscores)
+                 schema_root = parser.parse()
+-            except SyntaxError, e:
++            except SyntaxError as e:
+                 raise GSettingsSchemaConvertException('\'%s\' does not look like a valid gconf schema file: %s' % (argfile, e))
+         else:
+             # autodetect if file is XML or not
+@@ -1104,7 +1104,7 @@ def main(args):
+                 schema_root = parser.parse()
+                 if not options.simple and not options.xml:
+                     options.simple = True
+-            except SyntaxError, e:
++            except SyntaxError as e:
+                 parser = SimpleSchemaParser(argfile)
+                 schema_root = parser.parse()
+                 if not options.simple and not options.xml:
+@@ -1127,13 +1127,13 @@ def main(args):
+                 fout = open(options.output, 'w')
+                 fout.write(output)
+                 fout.close()
+-            except GSettingsSchemaConvertException, e:
++            except GSettingsSchemaConvertException as e:
+                 fout.close()
+                 if os.path.exists(options.output):
+                     os.unlink(options.output)
+                 raise e
+ 
+-    except GSettingsSchemaConvertException, e:
++    except GSettingsSchemaConvertException as e:
+         print >> sys.stderr, '%s' % e
+         return 1
+ 
diff --git a/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb b/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
index b8466d4..ff36555 100644
--- a/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
+++ b/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
@@ -15,6 +15,7 @@
            file://remove_plus_from_invalid_characters_list.patch \
            file://unable-connect-dbus.patch \
            file://create_config_directory.patch \
+           file://python3.patch \
 "
 
 SRC_URI[archive.md5sum] = "2b16996d0e4b112856ee5c59130e822c"
@@ -52,6 +53,8 @@
                 ${datadir}/dbus-1/services/*.service \
                 ${datadir}/dbus-1/system-services/*.service \
                "
+RDEPENDS_${PN} = "python3-xml"
+
 FILES_${PN}-dev += "${datadir}/sgml/gconf/gconf-1.0.dtd"
 
 BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb b/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb
index 7eefdd3..4d80f00 100644
--- a/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb
+++ b/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb
@@ -131,6 +131,11 @@
         export GIR_EXTRA_LIBS_PATH=$B/.libs
 }
 
+do_install_prepend() {
+        # This prevents g-ir-scanner from writing cache data to $HOME
+        export GI_SCANNER_DISABLE_CACHE=1
+}
+
 # Our wrappers need to be available system-wide, because they will be used
 # to build introspection files for all other gobject-based packages
 do_install_append_class-target() {
diff --git a/poky/meta/recipes-gnome/libhandy/libhandy_git.bb b/poky/meta/recipes-gnome/libhandy/libhandy_git.bb
index 6425894..9f74014 100644
--- a/poky/meta/recipes-gnome/libhandy/libhandy_git.bb
+++ b/poky/meta/recipes-gnome/libhandy/libhandy_git.bb
@@ -2,7 +2,7 @@
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-SRC_URI = "git://source.puri.sm/Librem5/${BPN}.git;protocol=https"
+SRC_URI = "git://gitlab.gnome.org/GNOME/${BPN}.git;protocol=https"
 SRCREV = "7a193d7692c9c76a1a94f17c4d30b585f77d177c"
 S = "${WORKDIR}/git"
 PV = "0.0.13"
diff --git a/poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb b/poky/meta/recipes-gnome/librsvg/librsvg_2.40.21.bb
similarity index 92%
rename from poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
rename to poky/meta/recipes-gnome/librsvg/librsvg_2.40.21.bb
index 337299f..acdbc1f 100644
--- a/poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb
+++ b/poky/meta/recipes-gnome/librsvg/librsvg_2.40.21.bb
@@ -23,8 +23,7 @@
             file://0001-Remove-non-reproducible-SRCDIR.patch \
 "
 
-SRC_URI[archive.md5sum] = "4949d313b0c5d9161a5c259104af5568"
-SRC_URI[archive.sha256sum] = "cff4dd3c3b78bfe99d8fcfad3b8ba1eee3289a0823c0e118d78106be6b84c92b"
+SRC_URI[archive.sha256sum] = "f7628905f1cada84e87e2b14883ed57d8094dca3281d5bcb24ece4279e9a92ba"
 
 CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
 
diff --git a/poky/meta/recipes-graphics/cogl/cogl-1.0.inc b/poky/meta/recipes-graphics/cogl/cogl-1.0.inc
index 1c5d0b7..d581ad1 100644
--- a/poky/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/poky/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -21,7 +21,7 @@
 EDEPENDS_GLES2 = "virtual/libgles2"
 EDEPENDS_KMS = "libdrm virtual/egl"
 EDEPENDS_EGL = "virtual/egl"
-EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr"
+EDEPENDS_X11 = "virtual/libx11 libxcomposite libxdamage libxfixes libxrandr"
 EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland"
 
 # Extra RDEPENDS for PACKAGECONFIG
diff --git a/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.8.bb b/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.7.1.bb
similarity index 92%
rename from poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.8.bb
rename to poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.7.1.bb
index 3c4a5b5..08c8f83 100644
--- a/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.8.bb
+++ b/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.7.1.bb
@@ -11,8 +11,7 @@
 UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar"
 
 SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "c8d4f2aeed6e576bd42f9dc6def1b1ae"
-SRC_URI[sha256sum] = "6648a571a27f186e47094121f0095e1b809e918b3037c630c7f38ffad86e3035"
+SRC_URI[sha256sum] = "e95ee43b6bd0d3d1307e2aacf0f9c0050e5baceb21988b367b833028114aa569"
 
 inherit autotools pkgconfig lib_package gtk-doc
 
diff --git a/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
index 91e59d1..ee171ad 100644
--- a/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
+++ b/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
@@ -1,4 +1,4 @@
-From dd1d15c75f6ff8ee96cf1e7b74e582bff3183ef6 Mon Sep 17 00:00:00 2001
+From 65857eaee12a21a631750ffcd9e64e0afbbc3af0 Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair@alistair23.me>
 Date: Thu, 14 Nov 2019 13:08:31 -0800
 Subject: [PATCH] meson.build: make TLS ELF optional
@@ -15,15 +15,15 @@
  2 files changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/meson.build b/meson.build
-index 261b588..311436e 100644
+index c51dde9..c16f78f 100644
 --- a/meson.build
 +++ b/meson.build
 @@ -392,7 +392,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
  endif
  
  # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
--if host_machine.system() != 'windows' and (not with_platform_android or get_option('platform-sdk-version') >= 29)
-+if (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
+-if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
++if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
    pre_args += '-DUSE_ELF_TLS'
  endif
  
diff --git a/poky/meta/recipes-graphics/mesa/mesa-gl_20.1.2.bb b/poky/meta/recipes-graphics/mesa/mesa-gl_20.1.4.bb
similarity index 100%
rename from poky/meta/recipes-graphics/mesa/mesa-gl_20.1.2.bb
rename to poky/meta/recipes-graphics/mesa/mesa-gl_20.1.4.bb
diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc
index 4fe5f02..8d8e528 100644
--- a/poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/poky/meta/recipes-graphics/mesa/mesa.inc
@@ -23,7 +23,7 @@
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
            "
 
-SRC_URI[sha256sum] = "283dff72814c8a80ce1ff8271e3f055895d26f4da3f4362acc49193e635780cb"
+SRC_URI[sha256sum] = "6800271c2be2a0447510eb4e9b67edd9521859a4d565310617c4b359eb6799fe"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
 
@@ -121,6 +121,7 @@
 VULKAN_DRIVERS = ""
 VULKAN_DRIVERS_append_x86_class-target = ",intel"
 VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
+VULKAN_DRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
 PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
 
 PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
diff --git a/poky/meta/recipes-graphics/mesa/mesa_20.1.2.bb b/poky/meta/recipes-graphics/mesa/mesa_20.1.4.bb
similarity index 100%
rename from poky/meta/recipes-graphics/mesa/mesa_20.1.2.bb
rename to poky/meta/recipes-graphics/mesa/mesa_20.1.4.bb
diff --git a/poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb b/poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
index 70b32cf..3e1ba19 100644
--- a/poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
+++ b/poky/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
@@ -9,7 +9,7 @@
 LIC_FILES_CHKSUM = "file://COPYRIGHT.TXT;md5=27d7484b1e18d0ee4ce538644a3f04be"
 PR = "r7"
 
-inherit fontcache
+inherit allarch fontcache
 
 FONT_PACKAGES = "${PN}"
 
diff --git a/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb b/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb
index 29b1262..5282119 100644
--- a/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb
+++ b/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb
@@ -8,7 +8,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
 
-DEPENDS = "libdrm mesa libepoxy"
+DEPENDS = "libdrm virtual/libgl libepoxy"
 SRCREV = "7d204f3927be65fb3365dce01dbcd04d447a4985"
 SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
            file://0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch \
diff --git a/poky/meta/recipes-graphics/wayland/libinput_1.15.6.bb b/poky/meta/recipes-graphics/wayland/libinput_1.16.0.bb
similarity index 92%
rename from poky/meta/recipes-graphics/wayland/libinput_1.15.6.bb
rename to poky/meta/recipes-graphics/wayland/libinput_1.16.0.bb
index f81cf7f..baf5c1d 100644
--- a/poky/meta/recipes-graphics/wayland/libinput_1.15.6.bb
+++ b/poky/meta/recipes-graphics/wayland/libinput_1.16.0.bb
@@ -16,8 +16,8 @@
            file://run-ptest \
            file://determinism.patch \
            "
-SRC_URI[md5sum] = "b2388a1d6f0dcc944b49bc7239a53be8"
-SRC_URI[sha256sum] = "aeedea216a6317ddc6e27c3d54f26b987078780db6a8320cc09e19c25b307f1c"
+SRC_URI[md5sum] = "b518dae7f603040872739216971ee97b"
+SRC_URI[sha256sum] = "83f6d0c94e5e0dd87094ce73f0edb631919617d24a60ee0ab9bd9197411d76e8"
 
 UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
 
diff --git a/poky/meta/recipes-graphics/wayland/weston_8.0.0.bb b/poky/meta/recipes-graphics/wayland/weston_8.0.0.bb
index f8e9e15..8fef864 100644
--- a/poky/meta/recipes-graphics/wayland/weston_8.0.0.bb
+++ b/poky/meta/recipes-graphics/wayland/weston_8.0.0.bb
@@ -20,7 +20,7 @@
 # depends on virtual/egl
 REQUIRED_DISTRO_FEATURES = "opengl"
 
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
 DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
 
 WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
@@ -31,7 +31,13 @@
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
                    ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
                    ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
-                   launch"
+                   launch \
+                   image-jpeg \
+                   screenshare \
+                   shell-desktop \
+                   shell-fullscreen \
+                   shell-ivi"
+
 #
 # Compositor choices
 #
@@ -67,6 +73,16 @@
 PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0"
 # Weston with PAM support
 PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
+# Weston with screen-share support
+PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
+# Traditional desktop shell
+PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
+# Fullscreen shell
+PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
+# In-Vehicle Infotainment (IVI) shell
+PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
+# JPEG image loading support
+PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
 
 do_install_append() {
 	# Weston doesn't need the .la files to load modules, so wipe them
diff --git a/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch b/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch
new file mode 100644
index 0000000..765d9ec
--- /dev/null
+++ b/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch
@@ -0,0 +1,27 @@
+From c2d730cf79eb3e4bea41f5ed8a8a21092ced8b03 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hanno=20B=C3=B6ck?= <hanno@gentoo.org>
+Date: Sun, 2 Feb 2020 14:18:39 +0100
+Subject: [PATCH] i810: Avoid duplicate definition of I810PatternROP
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/-/commit/652d93cbbdc159c0883f1b626ea48e28bac63ae3]
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/legacy/i810/i810.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/legacy/i810/i810.h b/src/legacy/i810/i810.h
+index 347188c9..19be049c 100644
+--- a/src/legacy/i810/i810.h
++++ b/src/legacy/i810/i810.h
+@@ -322,6 +322,6 @@ extern void I810InitMC(ScreenPtr pScreen);
+ extern const OptionInfoRec *I810AvailableOptions(int chipid, int busid);
+ 
+ extern const int I810CopyROP[16];
+-const int I810PatternROP[16];
++extern const int I810PatternROP[16];
+ 
+ #endif /* _I810_H_ */
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
index 7ab2236..161371b 100644
--- a/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
+++ b/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
@@ -15,6 +15,7 @@
 
 SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel \
            file://0001-Sync-i915_pciids-upto-8717c6b7414f.patch \
+           file://0001-i810-Avoid-duplicate-definition-of-I810PatternROP.patch \
 "
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
diff --git a/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Avoid-duplicate-definitions-of-IOPortBase.patch b/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Avoid-duplicate-definitions-of-IOPortBase.patch
new file mode 100644
index 0000000..4737040
--- /dev/null
+++ b/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-Avoid-duplicate-definitions-of-IOPortBase.patch
@@ -0,0 +1,45 @@
+From fc04acfd948ac99d04a5dc08c78f3b13bc0c5c41 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 17 Aug 2020 10:50:51 -0700
+Subject: [PATCH] Avoid duplicate definitions of IOPortBase
+
+This fixed build with gcc10/-fno-common
+
+Fixes
+compiler.h:528: multiple definition of `IOPortBase';
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ hw/xfree86/common/compiler.h            | 2 +-
+ hw/xfree86/os-support/linux/lnx_video.c | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
+index 2b2008b..c7d617e 100644
+--- a/hw/xfree86/common/compiler.h
++++ b/hw/xfree86/common/compiler.h
+@@ -525,7 +525,7 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
+ #define PORT_SIZE short
+ #endif
+ 
+-_X_EXPORT unsigned int IOPortBase;      /* Memory mapped I/O port area */
++extern _X_EXPORT unsigned int IOPortBase;      /* Memory mapped I/O port area */
+ 
+ static __inline__ void
+ outb(unsigned PORT_SIZE port, unsigned char val)
+diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
+index 04e4509..9dc7316 100644
+--- a/hw/xfree86/os-support/linux/lnx_video.c
++++ b/hw/xfree86/os-support/linux/lnx_video.c
+@@ -78,6 +78,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
+ /***************************************************************************/
+ /* I/O Permissions section                                                 */
+ /***************************************************************************/
++_X_EXPORT unsigned int IOPortBase;      /* Memory mapped I/O port area */
+ 
+ #if defined(__powerpc__)
+ volatile unsigned char *ioBase = NULL;
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb b/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb
index 26815fe..8c19692 100644
--- a/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb
+++ b/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb
@@ -5,6 +5,7 @@
            file://0001-test-xtest-Initialize-array-with-braces.patch \
            file://sdksyms-no-build-path.patch \
            file://0001-drmmode_display.c-add-missing-mi.h-include.patch \
+           file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \
            "
 SRC_URI[md5sum] = "a770aec600116444a953ff632f51f839"
 SRC_URI[sha256sum] = "d17b646bee4ba0fb7850c1cc55b18e3e8513ed5c02bdf38da7e107f84e2d0146"
diff --git a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 4f1af73..ea33732 100644
--- a/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@
 
 DEPENDS = "git-native"
 
-SRCREV = "c66833e1caac25279a5052fceb13213f5e4f79f9"
+SRCREV = "df4390b18a500a1a7d4695e1856971f8e36ce517"
 PR = "r12"
 PV = "0.2+git${SRCPV}"
 
diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch b/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch
new file mode 100644
index 0000000..a3ba091
--- /dev/null
+++ b/poky/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch
@@ -0,0 +1,68 @@
+From c5fec6d6368b4103557deb710150119dca438544 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Aug 2020 10:46:39 -0700
+Subject: [PATCH] kexec: Fix build with -fno-common
+
+Ensure that my_debug is not doubly defined
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ kexec/arch/ppc64/kexec-elf-ppc64.c | 2 --
+ kexec/fs2dt.h                      | 2 +-
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
++++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
+@@ -44,8 +44,6 @@
+ uint64_t initrd_base, initrd_size;
+ unsigned char reuse_initrd = 0;
+ const char *ramdisk;
+-/* Used for enabling printing message from purgatory code */
+-int my_debug = 0;
+ 
+ int elf_ppc64_probe(const char *buf, off_t len)
+ {
+--- a/kexec/fs2dt.h
++++ b/kexec/fs2dt.h
+@@ -30,7 +30,7 @@ extern struct bootblock bb[1];
+ 
+ /* Used for enabling printing message from purgatory code
+  * Only has implemented for PPC64 */
+-int my_debug;
++extern int my_debug;
+ extern int dt_no_old_root;
+ 
+ void reserve(unsigned long long where, unsigned long long length);
+--- a/kexec/arch/arm64/kexec-arm64.h
++++ b/kexec/arch/arm64/kexec-arm64.h
+@@ -50,8 +50,8 @@ int zImage_arm64_load(int argc, char **a
+ void zImage_arm64_usage(void);
+ 
+ 
+-off_t initrd_base;
+-off_t initrd_size;
++extern off_t initrd_base;
++extern off_t initrd_size;
+ 
+ /**
+  * struct arm64_mem - Memory layout info.
+@@ -65,7 +65,7 @@ struct arm64_mem {
+ };
+ 
+ #define arm64_mem_ngv UINT64_MAX
+-struct arm64_mem arm64_mem;
++extern struct arm64_mem arm64_mem;
+ 
+ uint64_t get_phys_offset(void);
+ uint64_t get_vp_offset(void);
+--- a/kexec/arch/x86_64/kexec-bzImage64.c
++++ b/kexec/arch/x86_64/kexec-bzImage64.c
+@@ -42,7 +42,6 @@
+ #include <arch/options.h>
+ 
+ static const int probe_debug = 0;
+-int bzImage_support_efi_boot;
+ 
+ int bzImage64_probe(const char *buf, off_t len)
+ {
diff --git a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb
index 871b364..1e81ecc 100644
--- a/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb
+++ b/poky/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb
@@ -20,6 +20,7 @@
            file://0005-Disable-PIE-during-link.patch \
            file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
            file://0007-kexec-un-break-the-build-on-32-bit-x86.patch \
+           file://0001-kexec-Fix-build-with-fno-common.patch \
            "
 
 SRC_URI[md5sum] = "46724b67f32501c5d3e778161347cad9"
diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 20139a8..b1cb553 100644
--- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -30,7 +30,7 @@
 #
 # -- RP
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
 RECIPE_NO_UPDATE_REASON = "Recipe is updated through a separate process"
 
@@ -46,6 +46,9 @@
         d.setVar("HEADER_FETCH_VER", "2.6")
 }
 
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[0]}"
+MIN_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[1]}"
+
 inherit kernel-arch pkgconfig multilib_header
 
 KORG_ARCHIVE_COMPRESSION ?= "xz"
@@ -83,7 +86,16 @@
 }
 
 do_install_armmultilib () {
-	oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
+	if [ ${MAJ_VER} -gt 5 ]; then
+		ARM_KVM_HEADER=""
+	else
+		if [ ${MAJ_VER} -eq 5 ] && [ ${MIN_VER} -ge 8 ]; then
+			ARM_KVM_HEADER=""
+		else
+			ARM_KVM_HEADER="asm/kvm.h"
+		fi
+	fi
+	oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h asm/fcntl.h asm/hwcap.h asm/ioctls.h $ARM_KVM_HEADER asm/kvm_para.h asm/mman.h asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
 	oe_multilib_header asm/posix_types.h asm/ptrace.h  asm/setup.h  asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h  asm/statfs.h asm/swab.h  asm/types.h asm/unistd.h
 }
 
diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
index 9d17daa..5b7c1b6 100644
--- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
+++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
@@ -1,4 +1,4 @@
-From 9708dc74d9f49488d669e070982f6224a888d61a Mon Sep 17 00:00:00 2001
+From dc221138c809125dc1bbff8506c70cb7bd846368 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 12 Sep 2018 17:08:58 -0700
 Subject: [PATCH] include linux/stddef.h in swab.h uapi header
@@ -23,12 +23,13 @@
 Cc: Kate Stewart <kstewart@linuxfoundation.org>
 Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 Cc: Thomas Gleixner <tglx@linutronix.de>
+
 ---
  include/uapi/linux/swab.h | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
-index 23cd84868cc3..acddbe50a20d 100644
+index 7272f85d6..2912fe463 100644
 --- a/include/uapi/linux/swab.h
 +++ b/include/uapi/linux/swab.h
 @@ -3,6 +3,7 @@
@@ -37,8 +38,5 @@
  #include <linux/types.h>
 +#include <linux/stddef.h>
  #include <linux/compiler.h>
+ #include <asm/bitsperlong.h>
  #include <asm/swab.h>
- 
--- 
-2.19.0
-
diff --git a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.4.bb b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb
similarity index 70%
rename from poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.4.bb
rename to poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb
index 8a12103..d76a8a3 100644
--- a/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.4.bb
+++ b/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb
@@ -12,5 +12,7 @@
     file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \
 "
 
-SRC_URI[md5sum] = "ce9b2d974d27408a61c53a30d3f98fb9"
-SRC_URI[sha256sum] = "bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+SRC_URI[md5sum] = "0e5c4c15266218ef26c50fac0016095b"
+SRC_URI[sha256sum] = "e7f75186aa0642114af8f19d99559937300ca27acaf7451b36d4f9b0f85cf1f5"
diff --git a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
index 0c98535..a9c7be0 100644
--- a/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/poky/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -259,10 +259,12 @@
     touch -r $kerneldir/build/.config $kerneldir/build/include/config/auto.conf* 2>/dev/null || :
 
     if [ -e "$kerneldir/build/include/config/auto.conf.cmd" ]; then
-        sed -i 's/ifneq "$(CC)" ".*-linux-gcc.*$/ifneq "$(CC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
-        sed -i 's/ifneq "$(LD)" ".*-linux-ld.bfd.*$/ifneq "$(LD)" "ld"/' "$kerneldir/build/include/config/auto.conf.cmd"
+        sed -i 's/ifneq "$(CC)" ".*-linux-.*gcc.*$/ifneq "$(CC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
+        sed -i 's/ifneq "$(LD)" ".*-linux-.*ld.bfd.*$/ifneq "$(LD)" "ld"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(CC_VERSION_TEXT)".*\(gcc.*\)"/ifneq "$(CC_VERSION_TEXT)" "\1"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(srctree)" ".*"/ifneq "$(srctree)" "."/' "$kerneldir/build/include/config/auto.conf.cmd"
+        # we don't build against the defconfig, so make sure it isn't the trigger for syncconfig
+        sed -i 's/ifneq "$(KBUILD_DEFCONFIG)".*"\(.*\)"/ifneq "\1" "\1"/' "$kerneldir/build/include/config/auto.conf.cmd"
     fi
 
     # make the scripts python3 safe. We won't be running these, and if they are
@@ -288,3 +290,5 @@
 RDEPENDS_${PN} += "openssl-dev util-linux"
 # and x86 needs a bit more for 4.15+
 RDEPENDS_${PN} += "${@bb.utils.contains('ARCH', 'x86', 'elfutils', '', d)}"
+# 5.8+ needs gcc-plugins libmpc-dev
+RDEPENDS_${PN} += "gcc-plugins libmpc-dev"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
index caa5b4e..cfe3277 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb
@@ -11,13 +11,13 @@
         raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "508b4e6ada7f78b3ef5a9dbdd182d13dffe00123"
-SRCREV_meta ?= "caafbdfe382bf22a4786d871af097acd49d0867a"
+SRCREV_machine ?= "22664d170488313b5c2713b6d9c8df6563387728"
+SRCREV_meta ?= "83311f062f4aede9928eca82a34ddf73f264fe2a"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "5.4.51"
+LINUX_VERSION ?= "5.4.58"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.8.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.8.bb
new file mode 100644
index 0000000..e23e7dc
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.8.bb
@@ -0,0 +1,44 @@
+KBRANCH ?= "v5.8/standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+    if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+        raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_meta ?= "a3138cb23c3b7409c516d5d2115da9534c120a0c"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.8;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "5.8.1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
index 86e133f..b90b125 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb
@@ -6,7 +6,7 @@
 
 require recipes-kernel/linux/linux-yocto.inc
 
-LINUX_VERSION ?= "5.4.51"
+LINUX_VERSION ?= "5.4.58"
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine_qemuarm ?= "d4c9ad88abadd22f7b2785e8a101523fe9a74dc0"
-SRCREV_machine ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc"
-SRCREV_meta ?= "caafbdfe382bf22a4786d871af097acd49d0867a"
+SRCREV_machine_qemuarm ?= "d192ae0b9995a7be2a33b12005a95348ec6aae94"
+SRCREV_machine ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
+SRCREV_meta ?= "83311f062f4aede9928eca82a34ddf73f264fe2a"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.8.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.8.bb
new file mode 100644
index 0000000..36a8ae4
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.8.bb
@@ -0,0 +1,32 @@
+KBRANCH ?= "v5.8/standard/tiny/base"
+KBRANCH_qemuarm  ?= "v5.8/standard/tiny/arm-versatile-926ejs"
+
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "5.8.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine_qemuarm ?= "566e869df9400258b6f162bf34933f5b6dcd0115"
+SRCREV_machine ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_meta ?= "a3138cb23c3b7409c516d5d2115da9534c120a0c"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.8;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb
index e79793b..f85e37d 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.4.bb
@@ -12,16 +12,16 @@
 KBRANCH_qemux86-64 ?= "v5.4/standard/base"
 KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "601e67d37274e4a0890bcdbe6660c2dbd08d3b97"
-SRCREV_machine_qemuarm64 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc"
-SRCREV_machine_qemumips ?= "c8543a84037b88da45d0d825216187b42d0c509a"
-SRCREV_machine_qemuppc ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc"
-SRCREV_machine_qemuriscv64 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc"
-SRCREV_machine_qemux86 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc"
-SRCREV_machine_qemux86-64 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc"
-SRCREV_machine_qemumips64 ?= "c741fec6daabb449d08c9f96052be1477fe3c968"
-SRCREV_machine ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc"
-SRCREV_meta ?= "caafbdfe382bf22a4786d871af097acd49d0867a"
+SRCREV_machine_qemuarm ?= "7bbd138602fda3d69d74674460e73bffdec73cd2"
+SRCREV_machine_qemuarm64 ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
+SRCREV_machine_qemumips ?= "e43ed1586cd85a007b0fae3c63d6980d4f5cb336"
+SRCREV_machine_qemuppc ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
+SRCREV_machine_qemuriscv64 ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
+SRCREV_machine_qemux86 ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
+SRCREV_machine_qemux86-64 ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
+SRCREV_machine_qemumips64 ?= "d1ff96887c64f70de00add62eb91d4c36f1b181a"
+SRCREV_machine ?= "706efec4c1e270ec5dda92275898cd465dfdc7dd"
+SRCREV_meta ?= "83311f062f4aede9928eca82a34ddf73f264fe2a"
 
 # remap qemuarm to qemuarma15 for the 5.4 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
@@ -30,7 +30,7 @@
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-LINUX_VERSION ?= "5.4.51"
+LINUX_VERSION ?= "5.4.58"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
 DEPENDS += "openssl-native util-linux-native"
@@ -38,7 +38,7 @@
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
+KCONF_BSP_AUDIT_LEVEL = "1"
 
 KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
 
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.8.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.8.bb
new file mode 100644
index 0000000..aad6895
--- /dev/null
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.8.bb
@@ -0,0 +1,55 @@
+KBRANCH ?= "v5.8/standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm  ?= "v5.8/standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "v5.8/standard/qemuarm64"
+KBRANCH_qemumips ?= "v5.8/standard/mti-malta32"
+KBRANCH_qemuppc  ?= "v5.8/standard/qemuppc"
+KBRANCH_qemuriscv64  ?= "v5.8/standard/base"
+KBRANCH_qemux86  ?= "v5.8/standard/base"
+KBRANCH_qemux86-64 ?= "v5.8/standard/base"
+KBRANCH_qemumips64 ?= "v5.8/standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "097417e785af04be0cbe757bc6e24456a3f701fd"
+SRCREV_machine_qemuarm64 ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_machine_qemumips ?= "1fc5490bef8322680d73f6ab2c7b666eccc3bce1"
+SRCREV_machine_qemuppc ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_machine_qemuriscv64 ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_machine_qemux86 ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_machine_qemux86-64 ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_machine_qemumips64 ?= "e61fc06792254eed92c6908a9b35790ed54b0ace"
+SRCREV_machine ?= "d3c69e89ee5b5d4c3c19b8614bdcdc3f5dc7a8b3"
+SRCREV_meta ?= "a3138cb23c3b7409c516d5d2115da9534c120a0c"
+
+# remap qemuarm to qemuarma15 for the 5.8 kernel
+# KMACHINE_qemuarm ?= "qemuarma15"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.8;destsuffix=${KMETA}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+LINUX_VERSION ?= "5.8.1"
+
+DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
+DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "gmp-native"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "1"
+
+KERNEL_DEVICETREE_qemuarmv5 = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}"
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.1.bb b/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb
similarity index 94%
rename from poky/meta/recipes-kernel/lttng/lttng-modules_2.12.1.bb
rename to poky/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb
index c0df0ca..49b7a11 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.1.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules_2.12.2.bb
@@ -13,7 +13,7 @@
            file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
            "
 
-SRC_URI[sha256sum] = "639c03bf8f0e920567f45c96cc7ef749a8fc29ff7fb3fb97263d67f66fb71aef"
+SRC_URI[sha256sum] = "df50bc3bd58679705714f17721acf619a8b0cedc694f8a97052aa5099626feca"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch b/poky/meta/recipes-kernel/lttng/lttng-tools/0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch
deleted file mode 100644
index a150d64..0000000
--- a/poky/meta/recipes-kernel/lttng/lttng-tools/0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From e5d94cf4882cc6516af52b794c6acb8e4d6469a3 Mon Sep 17 00:00:00 2001
-From: Ovidiu Panait <ovidiu.panait@windriver.com>
-Date: Mon, 18 May 2020 16:39:26 +0300
-Subject: [PATCH] tests: gen-ust-events-ns/tp.h: Fix build with musl libc
-
-Fix the following build error with musl libc:
-In file included from ../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.h:14,
-                 from ../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.c:10:
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.h:17:10: error: unknown type name 'ino_t'; did you mean 'int8_t'?
-   17 |  TP_ARGS(ino_t, ns_ino),
-      |          ^~~~~
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/tp.h:17:10: error: unknown type name 'ino_t'; did you mean 'int8_t'?
-   17 |  TP_ARGS(ino_t, ns_ino),
-      |          ^~~~~
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/./tp.h:17:2: error: unknown type name 'ino_t'; did you mean 'int8_t'?
-   17 |  TP_ARGS(ino_t, ns_ino),
-      |  ^~~~~~~
-../../../../../lttng-tools-2.12.0/tests/utils/testapp/gen-ust-events-ns/./tp.h:17:2: error: unknown type name 'ino_t'; did you mean 'int8_t'?
-   17 |  TP_ARGS(ino_t, ns_ino),
-      |  ^~~~~~~
-
-Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/161]
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- tests/utils/testapp/gen-ust-events-ns/tp.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tests/utils/testapp/gen-ust-events-ns/tp.h b/tests/utils/testapp/gen-ust-events-ns/tp.h
-index 4dbfed5..e0ddb29 100644
---- a/tests/utils/testapp/gen-ust-events-ns/tp.h
-+++ b/tests/utils/testapp/gen-ust-events-ns/tp.h
-@@ -11,6 +11,7 @@
- #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
- #define _TRACEPOINT_TP_H
- 
-+#include <sys/types.h>
- #include <lttng/tracepoint.h>
- 
- TRACEPOINT_EVENT(tp, tptest,
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.1.bb b/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
similarity index 97%
rename from poky/meta/recipes-kernel/lttng/lttng-tools_2.12.1.bb
rename to poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
index 094e33d..e9c8e18 100644
--- a/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.1.bb
+++ b/poky/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
@@ -33,10 +33,9 @@
            file://run-ptest \
            file://lttng-sessiond.service \
            file://0001-tests-regression-disable-the-tools-live-tests.patch \
-           file://0001-tests-gen-ust-events-ns-tp.h-Fix-build-with-musl-lib.patch \
            "
 
-SRC_URI[sha256sum] = "0de7afc1f40a5acbede933cdfd6cf47b32ff84d02e170a1321f7fc86141585b8"
+SRC_URI[sha256sum] = "9ed9161795ff023b076f9f95afaa4f1f822ec42495c0fa04c586ab8fa74e84f1"
 
 inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
 
diff --git a/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
index c7edb20..1ab248f 100644
--- a/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
+++ b/poky/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -15,8 +15,10 @@
 RDEPENDS_${PN}-dev = ""
 
 DEPENDS += "bc-native bison-native"
+DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
 
 # Build some host tools under work-shared.  CC, LD, and AR are probably
 # not used, but this is the historical way of invoking "make scripts".
diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb
index e5bc7dc..5faf22a 100644
--- a/poky/meta/recipes-kernel/perf/perf.bb
+++ b/poky/meta/recipes-kernel/perf/perf.bb
@@ -70,6 +70,7 @@
 LDFLAGS="-ldl -lutil"
 
 EXTRA_OEMAKE = '\
+    V=1 \
     -C ${S}/tools/perf \
     O=${B} \
     CROSS_COMPILE=${TARGET_PREFIX} \
@@ -201,6 +202,9 @@
             ${S}/tools/perf/Makefile.perf
         sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
             ${S}/tools/perf/Makefile.perf
+        # backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
+        sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
+            ${S}/tools/perf/Makefile.perf
     fi
     sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
         ${S}/tools/perf/Makefile*
diff --git a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc
index 4ec0703..56fa51d 100644
--- a/poky/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/poky/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,6 +1,6 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "c9c23c987d819d07c6b96b54f8e03188fecd9e46"
+SRCREV = "82b8e1a07a31bf37ed05d6ebc5162b054c0be9fd"
 PV = "4.3"
 
 SRC_URI = "git://sourceware.org/git/systemtap.git \
diff --git a/poky/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.3.bb b/poky/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.3.bb
index fd949be..3575c46 100644
--- a/poky/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.3.bb
+++ b/poky/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.3.bb
@@ -10,8 +10,8 @@
 inherit allarch
 
 do_install() {
-        install -d ${D}/usr/share/alsa
-        cp -r ${S}/topology ${D}/usr/share/alsa
+        install -d "${D}${datadir}/alsa"
+        cp -r "${S}/topology" "${D}${datadir}/alsa"
 }
 
 PACKAGES = "${PN}"
diff --git a/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.3.bb b/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.3.bb
index 19eeabf..7be0df8 100644
--- a/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.3.bb
+++ b/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.3.bb
@@ -10,9 +10,9 @@
 inherit allarch
 
 do_install() {
-        install -d ${D}/usr/share/alsa
-        cp -r ${S}/ucm ${D}/usr/share/alsa
-        cp -r ${S}/ucm2 ${D}/usr/share/alsa
+        install -d "${D}${datadir}/alsa"
+        cp -r "${S}/ucm" "${D}${datadir}/alsa"
+        cp -r "${S}/ucm2" "${D}${datadir}/alsa"
 }
 
 PACKAGES = "${PN}"
diff --git a/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
index 271c2a3..2061c28 100644
--- a/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
+++ b/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
@@ -26,6 +26,8 @@
 
 PROVIDES += "virtual/libomxil"
 
+CFLAGS += "-fcommon"
+
 #
 # The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked.
 # Make sure they get packaged in the main package.
diff --git a/poky/meta/recipes-multimedia/mpg123/mpg123_1.26.2.bb b/poky/meta/recipes-multimedia/mpg123/mpg123_1.26.3.bb
similarity index 96%
rename from poky/meta/recipes-multimedia/mpg123/mpg123_1.26.2.bb
rename to poky/meta/recipes-multimedia/mpg123/mpg123_1.26.3.bb
index aaa66e1..0746d8d 100644
--- a/poky/meta/recipes-multimedia/mpg123/mpg123_1.26.2.bb
+++ b/poky/meta/recipes-multimedia/mpg123/mpg123_1.26.3.bb
@@ -10,7 +10,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
 
 SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
-SRC_URI[sha256sum] = "00f7bf7ea64fcec2c9d07751d6ad8849343ee09c282ea3b0d5dd486e886e2ff3"
+SRC_URI[sha256sum] = "30c998785a898f2846deefc4d17d6e4683a5a550b7eacf6ea506e30a7a736c6e"
 
 UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar"
 
diff --git a/poky/meta/recipes-multimedia/x264/x264_git.bb b/poky/meta/recipes-multimedia/x264/x264_git.bb
index 1ff5348..f226fec 100644
--- a/poky/meta/recipes-multimedia/x264/x264_git.bb
+++ b/poky/meta/recipes-multimedia/x264/x264_git.bb
@@ -14,9 +14,9 @@
            "
 UPSTREAM_CHECK_COMMITS = "1"
 
-SRCREV = "296494a4011f58f32adc54304a2654627558c59a"
+SRCREV = "cde9a93319bea766a92e306d69059c76de970190"
 
-PV = "r2991+git${SRCPV}"
+PV = "r3011+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-sato/webkit/libwpe_1.6.0.bb b/poky/meta/recipes-sato/webkit/libwpe_1.7.1.bb
similarity index 81%
rename from poky/meta/recipes-sato/webkit/libwpe_1.6.0.bb
rename to poky/meta/recipes-sato/webkit/libwpe_1.7.1.bb
index 09c7408..e25d940 100644
--- a/poky/meta/recipes-sato/webkit/libwpe_1.6.0.bb
+++ b/poky/meta/recipes-sato/webkit/libwpe_1.7.1.bb
@@ -13,6 +13,5 @@
 
 REQUIRED_DISTRO_FEATURES = "opengl"
 
-SRC_URI[md5sum] = "6e8a2c279dcc3617db5ec7ac4c03d628"
 SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "3587c6b8a807f4bb76b268ba74ca82c6b395b90235db41ad8252224456193c90"
+SRC_URI[sha256sum] = "a784b7fa0c658b28071100f6f6749b0d85bbcddd82de028e07672ce13982d340"
diff --git a/poky/meta/recipes-sato/webkit/webkitgtk/0001-clang-11-fix-build-errors-due-to-WWc-11-narrowing.patch b/poky/meta/recipes-sato/webkit/webkitgtk/0001-clang-11-fix-build-errors-due-to-WWc-11-narrowing.patch
new file mode 100644
index 0000000..d8bb8ef
--- /dev/null
+++ b/poky/meta/recipes-sato/webkit/webkitgtk/0001-clang-11-fix-build-errors-due-to-WWc-11-narrowing.patch
@@ -0,0 +1,66 @@
+From cb929f59b527fe890376e47613dfe1434a320bc0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 11 Aug 2020 15:44:48 -0700
+Subject: [PATCH] [clang 11] fix build errors due to -WWc++11-narrowing
+
+https://bugs.webkit.org/show_bug.cgi?id=211193
+
+Reviewed by Adrian Perez de Castro.
+
+Fixes the following errors,
+
+Source/WebCore/html/MediaElementSession.cpp:1059:9: error: type 'WebCore::RenderMedia *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
+m_element.renderer(),
+^~~~~~~~~~~~~~~~~~~~
+
+Source/WebCore/style/StyleResolver.cpp:106:55: error: type 'const char [4]' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
+m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };
+                                              ^~~~~
+Source/WebCore/style/StyleResolver.cpp:106:55: note: insert an explicit cast to silence this issue
+m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };
+                                              ^~~~~
+                                              static_cast<bool>( )
+
+* html/HTMLMediaElement.h:
+(WebCore::HTMLMediaElement::hasRenderer const):
+MediaElementSession was implicitly casting a pointer to a bool,
+which is not allowed with modern Clang checks. Add a helper method
+to encapsulate the now required static_cast<bool>.
+* html/MediaElementSession.cpp: Use the new helper method to see
+if the HTMLMediaElement has an associated renderer.
+(WebCore::MediaElementSession::updateMediaUsageIfChanged):
+* style/StyleResolver.cpp: This was calling MediaQueryEvaluator {
+"all" }; and seemingly expecting to cast a const char[] to a bool,
+or maybe String? It's confusing because of the MediaQueryEvaluator
+API. If it was implicitly converting to bool then that could be
+unintentional. Such casts are not allowed either now. The
+MediaQueryEvaluator's default constructor says it returns true for
+"all", which appears to be the original intent of this call, so I
+replaced it with that.
+(WebCore::Style::Resolver::Resolver):
+
+git-svn-id: http://svn.webkit.org/repository/webkit/trunk@260951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+Upstream-Status: Backport [https://github.com/WebKit/webkit/commit/c3cf651016e4cdcb4350598d4a586821071f91bf.patch]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Source/WebCore/style/StyleResolver.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/WebCore/style/StyleResolver.cpp b/Source/WebCore/style/StyleResolver.cpp
+index 8bf371a0..34580ddb 100644
+--- a/Source/WebCore/style/StyleResolver.cpp
++++ b/Source/WebCore/style/StyleResolver.cpp
+@@ -107,7 +107,7 @@ Resolver::Resolver(Document& document)
+     if (view)
+         m_mediaQueryEvaluator = MediaQueryEvaluator { view->mediaType() };
+     else
+-        m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };
++        m_mediaQueryEvaluator = MediaQueryEvaluator { };
+ 
+     if (root) {
+         m_rootDefaultStyle = styleForElement(*root, m_document.renderStyle(), nullptr, RuleMatchingBehavior::MatchOnlyUserAgentRules).renderStyle;
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-sato/webkit/webkitgtk_2.28.3.bb b/poky/meta/recipes-sato/webkit/webkitgtk_2.28.4.bb
similarity index 96%
rename from poky/meta/recipes-sato/webkit/webkitgtk_2.28.3.bb
rename to poky/meta/recipes-sato/webkit/webkitgtk_2.28.4.bb
index 0158092..8ebb370 100644
--- a/poky/meta/recipes-sato/webkit/webkitgtk_2.28.3.bb
+++ b/poky/meta/recipes-sato/webkit/webkitgtk_2.28.4.bb
@@ -19,8 +19,9 @@
            file://cross-compile.patch \
            file://0001-Fix-build-with-musl.patch \
            file://include_array.patch \
+           file://0001-clang-11-fix-build-errors-due-to-WWc-11-narrowing.patch \
            "
-SRC_URI[sha256sum] = "f0898ac072c220e13a4aee819408421a6cb56a6eb89170ceafe52468b0903522"
+SRC_URI[sha256sum] = "821952e8c9303ed752f1fb1d4283f612c25249d00d705d2b79c2db1bc49c9464"
 
 inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc
 
diff --git a/poky/meta/recipes-support/bash-completion/bash-completion_2.10.bb b/poky/meta/recipes-support/bash-completion/bash-completion_2.11.bb
similarity index 87%
rename from poky/meta/recipes-support/bash-completion/bash-completion_2.10.bb
rename to poky/meta/recipes-support/bash-completion/bash-completion_2.11.bb
index 041af74..da0baa7 100644
--- a/poky/meta/recipes-support/bash-completion/bash-completion_2.10.bb
+++ b/poky/meta/recipes-support/bash-completion/bash-completion_2.11.bb
@@ -9,8 +9,8 @@
 
 SRC_URI = "https://github.com/scop/bash-completion/releases/download/${PV}/${BPN}-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "f376ae3266cc70017aa833c39b76f984"
-SRC_URI[sha256sum] = "123c17998e34b937ce57bb1b111cd817bc369309e9a8047c0bcf06ead4a3ec92"
+SRC_URI[md5sum] = "2514c6772d0de6254758b98c53f91861"
+SRC_URI[sha256sum] = "73a8894bad94dee83ab468fa09f628daffd567e8bef1a24277f1e9a0daf911ac"
 UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar"
 UPSTREAM_CHECK_URI = "https://github.com/scop/bash-completion/releases"
 
diff --git a/poky/meta/recipes-support/curl/curl_7.71.1.bb b/poky/meta/recipes-support/curl/curl_7.72.0.bb
similarity index 97%
rename from poky/meta/recipes-support/curl/curl_7.71.1.bb
rename to poky/meta/recipes-support/curl/curl_7.72.0.bb
index f028f1f..e7f5492 100644
--- a/poky/meta/recipes-support/curl/curl_7.71.1.bb
+++ b/poky/meta/recipes-support/curl/curl_7.72.0.bb
@@ -9,7 +9,7 @@
            file://0001-replace-krb5-config-with-pkg-config.patch \
 "
 
-SRC_URI[sha256sum] = "9d52a4d80554f9b0d460ea2be5d7be99897a1a9f681ffafe739169afd6b4f224"
+SRC_URI[sha256sum] = "ad91970864102a59765e20ce16216efc9d6ad381471f7accceceab7d905703ef"
 
 CVE_PRODUCT = "curl libcurl"
 inherit autotools pkgconfig binconfig multilib_header
diff --git a/poky/meta/recipes-support/diffoscope/diffoscope_151.bb b/poky/meta/recipes-support/diffoscope/diffoscope_153.bb
similarity index 82%
rename from poky/meta/recipes-support/diffoscope/diffoscope_151.bb
rename to poky/meta/recipes-support/diffoscope/diffoscope_153.bb
index 9b39b44..77f5254 100644
--- a/poky/meta/recipes-support/diffoscope/diffoscope_151.bb
+++ b/poky/meta/recipes-support/diffoscope/diffoscope_153.bb
@@ -7,7 +7,7 @@
 
 inherit pypi setuptools3
 
-SRC_URI[sha256sum] = "f15e04aa537f0a3d91c99bf631c604668f4eea8f6552c5f93ea9be2bf014df84"
+SRC_URI[sha256sum] = "b5104b5e72252df45ba6b7cbb0169e2e3407715b6b063fa5b38a2649b0d719a2"
 
 RDEPENDS_${PN} += "binutils vim squashfs-tools python3-libarchive-c python3-magic"
 
diff --git a/poky/meta/recipes-support/fribidi/fribidi_1.0.10.bb b/poky/meta/recipes-support/fribidi/fribidi_1.0.10.bb
index ba9e6f0..53d78b4 100644
--- a/poky/meta/recipes-support/fribidi/fribidi_1.0.10.bb
+++ b/poky/meta/recipes-support/fribidi/fribidi_1.0.10.bb
@@ -12,6 +12,6 @@
 
 inherit meson lib_package pkgconfig
 
-CVE_PRODUCT = "gnu_fribidi"
+CVE_PRODUCT = "gnu_fribidi fribidi"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/gpgme/gpgme_1.13.1.bb b/poky/meta/recipes-support/gpgme/gpgme_1.13.1.bb
index 9fc1ae2..b515343 100644
--- a/poky/meta/recipes-support/gpgme/gpgme_1.13.1.bb
+++ b/poky/meta/recipes-support/gpgme/gpgme_1.13.1.bb
@@ -59,7 +59,7 @@
                  --disable-lang-python-test \
 '
 
-inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT}
+inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT} multilib_header
 
 export PKG_CONFIG='pkg-config'
 
@@ -83,3 +83,7 @@
 	rm -f ${S}/m4/libassuan.m4
 	rm -f ${S}/m4/python.m4
 }
+
+do_install_append() {
+       oe_multilib_header gpgme.h
+}
diff --git a/poky/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch b/poky/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
index 912f33f..81fdd2a 100644
--- a/poky/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
+++ b/poky/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
@@ -1,4 +1,4 @@
-From 24d59c99bcba065f1f40f49f870a5f6483b4b078 Mon Sep 17 00:00:00 2001
+From e4fe6890e07821d60f01f000a95f7944f3d68139 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 15 Jan 2020 17:16:28 +0100
 Subject: [PATCH] tests: do not statically link a test
@@ -13,10 +13,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/tests/Makefile b/tests/Makefile
-index f9cec56..aa0d09b 100644
+index 876a8b9..93a0e3a 100644
 --- a/tests/Makefile
 +++ b/tests/Makefile
-@@ -29,23 +29,23 @@ psx_test_wrap: psx_test.c $(DEPS)
+@@ -26,23 +26,23 @@ psx_test: psx_test.c $(DEPS)
  run_libcap_psx_test: libcap_psx_test
  
  libcap_psx_test: libcap_psx_test.c $(DEPS)
@@ -43,4 +43,4 @@
 +	$(CC) $(CFLAGS) $< -o $@
  
  clean:
- 	rm -f psx_test psx_test_wrap libcap_psx_test libcap_launch_test *~
+ 	rm -f psx_test libcap_psx_test libcap_launch_test *~
diff --git a/poky/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch b/poky/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch
index 26d108c..e8f1df9 100644
--- a/poky/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch
+++ b/poky/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch
@@ -1,4 +1,4 @@
-From 6309554225e05e76167eda4e0df383fb3d1a62c3 Mon Sep 17 00:00:00 2001
+From 5583b48c04d5bf50b56473d88d990c3f0bc45c14 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 20 Dec 2019 16:54:05 +0100
 Subject: [PATCH] tests: do not run target executables
@@ -7,23 +7,20 @@
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 
 ---
- tests/Makefile | 3 ---
- 1 file changed, 3 deletions(-)
+ tests/Makefile | 2 --
+ 1 file changed, 2 deletions(-)
 
 diff --git a/tests/Makefile b/tests/Makefile
-index 95e4ca6..7162cf0 100644
+index bfedbc2..876a8b9 100644
 --- a/tests/Makefile
 +++ b/tests/Makefile
-@@ -19,8 +19,6 @@ sudotest: test
+@@ -19,13 +19,11 @@ sudotest: test run_libcap_launch_test run_libcap_launch_test
  install: all
  
- run_psx_test: psx_test psx_test_wrap
+ run_psx_test: psx_test
 -	./psx_test
--	./psx_test_wrap
  
  psx_test: psx_test.c $(DEPS)
- 	$(CC) $(CFLAGS) $(IPATH) -DNOWRAP $< -o $@ $(LIBPSXLIB)
-@@ -29,7 +27,6 @@ psx_test_wrap: psx_test.c $(DEPS)
  	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create
  
  run_libcap_psx_test: libcap_psx_test
diff --git a/poky/meta/recipes-support/libcap/libcap_2.36.bb b/poky/meta/recipes-support/libcap/libcap_2.42.bb
similarity index 95%
rename from poky/meta/recipes-support/libcap/libcap_2.36.bb
rename to poky/meta/recipes-support/libcap/libcap_2.42.bb
index 2c98db6..48f8f92 100644
--- a/poky/meta/recipes-support/libcap/libcap_2.36.bb
+++ b/poky/meta/recipes-support/libcap/libcap_2.42.bb
@@ -12,7 +12,7 @@
            file://0002-tests-do-not-run-target-executables.patch \
            file://0001-tests-do-not-statically-link-a-test.patch \
            "
-SRC_URI[sha256sum] = "5048c849bdbbe24d2ca59463142cb279abec5edf3ab6731ab35a596bcf538a49"
+SRC_URI[sha256sum] = "3605a9cb60076547ea9f64989e0ba576da9508e4653e8dc40ae54c0d6f443dfd"
 
 UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
 
diff --git a/poky/meta/recipes-support/libevdev/libevdev_1.9.0.bb b/poky/meta/recipes-support/libevdev/libevdev_1.9.1.bb
similarity index 78%
rename from poky/meta/recipes-support/libevdev/libevdev_1.9.0.bb
rename to poky/meta/recipes-support/libevdev/libevdev_1.9.1.bb
index a2116a4..633e0af 100644
--- a/poky/meta/recipes-support/libevdev/libevdev_1.9.0.bb
+++ b/poky/meta/recipes-support/libevdev/libevdev_1.9.1.bb
@@ -8,8 +8,8 @@
 
 SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz \
            file://determinism.patch"
-SRC_URI[md5sum] = "13c3f0911f9326d4b9fa103365f84421"
-SRC_URI[sha256sum] = "e7e18a64264f2dea19b6c50a481f8c062529d42919ccda0bc861495bce28eb9e"
+SRC_URI[md5sum] = "58286a834ae14536caf9cab8633419cf"
+SRC_URI[sha256sum] = "f5603c48c5afd76b14df7a5124e0a94a102f8da0d45826192325069d1bbc7acb"
 
 inherit autotools pkgconfig
 
diff --git a/poky/meta/recipes-support/libexif/libexif_0.6.22.bb b/poky/meta/recipes-support/libexif/libexif_0.6.22.bb
index a520d5c..2478ba0 100644
--- a/poky/meta/recipes-support/libexif/libexif_0.6.22.bb
+++ b/poky/meta/recipes-support/libexif/libexif_0.6.22.bb
@@ -17,3 +17,5 @@
 inherit autotools gettext
 
 EXTRA_OECONF += "--disable-docs"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libffi/libffi_3.3.bb b/poky/meta/recipes-support/libffi/libffi_3.3.bb
index e5beb98..9dfdb9e 100644
--- a/poky/meta/recipes-support/libffi/libffi_3.3.bb
+++ b/poky/meta/recipes-support/libffi/libffi_3.3.bb
@@ -28,7 +28,7 @@
 inherit autotools texinfo multilib_header
 
 do_install_append() {
-	oe_multilib_header ffi.h
+	oe_multilib_header ffi.h ffitarget.h
 }
 
 FILES_${PN}-dev += "${libdir}/libffi-${PV}"
diff --git a/poky/meta/recipes-support/libunwind/libunwind/0001-Fix-compilation-with-fno-common.patch b/poky/meta/recipes-support/libunwind/libunwind/0001-Fix-compilation-with-fno-common.patch
new file mode 100644
index 0000000..e11487f
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/0001-Fix-compilation-with-fno-common.patch
@@ -0,0 +1,448 @@
+From 00d18b21dcb9723c4f13889a39a760a654782370 Mon Sep 17 00:00:00 2001
+From: Yichao Yu <yyc1992@gmail.com>
+Date: Tue, 31 Mar 2020 00:43:32 -0400
+Subject: [PATCH] Fix compilation with -fno-common.
+
+Making all other archs consistent with IA64 which should not have this problem.
+Also move the FIXME to the correct place.
+
+Also add some minimum comments about this...
+
+Upstream-Status: Backport [https://github.com/libunwind/libunwind/pull/166]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/aarch64/Ginit.c                        | 15 +++++++--------
+ src/arm/Ginit.c                            | 15 +++++++--------
+ src/coredump/_UPT_get_dyn_info_list_addr.c |  5 +++++
+ src/hppa/Ginit.c                           | 15 +++++++--------
+ src/ia64/Ginit.c                           |  1 +
+ src/mi/Gfind_dynamic_proc_info.c           |  1 +
+ src/mips/Ginit.c                           | 15 +++++++--------
+ src/ppc32/Ginit.c                          | 11 +++++++----
+ src/ppc64/Ginit.c                          | 11 +++++++----
+ src/ptrace/_UPT_get_dyn_info_list_addr.c   |  5 +++++
+ src/s390x/Ginit.c                          | 15 +++++++--------
+ src/sh/Ginit.c                             | 15 +++++++--------
+ src/tilegx/Ginit.c                         | 15 +++++++--------
+ src/x86/Ginit.c                            | 15 +++++++--------
+ src/x86_64/Ginit.c                         | 15 +++++++--------
+ 15 files changed, 89 insertions(+), 80 deletions(-)
+
+diff --git a/src/aarch64/Ginit.c b/src/aarch64/Ginit.c
+index dec235c..3538976 100644
+--- a/src/aarch64/Ginit.c
++++ b/src/aarch64/Ginit.c
+@@ -61,13 +61,6 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -78,7 +71,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/arm/Ginit.c b/src/arm/Ginit.c
+index 2720d06..0bac0d7 100644
+--- a/src/arm/Ginit.c
++++ b/src/arm/Ginit.c
+@@ -57,18 +57,17 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/coredump/_UPT_get_dyn_info_list_addr.c b/src/coredump/_UPT_get_dyn_info_list_addr.c
+index 0d11905..739ed05 100644
+--- a/src/coredump/_UPT_get_dyn_info_list_addr.c
++++ b/src/coredump/_UPT_get_dyn_info_list_addr.c
+@@ -74,6 +74,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
+ 
+ #else
+ 
++/* XXX fix me: there is currently no way to locate the dyn-info list
++       by a remote unwinder.  On ia64, this is done via a special
++       unwind-table entry.  Perhaps something similar can be done with
++       DWARF2 unwind info.  */
++
+ static inline int
+ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
+                int *countp)
+diff --git a/src/hppa/Ginit.c b/src/hppa/Ginit.c
+index 461e4b9..265455a 100644
+--- a/src/hppa/Ginit.c
++++ b/src/hppa/Ginit.c
+@@ -64,13 +64,6 @@ _Uhppa_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -81,7 +74,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/ia64/Ginit.c b/src/ia64/Ginit.c
+index b09a2ad..8601bb3 100644
+--- a/src/ia64/Ginit.c
++++ b/src/ia64/Ginit.c
+@@ -68,6 +68,7 @@ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+   if (!_U_dyn_info_list_addr)
+     return -UNW_ENOINFO;
+ #endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+   *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+diff --git a/src/mi/Gfind_dynamic_proc_info.c b/src/mi/Gfind_dynamic_proc_info.c
+index 98d3501..2e7c62e 100644
+--- a/src/mi/Gfind_dynamic_proc_info.c
++++ b/src/mi/Gfind_dynamic_proc_info.c
+@@ -49,6 +49,7 @@ local_find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
+     return -UNW_ENOINFO;
+ #endif
+ 
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+   list = (unw_dyn_info_list_t *) (uintptr_t) _U_dyn_info_list_addr ();
+   for (di = list->first; di; di = di->next)
+     if (ip >= di->start_ip && ip < di->end_ip)
+diff --git a/src/mips/Ginit.c b/src/mips/Ginit.c
+index 3df170c..bf7a8f5 100644
+--- a/src/mips/Ginit.c
++++ b/src/mips/Ginit.c
+@@ -69,13 +69,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -86,7 +79,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c
+index c5312d9..f8d6886 100644
+--- a/src/ppc32/Ginit.c
++++ b/src/ppc32/Ginit.c
+@@ -91,9 +91,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -104,7 +101,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/ppc64/Ginit.c b/src/ppc64/Ginit.c
+index 4c88cd6..7bfb395 100644
+--- a/src/ppc64/Ginit.c
++++ b/src/ppc64/Ginit.c
+@@ -95,9 +95,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -108,7 +105,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/ptrace/_UPT_get_dyn_info_list_addr.c b/src/ptrace/_UPT_get_dyn_info_list_addr.c
+index cc5ed04..16671d4 100644
+--- a/src/ptrace/_UPT_get_dyn_info_list_addr.c
++++ b/src/ptrace/_UPT_get_dyn_info_list_addr.c
+@@ -71,6 +71,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
+ 
+ #else
+ 
++/* XXX fix me: there is currently no way to locate the dyn-info list
++       by a remote unwinder.  On ia64, this is done via a special
++       unwind-table entry.  Perhaps something similar can be done with
++       DWARF2 unwind info.  */
++
+ static inline int
+ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
+                int *countp)
+diff --git a/src/s390x/Ginit.c b/src/s390x/Ginit.c
+index f0886ac..db01743 100644
+--- a/src/s390x/Ginit.c
++++ b/src/s390x/Ginit.c
+@@ -50,8 +50,6 @@ static struct unw_addr_space local_addr_space;
+ 
+ unw_addr_space_t unw_local_addr_space = &local_addr_space;
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+ static inline void *
+ uc_addr (ucontext_t *uc, int reg)
+ {
+@@ -75,11 +73,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -90,7 +83,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/sh/Ginit.c b/src/sh/Ginit.c
+index 52988a7..9fe96d2 100644
+--- a/src/sh/Ginit.c
++++ b/src/sh/Ginit.c
+@@ -58,13 +58,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -75,7 +68,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/tilegx/Ginit.c b/src/tilegx/Ginit.c
+index 7564a55..925e641 100644
+--- a/src/tilegx/Ginit.c
++++ b/src/tilegx/Ginit.c
+@@ -64,13 +64,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -81,7 +74,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c
+index f6b8dc2..3cec74a 100644
+--- a/src/x86/Ginit.c
++++ b/src/x86/Ginit.c
+@@ -54,13 +54,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+ 
+ # endif /* UNW_LOCAL_ONLY */
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -71,7 +64,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c
+index 6161da6..5c4e426 100644
+--- a/src/x86_64/Ginit.c
++++ b/src/x86_64/Ginit.c
+@@ -49,13 +49,6 @@ static struct unw_addr_space local_addr_space;
+ 
+ unw_addr_space_t unw_local_addr_space = &local_addr_space;
+ 
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+-       by a remote unwinder.  On ia64, this is done via a special
+-       unwind-table entry.  Perhaps something similar can be done with
+-       DWARF2 unwind info.  */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -66,7 +59,13 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+                         void *arg)
+ {
+-  *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++  if (!_U_dyn_info_list_addr)
++    return -UNW_ENOINFO;
++#endif
++  // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
++  *dyn_info_list_addr = _U_dyn_info_list_addr ();
+   return 0;
+ }
+ 
+-- 
+2.28.0
+
diff --git a/poky/meta/recipes-support/libunwind/libunwind_1.4.0.bb b/poky/meta/recipes-support/libunwind/libunwind_1.4.0.bb
index 34c2249..2193bd8 100644
--- a/poky/meta/recipes-support/libunwind/libunwind_1.4.0.bb
+++ b/poky/meta/recipes-support/libunwind/libunwind_1.4.0.bb
@@ -8,6 +8,7 @@
            file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
            file://0006-Fix-for-X32.patch \
            file://sigset_t.patch \
+           file://0001-Fix-compilation-with-fno-common.patch \
            "
 SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
 
diff --git a/poky/meta/recipes-support/popt/popt/disable_tests.patch b/poky/meta/recipes-support/popt/popt/disable_tests.patch
deleted file mode 100644
index 016cf66..0000000
--- a/poky/meta/recipes-support/popt/popt/disable_tests.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Use of $(top_srcdir) in TESTS is an error which causes
-automake-1.13 to abort. Just remove tests.
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd popt-1.16/Makefile.am popt-1.16/Makefile.am
---- popt-1.16/Makefile.am	2010-05-04 23:55:54.000000000 +0300
-+++ popt-1.16/Makefile.am	2013-01-02 13:34:29.540361391 +0200
-@@ -34,11 +34,6 @@
-
- noinst_SCRIPTS = testit.sh
-
--TESTS_ENVIRONMENT = \
--test1="$(top_builddir)/test1"
--
--TESTS = $(top_srcdir)/testit.sh
--
- include_HEADERS = popt.h
-
- usrlibdir = $(libdir)
diff --git a/poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch b/poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch
deleted file mode 100644
index 0bddbf8..0000000
--- a/poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Install the pkgconfig file into libdir.
-
---- popt-1.16.orig/Makefile.am	2012-04-26 13:42:54.021139813 +0800
-+++ popt-1.16/Makefile.am	2012-04-26 13:36:03.552096912 +0800
-@@ -47,7 +47,7 @@
- libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
- libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@
- 
--pkgconfigdir = $(prefix)/lib/pkgconfig
-+pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = popt.pc
- 
- if HAVE_LD_VERSION_SCRIPT
diff --git a/poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch b/poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
deleted file mode 100644
index 7d74aad..0000000
--- a/poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: pending
-
-This patch avoids this error with automake 1.12:
-
-| configure.ac:49: error: automatic de-ANSI-fication support has been removed
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/02
-
-Index: popt-1.16/configure.ac
-===================================================================
---- popt-1.16.orig/configure.ac
-+++ popt-1.16/configure.ac
-@@ -46,7 +46,6 @@ AC_GCC_TRADITIONAL
- AC_SYS_LARGEFILE
- 
- AC_ISC_POSIX
--AM_C_PROTOTYPES
- 
- AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h)
- 
diff --git a/poky/meta/recipes-support/popt/popt_1.16.bb b/poky/meta/recipes-support/popt/popt_1.16.bb
deleted file mode 100644
index 27e49c2..0000000
--- a/poky/meta/recipes-support/popt/popt_1.16.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Library for parsing command line options"
-HOMEPAGE = "http://rpm5.org/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
-PR = "r3"
-
-DEPENDS = "virtual/libiconv"
-
-SRC_URI = "http://anduin.linuxfromscratch.org/BLFS/popt/popt-${PV}.tar.gz \
-           file://pkgconfig_fix.patch \
-           file://popt_fix_for_automake-1.12.patch \
-           file://disable_tests.patch \
-          "
-
-SRC_URI[md5sum] = "3743beefa3dd6247a73f8f7a32c14c33"
-SRC_URI[sha256sum] = "e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8"
-
-inherit autotools gettext
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/popt/popt_1.18.bb b/poky/meta/recipes-support/popt/popt_1.18.bb
new file mode 100644
index 0000000..022ece5
--- /dev/null
+++ b/poky/meta/recipes-support/popt/popt_1.18.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Library for parsing command line options"
+HOMEPAGE = "https://www.rpm.org/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
+
+DEPENDS = "virtual/libiconv"
+
+SRC_URI = "http://ftp.rpm.org/popt/releases/popt-1.x/${BP}.tar.gz"
+SRC_URI[sha256sum] = "5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1"
+
+inherit autotools gettext
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/re2c/re2c/CVE-2020-11958.patch b/poky/meta/recipes-support/re2c/re2c/CVE-2020-11958.patch
deleted file mode 100644
index 43462e6..0000000
--- a/poky/meta/recipes-support/re2c/re2c/CVE-2020-11958.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c4603ba5ce229db83a2a4fb93e6d4b4e3ec3776a Mon Sep 17 00:00:00 2001
-From: Ulya Trofimovich <skvadrik@gmail.com>
-Date: Fri, 17 Apr 2020 22:47:14 +0100
-Subject: [PATCH] Fix crash in lexer refill (reported by Agostino Sarubbo).
-
-The crash happened in a rare case of a very long lexeme that doen't fit
-into the buffer, forcing buffer reallocation.
-
-The crash was caused by an incorrect calculation of the shift offset
-(it was smaller than necessary). As a consequence, the data from buffer
-start and up to the beginning of the current lexeme was not discarded
-(as it should have been), resulting in less free space for new data than
-expected.
-
-Upstream-Status: Backport [https://github.com/skvadrik/re2c/commit/c4603ba5ce229db83a2a4fb93e6d4b4e3ec3776a]
-CVE: CVE-2020-11958
-Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
----
- src/parse/scanner.cc | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/parse/scanner.cc b/src/parse/scanner.cc
-index 1d6e9efa..bd651314 100644
---- a/src/parse/scanner.cc
-+++ b/src/parse/scanner.cc
-@@ -155,13 +155,14 @@ bool Scanner::fill(size_t need)
-         if (!buf) fatal("out of memory");
- 
-         memmove(buf, tok, copy);
--        shift_ptrs_and_fpos(buf - bot);
-+        shift_ptrs_and_fpos(buf - tok);
-         delete [] bot;
-         bot = buf;
- 
-         free = BSIZE - copy;
-     }
- 
-+    DASSERT(lim + free <= bot + BSIZE);
-     if (!read(free)) {
-         eof = lim;
-         memset(lim, 0, YYMAXFILL);
diff --git a/poky/meta/recipes-support/re2c/re2c_1.3.bb b/poky/meta/recipes-support/re2c/re2c_2.0.bb
similarity index 74%
rename from poky/meta/recipes-support/re2c/re2c_1.3.bb
rename to poky/meta/recipes-support/re2c/re2c_2.0.bb
index e9053ac..b73b024 100644
--- a/poky/meta/recipes-support/re2c/re2c_1.3.bb
+++ b/poky/meta/recipes-support/re2c/re2c_2.0.bb
@@ -5,10 +5,8 @@
 LICENSE = "PD"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=64eca4d8a3b67f9dc7656094731a2c8d"
 
-SRC_URI = "https://github.com/skvadrik/re2c/releases/download/${PV}/${BPN}-${PV}.tar.xz \
-           file://CVE-2020-11958.patch \
-"
-SRC_URI[sha256sum] = "f37f25ff760e90088e7d03d1232002c2c2672646d5844fdf8e0d51a5cd75a503"
+SRC_URI = "https://github.com/skvadrik/re2c/releases/download/${PV}/${BPN}-${PV}.tar.xz"
+SRC_URI[sha256sum] = "89a9d7ee14be10e3779ea7b2c8ea4a964afce6e76b8dbcd5479940681db46d20"
 UPSTREAM_CHECK_URI = "https://github.com/skvadrik/re2c/releases"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/sqlite/sqlite3_3.32.3.bb b/poky/meta/recipes-support/sqlite/sqlite3_3.33.0.bb
similarity index 68%
rename from poky/meta/recipes-support/sqlite/sqlite3_3.32.3.bb
rename to poky/meta/recipes-support/sqlite/sqlite3_3.33.0.bb
index 1d4e8d4..611a1bd 100644
--- a/poky/meta/recipes-support/sqlite/sqlite3_3.32.3.bb
+++ b/poky/meta/recipes-support/sqlite/sqlite3_3.33.0.bb
@@ -4,8 +4,7 @@
 LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
 
 SRC_URI = "http://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_PV}.tar.gz"
-SRC_URI[md5sum] = "2e3911a3c15e85c2f2d040154bbe5ce3"
-SRC_URI[sha256sum] = "a31507123c1c2e3a210afec19525fd7b5bb1e19a6a34ae5b998fbd7302568b66"
+SRC_URI[sha256sum] = "106a2c48c7f75a298a7557bcc0d5f4f454e5b43811cc738b7ca294d6956bbb15"
 
 # -19242 is only an issue in specific development branch commits
 CVE_CHECK_WHITELIST += "CVE-2019-19242"
diff --git a/poky/scripts/lib/checklayer/__init__.py b/poky/scripts/lib/checklayer/__init__.py
index f625d59..fe54560 100644
--- a/poky/scripts/lib/checklayer/__init__.py
+++ b/poky/scripts/lib/checklayer/__init__.py
@@ -229,6 +229,20 @@
                 f.write("\nBBLAYERS += \"%s\"\n" % path)
     return True
 
+def check_bblayers(bblayersconf, layer_path, logger):
+    '''
+    If layer_path found in BBLAYERS return True
+    '''
+    import bb.parse
+    import bb.data
+
+    ldata = bb.parse.handle(bblayersconf, bb.data.init(), include=True)
+    for bblayer in (ldata.getVar('BBLAYERS') or '').split():
+        if os.path.normpath(bblayer) == os.path.normpath(layer_path):
+            return True
+
+    return False
+
 def check_command(error_msg, cmd, cwd=None):
     '''
     Run a command under a shell, capture stdout and stderr in a single stream,
diff --git a/poky/scripts/lib/wic/plugins/source/bootimg-efi.py b/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
index 2cfdc10..14c1723 100644
--- a/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -13,6 +13,9 @@
 import logging
 import os
 import shutil
+import re
+
+from glob import glob
 
 from wic import WicError
 from wic.engine import get_custom_config
@@ -209,6 +212,57 @@
         except KeyError:
             raise WicError("bootimg-efi requires a loader, none specified")
 
+        if get_bitbake_var("IMAGE_BOOT_FILES") is None:
+            logger.debug('No boot files defined in IMAGE_BOOT_FILES')
+        else:
+            boot_files = None
+            for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)):
+                if fmt:
+                    var = fmt % id
+                else:
+                    var = ""
+
+                boot_files = get_bitbake_var("IMAGE_BOOT_FILES" + var)
+                if boot_files:
+                    break
+
+            logger.debug('Boot files: %s', boot_files)
+
+            # list of tuples (src_name, dst_name)
+            deploy_files = []
+            for src_entry in re.findall(r'[\w;\-\./\*]+', boot_files):
+                if ';' in src_entry:
+                    dst_entry = tuple(src_entry.split(';'))
+                    if not dst_entry[0] or not dst_entry[1]:
+                        raise WicError('Malformed boot file entry: %s' % src_entry)
+                else:
+                    dst_entry = (src_entry, src_entry)
+
+                logger.debug('Destination entry: %r', dst_entry)
+                deploy_files.append(dst_entry)
+
+            cls.install_task = [];
+            for deploy_entry in deploy_files:
+                src, dst = deploy_entry
+                if '*' in src:
+                    # by default install files under their basename
+                    entry_name_fn = os.path.basename
+                    if dst != src:
+                        # unless a target name was given, then treat name
+                        # as a directory and append a basename
+                        entry_name_fn = lambda name: \
+                                        os.path.join(dst,
+                                                     os.path.basename(name))
+
+                    srcs = glob(os.path.join(kernel_dir, src))
+
+                    logger.debug('Globbed sources: %s', ', '.join(srcs))
+                    for entry in srcs:
+                        src = os.path.relpath(entry, kernel_dir)
+                        entry_dst_name = entry_name_fn(entry)
+                        cls.install_task.append((src, entry_dst_name))
+                else:
+                    cls.install_task.append((src, dst))
 
     @classmethod
     def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
@@ -238,6 +292,12 @@
             (staging_kernel_dir, kernel, hdddir, kernel)
         exec_cmd(install_cmd)
 
+        if get_bitbake_var("IMAGE_BOOT_FILES"):
+            for src_path, dst_path in cls.install_task:
+                install_cmd = "install -m 0644 -D %s %s" \
+                              % (os.path.join(kernel_dir, src_path),
+                                 os.path.join(hdddir, dst_path))
+                exec_cmd(install_cmd)
 
         try:
             if source_params['loader'] == 'grub-efi':
diff --git a/poky/scripts/lib/wic/plugins/source/bootimg-partition.py b/poky/scripts/lib/wic/plugins/source/bootimg-partition.py
index 138986a..5dbe255 100644
--- a/poky/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/poky/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -141,7 +141,7 @@
                     break
 
             if not kernel_name:
-                raise WicError('No kernel file founded')
+                raise WicError('No kernel file found')
 
             # Compose the extlinux.conf
             extlinux_conf = "default Yocto\n"
diff --git a/poky/scripts/runqemu b/poky/scripts/runqemu
index f2168c1..7fb5f7d 100755
--- a/poky/scripts/runqemu
+++ b/poky/scripts/runqemu
@@ -478,7 +478,8 @@
                     self.qemu_opt_script += ' -display gtk,show-cursor=on'
             elif arg == 'gl' or arg == 'gl-es':
                 # These args are handled inside sdl or gtk blocks above
-                pass
+                if ('gtk' not in sys.argv) and ('sdl' not in sys.argv):
+                    raise RunQemuError('Option %s also needs gtk or sdl option.' % (arg))
             elif arg == 'egl-headless':
                 self.set_dri_path()
                 self.qemu_opt_script += ' -vga virtio -display egl-headless,show-cursor=on'
@@ -585,10 +586,10 @@
                 logger.error("For further help see:")
                 raise RunQemuError(yocto_paravirt_kvm_wiki)
 
-        if not os.access(dev_kvm, os.W_OK|os.R_OK):
+            if not os.access(dev_vhost, os.W_OK|os.R_OK):
                 logger.error("You have no read or write permission on /dev/vhost-net.")
                 logger.error("Please change the ownership of this file as described at:")
-                raise RunQemuError(yocto_kvm_wiki)
+                raise RunQemuError(yocto_paravirt_kvm_wiki)
 
     def check_fstype(self):
         """Check and setup FSTYPE"""
diff --git a/poky/scripts/yocto-check-layer b/poky/scripts/yocto-check-layer
index ca6c79b..b7c83c8 100755
--- a/poky/scripts/yocto-check-layer
+++ b/poky/scripts/yocto-check-layer
@@ -24,7 +24,7 @@
 scriptpath.add_oe_lib_path()
 scriptpath.add_bitbake_lib_path()
 
-from checklayer import LayerType, detect_layers, add_layers, add_layer_dependencies, get_signatures
+from checklayer import LayerType, detect_layers, add_layers, add_layer_dependencies, get_signatures, check_bblayers
 from oeqa.utils.commands import get_bb_vars
 
 PROGNAME = 'yocto-check-layer'
@@ -138,6 +138,13 @@
                 layer['type'] == LayerType.ERROR_BSP_DISTRO:
             continue
 
+        if check_bblayers(bblayersconf, layer['path'], logger):
+            logger.info("%s already in %s. To capture initial signatures, layer under test should not present "
+               "in BBLAYERS. Please remove %s from BBLAYERS." % (layer['name'], bblayersconf, layer['name']))
+            results[layer['name']] = None
+            results_status[layer['name']] = 'SKIPPED (Layer under test should not present in BBLAYERS)'
+            continue
+
         logger.info('')
         logger.info("Setting up for %s(%s), %s" % (layer['name'], layer['type'],
             layer['path']))