summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2011-06-26glibc: Refactor startfiles/headers into do_libc_backend()Bryan Hundven1-123/+92
Refactor the contents of 'do_libc_start_files()' and 'do_libc()' into a parameterized 'do_libc_backend()'. 'do_libc_start_files()' and 'do_libc()' call 'do_libc_backend()' with either 'libc_mode=startfiles' or 'libc_mode=final' (respectively) so that the startfiles/headers and the final libc builds are configured and built with the same options. One example of where this is needed is when building a mips toolchain. Previously, if you were building an n32 toolchain, you wouldn't have noticed an issue, because if '-mabi' is not in CFLAGS, n32 is the default: http://sourceware.org/git/?p=glibc-ports.git;a=blob;f=sysdeps/mips/preconfigure;hb=HEAD But when trying to build an o32 or n64 toolchain the build would have failed. This is because (e)glibc expects "-mabi={o32,n32,n64}" to be in CFLAGS, but was not previously provided in 'do_libc_start_files()'. The build failure would happen in the shared-core gcc when it tries to configure an n64 or o32 gcc with an n32 libc. A simpler solution would have been to just add TARGET_CFLAGS to configure in 'do_libc_start_files()', but this way makes configure and make consistent for both steps. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2011-06-08debug/cross-gdb: check host dependenciesYann E. MORIN"1-0/+1
Cross-gdb depends on expat and python. If either is missing, cross-gdb will build successfully, but lacking some features. Especially, if expat is missing, cross-gdb will be unable to parse the target description, which may lead to runtime malfunctions and the following GDB warning: "Can not parse XML target description; XML support was disabled at compile time" Hence, expat should be considered mandatory. On the other hand, the features missing without python are not critical, so python should not be considered mandatory. This patch does the following: - At configure time, warn the user if either expat or python is missing. - In menuconfig, disable the static build options regarding cross-gdb if no static version of expat is available, and disable cross-gdb if expat is missing. Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com> [yann.morin.1998@anciens.enib.fr: add comment for impossible static cross-gdb] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-04libc/glibc: do not try to download NPTL add-onYann E. MORIN"2-2/+12
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-03kconfig: prepend CT-NG's version tag to PKGVERSIONBenoît THÉBAUDEAU"5-12/+15
"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-02functions: save & restore the static companion libraries install dirYann E. MORIN"1-0/+2
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02functions: fix downloading filesYann E. MORIN"1-5/+6
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-30glibc: properly handle internal addonsYann E. MORIN"3-11/+31
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-30libc/eglibc: use generic SVN functionsYann E. MORIN"1-83/+15
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-30scripts/functions: do not abort on failed svnYann E. MORIN"1-1/+4
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-30scripts/functions: do not abort on failed extractYann E. MORIN"1-2/+5
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-30scripts/functions: do not abort on failed downloadYann E. MORIN"1-5/+6
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-30cc/gcc: fix a misleading FIXMEYann E. MORIN"1-4/+4
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-31gdb: use the PKGVERSION and BUGURL optionsBenoît THÉBAUDEAU"1-0/+5
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-31eglibc: use the PKGVERSION and BUGURL optionsBenoît THÉBAUDEAU"2-2/+23
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-31binutils: use the PKGVERSION and BUGURL optionsBenoît THÉBAUDEAU"2-0/+24
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-31gcc: promote PKGVERSION and BUGURL options to toolchain levelBenoît THÉBAUDEAU"1-6/+10
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-31scripts/addToolVersion.sh: add a function to extract fields from versionsBenoît THÉBAUDEAU"1-6/+15
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-29libc/glibc: commonalise extraction btw glibc and eglibcYann E. MORIN"3-90/+47
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-28libc/glibc: fix {e,}glibc add-ons with short or long namesYann E. MORIN"2-10/+30
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-25debug/gdb: fix runtime sysrootBenoît THÉBAUDEAU"1-0/+1
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-24scripts: fix broken variable nameBenoît THÉBAUDEAU"1-2/+2
This patch fixes a config variable name missing its 'CT_' prefix. Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-05-19scripts: munge .config to handle array variablesYann E. MORIN"4-6/+13
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-18config: rename variables that are arraysYann E. MORIN"5-11/+12
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-15scripts: interpret *_EXTRA_CONFIG config variables arraysYann E. MORIN"4-9/+9
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-19complibs/ppl: build only C and C++ interfaces for PPLAnthony Foiani1-1/+1
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-19complibs/ppl: remove unnecessary (and confusing) --enable-cxx configure switch.Anthony Foiani1-1/+0
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-19complibs/ppl: update GMP location configuration argument for PPL v0.11 and laterAnthony Foiani1-0/+1
'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-08scripts/addToolVersion: fix gcc complibs dependencyYann E. MORIN"1-9/+10
Since the gcc configuration changes, the way to select the dependent companion libraries has changed. Update the addToolVersion script to match. Reported-by: Xun Li <lxfind@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-02internals: fix stripping yet once againYann E. MORIN"1-1/+13
Fix typo introduced by changeset #055e505f28be. Also, handle older versions of gcc (typically, all versions prior to 4.0.0). Maxime provided a similar patch, missing the case for the legacy versions of gcc. Reported-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-30internals: fix stripping canadiansYann E. MORIN"1-1/+1
We can't run the newly built gcc when it is a canadian cross. Thus, we can't get the version number, and thus we can't get the directory libexec subdirectory to strip. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-27scripts/addToolsVersion: versions can be either in the .in or the .in.2Yann E. MORIN"1-5/+12
The components have their version selection handled either in the .in file or the .in.2 file. Handle both cases. Also, when dumping an existing version, keep the user's grep options (ie. do override neither options nor colors). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-24libc/uClibc: use MMU settingsYann E. MORIN"1-0/+13
Enforce the MMU settings from the crosstool-NG configuration. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-24scripts: small eye-candy in the wiki tableYann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-24internals/finish: do not remove ${PREFIX}/includeYann E. MORIN"1-3/+0
gcc installs the C++ headers in ${PREFIX}/include/ but we trash that directory at the end of the build. We previously removed that directory as it contained the companion libraries header files. But it's been some time now that we isntall the companion libraries in their own dedicated place, so we do not need to remove that directory. Until we have a better fix, just keep that directory for now. Reported-by: Bob Rossi <bob@brasko.net> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-12scripts: update config.subYann E. MORIN"1-11/+32
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-07scripts/mk-patch: squash all non alphanumeric charsYann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-07functions: pretty print error messagesYann E. MORIN"1-9/+43
Reformat the error messages: - strip ${CT_LIB_DIR} from scripts path names - strip ${CT_TOP_DIR} from build.log path and docs path - overall shorter lines - point to the known-issues file Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-07functions: fix date calculationsYann E. MORIN"1-1/+1
In case date(1) does not support nanosecond resolution, it does not interpret '%N', and leave it as-is. So we have to remove it. Note that some versions replaces '%N' with 'N', so we have to take this into account as well. Reported-by: Kyle Grieb <grieb.kyle@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-07functions: avoid CR when progress bar is not enabledJavier Viguera1-1/+1
Using CT-NG with progress bar disabled, still prints CR ('\r') characters on the output. When you capture the output to a file as part of an automated build, it shows extra empty lines. For example: ------------------------------------------------------------ [INFO ] Performing some trivial sanity checks [INFO ] Build started 20110404.113619 [INFO ] Building environment variables [EXTRA] Preparing working directories [EXTRA] Installing user-supplied crosstool-NG configuration ------------------------------------------------------------ Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2011-04-06complibs: disable building shared libsYann E. MORIN"11-275/+15
Managing the shared version of the companion libraries has become cumbersome. Also, it will one day be possible to use the companion libraries from the host distribution, and then we will be able to easily use either shared or static libs. As a side note, while working on the canadian-rework series, it has become quite more complex to properly handle shared companion libraries, as they need to be built both for the build and gost systems. That's not easy to handle. At all. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-04binutils/binutils: add blind option to force use of ld.bfd during buildYann E. MORIN"1-0/+5
gold is not capable of building glibc/eglibc, so we have to force using the BFD linker, ld.bfd. Offer a blind option that affected components can select to force use of the BFD linker during the build. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-05binutils/binutils: also install the wrapper for the internall ldYann E. MORIN"1-0/+3
ld is also installed in PREFIX/TUPLE/bin, so we need to wrap that as well. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-03arch/sparc: add absic supportYann E. MORIN"1-0/+8
Add support for building SPARC targeted toolchain. With this patch I have built a working sparc V8 (32 toolchain). Testing shows that not all gcc versions works well: 4.4.1 OK (kernel builds and the final kernel can boot) 4.4.2 Not tested 4.4.3 Not tested 4.4.4 BAD (Kernel can build but fails during boot) 4.4.5 BAD (Kernel can build but fails during boot) 4.5.1 BAD (Build fails with a spill related ICE - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35664) 4.5.2 OK (kernel builds and boots) I have successfully been using the 4.5.2 version for a few months. This patch does not add support for the LEON variant. That may come later. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> [yann.morin.1998@anciens.enib.fr: for 32-bit, default CT_TARGET_ARCH is OK] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-27cc/gcc: fix linking with static PPL 0.11+Yann E. MORIN"1-4/+32
PPL 0.11+ installs three libs: lippl, libppl_c and libpwl. libppl_c has a dependency on libpwl (at least for watchdog stuff). While gcc correctly links with libppl and libppl_c, it does not pull libpwl in. In case of shared libs, this is not a problem, as libppl_c has a NEEDED dependency on libpwl. But for static libs, that does not work. Although libppl_c.la exists and has a correct dependency on lipwl, somehow gcc misses it. So we have to force pulling libpwl when needed. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-26complibs/ppl: build watchdog libraryYann E. MORIN"1-0/+2
gcc-4.6+ requires the Parma Watchdog Library (libpwl). Build it and use it. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-26cc/gcc: fix building core when building staticallyYann E. MORIN"1-2/+2
There was a mishap when cut-n-pasting code from the final step into the core step: a variable was not renamed. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-22scripts/internals: fix stripping once moreYann E. MORIN"1-1/+1
Some scripts have 'very long lines', so the output of 'file' will have that mentioned, such as: POSIX shell script, ASCII text executable, with very long lines Reported-by: Kyle Grieb <grieb.kyle@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-20cc/gcc: log even moreYann E. MORIN"1-2/+2
Also log variable assignement for single commands. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-20libc/mingw: log even moreYann E. MORIN"1-3/+3
Also log variable assignement for single commands. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-03-20libc/glibc-common: log even moreYann E. MORIN"1-2/+2
Also log variable assignement for single commands. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>