kernel: extract functions for kernel modules to separate bbclass

* this way we can reuse the same functionality also for external modules
  including module_autoload_foo and module_conf_foo functionality
* MODULE_PACKAGES variable was removed (splited modules are now returned
  by do_split_packages
* KERNEL_MODULES_META_PACKAGE is used to append all splitted packages
  to RDEPENDS. In kernel.bbclass it's old "kernel-modules" in
  module.bbclass it defaults to ${PN} for upgrade path from
  single PN with all modules to PN depending on all new kernel-module-*

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_rpm.bbclass: Optimise per file dependency handling

Currently the process for injecting the per file rpm dependencies into
rpmbuild is painfully slow. Its done through the repeated execution of
a script which has to return the correct value in each case. This continual
execution means the CPU usage of rpmbuild is low.

This patch allows the option of collapsing the per file dependencies to
a per package basis and injecting them through the .spec file. This removes
the execution overhead and allows rpmbuild to run at 100% of cpu.

Ultimately it would be nice to inject the per file dependencies through
the .spec file however that is not currently possible.

Since few people use the per file dependency information, this patch
goes for the faster approach. It can be enabled if anyone needs it although
I'd mention that its being used to us as this code may well go away in
the future if nobody complains.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
iproute2: Fix build failure on ppc

Latest version bump started failing for ppc32
attached patch is a backport from 3.9-rc1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc-common.inc: handle case where tune is not defined

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libpfm4_4.3.0.bb: use compatible host to limit arches

This is only test with powerpc64 currently, even though
it should work on other arches such as x86 and sparc. When
thos are testing and working this COMPATIBLE_HOST should
be updated

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oprofile: update patch for powerpc64

This is a more appropriate follow up patch from upstream. Also,
only powerpc64 requires libpfm4 currently for this specific
version of oprofile (x86, sparc can make use of libpfm but
don't make use of it here)

Additionally, this patch from upstream requires some more
patches to be pulled into oprofile

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel-arch.bbclass: don't pass extra args to KERNEL_{CC, LD, AR}

Commit a3ca06c3b45c791dd38dbf154ad0fc62b4063475 added extra args to
KERNEL_CC, these revert that bit while maintaining machine additions
in TARGET_??_KERNEL_ARCH

Producing incorrect instructions and generating the following errors:

   CC      arch/powerpc/kernel/init_task.o
| {standard input}: Assembler messages:
| {standard input}:384: Error: junk at end of line: `1'
| {standard input}:949: Error: junk at end of line: `1'
| {standard input}:1428: Error: junk at end of line: `1'
| {standard input}:1526: Error: junk at end of line: `1'
| {standard input}:1626: Error: junk at end of line: `1'
| {standard input}:1685: Error: junk at end of line: `1'
| {standard input}:1973: Error: junk at end of line: `1'
| {standard input}:2001: Error: junk at end of line: `1'
| {standard input}:2100: Error: junk at end of line: `1'
| {standard input}:2168: Error: junk at end of line: `1'
| {standard input}:2520: Error: junk at end of line: `1'
|   CC      arch/powerpc/lib/locks.o

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
recipes: Fix ALLOW_EMPTY with no package specified

There are various usages of ALLOW_EMPTY with no packages specified. This
is not recommended syntax, nor is it likely to be supported in the future.
This patch improves the references in OE-Core, either removing them if they're
pointless (e.g. when PACKAGES="") or specifying which package it applies to.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libgcc: Mark libgcc_s as executable to ensure its stripped

libgcc_s is not marked as executable and hence it doesn't get stripped. This
means its about 1MB larger than it needs to be. There is no good reason it
shouldn't get stripped so ensure it does and mark as executable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
buildhistory: Allow the version backwards check to be disabled

When the PR service is not enabled, the versions can go backwards and there
are cases we don't want to know about this. This patch adds a variable
allowing these checks to be turned off whilst still using buildhistory.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
insane.bbclass: Add ALLOW_EMPTY to list of package specific variables

ALLOW_EMPTY should have a package specified so extend sanity checks to
cover it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
documentation: Fix P entry

P is PN-PV, not PN-PF.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
apr: add libtool to SSTATE_SCAN_FILES

The hardcoded paths in libtool will cause apache2 compile fail at
link stage when the package apr is installed from sstate cache, so
add libtool to SSTATE_SCAN_FILES.

[ CQID: WIND00405372 ]

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>