2011-03-22scripts/internals: fix stripping once more 1.10
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Tue, 22 Mar 2011 18:10:00 +0100] rev 2395
scripts/internals: fix stripping once more

Some scripts have 'very long lines', so the output of 'file'
will have that mentioned, such as:
POSIX shell script, ASCII text executable, with very long lines

Reported-by: Kyle Grieb <grieb.kyle@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 21025504dbc91d53eced23e337a547d5c1b94686)

2011-03-19scripts: fix stripping in finalisation step 1.10
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Sat, 19 Mar 2011 21:43:26 +0100] rev 2394
scripts: fix stripping in finalisation step

The heuristic to find shell script is deficient. Fix it.

Reported-by: Kyle Grieb <grieb.kyle@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from ade5d48d98f27ba75e28c2f559f1eec9e76e9c59)

2011-02-21libc/glibc: LinuxThreads are no longer supported in latest versions 1.10
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Mon, 21 Feb 2011 23:42:20 +0100] rev 2393
libc/glibc: LinuxThreads are no longer supported in latest versions

In fact, it is only supported in a few legacy versions.

Keep LT available for all eglibc versions, although it might need
a similar safeguard...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 0c0734c5d62ca4e09f5d54be4fe7f5c97bfc7539)

2011-02-22cc/gcc: do not build plugins for static toolchains 1.10
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Tue, 22 Feb 2011 23:27:42 +0100] rev 2392
cc/gcc: do not build plugins for static toolchains

Plugins are shared objects, and when building a toolchain statically,
the gcc build system breaks havok (although there is no hard technical
reasons it should not be possible)...

And consequently, do not enable plugin supoprt in binutils.

Reported-by: Thomas Spurden <thomas@ado.is-a-geek.net>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 9139319423fd7d71017dfc974d3a06ab79e08fb8)

2011-02-21internals: don't remove lib64 symlinks in sysroot 1.10
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Mon, 21 Feb 2011 14:39:24 +0100] rev 2391
internals: don't remove lib64 symlinks in sysroot

The lib64 symlinks are needed for the linker to find the libraries.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from b49767e8651b2252bc651f2c2e16d6e6860689f4)

2011-01-22scripts: create the makeinfo wrapper before we set PATH 1.10
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Sat, 22 Jan 2011 23:20:18 +0100] rev 2390
scripts: create the makeinfo wrapper before we set PATH

If we set PATH to the tools wrappers before we create the
makeinfo wrapper, then we may well wrap an existing wrapper
from a previous run.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 2ed26c6465689c024044f79c19ba302f749d0100)

2011-02-17internals: fix stripping host binaries 1.10
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Thu, 17 Feb 2011 21:54:07 +0100] rev 2389
internals: fix stripping host binaries

The gcc used by linaro has a version number specific to Linaro, but
identifies itself with its upstream version numbering scheme.

This breaks the strip in the finish step, because the actual gcc version
is not the same as the configured one (eg. 4.5.2 vs. linaro-4.5-2011.02-0).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from a3818c3b03e053adb8f6b7e6cf326f16a7f0c4aa)

2011-04-08functions: pretty print error messages
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Fri, 08 Apr 2011 00:08:57 +0200] rev 2388
functions: pretty print error messages

Reformat the error messages:
- strip ${CT_LIB_DIR} from scripts path names
- strip ${CT_TOP_DIR} from build.log path and docs path
- overall shorter lines
- point to the known-issues file

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

2011-04-07docs: add a status for know issues
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Thu, 07 Apr 2011 19:21:15 +0200] rev 2387
docs: add a status for know issues

As time passes, a known issues can be no longer applicable (because
the component has been fixed, or a workaround ahs been added in the
crosstool-NG scripts/config...).

Some may also be unconfirmed, with no way to easily trigger the error,
or applies to old versions of components...

Add a status for every known issues.

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

2011-04-07docs: use the error message in the known issues titles
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Thu, 07 Apr 2011 19:17:12 +0200] rev 2386
docs: use the error message in the known issues titles

This helps users find the appropriate known issue entry.

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

