Commit Graph

147 Commits

Author SHA1 Message Date
Yann E. MORIN"
b44a9d9e34 scripts: Do not create backup files when patching
Some patches may apply with offset and/or fuzz, and would leave .orig files.
2010-01-31 12:07:44 +01:00
Yann E. MORIN"
58a53e7bf6 scripts/functions: add git wrapper
Add a git wrapper to retrieve components from their git tree.
Add a git wrapper to create a working copy (in our tarballs dir).
Recognise git trees when searching for local copies.
2010-01-14 20:54:47 +01:00
Yann E. MORIN"
e3a4063ac6 scripts/functions: change handling of nochdir
- 'nochdir' must be the first option
- have systematic pushd/popd, even if nochdir
2010-01-12 19:24:03 +01:00
Yann E. MORIN"
994427dbbe scripts/functions: do not compute CT_KERNEL_ARCH, it's obsolete
Since we merged the 32/64-bit archs, and we explicitly used
the Linux kernel arch name, we can get rid of CT_KERNEL_ARCH.
2010-01-23 19:02:46 +01:00
Yann E. MORIN"
9bfea69431 scripts/functions: inverse log level ALL and DEBUG 2010-01-16 17:52:44 +01:00
Richard Strand
185ea5a640 scrips/functions: fix downloads using curl
By default curl doesn't folow redirects. This breaks sourceforge downloads.
Add the -L option to curl to fix this.

Curl also downloads the html as a file even when it gets a 404. This breaks
http downloads when using the failback system. Add the -f option to curl to fix
this.

Signed-off-by: Richard Strand <richard.strand@icomera.com>
2010-01-10 15:19:25 +00:00
Yann E. MORIN"
28d1a52859 scripts/functions: fix extraction 2010-01-09 17:31:25 +01:00
Yann E. MORIN"
a272b32bba config: don't force the vendor part in the tuple
Note however that some configurations (eg. arm-elf) will still
have the vendor part 'unknown' forced in (by config.sub).
2010-01-07 23:05:30 +01:00
Yann E. MORIN"
009eb2a247 scripts: protect against partially extracted source
In case of failure (eg. user hitting Ctrl-C), avoid extracting over
partially extracted source. Will help once we have git available.
2009-11-30 21:34:50 +01:00
Yann E. MORIN"
01a58679df scripts: handle custom or empty extension when extracting 2009-11-30 00:05:45 +01:00
Yann E. MORIN"
135ea6486f scripts/functions: do not double check if downloads are allowed
Only call the *_get functions if downloads are allowed, so there
is no need to check it again in the retrieval wrappers.
2009-11-25 20:36:04 +01:00
Yann E. MORIN"
9b5d316acc scripts/functions: make aria2 less verbose when downloading 2010-01-03 16:30:35 +01:00
Yann E. MORIN"
c20e01d094 scripts/functions: fix downloading with aria2
In case the remote file does not exist (and probably for some
other reasons as well), aria2 nonetheless creates an empty file
(or not empty for some other reasons).

The solution is to delete the file whenever aria2 fails.
2010-01-01 17:09:52 +01:00
Yann E. MORIN"
b9eba0996a scripts/functions: fix using Aria2
Latest aria2 no longer recognise the --retry-wait option.
2010-01-01 12:27:06 +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"
2c077d6fac scripts/functions: simplify wget vs. curl check 2009-12-29 22:11:09 +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"
49e5b08739 libc/newlib: allow using CVS snapshots
The newlib "team" rolls new releases about once a year (december).
This is quite a long time between releases, in case code was fixed.
So, allow user to use a CVS snapshot to benefit early from fixes
and enhancements to newlib.
2009-10-26 22:00:30 +01:00
Yann E. MORIN"
e73418236d functions: allow using sub-dir of a module
Some projects' module (eg. newlib) are checked-out into a sudirectory
rather than into their own directory. Handle this case in the CT_GetCVS
function.
2009-10-26 19:49:50 +01:00
Yann E. MORIN"
68b9b30f6b libc/newlib: allow using newlib with archs other than avr32 2009-10-21 22:51:39 +02:00
Frederic Roussel
1215142d57 scripts/functions: Fix a variable name.
Signed-off-by: Frederic Roussel <fr.frasc@gmail.com>
2009-10-23 09:48:22 -07:00
Yann E. MORIN"
9ce2053352 log functions: fix CT_DoLog and CT_DoExecLog
$@ and $* are different when in double quotes; use $* to print the message.
2009-09-06 16:49:20 +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"
c992de9eb5 functions: do not over-detect error when patching 2009-08-31 11:57:13 +02:00
Yann E. MORIN"
4cd607512b [functions] Allow newlines (\n) in log messages
Allow caller to log messages with embedded newlines when calling
CT_DoLog and other logging functions (eg. CT_Abort...).
2009-06-22 21:51:13 +02:00
Yann E. MORIN"
9a954cd1a2 /devel/gcc-4.4:
- functions: add a utility function that sets and exports LD_LIBRARY_PATH

 -------- diffstat follows --------
 /devel/gcc-4.4/scripts/functions |   30    30     0     0 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
