Commit Graph

1272 Commits

Author SHA1 Message Date
Yann E. MORIN"
4e8f04012c cc/gcc: do not build manuals in parallel
Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Reported-by: Johannes Stezenbach <js@sig21.net>
Tested-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-09 18:17:17 +02:00
Yann E. MORIN"
33a6cdd7ec samples: rework show-tuple
Now that we are using defconfig files, the samples do not contain
the full configuration, so we can not simply parse them to show
their content.

Instead, we must fake recalling a sample, and parse the generated
.config file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-07 21:37:59 +02:00
Yann E. MORIN"
99a6ddf3be samples: use savedefconfig when saving samples
When saving a sample, use savedefconfig instead of copying
the full .config file.

This reduces the saved .config, and reduces clutter when it
is later upgraded.

Also use defconfig when retrieving a sample.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-07 00:27:05 +02:00
Yann E. MORIN"
27e8b280f9 cc/gcc: add option to enable/disable libquadmath
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-06 15:32:56 +02:00
Yann E. MORIN"
0a33870578 scripts: fix mk-release
mk-release was not adding the SoB lines in the commit messages.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-08 22:30:05 +02:00
Yann E. MORIN"
4f5fca1947 scripts: fix catching build failures, the proper way, now
Serves me for pushing too fast... :-(

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-08 23:29:38 +02:00
Yann E. MORIN"
5f54193297 scripts/functions: tweak the endianness LDFLAGS
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-06 16:42:59 +02:00
Yann E. MORIN"
08f2b68bfb scripts: fix catching failures
POSIX 1003.1-2008 does not say whether "set -e" should catch a sub-shell
that exits with !0 (it has a list of conditions to catch, but no list of
conditions not to catch, and this situation is not listed).

bash-3 does not catch such a failure, but bash-4 does. That why, on my
Squeeze system I did not see the issue, while Thomas did on is Lenny chroot.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-08 18:31:10 +02:00
Yann E. MORIN"
8891442c9b scripts: update config.{guess,sub}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-05-06 15:11:24 +02:00
Johannes Stezenbach
2aee11ccf2 libc/uClibc: add additional debug level between "minimal" and "all"
During application development it is desirable to enable malloc
debugging and LD_DEBUG support, but the extensive debug spew from
SUPPORT_LD_DEBUG_EARLY is only useful when working on
uClibc's ld.so.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
2012-02-24 16:08:32 +01:00
Anthony Foiani
e9cb0c788c Allow multi-word "install" command.
Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c".  When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

  # this is the value returned by autoconf and stored in CT_install
  $ ins="/usr/bin/install -c"

  # if we call it with quotes, the command is not found
  $ "${ins}"
  bash: /usr/bin/install -c: No such file or directory

  # removing the quotes lets it work as expected
  $ ${ins}
  /usr/bin/install: missing file operand
  Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
2012-04-26 19:55:59 -06:00
Yann E. MORIN"
1db6c63e33 samples: . accepts previous comment as-is
When updating a sample configuration with a comment, a dot '.'
in the new comment keeps the previous comment.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-04-09 11:19:51 +02:00
Yann E. MORIN"
d776140189 cc/gcc: build core compilers for canadian
Currently, we rely on an existing external cross-compiler targetting
the target, to build the C library.

This can pause quite a few problems if that compiler is different from
the one we are building, because it could introduce some ABI issues.

This patch removes this dependency, by building the core compilers
as we do for standard cross, and also by building the binutils and
gcc, for running on the build machine.

This means we no longer need to offer the cross-sompiler selection in
the menuconfig.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-03 22:57:25 +01:00
Yann E. MORIN"
b485733f26 cc/gcc: add build frontend
Bizarrely enough, the core gcc are not enough to be able to build a
canadian cross, and a real, full cross compiler is required so that
the canadian cross can be properly built... WTF?!? Sigh...

Add a build-frontend, as was done for the binutils and the complibs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-04-02 22:54:30 +02:00
Yann E. MORIN"
6471f1598c cc/gcc: frontends are responsible for selecting the list of languages
Do for the final step the same as for the core step: compute the list
of selected langauages from the frontend, not in the backend.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-04-01 19:07:11 +02:00
Yann E. MORIN"
7b360e7a22 cc/gcc: pass the language list to the core backend
As the core backend can be used to also build the bare-metal compiler,
we have to tel it what languages to build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-15 22:52:51 +02:00
Yann E. MORIN"
1a7cf0ea9e cc/gcc: add language helper function
Add a function that prepares the language configure option.
It is needed in at least two places, some commonalisation is needed. ;-)

