toolchain: generate a gdbinit file

This commit slightly improves the external toolchain backend, and the
gdb build logic to create a file named
$(STAGING_DIR)/usr/share/buildroot/gdbinit which can be used as a
gdbinit file using gdb -x option. This allows gdb to automatically use
the proper sysroot to find libraries.

The initial insight for this patch comes from the report of Oded
Hanson <OHanson@xsightsys.com>, who found an issue with the Eclipse
Buildroot plugin, which was setting a solib-path in gdb, but not a
sysroot. Setting a solib-path was enough to find shared libraries, but
not the dynamic linker. And since Eclipse doesn't allow to set the
sysroot in any other way than giving a gdbinit file, it makes sense to
have Buildroot generate a gdbinit file (which can be used in other
situations than Eclipse).

To achieve this, this commit introduces a gen_gdbinit_file helper in
toolchain/helpers.mk, and uses it for the internal toolchain and
external toolchain backends.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[ThomasDS: minor updates in commit message]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
docs/manual: document how to use the cross debugger

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[ThomasDS: some rewording, add <buildroot> path prefix in example]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
lcdproc: bump version to 0.5.7

Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
perf: Fix compilation without libelf for post-3.10 kernels

kernel commit cf4cca10 (perf tools: Move libelf check config into config/Makefile)
removes the NO_LIBELF check from the top-level Makefile

for newer kernels, if config/Makefile exists, we can assume that NO_LIBELF is
also there

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
github packages: use tarball download via github helper iso git clone

Tarball download from github is preferred, because:
- download size is smaller
- git clone may be blocked in some corporate environments

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
musl: new package

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc: add musl support patch for gcc 4.7.3

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc: add musl support patch to gcc 4.8.2

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc: add musl support patch to gcc 4.9.0

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc: musl patches only available for gcc 4.7+

For the moment, the musl support is not in mainline gcc, so it
requires a few patches. We have integrated those patches only for gcc
4.7 and gcc 4.8 at the moment, so only allow those gcc versions when
the musl library is selected.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package: add support for musl in tuple

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
busybox: allow build with musl

The musl C library does not yet implemented the getpwent_r() function,
needed by the Busybox password code when CONFIG_USE_BB_PWD_GRP is
disabled. So we enable it when the musl C library is used.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
toolchain-buildroot: add support for building musl toolchains

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
gcc: disable libsanitizer for musl

A build issue affects libsanitizer on musl toolchains, even with
previous versions of gcc such as 4.8.x, so we disable building
libsanitizer when working with musl.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
toolchain-external: add publicly available musl toolchains

This commit adds ten toolchains based on the musl C library that are
publicly available from the musl-cross project.

[Peter: fix ppc prefix, only for classic ABI]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
toolchain/buildroot: default to uClibc

Otherwise we're getting musl for everything except those who have a
default (mips64*).

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
toolchain/gcc: musl is not available for gcc 4.3.x either

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
nftables: disable dblatex check

On the systems with old dblatex (for example 3.0) the build step will
fail, because dblatex doesn't support '-q' parameter. This patch
overrides dblatex check.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
clapack: Disable for MIPS platforms

Disable this package for MIPS because it needs IRIX headers and
libraries.

Fixes:
   http://autobuild.buildroot.net/results/370/370f964441722675820c644403dde7fbc683a315/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Markos Chandras <Markos.Chandras@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
linux-headers: bump 3.{4,10,14}.x series

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>