Commit Graph

1067 Commits

Author SHA1 Message Date
Yann E. MORIN"
5bd048be2c complibs/cloog: auto-reconf for 0.15.10 and later
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-16 15:10:29 +02:00
Yann E. MORIN"
fcd48e80f5 complibs/cloog: fix extraction
In the early days, cloog-ppl was bizarrely packaged: the first tarball
did not contain the version in the name of the extracted directory, so
we had to play tricks.

Nowadays, however, the first component of the path are stripped when
extracting a  tarball, which means that the created directory will
always be properly named. So, our old tricks do no longer work, and
worse, they break the build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-16 14:58:29 +02:00
Yann E. MORIN"
2183a850e2 debug/gdb: fix tic install path, tell ncurses where to find it
ncurses 5.9 wants tic to be either one of:
 - $TIC_PATH
 - /usr/bin/tic

Of course, se do not want the latter, for it can be incompatible if the
ncurses in the build system is too old (eg. RHEL 5.6, Debian Lenny...).
So, force TIC_PATH to the location of our own tic.

Also, install tic alongside the other build tools, not in a sub-dir
of the toolchain installation dir.

Signed-off-by: Willy Tarreau <w@1wt.eu>
[yann.morin.1998@anciens.enib.fr: install in builtools/bin, move TIC_PATH]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-15 19:11:57 +01:00
Yann E. MORIN"
4fc56b1d14 arch: add softfp support
Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-19 15:27:32 +13:00
Yann E. MORIN"
67ede2f5d4 scripts: use the hardfloat option to set configure and CFLAGS
When hardfloat is selected, we need to pass that selection down to
./configure and in the CFLAGS.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-19 15:27:32 +13:00
Yann E. MORIN"
28e54116c3 scripts: introduce float type as a string
With the upcoming softfp support, the case..esac test would become
a bit convoluted if it were to test three different booleans.

Introduce a new blind string config option that defaults to the
selected floating point type used.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-19 15:27:32 +13:00
Michael Hope
486d1c141d scripts: fix missing space when using CT_EXTRA_FLAGS_FOR_HOST
CT_EXTRA_FLAGS_FOR_HOST needs a preceding space to separate it from
any other options that have already been set.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
2011-10-21 03:29:18 +02:00
Yann E. MORIN"
1cc14334e4 misc: change references to point to the new website
It's been a while now that crosstool-NG has been hosted on it's own
website, and not at my home. Change every reference to the old site
to the new one, everywhere is makes sense to.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-18 20:17:41 +02:00
Yann E. MORIN"
c8f54b8ca7 arch/powerpc: fix tuple for uClibc
Changeset #7c288c777455 broke the tuple for uClibc-based
powerpc toolchains, by unconditionally  forcing CT_TARGET_SYS
to "gnu".

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-16 17:52:33 +02:00
Yann E. MORIN"
0c06bd8cae scripts/functions: Fix CT_ExtractGit function.
Change CT_ExtractGit so that it clones the repository, instead of just
symlinking it.  After cloning, any given ref is checked out, or if no
ref is given, the HEAD of the repository is checked out.

This makes CT_Extract behave similar for git repositories as it does
for tarballs, so that it for example can be used for passing glibc-ports
as a git repository.

Signed-off-by: "Esben Haabendal" <esben.haabendal@prevas.dk>
[yann.morin.1998@anciens.enib.fr: fix incomplete var rename]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-07 15:06:44 +02:00
Yann E. MORIN"
e2b9a81da3 scripts: check host features with host compiler
Currently, we check host feature in ./configure. This works only for
cross toolchains, but not for canadian toolchains. ./configure has
absolutely no way to know what the host for the toolchain will be;
only the build scripts know.

So, move the headers & libraries checks from ./configure to the build
scripts, early enough in the build, but not before we know the host
compiler and other tools.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-14 22:44:24 +02:00
Yann E. MORIN"
6e00f49ab4 config: use '0' for automatic number of jobs
Also, make it the default.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-16 13:26:26 +02:00
Yann E. MORIN"
892ef743c4 scripts: execute each steps in a subshell
To avoid variable leakage from one step to another, isolate the
steps from each others by running them in their own sub-shell.

This avoids variables leaking from one step to the others.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-09 19:19:04 +02:00
Yann E. MORIN"
315b15109f libc/glibc: run ./configure in CONFIG_SHELL
Tremendously helps when running on at least Ubuntu, with dash as
the system shell (ie. /bin/sh points to dash).

Reported by a few people, of which:
  leming, ccct and ccole on IRC

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-11 22:21:48 +02:00
Yann E. MORIN"
56c411b206 config: simplify setting CONFIG_SHELL, add a bit to the help entry
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-11 21:43:42 +02:00
Yann E. MORIN"
f52ab9bddb complibs/cloog: catch autogen.sh's output
Run autogen.sh through CT_DoExecLog to catch its output.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-10 00:00:58 +02:00
Yann E. MORIN"
c7a396f9b7 debug/gdb: new option to enable/disable use of python
Add a new option to enable/disable the Python scripting in gdb.
Hide the option (ie. disable it) when statically linking the cross-gdb.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-08 22:57:21 +02:00
Yann E. MORIN"
8e715ea4ba binutils/binutils: ensure gold is staticaly-linked if needed
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-09 15:34:16 +02:00
Yann E. MORIN"
04da3418ca scripts: support extra host compiler flags
Allow the user to configure extra flags to pass to the host compiler
at build time.  Applies to both C and C++.

