insane: Add build depends check

Now that we can get the task dependency tree from bitbake, we can start
to use this to strengthen our QA checks. If a dependency is added on
something which isn't in our dependency tree, that is obviously a bad
thing for example.

This patch therefore checks the RDEPENDS against the list of tasks and
ensures we do have a dependency present, if not a QA warning or error
can be issued through the usual mechanism.

The implementation is complicated by needing to resolve the RDEPENDS to
a PN using pkgdata. Its possible that can be an RPROVIDES of another
package so we need to check that too if it isn't a direct RDEPENDS.

To allow this test to work, we need to extend the do_package_qa
dependencies to include all RDEPENDS. In practise the do_package_write_*
tasks already do this so there should be no new circular dependencies or
any issues like that.

For now the issues are warnings as there are issues this finds in
OE-Core which need to be resolved and certainly will be in other layers
too. This change should simplify and assist some of Martin's dependency
scripts, the idea for this came from a discussion with Martin. It has
changed in that it doesn't just cover shlibs dependencies but checks all
dependencies.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-yocto/3.14: vexpress and MVM firmware support

Updating the 3.14 SRCREVs to integrate the following changes:

 meta: iwlwifi: Add MVM firmware support
 vexpress: Pass LOADADDR to Makefile

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
lttng-modules: update to 2.5.0

During the uprev of the yocto kernel to 3.16, lttng-modules failed to build.
To grab the latest stable content, we update to 2.5.0, and add two patches
to also make it build against 3.16+.

We also drop the older 2.3.3 lttng-modules, since it is no longer required
to support ARM builds.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
lttng-modules: re-enable ARM builds

With lttng 2.4.2 and gcc 4.9, we can now enable lttng-modules for ARM.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
linux-yocto: x86_64: expand kernel stack to 16K

Updating to backport the following mainline commit:

[
    x86_64: expand kernel stack to 16K

    commit 6538b8ea886e472f4431db8ca1d60478f838d14b upstream

    While I play inhouse patches with much memory pressure on qemu-kvm,
    3.14 kernel was randomly crashed. The reason was kernel stack overflow.

    When I investigated the problem, the callstack was a little bit deeper
    by involve with reclaim functions but not direct reclaim path.

   ....
]

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
linux-yocto-dev: bump to v3.16+

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
kernel: don't copy .so.dbg files into kernel source install

In 3.16+ x86-64 kernel builds produce a vdso64.so.dbg file. If this file is
copied into the kernel source install multiple QA failures are triggered.
Specifically, this file triggers a debug package split that results in
files installed but not shipped, and invalid .debug file errors.

By ensuring that .so files are not copied, we avoid this incorrect split
with no impact on future build phases.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
linux-yocto/3.14: libata and generic CPU modalias handling

Updating the 3.14 yocto kernel to incorporate the following fix
and feature of interest.

   5724bf17acbf x86: align x86 arch with generic CPU modalias handling
   6b9a52451a78 cpu: add generic support for CPU feature based module
  38367de316bb libata: support the ata host which implements a queue depth less than 32

[YOCTO: #6489]

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
kern-tools: adjust to full history meta-data

In order to generate and support kernel trees with full history, we need
to modify the kernel tools

 e914d570232a kgit-checkpoint: ensure that full meta-data artifacts are maintained
 192be836d318 kgit-scc: allow meta-data history to be maintained

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
libice: fix non-deterministic libbsd dependency

libice 1.0.9 added automatic detection of arc4random(), which is in libbsd on
Linux.  As this is automatic and leads to failing builds when ssstate is reused,
seed the autoconf cache as relevant to implement a PACKAGECONFIG for the
functionality.

Default to not using arc4random() as the fallback has been in use for many
years, but people interested in security may wish to turn this on to increase
the security of the X authentication cookies.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
allarch: Generate same package for MIPS and non-MIPS targets

LINKER_HASH_STYLE differs between MIPS and non-MIPS targets. This means
that LDFLAGS differs too. LDFLAGS is exported so it influences all task
hashes. Unfortunately this means that packages with architecture "all"
differ depending on whether they are built for a MIPS or non-MIPS target.
This causes a lot of unnecessary churn in the ipk/all directory when
switching build targets.

The simplest way to fix this is to ensure that LDFLAGS stays the same for
architecture "all" packages by clearing it. It shouldn't being used by such
packages anyway.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Revert "libomxil-0.9.3: Remove versioning for .so files."

The previous version of this fix was too aggressive and removed
versioning from too many of the .so files in the libomxil package.

This reverts commit 0ef3734c2f279bf463ba4d1aef5241cd4882d483.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libomxil-0.9.3: Remove versioning for bellagio .so files.

The so files installed under ${libdir}/bellagio are not versioned and should
be installed without version-based symlinks so that omxregister-bellagio
can properly find and register them.

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
populate_sdk_base: Extend TOOLCHAIN_TARGET_TASK to include multilib variants

Most people expect the toolchain from a multilib build to contain multilib
components. This change makes that happen and is easy for users to override
should they want something different.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cross-canadian: Copy target_ definitions from cross.bbclass

A while back we fixed the cross definitions to work better in multilib
configurations, apply the same fixes to cross-candian.bbclass

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe/classextend: Avoid early expansion of PR values

Variables like RDEPENDS can contain EXTENDPKGV which in turn uses AUTOPR
based values. This gets set during do_package execution so we want to
defer expansion until then. The only way we can do this in the RDEPENDS
(and friends) mapping code is to subsitute a dummy value, then change it
back again. Horrible but I can't see any other way.

This resolves multilib build failures with inconsistent PR values.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc-multilib: Simply/fix MULTILIB_OPTIONS handling

MULTILIB_OPTIONS takes the parameters which trigger a given multilib to be
selected. It supports *one* option per multilib, '/' separated. Spaces
separate options used to generate additional multilib combinations.

Adding in all of CFLAGS to this is therefore clearly a really bad idea
but how do we fix things?

The best option I've come up with so far is a list of whitelist variables
to use to trigger the multilibs. Its populated with the standard multilibs
we support, anyone setting up an advanced multilib can populate the variable
with the correct trigger parameters.

This has the advantage of simplifying the code and allowing us to remove
the code filtering blocks since there is no longer option duplication. Testing
after this change shows a much improved sdk toolchain functionality.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemu: Use PACKAGECONFIG for libusb to avoid floating dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
binutils-cross-canadian: Explicitly DEPEND on nativesdk-flex, we require it anyway

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cups: Upgrade to 1.7.4

Remove patch that was backported

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>