Unfortunately, it is no longer possible to print warnings about experimental
languages any more. Anyway, the experimental status is clearly indicated
in the menuconfig. so it should not be a surprise if the build breaks. :-/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-15 21:42:28 +02:00
Yann E. MORIN"
2f718dd60c complibs: fixup the host complibs install dir
It's easier to have as much as possible stuff in the same place to
ease backup/restore, and make things easier to follow.

Move the host companion libraries install dir as a sub-dir of the
build-tools install dir (but not directly in it, it would break
for canadian or cross-native).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-25 19:04:17 +02:00
Yann E. MORIN"
4a8daa02e3 cc/gcc: cleanup the frontends
A few noop fix-ups:
 - fix the comments in core pass-1
 - commonalise settings that can be

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-25 19:04:00 +02:00
Yann E. MORIN"
ae3b564fb8 complibs: add frontends for building to run on the build machine
In canadian-cross, we need the companion libraries running on the
build machine, to be able to build the two core gcc.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-24 23:53:14 +02:00
Yann E. MORIN"
518a1ff137 binutils: add frontends for building to run on the build machine
In canadian-cross, we need binutils running on the build machine to be
able to build the target C library.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-24 23:52:28 +02:00
Yann E. MORIN"
2e3cc45633 complibs: split companion libraries to backend/frontend, a-la cc_core
Move the actual complibs codes to backend functions that builds the
required combo of build/host/target as requested by a frontend.

This split is currently a no-op, but is required for the upcoming
canadian-cross rework, where we'll be needing to build the complibs
twice, one for build/build, and one for build/host.

This applies to the six companion libraries:
 - GMP
 - MPFR
 - PPL
 - Cloog/PPL
 - MPC
 - libelf

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:56:30 +02:00
Yann E. MORIN"
533e5c128c binutils: split binutils to backend/frontend, a-la cc_core
Move the actual binutils code to a backend function that builds the
required combo of build/host/target as requested by a frontend.

This split is currently a no-op, but is required for the upcoming
canadian-cross rework, where we'll be needing to build two binutils,
one for build/build/target, and one for build/host/target.

This applies to the three binutils:
 - GNU binutils
 - elf2flt
 - sstrip

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:29:35 +02:00
Yann E. MORIN"
08161250ed cc/gcc: always build core compilers to run on the build machine
The core compilers are used to build the C library, so they
should always run on the build machine, not on the host.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:28:19 +02:00
Yann E. MORIN"
e960f66953 cc/gcc: install the core compilers in the build-tools dir
There really is no good reason to install the core compilers in their
own places, one for each pass. We can install them with the other
build tools.

Also, this implies that:
 - there are fewer directories to save/restore
 - there are fewer symlinks to create for binutils
 - the PATH is shorter

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-01 17:49:44 +01:00
Yann E. MORIN"
ad1aa7079e binutils/binutils: don't install symlinks when in canadian
When building a canadian-cross, the binutils are not executable on
the build machine, so there is no point in installing the symlinks
in the gcc static/shared install dirs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-02 21:38:12 +01:00
Yann E. MORIN"
c427fcce6b debug/strace: fix download URL
strace upstream location has slightly changed.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-03-12 21:19:26 +01:00
Yann E. MORIN"
ffee93e4d2 docs: update my e-mail
Since anciens.enib.fr has been dead for two months now, without any
hope of recovery, update my e-mail to point to @free.fr instead.