2011-04-07docs: add known issues summary in the ToC
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Thu, 07 Apr 2011 19:13:09 +0200] rev 2385
docs: add known issues summary in the ToC

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

2011-04-07docs: add known issue about missing forced unwind support
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Thu, 07 Apr 2011 19:02:56 +0200] rev 2384
docs: add known issue about missing forced unwind support

This has been reported many times, and has become a FAQ.

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

2011-04-08functions: fix date calculations
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Fri, 08 Apr 2011 00:02:44 +0200] rev 2383
functions: fix date calculations

In case date(1) does not support nanosecond resolution, it does
not interpret '%N', and leave it as-is. So we have to remove it.

Note that some versions replaces '%N' with 'N', so we have to
take this into account as well.

Reported-by: Kyle Grieb <grieb.kyle@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

2011-04-07functions: avoid CR when progress bar is not enabled
Javier Viguera <javier.viguera@digi.com> [Thu, 07 Apr 2011 11:52:23 +0200] rev 2382
functions: avoid CR when progress bar is not enabled

Using CT-NG with progress bar disabled, still prints CR ('\r') characters
on the output. When you capture the output to a file as part of an
automated build, it shows extra empty lines.

For example:

------------------------------------------------------------
[INFO ] Performing some trivial sanity checks

[INFO ] Build started 20110404.113619

[INFO ] Building environment variables

[EXTRA] Preparing working directories

[EXTRA] Installing user-supplied crosstool-NG configuration
------------------------------------------------------------

Signed-off-by: Javier Viguera <javier.viguera@digi.com>

2011-04-06complibs: disable building shared libs
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Wed, 06 Apr 2011 22:30:57 +0200] rev 2381
complibs: disable building shared libs

Managing the shared version of the companion libraries
has become cumbersome.

Also, it will one day be possible to use the companion
libraries from the host distribution, and then we will
be able to easily use either shared or static libs.

As a side note, while working on the canadian-rework
series, it has become quite more complex to properly
handle shared companion libraries, as they need to be
built both for the build and gost systems. That's not
easy to handle. At all.

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

2011-04-06libc/glibc: remove duplicate patch
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Wed, 06 Apr 2011 21:34:22 +0200] rev 2380
libc/glibc: remove duplicate patch

Remove a now obsolete patch for glibc-2.9 (a better one has
just been contributed by Esben).

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

2011-04-06libc/glibc: workaround for autoconf'ed define of caddr_t
Esben Haabendal <eha@dev.doredevelopment.dk> [Wed, 06 Apr 2011 20:15:23 +0200] rev 2379
libc/glibc: workaround for autoconf'ed define of caddr_t

When building canadian cross compiler, I have some trouble with
configure defining caddr_t as a macro, like:
#define caddr_t char *

When combined with the types.h where caddr_t is protected together
with daddr_t, the typedef of caddr_t breaks.

This patch works around it by protecting the caddr_t typedef
specifically.

I am uncertain as to the real cause and solution to this :-(

Signed-off-by: Esben Haabendal <eha@dev.doredevelopment.dk>

2011-04-06libc/glibc: fix cross-compiling to i686
Esben Haabendal <eha@dev.doredevelopment.dk> [Wed, 06 Apr 2011 20:15:40 +0200] rev 2378
libc/glibc: fix cross-compiling to i686

In OE-lite we use the attached patch for building i686 cross compilers.
Thanks to Khem Raj for original patch :-)

At the same time, remove the corresponding patch that was in
the ports patchset.

CC: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Esben Haabendal <eha@dev.doredevelopment.dk>
[yann.morin.1998@anciens.enib.fr: remove patch from ports]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

2011-04-05libc/glibc-common: force use of the BFD linker
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Tue, 05 Apr 2011 01:04:31 +0200] rev 2377
libc/glibc-common: force use of the BFD linker

gold can not build glibc/eglibc, force use of the BFD
linker during the toolchain build.

Reported-by: Bill Pringlemeir <bpringle@sympatico.ca>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

2011-04-05binutils/binutils: add blind option to force use of ld.bfd during build
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Tue, 05 Apr 2011 01:02:28 +0200] rev 2376
binutils/binutils: add blind option to force use of ld.bfd during build

