linux-yocto/3.8: Makefile: add -grecord-gcc-switches if using -mfentry

    Commit a2546fae [ftrace: Add -mfentry to Makefile on function tracer]
    adds support for using -mfentry when possible, whenever the ftrace
    CONFIG_FUNCTION_TRACER option is enabled.

    This unfortunately causes bogus dwarf debuginfo to be generated:

      gcc Bug 54793 - the location of a formal_parameter is not started from a
                      function entry with -mfentry

      http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54793

    This can be fixed by applying the gcc patch above, which will be
    present in gcc-4.8, but in the meantime, the problem is currently
    being worked around in different ways by various tools.  One of those
    tools that we support in Yocto, Systemtap, requires the DW_AT_producer
    string contain -mfentry, which means that it's assuming
    record-gcc-switches is also used:

      SystemTap Bug 15123 - workaround for bad debuginfo for -mfentry
      http://sourceware.org/bugzilla/show_bug.cgi?id=15123

    The lack of -grecord-gcc-switches and therefore a missing -mfentry
    string in Yocto leads to the following Yocto bug:

      Bug 4099 - Crosstap script check fails
      https://bugzilla.yoctoproject.org/show_bug.cgi?id=4099

    Which is what this patch intends to fix.

    It only affects architectures that HAVE_FENTRY when
    CONFIG_FUNCTION_TRACER is turned on and in any case is just adding to
    the debuginfo, so there doesn't seem to be much risk to adding it.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
separatebuilddir.inc: disable libmusicbrainz

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: use AC_CHECK_TOOL instead of AC_PATH_TOOL when checking objcopy, strings, gperf

* with external toolchain I have different HOST_PREFIX and HOST_SYS
  AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
  then it tries objcopy without prefix which is found on host, but
  that objcopy does not work for arm libs
* with internal toolchain gperf is not prefixed with HOST_PREFIX, but
  fallback to "gperf" only finds the one in native sysroot first
* based on http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037985.html

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: Fix shell variable assignment spacing

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
consolekit: Fix ${S} != ${B} issues with pam enabled

When pam is enabled an extra plugin is build and it references an incorrect directory
when separate build directories are used. This patch corrects the issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libpam: backport patches from upstream

Backport patches from linux-pam git repo to fix test case
tst-pam_pwhistory1 failure.

[YOCTO #4107]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
augeas: Fix missing files with separate build directory

${datadir} was empty when building ${B} != ${S}, this patch addresses that
problem and means the -lenses package is no longer empty.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
busybox: fix mount issue

When the mount command is not given the filesystem type to mount, then
it will try all the known filesystems. However, when a filesystem is not
supported by the kernel, the mount function call will return ENODEV.

The following patch, ecd90bc6aa63da2aef2513ac090d4b426b2b719c,
introduced a problem because it bailed out on ENODEV too. Instead it should
have only bailed out on ENOMEDIUM.

[YOCTO #4308]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Fix populate_packages for glob expansion issues

If we put a valid glob like "*/foo/*" into FILES, populate_packages
breaks with a "file exists" message. This is because the glob expansion
does not have "./" prefix however there may already be an entry in
the seen list which does have such a prefix. The easiest/simplest fix
right now is to add the prefix if it doesn't exist which only happens
for certain globs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pcmciautils: Use pkgconfig to set udev variables correctly

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bluez4: Set udev variables using pkg-config

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pulseaudio: Set udev variables using pkg-config

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
udev: Effectively revert the move to /sbin

This effectively reverts the changes made in b49ddeb11c0319b7ece278fd7cef6b0223114ca9
to move udev's libexecdir to sbin. The changes caused too many issues in
other places and were not well enough tested this close to a release.

Rather than use base_libdir, the nonarch version is used to try and give some
chance of multilib not being totally broken in the release.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
packagegroup: Add init-manager sanity check

Currently, you can set VIRTUAL-RUNTIME_init_manager to an init system that
isn't in DISTRO_FEATURES. This leads to head scratching over unbootable images.

This adds a sanity check which ensures more valid systems are built.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
alsa-utils: Use pkg-config instead of hardcoded udev paths

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
udev: remove explicit path to udevadm

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: fix out of tree builds

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
seperatebuilddir: add systemd

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: Effectively revert the move to /sbin

This effectively reverts the move systemd's libexecdir to /sbin.  This caused
too many issues in other places and was not well enough tested this close to
release.

Rather than use base_libdir, the nonarch version is used to try and give some
chance of multilib not being totally broken in the release.  Also some variables
are used that mirror the systemd build system to reduce the risk of using
variables that "work" in the general case but will break with multilib.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
udev: explicitly package nonarch_base_libdir

When using multilib this doesn't get caught by the default FILES_${PN}, so add
it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>