2009-05-27 21:07:37 +00:00
Yann E. MORIN"
1805f4e62d There's no longer any reason to require GNU awk:
- the only part that required it (socks proxy settings) is gone,
- all remaining awk scripts are POSIXly correct (or should be).

 -------- diffstat follows --------
 /trunk/configure                     |    5     2     3     0 ++---
 /trunk/Makefile.in                   |    2     0     2     0 --
 /trunk/scripts/build/kernel/linux.sh |    2     1     1     0 +-
 /trunk/scripts/build/internals.sh    |    1     0     1     0 -
 /trunk/scripts/build/mpfr.sh         |    2     1     1     0 +-
 /trunk/scripts/functions             |    4     2     2     0 ++--
 /trunk/scripts/saveSample.sh.in      |    4     2     2     0 ++--
 7 files changed, 8 insertions(+), 12 deletions(-)
2009-04-20 21:10:03 +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
Yann E. MORIN"
15e04fe2de Get rid of the proxy settings, once and for all.
They have nothing to do in here, just let the user
configure his/her system appropriately.

 -------- diffstat follows --------
 /trunk/scripts/build/libc/eglibc.sh |    1     0     1     0 -
 /trunk/scripts/functions            |  100     0   100     0 -----------------------------
 /trunk/config/global/download.in    |  148     0   148     0 -------------------------------------------
 3 files changed, 249 deletions(-)
2009-04-19 16:34:59 +00:00
Yann E. MORIN"
9be02f047e Use "${awk}", not gawk.
/trunk/scripts/build/kernel/linux.sh |    2     1     1     0 +-
 /trunk/scripts/build/mpfr.sh         |    2     1     1     0 +-
 /trunk/scripts/functions             |    4     2     2     0 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
2009-04-06 20:27:17 +00:00
Yann E. MORIN"
91a189c7ba Only create the state dir if asked for a restartable build:
- introduce the config dir, where components can store their config files
- move the munged uClibc config file to the config dir
- now, the state dir really is an indication that a build can be restarted

Thanks to Groleo Marius <groleo@gmail.com> for spotting the inconsistency
of the state dir usage, and suggesting this change.

 /trunk/scripts/build/libc/uClibc.sh |    6     3     3     0 +++---
 /trunk/scripts/crosstool-NG.sh.in   |    9     7     2     0 +++++++--
 /trunk/scripts/functions            |   15    12     3     0 ++++++++++++---
 3 files changed, 22 insertions(+), 8 deletions(-)
2009-03-27 23:40:07 +00:00
Yann E. MORIN"
3a181fe514 Detect and abort on partially patched component.
/trunk/scripts/functions |   18    15     3     0 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
2009-03-27 21:30:47 +00:00
Yann E. MORIN"
0e4c0c8815 Log the save/restore messages at a level that is always visible.
/trunk/scripts/functions |    7     5     2     0 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
2009-03-24 17:37:52 +00:00
Yann E. MORIN"
6d392339c6 When patching, always assume the package has been previously extraacted (don't check).
"chmod u+w" the full src tree: because of nochdir and cvs snapshots, we can't reliably know were we are...

 /trunk/scripts/functions |   11     3     8     0 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
2009-03-15 20:06:40 +00:00
Yann E. MORIN"
36871474d3 Correctly use CT_DoExecLog with wget and curl.
/trunk/scripts/functions |   16     8     8     0 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
2009-03-13 10:34:53 +00:00
Yann E. MORIN"
8e49c29255 Add CT_GetSVN to commonalise retrieval from SVN (ala CT_GetCVS).
/trunk/scripts/functions |   34    33     1     0 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)
2009-03-08 11:14:54 +00:00
Yann E. MORIN"
fec3baeca6 Check that a pacakge was previously extracted prior to patching.
Fix a comment.

 /trunk/scripts/functions |    8     5     3     0 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