Reported-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-03-06 21:36:10 +01:00
Yann E. MORIN"
bf2726cb9f binutils/binutils: rename function that build target libraries
Prepare for the incoming build/host/target frontends.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-03-04 17:31:23 +01:00
Yann E. MORIN"
354914c49a complibs/libelf: rename libelf for target function
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-03 18:39:11 +01:00
Zhenqiang Chen
c6caf866f9 cc/gcc: Update core_prefix_dir to prefix.
core_prefix_dir is not defined. It should be prefix.

Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2012-02-27 15:24:18 +08:00
Yann E. MORIN"
fec8e7b566 cc-gcc: the frontends are responsible for mkdir/chdir
The build dir are created depending on the host (host for that specific
backend, not host for the toolchain). Only the frontends know what host
this is, so only the frontends can create non-ambiguous dirs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-24 19:35:24 +02:00
Yann E. MORIN"
21b1d79706 libc/glibc: use CT_mkdir_pushd helper
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-01 17:35:10 +01:00
Yann E. MORIN"
c0475188cb functions: add new helpers that create a dir and cd/pushd into it
A lot of places are currently doing:
    mkdir -p foo/bar
    cd foo/bar

Or even:
    mkdir -p foo/bar
    pushd foo/bar
    [...]
    popd

Provide both wrapper to ease doing this.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-24 20:08:13 +02:00
Yann E. MORIN"
b990202ced cc/gcc: fix core backend's API doc
Make it more in line with the final backend's doc,
and make it simpler as well.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-24 19:24:02 +02:00
Yann E. MORIN"
58337ba708 cc/gcc: no need to build a static core pass-1 gcc for baremetal
The only user of the static core compiler in pass-1 was the newlib
C library. Now that it is build in a later step, we do no longer
need to build a static core compiler in pass-1.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-24 19:33:04 +02:00
Yann E. MORIN"
70659870b7 libc/newlib: build newlib in the proper step
Currently, newlib is built in the start_file step, which is wrong, but was
needed when the baremetal integration was... well, 'unfinished'.

Now that we build the baremetal compiler from the final cc step, and a
proper core gcc in pass-1 and pass-2, we can move the newlib build to the
step do_libc, where it belongs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:01:28 +02:00
Yann E. MORIN"
f6de807fc0 cc/gcc: comonalise the manuals build decision
Let the final frontend decide whether or not to build the manuals.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-02-13 22:18:02 +01:00
Yann E. MORIN"
33cdb19ed5 cc/gcc: do not use the core pass-2 to build the baremetal compiler
In case we build a baremetal compiler, use the standard passes:
 - core_cc is used to build the C library;
 - as such, it is meant to run on build, not host;
 - the final compiler is meant to run on host;

As the current final compiler step can not build a baremetal compiler,
call the core backend from the final step.

NB: Currently, newlib is built during the start_files pass, so we have
to have a core compiler by then... Once we can build the baremetal
compiler from the final cc step, then we can move the newlib build to
the proper step, and then get rid of the core pass-1 static compiler...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 22:43:07 +02:00
Yann E. MORIN"
40dda92f57 cc/gcc: add the backend/frontend infra for final gcc
Currently, we issue the bare-metal compiler from the pass_1 & pass_2
core compilers, because the final gcc breaks while doing so.

This implies we have to build some libces during the start_files step,
instead of the standard libc step. This is the case for newlib.

By adding a backend/frontend infra to the final gcc, we can abstract
what backend to call: the standard backend for non-bare-metal gcc,
and the core backend for bare-metal.

