Commit Graph

2423 Commits

Author SHA1 Message Date
Benoît THÉBAUDEAU"
c890ff476c configure: give check_for() the ability to test several item types at once
Currently, check_for() can only test one of prog, inc or lib at once. This patch
removes this limitation.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-06-08 15:47:03 +02:00
Yann E. MORIN"
fa8cf23b2e configure: rationalise error messages with meaningful texts
Currently, error messages just state the obvious: a required
component is required. While in some cases, there is not much
else to say, in some other cases we could tell much more.

For example, a missing libstdc++ means no static toolchain.

Also, format error and warning messages in a similar fashion,
with a {error,warning} intro, followed by the message specified
by the caller.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-04 19:17:26 +02:00
Yann E. MORIN"
929fda76b8 Makefile: make it work for auto-completion
The latest autocompletion calls 'make -qp' to get all the possible
targets. This currently fails, as our makefile is calling itself
again and again ad-libitum.

Fix it by detecting that the recursion level is not 0, and bail out
if so. It works so well that it has the side effect of showing only
the 'public' target, and hide our internal ones! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-04 17:43:49 +02:00
Yann E. MORIN"
39dedfbcb6 libc/glibc: do not try to download NPTL add-on
The NPTL add-on has always been internal, so there is no
reason to try downloading it, it will never succeed.
Add provision to skip other add-ons as well.

For consistency, do the same test in both glibc and eglibc.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-04 17:15:58 +02:00
Benoît THÉBAUDEAU"
d147fbb201 kconfig: prepend CT-NG's version tag to PKGVERSION
"crosstool-NG-${CT_VERSION}" is currently the default for TOOLCHAIN_PKGVERSION,
and this options is passed as is to --with-pkgversion.

This patch prepends "crosstool-NG ${CT_VERSION}" to TOOLCHAIN_PKGVERSION before
passing it to --with-pkgversion.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-06-03 17:21:56 +02:00
Yann E. MORIN"
7f504c6c27 functions: save & restore the static companion libraries install dir
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02 22:30:55 +02:00
Yann E. MORIN"
3299aa7685 functions: fix downloading files
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02 23:56:13 +02:00
Yann E. MORIN"
08ebd6ec3d cc/gcc: CC_STATIC_LIBSTDCXX 'depends on' CONFIGURE_has_static_libstdcpp
Hide the staticaly linked libstdc++ option if the static libstdc++ is not
present, detected at configure time.

Add a blind option that says whether static linking is possible at all.
It defaults to 'y', but depends on the needed CONFIGURE_* options. For
now, it only depends on static libtdc++, but new dependencies can be
easily added.

Hide the global static toolchain option behind this new option.

Original patch by Bryan Hundven <bryanhundven@gmail.com>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02 19:50:12 +02:00
Yann E. MORIN"
203f2d36ba configure: check for libstdc++.{so,dylib,a}
It's probably a good thing to check for at least one instance of
libstdc++.{so,dylib,a} at configure time. At least one is needed
by the companion libraries and gcc.

Original patch by Bryan Hundven <bryanhundven@gmail.com>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02 19:49:36 +02:00
Yann E. MORIN"
c6f3947bcb configure: add prefix to err messages in has_or_{abort,warn}
Make it easier to spot messages spewed out by has_or_{abort,warn}.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02 21:43:36 +02:00
Yann E. MORIN"
a8f575082a configure: maintain single quotes in error messages
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02 19:58:05 +02:00
Yann E. MORIN"
93b0db91b4 glibc: properly handle internal addons
Some addons are bundled with glibc/eglibc, so we should not try to
download and extract them.

This is done as thus:
 - at download time:
   - if the add-on download fails, keep going;
 - at extract time:
   - if the addon is present in the source tree, ignore it;
   - if the addon is missing in the source tree:
     - if the archive is present, extract it;
     - if the archive is missing, bail out.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-30 23:05:28 +02:00
Yann E. MORIN"
3d6ce4cd3d libc/eglibc: use generic SVN functions
eglibc is only available from SVN. The script currently calls svn
in its own tortuous and convoluted way.

Use the egeneric SVN extract functions, and sinplify the eglibc
download function.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-31 00:20:44 +02:00
Yann E. MORIN"
3304d5c077 scripts/functions: do not abort on failed svn
In case of eglibc, some add-ons that were previously external are
now internal (bundled with the main sources).