Useful on Ubuntu to turn off the stack protector and fortify defaults
so the program stands a better chance of running on other distros.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: put the custom flags at the end]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-05 14:19:51 +13:00
Yann E. MORIN"
85a85d3cc7 libc/glibc: add log messages for glibc addons dirs and symlinks
Signed-off-by: "Esben Haabendal" <esben.haabendal@prevas.dk>
[yann.morin.1998@anciens.enib.fr: fix linewrap-carnage]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-07 15:23:47 +02:00
Yann E. MORIN"
ba5dc88582 scripts: update config.{guess,sub}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-06 00:09:00 +02:00
Michael Hope
1215a8fbcc Pass CXXFLAGS to binutils/gold.
The GOLD linker is written in C++.  Pass CT_CFLAGS_FOR_HOST as
CXXFLAGS to configure so that any host specific flags are passed
through.

It feels a bit funny passing CFLAGS as CXXFLAGS, but the PPL and GCC
target rules already do the same.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
2011-10-05 14:15:45 +13:00
Michael Hope
1c0488792d config: add a 'auto' value for the number of parallel jobs
When CT_PARALLEL_JOBS is -1, set the number of parallel jobs to the
number of online CPUs + 1.  Update documentation to match.

I find this useful when building in the cloud.  You can use the same
.config file and have the build adapt to the number of processors
available.  Limited testing shows that NCPUS+1 is faster than NCPUS+0
or NCPUS+2.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
2011-09-29 12:40:42 +13:00
Yann E. MORIN"
52c5b06255 kernel/linux: prepare for 3.1 and above
The real upstream location is not in the '3.0' directory, but
in the '3.x' directory.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-26 22:59:14 +02:00
Yann E. MORIN"
bcb784e826 kernel/linux: use a custom kernel source directory
Allows using either a tarball or a directory as the custom kernel
source location.

Signed-off-by: Vincent BENOIT <sinseman44@gmail.com>
[yann.morin.1998@anciens.enib.fr: fix space damage, detailed commit message]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-22 22:49:38 +02:00
Yann E. MORIN"
e8fc5b3407 kernel/linux: add alternate download locations
Since kernel.org is dead, and there is no announced or known estimated
time or return to normality, it is impossible to download any kernel at
this time.

Add a known-working mirror.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-21 22:42:35 +02:00
Yann E. MORIN"
53e8799ece cc/gcc: speed up the build a little bit
Even if the current process is highly parallel, crosstool-NG spends most
of its time in single-job steps on fast machines (with a 12-CPU system,
I approximate the parallel vs. non-parallel time to be in the order os
1 to 3; that is crostool-NG spends two-thirds of its time running
non-parallel jobs).

Some steps to build gcc can be paralleled, gaining a litle bit of time
on the whole compilation.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-14 12:59:17 +02:00
Yann E. MORIN"
6fea2cfd09 gcc: add support for the PowerPC EABI
Signed-off-by: Mircea Gherzan <mgherzan@gmail.com>
[yann.morin.1998@anciens.enib.fr: rm trailing space]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-17 14:30:52 +02:00
Yann E. MORIN"
b8aa940233 libc/uClibc: enable NPTL choice for uClibc >= 0.9.32
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-12 02:37:29 +02:00
Yann E. MORIN"
77436f025f scripts/functions: only use passive FTP
Virtually all FTP server available on-line support passive FTP.
At least, this is the case for the servers crosstool-NG needs to
connect to.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-09 15:48:59 +02:00
Yann E. MORIN"
4b0155c24f scripts/functions: only use one download program
Currently, we use either wget or curl, whichever is installed.
In case both are installed, both are used. This means that it
takes a while trying all extensions.

Remove use of wget, and use only curl.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-09 15:34:04 +02:00
Yann E. MORIN"
3e7036062c scripts: fix sysroot prefix dir
The sysroot prefix dir was broken in #4960f5d9f829 due to a mishap
when making the out-of-sysroot lib/ symlink: the './' was mistakenly
changed into a single '.' .

Although Jonathan suggested restoring the missing '/' to restore it to
normal operation, I prefered using an explicit pushd/popd to be extra
sure of the symlink location and target, along with a fix in the sysroot
relative directory calculation.

Reported-by: Jonathan Grundon <JGrundon@xos.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-07 01:22:37 +02:00
Kévin PETIT
1097bea2e0 libc/newlib: add a config option allowing to disable builtin syscalls
Allows to choose if one wants to keep or not the syscalls that are provided with
newlib. It passes the --disable-newlib-supplied-syscalls or
--enable-newlib-supplied-syscalls to the configure script. If one chooses to
disable the builtin syscalls, he/she will have to write his/her own. This can
be usefull to port newlib to a new platform/board.