This patch is just an no-op, it just adds the final backend and
frontend without changing the way bare-metal is built, to come in a
subsequent patch.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 22:46:47 +02:00
Yann E. MORIN"
35f50ca6c2 cc/gcc: add 'cflags' paramater to the core backend
As the core backend is used to generate the bare-metal compiler,
we need to pass it the host CFLAGS.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-23 21:11:26 +02:00
Yann E. MORIN"
6a29db1593 cc/gcc: add host parameter to core compiler build process
Tell the core compiler what host it should run on (instead of
hard-coding runing on CT_HOST).

No functional change so far, switching between CT_HOST and CT_BUILD
will come in a following patch.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 18:10:53 +02:00
Yann E. MORIN"
cf7fbfa839 cc/gcc: pass the install prefix to the core passes
Currently, the discrimination on the core compilers prefixes depends on
the type of core compiler to build.

This is not correct, and the caller of the core backend should specify
the prefix.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 17:56:22 +02:00
Yann E. MORIN"
f87a5d6d19 cc/gcc: pass the companion libs prefix to cc_core
In case of canadian-cross, the companion libraries are not the same for
the core cc (they run on 'build') as they are for the final cc (they run
on 'host').

Prepare for this differentiation (coming later), while retaining the
current behavior (to use the same compblibs).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 17:54:21 +02:00
Yann E. MORIN"
02a77ea464 cc/gcc: rename the core backend function
Rename the core backend function to do_cc_core_backend, to
make it explicit it is a backend.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 18:08:00 +01:00
Yann E. MORIN"
e837554caa cc/gcc: simplify calls to core backend
The core backend is going to have more parameters in the upcoming
patches, so it will be a bit complex to handle.

Introduce an array-variable that is filled by the different code-paths
with the required values.

This makes the code easier to read and maintain.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 15:48:27 +02:00
Yann E. MORIN"
e9de7fc0af cc/gcc: do not consume parameters when parsing them
The current construct consumes the parameters while we parse them.
Change this to a construct that does not consume the parameters.

This has no impact on gcc, but is done for homogeneity with other
components (eg. glibc).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-02-13 21:51:48 +01:00
Yann E. MORIN"
e1899ce97c libc/glibc: do not consume parameters when parsing them
Currently, there are two constructs used to parse arguments in
glibc backends, one that consumes args as they are parsed, and
one that does not.

Always use the construct that does not eat args as they are parsed.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-02-13 21:47:25 +01:00
Yann E. MORIN"
b02975d5e8 scripts: fix download from sourceforge
It seems sourceforge changed yet again the way to download files.
This time, no longer use their 'mesh' thingy, and hard-code the
server to use in the URL... Sigh... :-(

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-02-05 23:26:55 +01:00
Yann E. MORIN"
0cbe8e889f scripts: fix typo in mk-release, remove temporary autom4 files
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-30 21:31:20 +01:00
Yann E. MORIN"
7553cf86a9 scripts: update mk-release to cope with the new autoconf framework
Now that ./configure is generated by autoconf, it must be generated
before the release tarball is made. So, we can not simply use hg's
archive, we must post-process it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-29 22:19:27 +01:00
Yann E. MORIN"
7bcabe3ae1 scripts/mk-release: use HGPLAIN and don't print progress
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-29 22:44:09 +01:00
Yann E. MORIN"
145d048e58 debug/gdb: --disable-sim for CT_GDB_CROSS.
sim was already disabled for CT_GDB_NATIVE.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@anciens.enib.fr: make it a config option]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-18 16:22:52 +08:00
Benoît Thébaudeau"
f173e77e32 complibs/cloog: fix linking with libm
In Ubuntu 11.04 and 11.10, the default options for ld have changed.
--no-copy-dt-needed-entries and --as-needed are now enabled by default, which
causes errors like:

