libc: rename the threads options

Use a more coherent naming for the options. This will help commonalise
the native case (e.g. NPTL on Linux, win32 on Windows), and add alternate
implementations (e.g. musl.)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Bryan Hundven <bryanhundven@gmail.com>
libc: libces are responsible for naming their threads implementation

This will help add new implementations, such as the one in musl.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Bryan Hundven <bryanhundven@gmail.com>
libc/mingw: threads are the native ones

There is no need to differentiate the win32 threads case, since we
can cosider them to be the native implementation on Windows.

Besides, with the previous patch, nothing uses it anymore.

So, just remove it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc Bryan Hundven <bryanhundven@gmail.com>
libc/musl: add musl-libc support

This patch adds initial support for musl-libc.

Musl-libc versions currently supported:
* 1.0.3 (Stable)
* 1.1.3 (Previous Mainline)
* 1.1.4 (Mainline)

Futher improvements are needed.
* gcc-4.9.x has issues (Might be fixed in musl-1.1.4).
* Multilib support is needed.
* Checks to make sure paths are correct.
* Move to 2-step gcc build. 3-step build is not necessary.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: removed the gcc musl patch, to be added later;
 removed dead code do_get_arch()]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
debug/gdb: add gdb 7.8

Add updated gdb 7.8 to the available versions of gdb.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
debug/gdb: add GDB_HAS_PYTHON

Add a Kconfig boolean to enable python, only if GDB_7_0_or_later.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
scripts/functions: use ${sed} instead of 'sed'

Helps build on BSD-like systems.

Reported-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Signed-off-by: "Fabian Freyer" <fabian.freyer@physik.tu-berlin.de>
[yann.morin.1998@free.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
configure: add option to specify grep

Allows users for which GNU grep is not the default grep (e.g. BSD
folks), or is in a weird location.

Reported-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Signed-off-by: "Fabian Freyer" <fabian.freyer@physik.tu-berlin.de>
[yann.morin.1998@free.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
scripts/crosstool-NG: use ${grep} instead of 'grep'

Helps building on BSD-like systems.

Reported-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Signed-off-by: "Fabian Freyer" <fabian.freyer@physik.tu-berlin.de>
[yann.morin.1998@free.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Added documentation for --with-grep

Signed-off-by: "Fabian Freyer" <fabian.freyer@physik.tu-berlin.de>
libc/mingw: does not require gcc core pass-1

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
cc/gcc: add option to enable/disable libsanitizer

libsaniotizer requires a few headers that are not in uClibc, for
example. Also, it is only available for native threads (NPTL under
glibc.) Finally, it is only available starting with gcc-4.8.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
libc/musl: Remove 1.0.3 and 1.1.3. Add 1.0.4.

This change removes 1.0.3 and 1.1.3 and linker regession patches for
those versions.

We add 1.0.4, and a patch needed for gcc-4.9.x which defines
`max_align_t'.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
patches/experimental/gcc: Add patches for musl-lib support

The following are experimental patches for gcc that add support for
musl-libc.

I haven't been able to test every combination, but please test and let
me know on the mailing-list or on irc your results!

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: ditch the gcc-4.7 patches]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
libc/glibc: add patch to avoid caddr_t redefinition

Forward-ported from glibc-2.13.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
scripts: properly restore stdout/err/in at the end

Byt the end of the main script, the log file is being moved and
compressed, and the final destination might become read-only at any
time, so we consign stdout/err to oblivion.

This is incorrect, as some actions after may still fail (out of space,
for example).

So, properly restore stdout/err, but also stdin (useless, but harmless)
instead, so the user has a chance to see the error, especially since it
is not logged into the log file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
samples: update the alpha samples

Use latest versions where possible, don't use experimental versions.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
samples: update x86-64 samples

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
samples: update sh4 sample

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
samples: update the s390 samples

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>