So we do not want to fail if an add-on can't be downloaded; we
want to post-pone the check until we can extract the main archive.

So:
 - try to retrieve the add-on
 - if it fails, print a warning instead of calling CT_Abort
 - return 1

So, components that want to catch the error and want to handle it can,
while components that do not will gracefuly fail thanks to our catching
every errors.

Bonus: it works without changing any existing retrieval procedure! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-31 00:57:36 +02:00
Yann E. MORIN"
1c3c90d0d4 scripts/functions: do not abort on failed extract
For glibc/eglibc, if the add-on can not be extracted, we want to catch
the error to print a meaningful error message.

So:
 - try to extract the tarball
 - if it fails, print a waring instead of calling CT_Abort
 - return 1

So, components that want to catch the error and want to handle it can,
while components that do not will gracefuly fail thanks to our catching
every errors.

Bonus: it works without changing any existing extract procedure! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-30 23:24:45 +02:00
Yann E. MORIN"
0c73370023 scripts/functions: do not abort on failed download
In case of glibc/eglibc, some add-ons that were previously external are
now internal (bundled with the main sources).

So we do not want to fail if an add-on tarball can't be downloaded; we
want to post-pone the check until we can extract the main archive.

So:
 - try to download the tarball
 - if it fails, print a warning instead of calling CT_Abort
 - return 1

So, components that want to catch the error and want to handle it can,
while components that do not will gracefuly fail thanks to our catching
every errors.

Bonus: it works without changing any existing retrieval procedure! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-30 23:24:11 +02:00
Yann E. MORIN"
b4620c6640 cc/gcc: fix a misleading FIXME
The FIXME about the static libstdc++ is misleading; it only deserves
being an INFO.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-31 01:30:54 +02:00
Benoît THÉBAUDEAU"
500ee00f22 gdb: use the PKGVERSION and BUGURL options
This patch makes gdb benefit from the TOOLCHAIN_PKGVERSION and
TOOLCHAIN_BUGURL options.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 21:03:03 +02:00
Benoît THÉBAUDEAU"
d558bb995d eglibc: use the PKGVERSION and BUGURL options
This patch makes eglibc benefit from the TOOLCHAIN_PKGVERSION and
TOOLCHAIN_BUGURL options.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 20:55:30 +02:00
Benoît THÉBAUDEAU"
493672e977 binutils: use the PKGVERSION and BUGURL options
This patch makes binutils benefit from the TOOLCHAIN_PKGVERSION and
TOOLCHAIN_BUGURL options.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 20:39:42 +02:00
Benoît THÉBAUDEAU"
35fe8a047d gcc: promote PKGVERSION and BUGURL options to toolchain level
This patch promotes the PKGVERSION and BUGURL options to toolchain level so that
all toolchain components supporting them can benefit from them.

These options are passed to configure through --with-pkgversion and
--with-bugurl.

They are supported by binutils 2.18+, gcc 4.3+, eglibc 2.9+ and gdb 7.0+.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 20:12:35 +02:00
Benoît THÉBAUDEAU"
b87fff5473 gcc: add a CC_GCC_HAS_PKGVERSION_BUGURL option
This patch adds a blind option CC_GCC_HAS_PKGVERSION_BUGURL to test the support
of --with-pkgversion and --with-bugurl by GCC's configure.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 19:55:59 +02:00
Benoît THÉBAUDEAU"
c06117b767 scripts/addToolVersion.sh: add a function to extract fields from versions
This patch adds a function to extract major, minor, revision, etc. from version
numbers.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 17:20:52 +02:00
Benoît THÉBAUDEAU"
96245813d8 kconfig: remove useless 'default n'
kconfig bools are disabled by default, so specifying 'default n' is useless and
noisy. This patch removes all occurrences of 'default n'.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-31 16:27:39 +02:00
Yann E. MORIN"
8f32ebcc88 libc/glibc: commonalise extraction btw glibc and eglibc
glibc and eglibc have a very similar extraction process, so it
makes sense to commonalise it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-29 19:24:41 +02:00
Yann E. MORIN"
82fa824f68 libc/glibc: fix {e,}glibc add-ons with short or long names
Fixes the issue with {e,}glibc addons having short and long names (such as
eglibc-ports-2_13 and ports), which caused configure scripts to run
through them twice and thus configuring incorrectly.