[EXTRA]    Checking CLooG/ppl
[DEBUG]    ==> Executing: 'make' '-j3' '-s' 'check'
[ALL  ]    Making check in .
[ALL  ]    config.status: creating include/cloog/cloog-config.h
[ALL  ]    config.status: include/cloog/cloog-config.h is unchanged
[ALL  ]    libtool: link: i686-build_pc-linux-gnu-gcc -Wall -fomit-frame-pointer
 -pipe -o cloog cloog.o  -L/<snip>/build/static/lib ./.libs/libcloog.a -lm
 /<snip>/build/static/lib/libppl_c.a /<snip>/build/static/lib/libpwl.a
 /<snip>/build/static/lib/libppl.a /<snip>/build/static/lib/libgmpxx.a
 /<snip>/build/static/lib/libgmp.a -lstdc++
[ALL  ]    /usr/bin/ld: /<snip>/build/static/lib/libppl.a(MIP_Problem.o):
 undefined reference to symbol 'sqrt@@GLIBC_2.0'
[ALL  ]    /usr/bin/ld: note: 'sqrt@@GLIBC_2.0' is defined in DSO
 /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so so try adding
 it to the linker command line
[ALL  ]    /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so:
 could not read symbols: Invalid operation
[ALL  ]    collect2: ld returned 1 exit status
[ERROR]    make[2]: *** [cloog] Error 1
[ERROR]    make[1]: *** [check-recursive] Error 1

See:
https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition

This patch fixes these errors by placing '-lm' at the right place on the command
line as libppl requires libm when linking cloog.

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
2012-01-27 13:31:16 +01:00
Yann E. MORIN"
301cadf45d configure: fix kconfig option names
In the process of converting to autoconf, the kconfig option
were not properly translated.

Fix that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-16 23:45:16 +01:00
Yann E. MORIN"
b86899a341 scripts: fix tools override
The tools found by the new autostuff configure can contain arguments,
for example: grep -E

This needs separating the paths set for the Makfile from the paths
set for the scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-16 23:36:42 +01:00
Yann E. MORIN"
c8e39d6d29 configure: use autoconf to generate configure
Create configure.ac, an autoconf script to generate ./configure
This will be needed by a subsequent patch to properly handle
--build and --host, and more tests, when the kconfig stuff will
be installed pre-built.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-07 22:28:40 +01:00
Yann E. MORIN"
95fd76b784 scripts: update config.{guess,sub}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-03 23:02:04 +01:00
Yann E. MORIN"
fd09c5ab15 cc/gcc: copy file with 'cp -v', it rotates the progress bar
Installing the gcc test-suite can take a bit of time, so the
progress bar is currently not rotating because there is no
output during the copy. For an unsuspecting user, it could
mean the process hung.

With 'cp -v', the progress bar now rotates.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-01 22:54:37 +01:00
Yann E. MORIN"
af32c9331b libc/glibc: cleanup CFLAGS handling
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-28 17:05:46 +01:00
Yann E. MORIN"
6c47c0077a libc/glibc: remove multi-dir
Remove the sysroot/${multi_dir} directory after the libc install.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-27 16:11:34 +01:00
Yann E. MORIN"
3a31d01b49 libc/glibc: allow to selectively install headers and/or start-files
When doing multilib, we only need the headers from the default variant,
but we need the startfiles for each variants.

Allow the frontend to specify either one, or both.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-27 14:45:03 +01:00
Yann E. MORIN"
9d53aa6475 libc/glibc: add multilib-cacpable backend
For mutlilib, the C library must be built once for each variants.
Special care must be taken to put the resulting libraries in
the proper places.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-23 00:11:36 +01:00
Yann E. MORIN"
a5006075b7 libc/glibc: fix code formatting
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-22 00:51:37 +01:00
Yann E. MORIN"
cfb908d2ee libc/glib: pass installation subdir to backend
When building a multilib variant, install in a separate directory, to
avoid clutering the default or any other variant.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-22 00:16:37 +01:00
Yann E. MORIN"
170091aa2a libc/glibc: set the endian option according to extra CFLAGS
When building a multilib, some extra CFLAGS can override the
default config option. This is the case for the endianness
selection.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-22 00:11:51 +01:00
Yann E. MORIN"
a2e7a536e0 libc/glibc: set the float option according to extra CFLAGS
When building a multilib, some extra CFLAGS can override the
default config option. This is the case for the floating point
selection.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:56:53 +01:00
Yann E. MORIN"
2d5dc881e3 libc/glibc: add extra CFLAGS when building the C library
When building multilib, we need extra CFLAGS that tell the compiler
to use non-default settings (eg. big/little endian, hard/soft float,
-march/cpu/tune flags, and so on...).

