package.bbclass: move reading shlibs providers to separate function

* prepare for reading shlibs providers only from dependency tree of
  current recipe

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: show warning when package is trying to provide already provided shlib

* move read_shlib_providers before registering package as provider
  and don't change provider if it already exists, show warning instead

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: add SHLIBSSEARCHDIRS to define where to search for shlib providers

* when package contains some files matching "^.*\.so", but in directory
  not default linker search paths (e.g. /opt/package/bundled-lib/libfoo.so)
  don't register it as libfoo provider, because it's possible that there
  is different package providing libfoo.so in ${libdir} and that would
  be better shlib provider for other packages to depend on
* recipes providing libs intentionally in some other directory can
  define own SHLIBSSEARCHDIRS value

[YOCTO #4628]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: Don't search for prividers of PRIVATE_LIBS

* split PRIVATE_LIBS and don't use find(), so that libfoo cannot be
  found in PRIVATE_LIBS = "libfoobar"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
package.bbclass: Show which files require given dependency in debug output

* when log.do_package shows some unexpected dependency, people usually
  need to grep package directory to find which binary was creating that
  dependency, show it directly in the debug output

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
qemux86: Add identical qemux86copy variant for tests

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
allarch: Always inhibit default dependencies and set empty TARGET_PREFIX

* typical case where we inherit allarch and override PACKAGE_ARCH
  are packagegroup recipes, but those need default dependencies
  inhibited even when they are MACHINE_ARCH or TUNE_PKGARCH.
  I don't know about any recipe which inherits allarch and needs
  default dependencies.
* set empty TARGET_PREFIX
  This has a bit weird reason caused by unsupported setup where
  external-toolchain is used in some DISTRO only for some MACHINEs
  and internal is used for other MACHINEs.
  Because external-toolchain usually comes with different TARGET_PREFIX
  it was causing allarch recipes to have different signatures even
  when they don't use toolchain at all.
  Empty TARGET_PREFIX also helps to find allarch recipes which still
  have default dependency on e.g. virtual/${TARGET_PREFIX}gcc.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
xuser-account: Drop allarch inherit

* has build time dependency on TUNE_PKGARCH recipes:
  bitbake-diffsigs sstate-diff/1383303628/*/all*/xuser-account/*do_configure*
  Hash for dependent task base-passwd_3.5.26.bb.do_populate_sysroot changed from 09b3168865b6212269d4e5512a963b9e to ffa22dc51e42a164a7392ec719151629
  Hash for dependent task shadow_4.1.4.3.bb.do_populate_sysroot changed from f426f0c93b2d341050b2547804645314 to 89bdbb151f8c200553c9a74e89504457
  Hash for dependent task shadow-sysroot_4.1.4.3.bb.do_populate_sysroot changed from c42103fe54ac5109eab8de4fb0eb9a75 to f83f628e766fdbd49eb2a44cf6134339

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
linux-firmware: Drop allarch

* the recipe itself is allarch, but update-alternatives adds dependency on
  virtual/${MLPREFIX}update-alternatives which can be TUNE_PKGARCH opkg
  causing linux-firmware signature to be different for different TUNE_PKGARCHs
  Hash for dependent task opkg_svn.bb.do_populate_sysroot changed from 8d215059308161841a84542dd1dcbf3a to 80b280c741c392cf5b30dd67b61dd56e

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
ppp-dialin: Drop allarch

* depends on some TUNE_PKGARCH recipes:
  base-passwd, ppp_, shadow-sysroot, shadow

  Hash for dependent task base-passwd_3.5.26.bb.do_populate_sysroot changed from ff08f0198f5424a21ccb61957325ffdf to d9d962e2d8c0d591b916ed68aa826efe
  Hash for dependent task ppp_2.4.5.bb.do_populate_sysroot changed from 515251fb9d5196733f9b6ca0f6cc041b to 5cfb0b7b71f4440c3147da52c22234cc
  Hash for dependent task shadow-sysroot_4.1.4.3.bb.do_populate_sysroot changed from 3e5bddc578887636c1809e4cdf28c1c2 to 8f03231a1d4bb1aea6c4adce1febc1b4
  Hash for dependent task shadow_4.1.4.3.bb.do_populate_sysroot changed from 518f7edcba3545e5c60c3a13cef23169 to 7dbf1646de02a117bf0d573276b878c0

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
initramfs-framework: Drop allarch

* depends on TUNE_PKGARCH busybox and udev
  Hash for dependent task busybox_1.20.2.bb.do_packagedata changed from b814437371de0c3253bdd3610c051f30 to 7dd9c851d5f7c675dd65cc7872c30743
  Hash for dependent task udev_182.bb.do_packagedata changed from 1034300ce0e27d444e0e7d9e2a239605 to c13031b26b2a86dcf9bcce33b7823477

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
resolvconf: Drop allarch

* has runtime dependency on TUNE_PKGARCH bash
  Hash for dependent task bash_4.2.bb.do_packagedata changed from d6eafb155c37bc2da7327492afa449fb to 0ae080aaa92025af690cf16ef0cd2b7e

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
WIP: Add KERNEL_EXTRA_ARGS?
icecc: Don't replace non-empty PARALLEL_MAKE with empty ICECC_PARALLEL_MAKE

* it's needed for use-case like this:
  # Inherit icecc here, so that all builders have the same sstate signatures
  INHERIT_DISTRO += "icecc"
  # and then disable its function by default (so that people still need to explicity
  # enable it in local.conf if they have configured icecc and want to use it.
  # You need to set _empty_ value in local.conf to enable icecc function:
  # ICECC_DISABLED = ""
  ICECC_DISABLED ??= "1"
* so default ICECC_PARALLEL_MAKE is still empty, but we want build
  to respect our PARALLEL_MAKE, unfortunately we cannot do something
  like ICECC_PARALLEL_MAKE ??= "${PARALLEL_MAKE}", because that would
  cause PARALLEL_MAKE to reference itself.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
icecc.bbclass: use bb.utils.which also for 'as'

* it was introduced in
  commit 3a842ec52e7d010767b13bdcb5629ac07b3ee9e7
  Author: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
  Date:   Fri Sep 16 10:55:16 2011 +0400
  Subject: icecc.bbclass: replace with updated version

  without any explanation in which case
    ${ICECC_CC} -print-prog-name=as
  is returning as in current working directory, but will keep old
  behavior just in case

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
icecc.bbclass: Fix allarch and native recipes having different signatures

* for different MACHINES
* is there more elegant way to have "overridable" function so that
  signature handler properly uses only the branch without
  STAGING_BINDIR_TOOLCHAIN?

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>