For instance, the mips64el-n32-linux-gnu toolchain would be recognized
correctly first, but then the second pass would change it to mips32,
building a mixed MIPS-III N32 and MIPS-I libc.

Signed-off-by: Nicolás Reynolds <fauno@kiwwwi.com.ar>
[yann.morin.1992@anciens.enib.fr: remove spurious trailing spaces]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-27 22:02:30 -03:00
Yann E. MORIN"
a257ff7da8 configure: add possibility to set arbitrary variable in check_for
If check_for is able to find the required prog/inc/lib, allow it to
set an arbitrary variable to 'y'. This variable is then pushed down
to the kconfig definition.

For example:
  has_or_abort prog=foobar kconfig=has_foobar

If foobar is available, it yields a kconfig variable defaulting to y:
    config CONFIGURE_has_foobar
        bool
        default y

If foobar is missing, it yields a kconfig variable defaulting to n:
    config CONFIGURE_has_foobar
        bool

Thus it is possible to depends on that variabel to show/hide options:
    config SOME_FEATURE
        bool
        prompt "Some feature"
        depends on CONFIGURE_has_foobar

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-26 22:51:03 +02:00
Yann E. MORIN"
7aa57aa228 configure: add has_or_warn
By popular request, add a function to only warn on missing stuff.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-26 18:33:53 +02:00
Yann E. MORIN"
94314fce7c configure: move error message down to has_or_abort
When has_or_warn will come, we do want to print the error message
only in has_or_abort, so move it down there.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-26 18:40:53 +02:00
Benoît THÉBAUDEAU"
5deed0f23f debug/gdb: bump Linaro revision to 2011.05-0
This patch bumps the Linaro GDB revision to 2011.05-0.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-25 21:21:03 +02:00
Benoît THÉBAUDEAU"
d47003fda1 cc/gcc: bump Linaro revisions to 2011.05-0
This patch bumps the Linaro GCC revisions to 2011.05-0 when applicable.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-25 21:19:09 +02:00
Benoît THÉBAUDEAU"
911a3d473e debug/gdb: fix runtime sysroot
This patch sets the runtime sysroot to fix the following GDB warning:
"Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code."

The sysroot can later be changed within gdb with the `set sysroot`
command if necessary.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-25 20:23:48 +02:00
Benoît THÉBAUDEAU"
338d4b8b4d scripts: fix broken variable name
This patch fixes a config variable name missing its 'CT_' prefix.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-24 14:15:47 +02:00
Yann E. MORIN"
d855275562 kconfig: fix forward dependencies
In case a set of options are conditional to two different paths,
the forward dependencies in these options is wrong, but in the
first path.

Fix by Arnaud Lacombe on linux-kbuild ML:
  http://www.spinics.net/lists/linux-kbuild/msg04832.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-22 17:44:34 +02:00
Yann E. MORIN"
93b6fd5032 kernel/linux: add latest versions
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-21 12:38:52 +02:00
Yann E. MORIN"
bdefc7b1e7 config: document array-capable variables
Update help entries for thos variables that accept multiple
arguments with spaces (aka. array-capable variables).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-18 23:42:57 +02:00
Yann E. MORIN"
2c3b6d2b71 scripts: munge .config to handle array variables
Transfrom array variables from pure strings (in the kconfig output)
into proper bash arrays declarations, for feeding to the build scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-19 22:29:49 +02:00
Yann E. MORIN"
c4bb88466e config: rename variables that are arrays
Make it explicit that a variable is an array bu the name of the variable.
It will be used later when .config gets munged to allow both multiple
arguments and arguments with spaces at the same time to be passed from the
configuration down to the build scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-18 23:00:46 +02:00
Yann E. MORIN"
b00e501d7c scripts: interpret *_EXTRA_CONFIG config variables arrays
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-15 18:51:40 +02:00
Anthony Foiani
e109ca92a0 complibs/ppl: fix 0.11-0.11.2 to compile with --disable-shared
PPL 0.11 (through 0.11.2) had a small bug where it still tried to build
and test its Java interface even when shared libraries are disabled.
Since that's exactly what ct-ng does, it explodes.

This is the patch from the PPL authors (see final link below).