We have to pass these flags to the build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:33:08 +01:00
Yann E. MORIN"
d6f8cd9b0a libc/glibc: no default mode for backend
The caller SHALL explicitly ask for a nmode, and not rely on a default mode.
That's what actually happens, so we can get rid of the default.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-13 11:51:07 +01:00
Yann E. MORIN"
81dc791f83 cc/gcc: print supported multilibs
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-30 21:43:10 +01:00
Yann E. MORIN"
61ce016e46 cc/gcc: build multilib
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-23 23:51:07 +01:00
Yann E. MORIN"
c23fe1a32a binutils/binutils: build multilib
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-23 23:27:12 +01:00
Yann E. MORIN"
92744ca68f cc/gcc: add option to use system zlib
In some cases, it might be desirable to use the system zlib

Eg. because latest gcc seem to be totally borked when it comes
to multilib, and tries to build a multilib host zlib, when it
is *absolutely* *not* needed: we want mulitlib on the target,
not on the host! Sigh... :-(

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-31 16:23:27 +01:00
Yann E. MORIN"
f81e437b6a scripts: update config.guess and config.sub
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-30 14:15:43 +01:00
Benoît Thébaudeau"
bcc636057f libc/eglibc: fix localedef 2.14 build
The localedef of eglibc 2.14 requires NOT_IN_libc to be defined in order to
compile intl/l10nflist.c.

This is because localedef is built separately from eglibc and uses some parts of
eglibc that don't compile in standalone without this preprocessor definition.

This fixes the following error:

[ALL  ]    gcc  -g -O2 -DNO_SYSCONF -DNO_UNCOMPRESS
 -DLOCALE_PATH='"/usr/lib/locale:/usr/share/i18n"'
 -DLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
 -DCHARMAP_PATH='"/usr/share/i18n/charmaps"'
 -DREPERTOIREMAP_PATH='"/usr/share/i18n/repertoiremaps"'
 -DLOCSRCDIR='"/usr/share/i18n/locales"' -Iglibc/locale/programs -Iglibc/locale
 -I/<snip>/.build/src/eglibc-localedef-2_14/include
 -I/<snip>/.build/src/eglibc-localedef-2_14 -I.
 -include /<snip>/.build/src/eglibc-localedef-2_14/include/always.h -Wall
 -Wno-format -c -o locarchive.o glibc/locale/programs/locarchive.c
[ALL  ]    glibc/locale/programs/locarchive.c: In function 'enlarge_archive':
[ALL  ]    glibc/locale/programs/locarchive.c:303:21: warning: variable
 'oldlocrectab' set but not used [-Wunused-but-set-variable]
[ALL  ]    In file included from glibc/locale/programs/locarchive.c:651:0:
[ALL  ]    glibc/locale/programs/../../intl/l10nflist.c: In function
 '_nl_normalize_codeset':
[ERROR]    glibc/locale/programs/../../intl/l10nflist.c:342:9: error:
 '_nl_C_locobj_ptr' undeclared (first use in this function)
[ALL  ]    glibc/locale/programs/../../intl/l10nflist.c:342:9: note: each
 undeclared identifier is reported only once for each function it appears in
[ALL  ]    glibc/locale/programs/locarchive.c: In function
 'add_locales_to_archive':
[ALL  ]    glibc/locale/programs/locarchive.c:1450:7: warning: passing argument
 1 of '__xpg_basename' discards 'const' qualifier from pointer target type
 [enabled by default]
[ALL  ]    /usr/include/libgen.h:35:14: note: expected 'char *' but argument is
 of type 'const char *'
[ERROR]    make[1]: *** [locarchive.o] Error 1

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
2011-12-14 16:55:22 +01:00
Yann E. MORIN"
d68d3cc408 libc/newlib: build manual for newlib
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@anciens.enib.fr: copy with a single call to 'cp']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-15 15:20:33 +08:00
Yann E. MORIN"
964f379a42 scripts: fix dumping execution backtrace
Dumping the backtrace has been broken since changeset #652e56d6d35a:
    scripts: execute each steps in a subshell

