Commit Graph

74 Commits

Author SHA1 Message Date
Samuel Martin
338c1b4642 script: allow to pass any float value for CT_LOAD
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Message-Id: <b51acf21c72b4a8e882e.1359320015@laptop>
Patchwork-Id: 216062
2013-01-27 17:54:19 +01:00
Yann E. MORIN"
1cabb74b7d scripts: check for running as root
Running as root is really, really dangerous.

Add a runtime-check that refuses to build if running as root.
Can be overriden with a double switch in the menuconfig.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-10 22:38:48 +01:00
Yann E. MORIN"
db5b6a4915 all: unmark experimental features
It's been some time now we've had those features, so unmark them
being experimental.

It does not mean everything is perfect, but may gather some more
testing of those features.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-12-26 20:05:19 +01:00
Yann Diorcet
b43fdf40f1 scripts: add BUILD/HOST extra cflags/ldflags
On some hosts, and for certain toolchains (eg. toolchain targetting
the upcoming Darwin), it may be necessary to pass arbitrary CFLAGS
and/or LDFLAGS when building the components.

And necessary infrastructure:
  - EXTRA_{CFLAGS,LDFLAGS}_FOR_{BUILD,HOST} as config options
  - pass those extra flags to components

Fix-up a slight typo in elf2flt at the same time (misnamed cflags).

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <d24043276c9243a35421.1353077450@macbook-smorlat.local>
Patchwork-Id: 199645
2012-11-16 15:25:57 +01:00
Yann E. MORIN"
dd98145bc1 scripts: add option to start an interactive debug shell
Add an option that, when a command fails:
  - starts an interactive shell with the failed command's environment
  - attempts re-execution of the failed command, continues, or aborts
    at user's whim.

Before starting the debug-shell, the backtrace is printed.
When exiting for an abort, the standard error message is printed.

Based on an idea and a patch from: Johannes Stezenbach <js@sig21.net>
    http://sourceware.org/ml/crossgcc/2012-09/msg00144.html

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[yann.morin.1998@free.fr: integrate in the fault handler]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Johannes Stezenbach <js@sig21.net>
Patchwork-Id: 191571
Patchwork-Id: 191668
2012-10-06 23:48:07 +02:00
David Holsgrove
f242016a09 scripts/functions: add a generic custom location infrastructure
Add a generic custom location infrastructure (inspired by the one in
kernel/linux) to allow the user to use custom tarballs or directories
for any component.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: move config option, improve help text, fix API doc]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <131c163c69f9cc81d2be.1349931191@localhost.localdomain>
PatchWork-Id: 190784
Message-Id: <0bbaba9190a76ba97f72.1349931192@localhost.localdomain>
PatchWork-Id: 190785
2012-10-04 13:26:14 +10:00
Yann E. MORIN"
15bde07c86 scripts: add option to only use the mirror
Currently, if downloads are forbidden, the mirror is still tried for.

Change this way:
  - if downlaods forbidden, do not try neither upstream locations nor mirror
  - add option to only use the mirror, and avoid upstream locations

