scripts/xldd: fix typoes

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: fix version string

The version string was hard-coded.
Now, the version string follows the crosstool-NG version.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: fix space-damage

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: stop at first match

Break the library search loop as soon as a match is found.
Previously, if a library was present in different places,
then the last occurence would be returned, when the first
one would have been used at runtime.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: report appropriate load address for 32- or 64-bit

For 32-bit target systems, report 4-byte (8-xdigit) wide adresses,
and for 64-bit, report 8-byte (16-xdigit) wide adresses.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: better find sysroot with old gcc

Only starting with 4.4 does gcc have a -print-sysroot option.
For 4.3 or before, we have to play some tricks:
- ask gcc where libc.so is,
  (we expect it in ${sysroot}/usr/lib/libc.so)
- trim /usr/lib/libc.so from the result

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: parse /etc/ld.so.conf

Scan /etc/ld.so.conf for paths to search for libraries.
Also follow include directives in there.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
script/xldd: add debug traces

Add debug traces to help understand how xldd finds the
libraries, what directories it scans, in which order...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: avoid reporting duplicates

Once a NEEDED dependency has been solved, do not report it
if other dependencies depend on it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: better handle the origin of the library

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/xldd: try to handle RPATH tags

The RPATH tags allow a binary to tell the dynamic linker what
directories to search for libraries. The so-added paths are
searched into before any other paths.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
complibs/CLooG: only install the libraries

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
kernel/linux: add latest versions

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
cc/gcc: 4.4.5, add arm-softfloat-libgcc patch from buildroot

Reported-by: M P <buserror@gmail.com>
[Yann E. MORIN: add the patch to other 4.4.x]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
cc/gcc: fix pr42289: incorrect alignment on OABI

Fix building libffi on OABI.
Although it has been marked as 4.3-only, it is stil not fixed,
and also applies to 4.4.x

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

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts: remove aria2c as downloader, retain only curl and wget

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts: call curl and wget in sequence

It can happen, in some circumpstances, than one can succeed where
the other would fail. Those cases involves convoluted enterprise
networks with proxies playing tricks.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts: recover on partially downloaded files

Download to an intermediate temp file, and rename it to its final
name only of download succeeds.

This catches both a failed download, and also the case where the user
interrupts the download. Thus, the a partial download gets discarded,
and we no longer try to extract a partial tarball, which we would
previously have done.

Suggested by Thomas PETAZZONI.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
complibs/cloog: fix linking with libstdc++

This rules out 0.15.5 and previous versions, that did not
have this option, so remove them from the list. Anyway,
they were marked 'OBSOLETE', so it's not a big loss...

[Yann E. MORIN: remove obsolete versions]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
config: add option to build statically linked toolchain

Add a config option to statically build the host tools.
Impacted tools can use that option to decide wether to build
statically or shared.

For now, no tool uses it, but they'll be added one at a time
in the next commits.

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>