We can spawn sub-sub-shells in some cases.

The way the fault handler works is to dump the backtrace, but to avoid
printing it once for every sub-shell (which could get quite confusing),
it simply exits when it detects that it is being run in a sub-shell,
leaving to the top-level shell the work to dump the backtrace.

Because each step is executed in its own sub-shell, the variable arrays
that contain the step name, the source file and line number, are lost
when exiting the per-step sub-shell.

Hence, the backtrace is currently limited to printing only the top-level
main procedure of the shell.

Fix this thus:
- when dumping the bckatraces for the steps & the functions, remember
  it was dumped, and only dump it if it was not already dumped
- at the top-level shell, print the hints

Also, rename the top-level step label.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-13 23:32:39 +01:00
Yann E. MORIN"
06daaa7cc4 libc/glibc: document the glibc backend arguments
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:35:21 +01:00
Yann E. MORIN"
7637254dfe libc/glibc: create build dir using libc_mode
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-21 23:26:18 +01:00
Benoît Thébaudeau"
9c6ce95674 binutils/binutils: fix extra config array variable name
The changeset 2467 #200836977ce6 missed renaming one occurrence of
CT_BINUTILS_EXTRA_CONFIG to CT_BINUTILS_EXTRA_CONFIG_ARRAY, which is fixed by
this patch.

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
2011-12-12 20:24:05 +01:00
Yann E. MORIN"
7a8183efcd scripts: unset CONFIG_SITE
Some distributions (eg. openSUSE 12.1) systematically export
the CONFIG_SITE environment variable to point to a custom
script setting misc paths for ./configure.

This can, and does, break when cross-compiling for architectures
that are not supported by this script.

The simple workaround is to unset this variable.
NB: buildroot has a similar fix:
http://git.buildroot.org/buildroot/commit/?id=12c9f7dd6dee9c6029b4f9a12d6aac1516911ab4

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-12 21:41:16 +02:00
Benoît Thébaudeau"
c6c56296dc kernel/linux: fix missing quote
Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
2011-12-12 21:47:08 +01:00
Yann E. MORIN"
9b92f56f2f kernel/linux: add alternate download locations
Some longterm versions are not in the usual directory.
Account for these new locations.

Get rid of the mirror location, now that the main kernel site is
(almost) back to normal operations.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-12 00:01:54 +01:00
Titus von Boxberg"
697c55b797 binutils/binutils: add binutils 2.22
Enable (EXPERIMENTAL) selection of binutils 2.22

Signed-off-by: "Titus von Boxberg" <titus@v9g.de>
2011-11-28 21:27:08 +01:00
Zhenqiang Chen
919775e88b scripts: create CT_HEADERS_DIR
"${CT_SYSROOT_DIR}/usr/include" is only for "${CT_USE_SYSROOT}" = "y".
We should also mkdir when "${CT_USE_SYSROOT}" != "y".
"${CT_HEADERS_DIR}" can support both cases.

Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-12-07 16:15:50 +08:00
Titus von Boxberg"
9a3b04c3e1 scripts: use CT_CONFIG_SHELL instead of CT_SHELL
CT_SHELL is undefined.
Thus, the generated wrapper scripts are not executable by the kernel
because they do not contain a valid interpreter.
Use CT_CONFIG_SHELL instead.

