Commit Graph

908 Commits

Author SHA1 Message Date
Yann E. MORIN"
908f4aeab9 kernel/linux: Cleanup unneeded files from 'headers_check' and 'headers_install'
headers_install makes  .install and ..install.cmd files.
headers_check makes    .check   and ..check.cmd   files.
Remove these files uncoditionaly after installing (and checking) header files
into the sys-root.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[Yann E. MORIN: reformat the patch, move hunk out of headers_check conditional]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-22 22:41:51 +01:00
Yann E. MORIN"
f63dfa3b31 scripts: add doc for patch-rework
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-19 11:57:08 +01:00
Yann E. MORIN"
96559f4610 scripts: update config.{sub,guess}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-18 23:29:46 +01:00
Kalle Kankare
461ca92d5d complibs/libelf: use host compiler
It appears, that the configure scripts of libelf versions 0.8.13 and
0.8.12 do not honour the --host option. The compiler must be given as an
environment variable or the process will use the command "gcc" as the
compiler.

It seems that this is already done in the function do_libelf_target in
scripts/build/companion_libs/libelf.sh, but not in function do_libelf.
2010-12-03 12:36:44 +01:00
Yann E. MORIN"
a9966d1e1c internals: fix stripping
Do not try to strip any script.

Previously, only shell scripts were ignored, but when the Java frontend
is installed, it also installs a Python script. So we have to ignore
any "script text executable", and not restrict it to "shell script text
executable".

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-12 20:47:40 +01:00
Yann E. MORIN"
2bf2991ebd scripts/internals: strip all executables
Using a list of files to strip misses a few of them.
Now, scan appropriate directories, and strip all ELF
executables and shared objects.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-05 16:27:06 +01:00
Bryan Hundven"
1ad4399072 cc/gcc: build bare-metal gcc statically
- add a new parameter to do_cc_core: build_statically=[yes|no]
- pass build_statically=yes in core_pass_2 when doing bare_metal
- fix handling the static / static libstdc++ / static complibs stuff
- add a commment to keep both blocks (in core and final) in sync

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-09 18:55:59 +01:00
Bryan Hundven"
118a6a5f98 cc/gcc: build final gcc statically
If the global static option is set, then build the final gcc statically.

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-09 18:55:42 +01:00
Bryan Hundven"
bf3c89ebb5 binutils/binutils: build statically
If the global static option is set, then build binutils statically.

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-09 18:55:33 +01:00
Yann E. MORIN"
63750f8841 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>
2010-11-29 00:50:21 +01:00
Yann E. MORIN"
28c5ee8baf 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>
2010-11-29 00:26:39 +01:00
Yann E. MORIN"
af6dd3f3f0 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>
2010-11-16 17:49:15 +01:00
Yann E. MORIN"
9dbbc8e5f6 scripts: remove aria2c as downloader, retain only curl and wget
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-16 10:00:27 +01:00
Yann E. MORIN"
f1c391e1d9 complibs/CLooG: only install the libraries
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-18 16:51:01 +02:00
Yann E. MORIN"
e2c7015edb 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>
2010-11-24 21:04:55 +01:00
Yann E. MORIN"
1a03e119de scripts/xldd: better handle the origin of the library
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:36:01 +01:00
Yann E. MORIN"
7d296c4f68 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>
2010-11-24 21:01:46 +01:00
Yann E. MORIN"
cd9a56ff50 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>
2010-11-23 21:35:45 +01:00
Yann E. MORIN"
6960ddb376 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>
2010-11-23 21:35:41 +01:00
Yann E. MORIN"
2e1dcdf8d4 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>
2010-11-23 21:35:28 +01:00
Yann E. MORIN"
70309ce671 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>
2010-11-23 21:35:15 +01:00
Yann E. MORIN"
b98f8fe48f 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>
2010-11-23 21:35:10 +01:00
Yann E. MORIN"
dc4498ca35 scripts/xldd: fix space-damage
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:01 +01:00
Yann E. MORIN"
b36267c6a6 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>
2010-11-23 21:34:56 +01:00
Yann E. MORIN"
727612bcf6 scripts/xldd: fix typoes
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:34:50 +01:00
Yann E. MORIN"
de81a59714 libc/*glibc: enable selection of the oldest supported ABI
[Yann E. MORIN: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-11 01:11:17 +01:00
Yann E. MORIN"
da6b834eef libc/*glibc: add option to disable symbols versioning
[Yann E. MORIN: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-11 00:29:53 +01:00
Bob Dunlop
fcfc3a27f8 libc/eglibc: fix downloading
Since Subversion 1.6.13 was released, it is no longer possible
to checkout/export to the current working directory using '.'
(eg. "svn co bla://blabla/foo/bar ." no longer extracts the content
of bar into ./ but into ./bar).

Fix this by luring Subversion to extract into "$(pwd)", which has
the advantage of working both with all known versions so far.

At the same time, remove the useless redirection.
2010-11-09 10:44:29 +01:00
Yann E. MORIN"
dd9fad50f5 scripts: also overide LANG
On some systems, we also need to overide LANG as well as LC_ALL.

Reported-by: Geoffrey Lee <geoffl@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-01 16:59:39 +01:00
Yann E. MORIN"
9b87613c37 libc/newlib: add option to compile support for IOs on C99 formats
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-23 01:21:20 +02:00
Yann E. MORIN"
1a0ab9ad55 libc/newlib: add option to compile support for long long IOs
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-23 00:53:41 +02:00
Yann E. MORIN"
d7e88461e6 libc/newlib: add option to compile support for float IOs
Adds support to enable/disable IOs of floating point values
(float, double, and long double).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-23 00:54:46 +02:00
Yann E. MORIN"
ae27f71102 scripts: do not provide to-sysroot include symlink
Do not provide the PREFIX/TUPLE/include -> SYSROOT/usr/include symlink,
and let gcc install its dependable C++ headers were it sees fit to
install them.

See the test by Anthony (by the end of the messages):
  http://sourceware.org/ml/crossgcc/2010-10/msg00129.html
  http://sourceware.org/ml/crossgcc/2010-10/msg00134.html

See also the comment by Arnaud:
  http://sourceware.org/ml/crossgcc/2010-10/msg00157.html

Reported-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-31 16:50:07 +01:00
Yann E. MORIN"
5ddca154bb Merge. 2010-10-24 22:03:53 +02:00
Yann E. MORIN"
8b275095e0 Revert #a09246191120: cc/gcc: fix C++ headers location
This was intended as a fix for g++ not finding its headers,
but it breaks in othe horrible ways. So just revert it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-24 22:03:47 +02:00
Anthony Foiani
90918d1095 scripts: add STATE logging level for state save/restore output.
The save/restore state output is voluminous; using this flag allows us
to quickly see or ignore when something is just being saved.

[Yann E. MORIN: this is a blind log level, and is used only to search
 in the build-log afterward.]

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
2010-10-22 22:02:49 +02:00
Anthony Foiani
92898249bd scripts: add "FILE" and "CFG" debug levels.
I ran into some minor difficulties looking through the build log for a
particular file: I wasn't interested in seeing it unpacked, but only
when it is built or installed.  Adding these two levels allows me to
differentiate between those cases.

[Yann E. MORIN: Those are blind log levels, and are used only to search
 in the build-log afterward.]

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
2010-10-22 22:02:57 +02:00
Yann E. MORIN"
2b912ba840 cc/gcc: fix 128-bit long doubles option
Spotted by Arnaud LACOMBE:
  http://sourceware.org/ml/crossgcc/2010-10/msg00122.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-20 15:25:38 +02:00
Yann E. MORIN"
cbd352f9ac cc/gcc: fix C++ headers location
In case we build the C++ compiler, we have to tell gcc where to put the C++
headers, or else it will try to # put it in prefix/tuple/include, which we
make a symlink to sysroot/usr/include during the build, and that we delete
(the symlink!) after the build, but gcc will not look in sysroot/usr/inlcude
for C++ headers by default.

Implements a fix suggested by: Bryan Hundven <bryanhundven@gmail.com>

Reported-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-08 23:37:12 +02:00
Yann E. MORIN"
c2bddddd64 scripts: update/fix patch-rework
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-07 23:45:25 +02:00
Yann E. MORIN"
b17f8707c1 cc/gcc: add an option to enable/disable build of libssp
libssp is the run-time Stack-Smashing Protection library.
It can be usefull to have or miss, depends...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-09 11:38:04 +02:00
Yann E. MORIN"
8922def6b4 cc/gcc: add an option to enable/disable build of libgomp
libgomp is the GNU implementation of the OpenMP API.
It can be usefull to have or miss, depends...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-08 23:58:58 +02:00
Yann E. MORIN"
416eb29198 cc/gcc: add option to enable 128-bit long doubles
Needed by some PPC targets, at least.
Requires gcc 4.2+ (noticed by Arnaud LACOMBE).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-09 22:49:28 +02:00
Yann E. MORIN"
8b0af28c69 cc/gcc: fix enabling/disabling LTO
There is a ./configure option for that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-08 23:51:38 +02:00
Yann E. MORIN"
96c2e11894 scripts: always create lib32 and lib64 symlinks
Unconditionally create the lib32 -> lib/ and lib64 -> lib/ symlinks.

This is reportedly a fix to build a toolchain for a 32-bit target on
a 'pure' 64-bit host (eg. on Fedora FC12, host libs are in lib64/,
and there is no lib -> lib64 symlink, as we can see on other distors,
as Debian). As gcc only puts static host lib in lib64/ (along with
target files in subdirs), we can safely create the symlinks.

Also note that the symlinks are summarily removed at the end
of the build.

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
[Yann E. MORIN: fix a comment, rephrase the commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-07 22:37:06 +02:00
Yann E. MORIN"
cb1a6420e9 complibs: better deduce whether to backup complibs or not
To decide whether we need to backup the companion libraries,
do not rely on the !shared case. In the future other cases
may require not to save the companion libraries (eg. if using
the ones provided by the host distro).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-03 23:10:46 +02:00
Yann E. MORIN"
9176074aec cc/gcc: disable complibs if not selected
Force gcc to not link with some companion libraries when
there are not needed (because selected-out).

There is no option to tell gcc *not* to build the Graphite and/or
LTO stuff. They *will* be built if gcc finds the suitable companion
libraries. If we do not provide them, but the host has them, then
gcc *will* find them, and link with them.

Consider the following:
- host has suitable PPL and CLooG (eg. Debian Squeeze)
- user wants to build gcc>=4.4
- user de-selects GRAPHITE
- gcc will find the hosts PPL and CLooG, and will use them
- the user moves the toolchain to an older host that does
  not have them (eg. Debian Lenny)
- the toolchain fails, when it was properly setup not to

So, explicitly tell gcc *not* to use unneeded companion libs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-12 23:51:25 +02:00
Yann E. MORIN"
d34a5ec7d8 cc/gcc: do not force use of non-vital companion libraries
While GMP and MPFR are required by gcc>=4.3 (to build the frontends),
and MPC is required by gcc>=4.5, the other libs are not. If they are
present then gcc will enable advanced features; if they are missing,
then gcc will (should) simply disable those features.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-12 20:54:54 +02:00
Yann E. MORIN"
6f5d910d1f libc/uClibc: use the MIPS ABI selection
Use the MIPS ABI selection to properly munge the uClibc config file.

This has the side effect to force the ISA:
- n32 ABI -> MIPS-III ISA
- n64 ABI -> MIPS64 ISA

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-12 22:15:12 +02:00
Yann E. MORIN"
b92668a211 arch/mips: add option for MIPS ABIs
This adds selection for one of the o32, n32 and n64 ABIs.
Later, we can easily use those boolean options, rather than
relying on a user-supplied string option.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-12 22:14:04 +02:00
Yann E. MORIN"
dae205737f scripts/internal: cleanup build symlinks
The symlinks are needed only during the build process.
The final gcc will still search those dirs, but will also search
the standard lib/ dirs, so we can get rid of the symlinks.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-11 17:55:54 +02:00
Yann E. MORIN"
ab9b5d109e scripts: hack-in lib32->lib symlinks
Some archs (eg. ppc64 with n32 ABI) will install their
variants in lib32/ instead of lib/, so do for lib32 as
we do for lib64->lib symlinks.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-10 12:14:24 +02:00
Yann E. MORIN"
3fcdd28e04 libc/uClibc: change munging code based on target arch
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-10 13:23:58 +02:00
Yann E. MORIN"
0622671d26 debug/gdb: use libexpat
gdb can use libexpat to parse target memory descriptions,
among other things. See:
  http://sourceware.org/ml/crossgcc/2010-08/msg00168.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-23 10:47:00 +02:00
Yann E. MORIN"
7a70e935c6 debug/gdb: install dependable libs in a generic target static libs dir
For now, ncurses is the only dependable target library built for gdb.
But expat is coming, and there's no reason to install each library in
its own place.

So, install ncurses in a generic directory, where other dependable
libraries can be installed as well.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-23 14:32:16 +02:00
Yann E. MORIN"
1504a1ef10 complibs: noone is using companion libs on the target; nuke them
As there's no longer any user of the companion libraries on the
target, nuke the build for the target.

Well, at least, there's libelf that's still needed by ltrace, so
we keep it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-23 23:18:49 +02:00
Yann E. MORIN"
e81fe2c778 debug/gdb: companion libs are not used
Although the gdb ./configure advertises for GMP and MPFR, those libraries
are not used by gdb (the ./configure is used across different packages,
hence the check for GMP/MPFR). See:
  http://sourceware.org/ml/crossgcc/2010-08/msg00168.html

The same applies to MPC.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-23 10:38:15 +02:00
Yann E. MORIN"
9736a99ee9 binutils/binutils: companion libraries are not used
GNU binutils does not use the companion libraries, although
./configure advertises switches for them. This is because the
configure file is shared between different packages, and is
a bit 'lax' about what it checks. See:
  http://sourceware.org/ml/crossgcc/2010-08/msg00160.html
  http://sourceware.org/ml/crossgcc/2010-08/msg00161.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-23 20:21:43 +02:00
Yann E. MORIN"
ae715a0a3c scripts/log: do not interpret log string as printf format
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-26 23:36:54 +02:00
Titus von Boxberg
f6634c28cc internals: call strip in a portable way
strip on CT_HOST darwin does not want --strip-all or -v
2010-08-21 16:45:50 +02:00
Yann E. MORIN"
d53f1d71f6 libc/mingw: fix space-damage
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-17 23:50:03 +02:00
Esben Haabendal
150789c22b mingw32: enable sysrooted toolchains
When targeting mingw32, gcc expects to find its include files
in "mingw/include" instead of the traditional "usr/include".

[Yann E. MORIN: split the original patch]
2010-08-15 00:00:51 +02:00
Esben Haabendal
386b4fed76 libc/mingw: use pre-set headers dir
There is a variable that contains the headers directory,
so there's no need to re-compute it again.

[Yann E. MORIN: split the original patch]
2010-08-14 23:21:06 +02:00
Esben Haabendal
1c81b216c8 kernel/mingw32: use pre-set headers dir
There is a variable that contains the headers directory,
so there's no need to re-compute it again.

[Yann E. MORIN: split the original patch]
2010-08-14 23:14:27 +02:00
Yann E. MORIN"
2e7698ed02 libc/uClibc: fix downloading pregen locales
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-11 20:05:05 +02:00
Yann E. MORIN"
e8f9aeade3 scripts: in case of failed download, remove partial files
It happens from time to time that the server mis-behaves, and breaks the
connection right in the middle of nowhere, for no good reason, leaving us
with a partial file, on which the extract pass would choke.

Remove partial downloads, to fail early.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-11 20:07:18 +02:00
Yann E. MORIN"
63235bd89c scripts: when downloading, use aria2 only when //
Even when // downloads are not enabled, aria2 can
fail on some servers (eg. uclibc.org).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-11 19:13:10 +02:00
Yann E. MORIN"
ebaebdacf4 scripts: better sanitise the patch names
When generating the fixes-patches, better sanitise the generated
file names, as it seems to raise a few issues for some people.
2010-08-10 13:25:52 +02:00
Yann E. MORIN"
46d72f5450 complibs/cloog: with static ppl, correctly link with libm
On some Fedora boxen (at least FC13), it is also required
to link with libm when static ppl is used.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-06 00:00:26 +02:00
Darcy Watkins
f30a7df9c9 cc/gcc: with static ppl, correctly link with libm
On some Fedora boxen (at least FC13), it is also required
to link with libm when static ppl is used.
2010-08-05 18:19:07 +02:00
Remy Bohmer
b1ac0964f4 scripts: add option to strip all toolchain executables
To reduce filesizes of the toolchain and even improve build times
of projects to be build with this toolchain it is usefull to strip
the delivered toolchain executables. Since it is not likely that we
will debug the toolchain executables itself we do not need the
debug information inside the executables itself.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2010-05-27 23:18:19 +02:00
Johannes Stezenbach
6d084fb565 Fix CT_SanitizePath
Replace the over-engineered and buggy test in CT_SanitizePath
with a straight forward string pattern match, and also
handle empty PATH elements which are qeuivalent to ".".

Thanks-To: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Johannes Stezenbach <js@sig21.net>
2010-07-30 17:50:34 +02:00
Johannes Stezenbach
143f02e0ce cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newer
Idea and know-how taken from CodeSourcery build script.

Normal build:
  $ ldd arm-unknown-linux-uclibcgnueabi-gcc
	linux-gate.so.1 =>  (0xb77f3000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb76e8000)
	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb75a1000)
	libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb757a000)
	/lib/ld-linux.so.2 (0xb77f4000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb755c000)

CC_STATIC_LIBSTDCXX=y:
  $ ldd arm-unknown-linux-uclibcgnueabi-gcc
	linux-gate.so.1 =>  (0xb7843000)
	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb76e6000)
	/lib/ld-linux.so.2 (0xb7844000)

I made CC_STATIC_LIBSTDCXX default=y since I think
it is always desirable.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
2010-07-29 19:47:16 +02:00
Yann E. MORIN"
8bd0034057 scripts: remove . from $PATH
Add CT_SanitizePath function which removes entries referring to ., /tmp
and non-existing directories from $PATH, and call it early in the
build script.

If . is in PATH, gcc-4.4.4 build breaks:

[ALL  ]    checking what assembler to use...
/tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as
...
[ALL  ]    config.status: creating as

i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler,
but config.status creates a local "as" script which is calling the
host assembler.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[Yann E. MORIN: style fixes + explanations]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-29 19:30:37 +02:00
Yann E. MORIN"
8bb436dad1 cc/gcc: add option to enable/disable libmudflap
For some scenarii, libmudflap is not very usefull
or can break the build. Make in an optioon that
defaults to 'N' to be on the safe side.

For the core gcc-s, there is absolutely no need
to build libmidflap.

Idea from: Bernhard Pfund <bernhard@chapter7.ch>
2010-07-28 23:55:10 +02:00
Yann E. MORIN"
61ebaa97ca cc/gcc: make sjlj config option a tristate
A tristate fits better here than a choice.
2010-07-28 23:53:09 +02:00
Yann E. MORIN"
b2d9366b56 libc/uClibc: fix space damage 2010-07-28 01:39:52 +02:00
Yann E. MORIN"
bb6a9e3e64 libc/uClibc: fix using pre-generated locale data
Some time, someone updated the locale Makefile to use
newer pre-generated locales data, but did not upload
those.

So we just force using the existing, ageing archive,
dating back 20030818. Sigh...
2010-07-28 01:38:15 +02:00
Yann E. MORIN"
d0ed3f0fe0 libc/uClibc: do not systematically use pre-generated locale data
It seems that using pre-generated locale data can be more problematic
than usefull in some circumstances.

Offer a config knob to enable/disable use of the pregen locale data.
Also, do not extract pregen locales data ourselves, it's broken.
2010-07-28 01:03:07 +02:00
Yann E. MORIN"
c03ac58aca scripts: add a cross-ldd-like
Add a cross-ldd that mimicks a native ldd.
2010-07-22 23:26:08 +02:00
Yann E. MORIN"
d7287c9b5f libc/uClibc: do not install cross-ldd
I was unable to make the cross-ldd from uClibc to work, and
it is not possible to build it on non-POSIX system.

Besides, we have a generic script that is in the starting-blocks
to replace it, that will work for any C library, and also will
work on non-POSIX systems. Bonus!
2010-07-22 20:06:27 +02:00
Bart vdr. Meulen
25bb99693a complibs: fix using static companion libraries
When building a cross-compiler for a target which uses a file extension for
binaries the symbolic link to cc is not created correctly because the lookup
of the gcc binary is done in a incorrect path

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
2010-07-19 23:16:02 +02:00
Yann E. MORIN"
2ad6d48f78 scripts/functions: recognise Cygwin build hosts 2010-07-18 00:34:38 +02:00
Yann E. MORIN"
f469d8a5e1 scripts: use 'hg archive' to create release tarballs 2010-07-17 11:31:57 +02:00
Yann E. MORIN"
6426b0ca5d scripts: update config.{guess,sub} 2010-07-15 10:18:40 +02:00
Yann E. MORIN"
8258ad7bcf debug/gdb: properly remove build tic
tic is isntalled in buildtools, not in the toolchain's bin dir.
Plus, it may have an extension...
2010-07-11 22:26:29 +02:00
Yann E. MORIN"
eec696451e debug/gdb: Fix compilation for Mingw hosts
GDB requires PDcurses instead of ncurses while running on Windows.
So, do not always compile ncurses in case GDB needs to build.

PDcurses is provided by an earlier build step and is not described in
this file.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
[yann.morin.1998@anciense.nib.fr: we already have a way to detect ncurses usage]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-11 22:23:34 +02:00
Yann E. MORIN"
d54963f0e3 kernel/mingw: add target libraries
Add several development libraries to the build of the mingw cross-compiler
to be used on target

Libraries:
PDCurses (port of the ncurses library)
GnuRX (the regex library)
DirectX
OpenGL

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
[yann.morin.1998@anciens.enib.fr: don't show DX and RX versions if disabled]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-11 21:36:55 +02:00
Yann E. MORIN"
b81d232a9b kernel: add mingw
Add the option to build a cross-compiler for kernel type 'mingw'.
The resulting cross-compiler can be used to build applications on a Linux host
that can be run on a Windows target.

Compiler is build using the mingwrt and w32-api packages aviable from the
MinGW project (http://sourceforge.net/projects/mingw).

The windows headers (w32-api package) are extracting with the kernel_headers
step The libraries and other headers from both packages are build and
installed in the various steps of libc

Signed-off-by: Bart vdr Meulen <bartvdrmeulen@gmail.com>
[yann.morin.1998@anciens.enib.fr: fix kernel headers comment, don't "return 0"]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-07-11 21:36:20 +02:00
Yann E. MORIN"
4144845579 cc/gcc: gcc-4.4 does not use MPC
As reported by Johannes Stezenbach, see thread at:
  http://sourceware.org/ml/crossgcc/2010-07/msg00017.html
2010-07-10 15:25:10 +02:00
Yann E. MORIN"
42a7dc1946 libc/uClibc: enable NPTL for snapshots
Recently, NPTL has matured a lot in uClibc, and more and more
people are interested to at least give it a try. So enable it.
2010-07-03 01:15:28 +02:00
Yann E. MORIN"
974f60e98a libc/uClibc: fix snapshots
Snapshots are in a subdir named uClibc, not uClibc-snapshot
(or uClibc-YYYYMMDD either).
2010-07-03 00:17:54 +02:00
Yann E. MORIN"
3fafacd093 libc/uClibc: fix munging .config for LT old/new 2010-07-02 22:11:45 +02:00
Yann E. MORIN"
58ade1d7aa scripts/finish: do not try to symlink if sed expr is a no-op
If the sed expression does not transform the
tuple, do not try to create the symlink.
2010-07-07 22:33:49 +02:00
Yann E. MORIN"
e8a36ea13c debug/gdb: fix incorrect path
Fix discrepancy between the directory we create,
and the directory into which we install tic.
2010-07-01 01:17:01 +02:00
Yann E. MORIN"
82766493f5 libc/glibc: fix installed scripts
glibc installs some bash-scripts, but uses the path to the buildtool
bash as interpreter (on the shebang line). This is only a symlink to
the real bash, and thus is not available at runtime.

Fix that by assuming that bash on the target *will* be /bin/bash.
2010-07-01 00:24:04 +02:00
Yann E. MORIN"
4ea01561e4 scripts/wrapper: fix wrong test when checking access to the reall tool
In C, the proper syntax for a bit-wise OR is a single '|', not two.

It worked so far because all was well:
- X_OK == 1
- R_OK||X_OK == 1
- the file we searched for had the x-bit set
-> access( file, R_OK||X_OK ) worked
- inicidentally, the file we searched for also had the r-bit set,
  but we were not testing that in fact.
2010-06-22 23:49:23 +02:00
Yann E. MORIN"
8b8f2c17ba cc/gcc: add option do disable PCH
In some cases, using Pre-Compiled Headers breaks the build.
Ass an option to disable building the PCH, as suggested by:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
2010-06-17 21:26:23 +02:00
Yann E. MORIN"
c4933a400c kernel/linux: allow headers from full custom source tree
Accept a local tarball name as the source of the Linux kernel headers,
rather than forcing the user to use either an upstream tarball, or a
local pre-installed headers tree.
2010-06-17 18:30:09 +02:00
Yann E. MORIN"
f99f3208af kernel/linux: reorder upstream/custom-tree handling 2010-06-15 20:04:01 +02:00