2009-03-04 18:25:58 +00:00
Yann E. MORIN"
806a517cc2 Move do_finish from scripts/functions to its own file in scipts/build/internals.sh.
/trunk/scripts/build/internals.sh |  907     4   903     0 ---------------------------------------------
 /trunk/scripts/addToolVersion.sh  |    8     4     4     0
 /trunk/scripts/crosstool-NG.sh.in |    1     1     0     0 +
 /trunk/scripts/functions          |   48     0    48     0 --
 4 files changed, 9 insertions(+), 955 deletions(-)
2009-03-04 17:59:35 +00:00
Yann E. MORIN"
6822fae02e Allow user to add a directory component in the sys-root path.
Rename CT_DEBUG_INSTALL_DIR to CT_DEBUGROOT_DIR (to match CT_SYSROOT_DIR).
As a side effect, fix creating lib64->lib symlinks.

 /trunk/scripts/build/debug/100-dmalloc.sh |    2     1     1     0 +-
 /trunk/scripts/build/debug/400-ltrace.sh  |    2     1     1     0 +-
 /trunk/scripts/build/debug/300-gdb.sh     |    6     3     3     0 +++---
 /trunk/scripts/build/debug/500-strace.sh  |    2     1     1     0 +-
 /trunk/scripts/build/debug/200-duma.sh    |    6     3     3     0 +++---
 /trunk/scripts/crosstool-NG.sh.in         |   16     7     9     0 +++++++---------
 /trunk/scripts/functions                  |    2     1     1     0 +-
 /trunk/config/toolchain.in                |   17    17     0     0 +++++++++++++++++
 8 files changed, 34 insertions(+), 19 deletions(-)
2009-03-03 17:41:59 +00:00
Yann E. MORIN"
fd268ea38b Fix extracting tarballs.
/trunk/scripts/functions |    6     5     1     0 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
2009-02-19 07:38:32 +00:00
Yann E. MORIN"
f621e51c3d "chmod -R u+w" extracted tarballs, as some may have read-only files in them (ncurses-5.7 does).
/trunk/scripts/functions |    3     3     0     0 +++
 1 file changed, 3 insertions(+)
2009-02-10 08:52:13 +00:00
Yann E. MORIN"
8eed91405e Fix populate to correctly use tools discovered via ./configure.
/trunk/scripts/functions   |   11     8     3     0 ++++++++---
 /trunk/scripts/populate.in |    6     4     2     0 ++++--
 2 files changed, 12 insertions(+), 5 deletions(-)
2009-02-01 22:41:16 +00:00
Yann E. MORIN"
3f4bf75a27 Fix removing directories.
/trunk/scripts/functions |    7     4     3     0 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
2009-02-01 17:04:00 +00:00
Yann E. MORIN"
1a346ed273 Fix downloading with CT_GetFile when no mirror is set.
/trunk/scripts/functions |    8     5     3     0 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
2009-01-31 13:15:18 +00:00
Yann E. MORIN"
2aaa5b8b68 Update populate:
- use tools found by ./configure
- some POSIX and eye-candy cleanups

 /trunk/scripts/functions   |    7     4     3     0 +++--
 /trunk/scripts/populate.in |   70    46    24     0 ++++++++++++++++++++++++++++++++++------------------
 2 files changed, 50 insertions(+), 27 deletions(-)
2009-01-29 22:35:26 +00:00
Yann E. MORIN"
1115b43f86 On 20090115.0012+0100, "Andy Johnson" <ajohnson@aecno.com> wrote:
... I added a step after
  "debug" called "finish", and moved the code in crosstool.sh
  after the loop that processes the steps from crosstool.sh
  into a do_finish function in functions.  Thus, it is now
  possible to restart after the "debug" step to re-do the
  final few things (clean and compress).

 /trunk/scripts/crosstool-NG.sh |   38     0    38     0 --------------------------------------
 /trunk/scripts/functions       |   42    42     0     0 ++++++++++++++++++++++++++++++++++++++++++
 /trunk/steps.mk                |    3     2     1     0 ++-
 3 files changed, 44 insertions(+), 39 deletions(-)
2009-01-20 20:37:43 +00:00
Yann E. MORIN"
0fc2762de7 Forced-removing of a non-existing directory breaks the build.
Noticed by "Andy Johnson" <ajohnson@aecno.com>, who provided a patch that I adapted.

 /trunk/scripts/functions |   13    10     3     0 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
2009-01-20 20:10:50 +00:00
Yann E. MORIN"
83f0bec915 Fix removing existing directories by chmod'ing them to be user-writeable.
/trunk/scripts/crosstool.sh |   21    10    11     0 ++++++++++-----------
 /trunk/scripts/functions    |    7     7     0     0 +++++++
 2 files changed, 17 insertions(+), 11 deletions(-)
2009-01-12 21:35:23 +00:00