More information can be found in these messages/threads:

  Anthony's initial report and analysis with Yann:
    http://www.cygwin.com/ml/crossgcc/2011-05/msg00046.html

  Ron Flory hit the same problem:
    http://www.cygwin.com/ml/crossgcc/2011-05/msg00054.html

  Anthony's report to the ppl-devel list:
    http://www.cs.unipr.it/pipermail/ppl-devel/2011-May/017450.html

  Roberto's reply with a link to the fix in the PPL git repo:
    http://www.cs.unipr.it/pipermail/ppl-devel/2011-May/017455.html

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
2011-05-19 23:09:43 +02:00
Anthony Foiani
3555e03268 complibs/ppl: build only C and C++ interfaces for PPL
By default, PPL wants to build interfaces for any of a variety of
langauges it finds on the local host (python, java, possibly perl, also
more esoteric languages such as ocaml and prolog).

These extra interfaces can double the compile time for the library. For
single-process builds, I found a savings of more than 40%:

  default    / j1: 716s total, 143.2s avg, 0.52s stdev
  just_c     / j1: 406s total,  81.2s avg, 0.33s stdev
  just_c_cpp / j1: 413s total,  82.6s avg, 0.22s stdev

And for multi-process builds, it approached 50%:

  default    / j4: 625s total, 125.0s avg, 0.57s stdev
  just_c     / j4: 338s total,  67.6s avg, 1.25s stdev
  just_c_cpp / j4: 327s total,  65.4s avg, 0.36s stdev

Since the PPL we build within ct-ng is only used by GCC, we only need to
build the C and C++ interfaces.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
2011-05-19 23:06:16 +02:00
Anthony Foiani
bf48824c1c complibs/ppl: remove unnecessary (and confusing) --enable-cxx configure switch.
PPL does not use the "--enable-cxx" configure switch at all; it's
possibly a cut-and-paste leftover from 'gmp.sh'.  (PPL is written in C++
natively, so it doesn't make much sense to have to enable C++; GMP, on
the other hand, is written in C with an optional C++ wrapper.)

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
2011-05-19 23:05:58 +02:00
Anthony Foiani
26cd54e8fc complibs/ppl: update GMP location configuration argument for PPL v0.11 and later
'configure' for PPL 0.11 (and later) needs "--with-gmp-prefix" to
provide the location of the GMP toolkit; the previous switches were
"--with-libgmp-prefix" and "--with-libgmpxx-prefix".

The upstream log message is:

  commit 08dfb6fea094f8c5a533575a3ea2095edce99a6d
  Author: Roberto Bagnara <bagnara@cs.unipr.it>
  Date:   Sun Jul 12 21:39:46 2009 +0200

     New configure option --with-gmp-prefix supersedes the (now removed)
     options --with-libgmp-prefix and --with-libgmpxx-prefix.

Link: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=08dfb6fea094f8c5a533575a3ea2095edce99a6d

Since PPL's 'configure' ignores unknown switches, we use all three so we
don't have to conditionalize the ppl.sh build script itself.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
2011-05-19 23:05:32 +02:00
Yann E. MORIN"
258c03b174 libc/glibc: source common parts instead of symlinking
Symlinks are a nightmare when one is grepping...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-18 23:48:56 +02:00
Yann E. MORIN"
df1b44cd26 kconfig: add the nconf frontend
The nconf frontend is the new hot topic in the kconfig land! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-12 19:45:30 +02:00
Yann E. MORIN"
f603742014 libc/glibc: use the multi-inclusion capability of the new kconfig
Now that kconfig can include a file multiple times, link the glibc/eglibc
common stuff to two .in.2 files.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-09 20:15:39 +02:00
Yann E. MORIN"
82250e56c7 kconfig: remove mis-leading messages
Unlinke the Linux kernel, crosstool-NG does not (directly) use make
as a frontend, so remove any occurence of reference to running make
after the configuration.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-12 19:46:23 +02:00
Yann E. MORIN"
bb27382f3b kconfig: fix choice multi-display
In case a choices has different combinations, it can be displayed
more than once.

See the discussion thread on the linux-kbuild ML:
  http://www.spinics.net/lists/linux-kbuild/msg04709.html

The fix applied here was proposed by Arnaud LACOMBE.
That fix, or a similar one, will probably be pushed upstream soon.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-10 22:45:33 +02:00
Yann E. MORIN"
3796ca5885 kconfig: don't trim spaces with leading pipe
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-08 15:12:55 +02:00
Yann E. MORIN"
c1053caf91 kconfig: do not warn on missing env variable
In crosstool-NG, we use env variables for the backend mode.
So it is perfectly legit that these variables are not set.
So do not warn about it.

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