Signed-off-by: "Titus von Boxberg" <titus@v9g.de>
2011-11-30 12:07:59 +01:00
Zhenqiang Chen
381366c8b6 libc/newlib: remove hard-coded "-O"
With hard-coded "-O", users can not customize CFLAGS_FOR_TARGET
by CT_TARGET_CFLAGS. If "-O" is needed, users can input it in
CT_TARGET_CFLAGS. By default, "-Os" is enabled.

Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-28 16:05:23 +08:00
Titus von Boxberg
f084787743 scripts/functions: extract: portable call for old and defective tars
Instead of using -J, --lzma, --use-compress-program or the like
use <compressor> -dc <file> | tar -f -

Signed-off-by: Titus von Boxberg <titus@v9g.de>
2011-11-22 10:08:10 +01:00
Yann E. MORIN"
3980ce9905 debug/gdb: add extra config for gdb cross.
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@anciens.enib.fr: prompt rewording, as suggested by M. Hope]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-23 13:15:27 +08:00
Zhenqiang Chen
91eb66a629 libc/newlib: add option to optimise for size
Add an option to build with -Os instead of the default -O.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-22 14:18:14 +08:00
Zhenqiang Chen
f8d8029026 cc/gcc: Apply CT_CC_GCC_DISABLE_PCH to do_cc_core.
Otherwise, users have to input --disable-libstdcxx-pch option
when building bare-metal CANADIAN C++ compiler.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-18 11:32:50 +08:00
Zhenqiang Chen
e714fd6a14 libc/newlib: Add extra config for newlib.
So users can input config like --enable-newlib-register-fini.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-18 11:47:30 +08:00
Zhenqiang Chen
e16b3b9e52 cc/gcc: handle NLS option
Add --disable-nls config when option "Enable nls" is not selected.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-17 18:00:28 +08:00
Zhenqiang Chen
46d2621f77 binutils/binutils: handle NLS option
Add --disable-nls config when option "Enable nls" is not selected.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-17 17:59:44 +08:00
Yann E. MORIN"
1185c9bf05 libc/uClibc: use endian string in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 21:08:27 +01:00
Yann E. MORIN"
756d7e704e libc/eglibc: use endian string in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 21:06:36 +01:00
Yann E. MORIN"
0056e55e74 arch/sh: use endian string in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 21:05:36 +01:00
Yann E. MORIN"
dc5048b6d2 arch/mips: use endian string in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 21:04:31 +01:00
Yann E. MORIN"
72f1c0b405 scripts/functions: use endian string in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-20 21:01:34 +01:00
Yann E. MORIN"
74d555b2c3 scripts: add support for building manuals
Add support for building the HTML and PDF manuals for the major
components.  Implement for binutils, GCC, GDB, and GLIBC.

Always build all manuals and install a subset.  Be explicit about the
subset to reduce the clutter and to avoid getting copies of common
manuals like bfd from all of the sourceware based components.  Downside of
being explicit is that you need to update it when a new component
comes along.

Build the manuals as part of the last GCC build, namely 'cc' for glibc
based ones and cc_core_pass_2 for baremetal.

An example of the output is at:
 http://people.linaro.org/~michaelh/incoming/crosstool-NG/

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: depends on ! remove docs; gold manual install]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-16 10:06:21 +13:00
Yann E. MORIN"
7e07a5043b scripts: use wget, not curl
It seems wget is more popular than curl.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-07 21:40:28 +01:00
Yann E. MORIN"
00a1fd67e9 scripts: use the floating-point string option in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-14 18:53:14 +01:00
Yann E. MORIN"
bc94e564de libc/uClibc: use the floating-point string option in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-14 18:54:37 +01:00
Yann E. MORIN"
da09907c00 arch/sh: use the floating-point string option in tests
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-14 18:51:20 +01:00
Titus von Boxberg
76b0fcc433 arch/x86: prescott is an i686
let CT_ARCH_ARCH=prescott result in a i686 tuple prefix

Signed-off-by: Titus von Boxberg <titus@v9g.de>
2011-11-17 14:18:44 +01:00
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