Signed-off-by: Austin Morton <austinpmorton@gmail.com>
[yann.morin.1998@free.fr: broaden the if USE_MIRRORto enclode mirror location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-12 07:45:42 -04: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"
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"
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"
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"
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
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"
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"
bb3519ad37 scripts/functions: always prefer the mirror
Currently, the mirror can be used either:
 - as a fallback in case upstream is unavailable (default behavior)
 - as the preferred source for downloads

But the most common use-case seems to provide a truely-LAN mirror
to speed up downloads in big corpos', and/or provide a 'trusted'
source for the tarballs.

So, make the following changes;
 - if a mirror is specified, always try that before trying upstream

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-02 23:11:25 +02:00
Yann E. MORIN"
c009897aee misc: fix more typos here and there...
Reported-by: "Antony N. Pavlov" <antony@niisi.msk.ru>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 16:53:40 +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"
cd348634e9 config: small help fix up for work dir default
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-28 01:10:23 +02:00
Yann E. MORIN"
7817bcebe7 config: add an option not to remove the destination directory
In certain circumstances, removing the destination/installation directory
is a bad idea. For example, when the build environment is already taking
care of sanitising the build tree, and pre-installs stuff in there, it is
a very bad idea to remove the destination directory.

This happens now in buildroot, as the crostool-NG backend now installs the
toolchain in the common host-tools directory, and pre-install there a few
host-utilities (eg. host-automake and host-gawk).

Provide a config knob to turn on/off the removal of the destination
directory, defaulting to 'y' (previous behavior), and forced to 'n' when
used as a backend.

Reported-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-28 22:06:49 +01:00
Yann E. MORIN"
6ef2caf1d3 docs: overview.txt is gone, point to the new documentation
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-22 00:34:56 +01:00
Yann E. MORIN"
6cdc8c6d7e config: fix the patch fallbacks methods
Reported-by: Heiko Zuerker <heiko@zuerker.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-18 23:08:12 +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"
72ad9d45f8 config: change name of default build dir
'targets' is not really meaningfull.
'build' means what it means.
'.build' just hides it as well! :-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-12 21:38:12 +02:00
Yann E. MORIN"
1c149fe46f scripts: do not download in // by default
Parallel downloads can be a bit harsh on the servers,
and some will fail (eg. uclibc.org) in some cases.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-08-11 19:10:45 +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
Yann E. MORIN"
d0475b1f5a config: no need to push the download mirror in a sub menu 2010-07-10 14:20:16 +02:00
Yann E. MORIN"
712f0c9919 config: move backend-related options to their own file 2010-03-29 20:15:25 +02:00
Yann E. MORIN"
eb765a2a46 config: hide arch and kernel selection when used as a backend
When used as a backend, it is the responsibility of the upper-layer build
system to set the target architecture and kernel.
2010-03-29 12:06:58 +02:00
Yann E. MORIN"
a5c8cbcff7 config: hide options to debug crosstool-NG when a backend
When used as a backend, it does not make sense to debug crosstool-NG,
so hide the option.
2010-03-29 10:03:29 +02:00
Yann E. MORIN"
63f8c480c5 config: hide more config options when a backend
Hide the prompts for some behavioral options, for which the upper-layer build
system is responsible for:
- parallel jobs and maximum load
- use pipes
- use custom shell
2010-03-29 10:05:21 +02:00
Yann E. MORIN"
bf785b301b config: hide paths when used as a backend
When crosstool-NG is used as a backend, it is the responsibility of the
upper-layer build-system to properly set paths, so we just hide the
prompts in this case.
2010-03-29 12:04:27 +02:00
Yann E. MORIN"
daca7d6672 config: prepare for build-system backend
When acting as a backend for a build-system, we should not build
any application that runs on the target, that is:
- no native gdb
- no companion libraries
- no binutils libraries
- no debug tools (save for gdbserver)
- ...

Here, we simply prepare the (hidden) config option that will detect
that we are acting as a back-end.

Update doc accordingly.
2010-03-05 09:19:56 +01:00
Yann E. MORIN"
96f5d9003a config: re-order the log entries inthe menuconfig 2010-02-04 00:11:56 +01:00
Yann E. MORIN"
754060b02e config: rename mirror prompt, update help entry
The mirror is not necessarily on the /LAN/.
2010-01-31 12:39:42 +01:00
Yann E. MORIN"
f50cca2bc9 config: remove never used/implemented 'ls-lR'
Use of listing (ls-lR) was never implemented, and never used.
2010-01-31 12:36:50 +01:00
Yann E. MORIN"
88d3a95eca global: do not offer the renice option, let's the user handle that
It's broken anyway. Eg.:
- user is already niced at 10
- user configures to renice at 5
- breaks because user is not allowed to 'boost' his/her nice value

Bette let the user handle the renice with:
  nice -XX ct-ng 'action'
2010-01-29 23:14:53 +01:00
Yann E. MORIN"
04c68600ea scripts/functions: add aria2, a powerfull downloader
aria2 is a powerfull downloader that is capable of chunking and
parallel retrieval.

Due to li;itations in crosstool-NG retrieval facilities, it's not possible
to take fully advantage of aria2. It might happen that, in the future,
those limitations get lifted away, so we can take use features such as
parallel downloading from more than one server at the same time. For now,
it should still speed up downloads thanks to parallel downloading of chunks.
2009-12-30 15:36:22 +01:00
Yann E. MORIN"
2b212bccad config/global: enable not using patches at all
It can be needed to build a toolchain with no patch at all.
2009-11-16 20:15:45 +01:00
Yann E. MORIN"
539a2357df config: move the patch choice to the extract section
Choosing the origin of the patches to apply is best
done in the 'extract' section.
2009-08-31 22:55:26 +02:00
Yann E. MORIN"
2efc2b2319 config: add fallback to patch order
Add the possibility to fallback to either bundled or local patches
if local or bundled are missing.
2009-08-31 12:47:58 +02:00
Yann E. MORIN"
b09e70bda5 config: add the local,bundled patch order
This ordering first applies the local patches, then the bundeld ones.
2009-08-31 12:51:53 +02:00
Yann E. MORIN"
dc836b5e4d config: make selecting the patch origin a choice rather than a bool 2009-08-31 12:05:52 +02:00
Yann E. MORIN"
6370afc4f4 config: make CONFIG_SHELL default to bash
Some components (eg. GMP) will fail to correctly build if
the CONFIG_SHELL is not bash (eg. ash or dash). So make bash
the default CONFIG_SHELL.

Keep ash as a possible selection, as future versions of those
currently /broken/ tools may come fixed wrt to CONFIG_SHELL
being POSIX-ly compliant.
2009-08-06 19:40:26 +02:00
Yann E. MORIN"
70f87b8969 [config] Warn againt using ash as CONFIG_SHELL
It apears that more and more ./configure scripts and Makefiles
make use of non-POSIXly correct shell constructs, that don't
work with ash.

For now, just warn the user against using ash, but keep it as
an option in case newer versions of the /broken/ components
come fixed, and we can again use ash, as it is in some cases
really faster than bash.
2009-08-02 23:50:22 +02:00
Yann E. MORIN"
27cdd4367c [config] Allow user to specify custom CONFIG_SHELL
In case the shell the user wants to use as CONFIG_SHELL is located in a
weird place (eg. /opt/bash/bin/bash), or is weirdly named (eg. bash-4),
let the user enter the patch to the shell.
2009-08-02 20:06:44 +02:00
Yann E. MORIN"
d6195c6483 [config] Add bash as a possible CONFIG_SHELL
On some systems and/or for some components, it may be necessary to
explicitly use bash as the shell used by ./configure and Makefiles.
2009-08-02 20:06:06 +02:00
Yann E. MORIN"
a08142a02a [config] Change the way to select the CONFIG_SHELL
Transform the single boolean option to a 'choice' selection
with two options: "sh" and "ash".

This is needed to later add "bash" as override.
2009-08-02 23:43:15 +02:00
Yann E. MORIN"
683d230777 Add a bit more explanations on the meaning of OBSOLETE and EXPERIMENTAL.
-------- diffstat follows --------
 /trunk/config/global/ct-behave.in |   22    13     9     0 +++++++++++++---------
 /trunk/docs/overview.txt          |    8     6     2     0 ++++++--
 2 files changed, 19 insertions(+), 11 deletions(-)
2009-04-20 21:30:25 +00:00
Yann E. MORIN"
e70f9494cb Poit my mirror as the default.
-------- diffstat follows --------
 /trunk/config/global/download.in |    2     1     1     0 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2009-04-19 16:59:40 +00:00
Yann E. MORIN"
9643bcbb55 Simplify the mirror settings.
-------- diffstat follows --------
 /trunk/scripts/functions         |    7     3     4     0 ++---
 /trunk/config/global/download.in |   60    14    46     0 +++++++++++-----------------------------------
 2 files changed, 17 insertions(+), 50 deletions(-)
2009-04-19 16:58:21 +00:00