gold is not capable of building glibc/eglibc, so we have to
force using the BFD linker, ld.bfd.

Offer a blind option that affected components can select to
force use of the BFD linker during the build.

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

2011-04-05binutils/binutils: also install the wrapper for the internall ld
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Tue, 05 Apr 2011 23:34:16 +0200] rev 2375
binutils/binutils: also install the wrapper for the internall ld

ld is also installed in PREFIX/TUPLE/bin, so we need to wrap that
as well.

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

2011-04-04binutils/binutils: warn if only gold is selected
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Mon, 04 Apr 2011 01:00:17 +0200] rev 2374
binutils/binutils: warn if only gold is selected

gold is not capable of building glibc/eglibc. See this thread:
http://sourceware.org/ml/crossgcc/2011-04/msg00010.html

Reported-by: Bill Pringlemeir <bpringle@sympatico.ca>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

2011-04-03binutils/binutils: always set name of the default linker
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Sun, 03 Apr 2011 23:44:57 +0200] rev 2373
binutils/binutils: always set name of the default linker

Always export the name of the default linker, even if only
one of them is selected.

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

2011-04-05binutils/binutils: hide gold option if no support for current architecture
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Tue, 05 Apr 2011 01:17:58 +0200] rev 2372
binutils/binutils: hide gold option if no support for current architecture

The gold linker does currently support only a limited set of architectures:
- x86 (32- and 64-bit)
- ARM

Hide the gold option for other architectures.

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

2011-04-03arch/sparc: add absic support
Sam Ravnborg <sam@ravnborg.org> [Sun, 03 Apr 2011 18:22:00 +0200] rev 2371
arch/sparc: add absic support

Add support for building SPARC targeted toolchain.
With this patch I have built a working sparc V8 (32 toolchain).

Testing shows that not all gcc versions works well:
4.4.1 OK (kernel builds and the final kernel can boot)
4.4.2 Not tested
4.4.3 Not tested
4.4.4 BAD (Kernel can build but fails during boot)
4.4.5 BAD (Kernel can build but fails during boot)
4.5.1 BAD (Build fails with a spill related ICE - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35664)
4.5.2 OK (kernel builds and boots)

I have successfully been using the 4.5.2 version for a few months.

This patch does not add support for the LEON variant.
That may come later.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
[yann.morin.1998@anciens.enib.fr: for 32-bit, default CT_TARGET_ARCH is OK]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

2011-03-28kernel/linux: update to latest versions
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Mon, 28 Mar 2011 22:45:49 +0200] rev 2370
kernel/linux: update to latest versions

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

2011-03-28samples: add first sample to build with gcc-4.6.0
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Mon, 28 Mar 2011 00:58:33 +0200] rev 2369
samples: add first sample to build with gcc-4.6.0

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

2011-03-28cc/gcc: fix linking with static PPL 0.11+
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Mon, 28 Mar 2011 01:07:31 +0200] rev 2368
cc/gcc: fix linking with static PPL 0.11+

PPL 0.11+ installs three libs: lippl, libppl_c and libpwl.
libppl_c has a dependency on libpwl (at least for watchdog stuff).

While gcc correctly links with libppl and libppl_c, it does not
pull libpwl in. In case of shared libs, this is not a problem, as
libppl_c has a NEEDED dependency on libpwl. But for static libs,
that does not work. Although libppl_c.la exists and has a correct
dependency on lipwl, somehow gcc misses it. So we have to force
pulling libpwl when needed.

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

2011-03-26cc/gcc: hide Linaro options by default
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Sat, 26 Mar 2011 22:04:22 +0100] rev 2367
cc/gcc: hide Linaro options by default

It can be quite confusing for a new-comer to find strange
version numbers for gcc, so hide the Linaro versions by
default.

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

2011-03-28cc/gcc: add linaro 4.6 pre-release
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> [Mon, 28 Mar 2011 01:06:53 +0200] rev 2366
cc/gcc: add linaro 4.6 pre-release

Before gcc 4.6 was released, Linaro has a pre-release available.
Include that version in the config list.

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