Signed-off-by: Kévin PETIT <kpet@free.fr>
2011-08-28 20:12:26 +02:00
Yann E. MORIN"
4c1666134b configure: xz-utils alone can also handle LZMA-compressed tarballs
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-26 00:07:51 +02:00
Yann E. MORIN"
04250cc896 configure: check for lzma
Some packages are available as LZMA tarballs. LZMA is a relatively recent
compression algorithm; it's slightly better than bzip2, but offers much
faster decompression. LZMA is now deprecated in favor of XZ, but some
packages switched to LZMA when XZ was not yet available, or still in its
infancy. Latest XZ (which totaly obsoletes LZMA) offers a backward LZMA-
compatible utility, so we can check for 'lzma' nonetheless.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-25 18:30:18 +02:00
Titus von Boxberg"
68cd6e6d26 debug/ltrace: Fix HOST_OS and ar
HOST_OS really is the target OS. Allow setting it for configure
via an environment variable.
libltrace.a should have an index:
Allow ar to be set as an environment variable, and generate
an index in this lib.

Reported-by: "Guylhem Aznar" <crossgcc@guylhem.net>
Signed-off-by: "Titus von Boxberg" <titus@v9g.de>
2011-08-22 09:26:02 +02:00
Titus von Boxberg"
aae55bbcc0 complibs/libelf: use target ranlib
For portability, the right ranlib for the target must be passed to
libelf's configure.

Signed-off-by: "Titus von Boxberg" <titus@v9g.de>
2011-08-21 17:54:12 +02:00
Yann E. MORIN"
307400f4ca debug/gdb: we don't care if the host tic is shared or static
Because we need our own host tic, we have to build it; and we do build
it statically for now.

But as MacOS/Darwin/Whatever-you-call-it does not support static linking
(what a shame!), it fails.

Anyway, we don't really care it being shared, in the end.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-17 23:53:49 +02:00
Yann E. MORIN"
2c98fef576 debug/gdb: use ncurses-5.9
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-18 23:52:47 +02:00
Yann E. MORIN"
340b25b7ad kernel/linux: fix using custom tarball
The custom-tarball symlink was created in CT_SRC_DIR, when it
should be created in CT_TARBALLS_DIR.

Reported-by: Guylhem Aznar <crossgcc@guylhem.net>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-16 22:30:00 +02:00
Yann E. MORIN"
3374dbf5eb scripts: simplify and fix the toolchain config script
The script that is installed, and which sole purpose is to dump
the .config that was used to build the toolchain, is pure insanity.

Let's make it much, much more simpler...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-19 00:52:05 +02:00
Yann E. MORIN"
09e5711dcb scripts/functions: add xz support
Add support for the new XZ-compressed tarballs. At least glibc
uses that new format.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-14 17:51:38 +02:00
Yann E. MORIN"
3910899c77 scripts/functions: test for decompressors before use
./configure does check for the presence of gz and bzip2, so we can
safely use them in the build scripts.

On the other hand, more recent formats (eg. XZ) are not yet widely
available, and we do not want, and can't, force the user to install
them as a pre-requisite.

So, build up a list of allowed tarball formats based on the available
decompressors. For no, this is a static list, but the upcoming XZ
support will conditionnaly add to this list.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-04 00:04:23 +02:00
Yann E. MORIN"
ac058b1042 scripts/functions: commonalise tar options in CT_EXtract
This shortens command lines, so it's good! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-14 17:28:35 +02:00
Yann E. MORIN"
4144a003ab kernel/linux: remove check for lzma tarballs
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-14 16:07:03 +02:00
Yann E. MORIN"
59499a2cda kernel/linux: simplify custom tarball handling
Simplify the way the custom tarball is handled:
- fake version="custom"
- at download, simply link the custom tarball to:
    "linux-custom.${custom_extension}"
- at extract, the above allows to simply extract "linux-${LINUX_VERSION}"
  where LINUX_VERISON is set to the fake version="custom"

Not that much convoluted, in fact... :-/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-14 19:59:02 +02:00
Yann E. MORIN"
b021021fec libc/uClibc: force use of ctor/dtor
Although ctor/dtor do not seem strictly required, missing them proves
rather inconvenient, as ld can't link binaries.

Reported-by: John Spencer <maillist-uclibc@barfooze.de> (sh4rm4 on IRC)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-13 00:05:51 +02:00
Yann E. MORIN"
37db634a00 scripts/functions: remove messages about failed downloads
When downloading via svn/cvs/... an attempt to retrieve from the
mirror is made. If the mirror does not have the required tarball,
an error message is printed. This is misleading, as the download
may later succeed via svn/cvs/...

Remove the messages about failed downloads altogether.

At the same time, use "if ... then ... fi" instead of "... && ..."

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-10 23:09:06 +02:00
Yann E. MORIN"
03c3e02fb7 scripts: try the mirror even if downloads are forbidden
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-02 23:10:37 +02:00
Yann E. MORIN"
263c92b3eb scripts/functions: use array variables for URLs list
This is needed later, when we'll conditionnally use both the
upstream and the mirror URLs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-03 00:00:44 +02:00