summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2011-08-14kernel/linux: remove check for lzma tarballsYann E. MORIN"1-1/+0
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-14kernel/linux: simplify custom tarball handlingYann E. MORIN"1-43/+27
Simplify the way the custom tarball is handled: - fake version="custom" - at download, simply link the custom tarball to: "linux-custom.${custom_extension}" - at extract, the above allows to simply extract "linux-${LINUX_VERSION}" where LINUX_VERISON is set to the fake version="custom" Not that much convoluted, in fact... :-/ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-12libc/uClibc: force use of ctor/dtorYann E. MORIN"1-1/+5
Although ctor/dtor do not seem strictly required, missing them proves rather inconvenient, as ld can't link binaries. Reported-by: John Spencer <maillist-uclibc@barfooze.de> (sh4rm4 on IRC) Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-10scripts/functions: remove messages about failed downloadsYann E. MORIN"1-3/+4
When downloading via svn/cvs/... an attempt to retrieve from the mirror is made. If the mirror does not have the required tarball, an error message is printed. This is misleading, as the download may later succeed via svn/cvs/... Remove the messages about failed downloads altogether. At the same time, use "if ... then ... fi" instead of "... && ..." Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-02scripts: try the mirror even if downloads are forbiddenYann E. MORIN"2-22/+35
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-02scripts/functions: use array variables for URLs listYann E. MORIN"1-4/+6
This is needed later, when we'll conditionnally use both the upstream and the mirror URLs. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-02scripts/functions: always prefer the mirrorYann E. MORIN"1-14/+4
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-02scripts/functions: cvs retrieval first tries the mirror for tarballsYann E. MORIN"1-5/+5
The cvs download helper looks for the local tarballs dir to see if it can find a pre-downloaded tarball, and if it does not find it, does the actual fetch to upstream via cvs. In the process, it does not even try to get a tarball from the local mirror, which can be useful if the mirror has been pre-populated manually (or with a previously downloaded tree). Fake a tarball get with the standard tarball-download helper, but without specifying any upstream URL, which makes the helper directly try the LAN mirror. Of course, if no mirror is specified, no URL wil be available, and the standard cvs retrieval will kick in. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-02scripts/functions: svn retrieval first tries the mirror for tarballsYann E. MORIN"1-5/+5
The svn download helper looks for the local tarballs dir to see if it can find a pre-downloaded tarball, and if it does not find it, does the actual fetch to upstream via svn. In the process, it does not even try to get a tarball from the local mirror, which can be useful if the mirror has been pre-populated manually (or with a previously downloaded tree). Fake a tarball get with the standard tarball-download helper, but without specifying any upstream URL, which makes the helper directly try the LAN mirror. Of course, if no mirror is specified, no URL wil be available, and the standard svn retrieval will kick in. Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-01scripts/functions: if no upstream URL is given, silently ignore thatYann E. MORIN"1-0/+1
When retrieving tarballs from upstream, if no URL was given, do not fail; simmply ignore that fact. This will be used later when the SVN helper will call the standard helper to try the LAN mirror before trying svn. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-29libc: remove unneeded glibc/eglibc common functionsBenoît THÉBAUDEAU"1-12/+0
do_libc_locales_extract() and do_libc_locales() in glibc-eglibc.sh-common have been overridden for both glibc and eglibc, so they can now be removed, which this patch does. Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-29libc/glibc: add partial support for localesBenoît THÉBAUDEAU"1-0/+70
This patch adds partial support for glibc locales. For now, it only generates the appropriate locales when the host and the target have the same endianness and uint32_t alignment. Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-29libc/eglibc: add support for localesBenoît THÉBAUDEAU"1-1/+74
This patch adds support for eglibc locales. Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-29libc: create an infrastructure to build and install the libc localesBenoît THÉBAUDEAU"1-0/+20
This patch adds a common glibc/eglibc infrastructure to build and install the libc locales. Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-31libc/mingw: fix mingw source dirsYann E. MORIN"2-23/+23
Someof the mingw32 source tarballs have an appended '-src' after the version. Since changeset #6e1412ba8da9 (scripts/functions: force extract folder to archive basename), it means mingw tarballs get extracted in a directory ending with '-src'. Fix that. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-31libc/uclibc: fix src dir locationYann E. MORIN"1-13/+3
Now that we akways extract the tarballs in a sane location (see changeset #6e1412ba8da9: scripts/functions: force extract folder to archive basename), the uClibc snapshot dir now has the date (as version) in it, eg.: uClibc-20100710 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-30config: don't require .config.2 to save a sampleYann E. MORIN"1-3/+4
Samples should contain kconfig-parsable definitions, not script variables. .config.2 contains bash arrays, which is definitely not kconfig-safe... Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-29debug/gdb: don;t install sample gdbinit for old versionsYann E. MORIN"1-14/+16
Only starting with gdb-7 does installing the gdbinit sample makes senses. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-29scripts/functions: force extract folder to archive basenameBenoît THÉBAUDEAU"1-3/+4
Some archives like those of the 2011.07 revisions of Linaro GCC contain a folder name different from the archive basename, which leads to errors afterwards, e.g. when patching. E.g.: gcc-linaro-4.5-2011.07.tar.bz2 extracts to gcc-linaro-4.5-2011.07-0/ This patch changes CT_Extract() to force the extraction of all archives to a folder named like the archive basename. E.g.: gcc-linaro-4.5-2011.07.tar.bz2 now extracts to gcc-linaro-4.5-2011.07/ Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-28scripts/libc: do not build add-ons by defaultBenoît THÉBAUDEAU"1-1/+1
Currently, no --enable-add-ons option is passed to libc configure when "$(do_libc_add_ons_list ,)" is empty, which makes configure automatically search for present add-ons. In that case, all present add-ons are built, although no add-on was selected by the user in the config. Moreover, this can make the configure fail if some non-standard add-ons like eglibc-localedef are present. This behavior also leads to an inconsistency from a user point of view between the following cases: - LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS="none" in the config, which makes "$(do_libc_add_ons_list ,)" return "", so all present add-ons are built. - LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS!="none" in the config, which makes "$(do_libc_add_ons_list ,)" return the add-on supporting the chosen threading implementation, e.g. "nptl", so only this add-on is built. This patch disables the building of all add-ons in that case. It is still possible to build all present add-ons by adding --enable-add-ons to LIBC_GLIBC_EXTRA_CONFIG_ARRAY. Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
2011-07-24debug/gdb: install gdbinit sample fileYann E. MORIN"2-0/+22
gdb needs to know where to find the libstdc++ helper python script to do, well, whatever it has to do with it... We can't install that in the user's ~/.gdbinit, it's too complex to handle all the cases. Moreover, if the user is using more than one toolchain, we can't put all that stuff in there... Just provide a sample config file the user can adapt to his/her own needs. Thanks go to Khem RAJ for providing such a hint: http://sourceware.org/ml/crossgcc/2011-07/msg00026.html Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com> CC: Khem Raj <raj.khem@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-22kernel/linux: prepare to handle 3.xYann E. MORIN"1-6/+12
The place to get 3.x has changed; the version scheme has changed. No need to be overkill, just support 3.x; 4.x is not even dreamt of. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17misc: fix more typos here and there...Yann E. MORIN"4-6/+6
Reported-by: "Antony N. Pavlov" <antony@niisi.msk.ru> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17misc: fix typosYann E. MORIN"2-2/+2
Reported-by: "Antony N. Pavlov" <antony@niisi.msk.ru> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-12scripts, cc/gcc: do not fail on existing symlinks or build.logYann E. MORIN"3-5/+5
If the user builds a toolchain over an existing one, so, without removing CT_PREFIX_DIR, the build fails as the symlinks already exist, as does the build.log. This can also happen (for build.log) if the user first ran in download- or extract-only. Patch (with no SoB) originally from: Phil Wilshire <phil.wilshire@overturenetworks.com> Modified by me as it did not apply cleanly. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-12scripts/xldd: fix missing arg to one printfYann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-10scripts/xldd: don't pass random format to printfYann E. MORIN"1-19/+19
Although proabaly inoffensive in our case, do not pass un-checked formats to printf. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-10scripts/xldd: print end of current actionYann E. MORIN"1-1/+13
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-10scripts/xldd: fix typoYann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-14cc/gcc: do not build libgomp or libmudflap in the core stepsYann E. MORIN"1-0/+3
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-14scripts/internals: do not remove lib{32,64}/ symlinks after buildYann E. MORIN"1-12/+2
During the build, we create lib{32,64}/ symlinks out of the sysroot. In some cases (eg. mingw32 target), these symlinks are still required when running the toolchain. For other combinations, the symlinks are without incidence, so they can be safely kept after the build. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-09scripts: on startup, also remove the buildtools dirYann E. MORIN"1-3/+2
In case there's one lingering around (whether the previous build was successful, or failed), we have to remove the buildtools directory as well as the toochain build dir. This should also fix the case where out makeinfo wrapper calls itself recursively. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-09libc/glibc: fix passing args with spaces when calling backendYann E. MORIN"1-1/+1
Spaces in arguments to the glibc backend were not handled. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-04-14cc/gcc: fix passing args with spaces when calling core gccYann E. MORIN"1-1/+1
Spaces in arguments to the core gcc backend were not handled. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-07scripts: update config.{guess,sub}Yann E. MORIN"2-13/+15
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-03config: move multi-line shell commands from Makefile to scriptYann E. MORIN"1-0/+158
Maintaining thos multi-line shell commands in a Makefile rule is a real PITA. Move the two affected rules (build_gen_choice_in and build_gen_menu_in to a shell script. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-03cc/gcc: fix non-MIPS buildsYann E. MORIN"1-30/+34
The new MIPS-specific options are not valid for other targets. Also, move the arch-specific setting lower in the extra_config setting. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-27cc/gcc: add MIPS spercific configure optionsYann E. MORIN"1-0/+32
Add the following MIPS specific options when configuring gcc: --with(out)-llsc --with(out)-synci --with(out)-mips-plt --with-divide=type Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-27cc/gcc: add option for linker hash styleYann E. MORIN"1-0/+10
Add an option to specify the hash type that gcc will ask the linker to use. It is a provision for the upcoming 4.7, as no version currently supports it. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-27cc/gcc: add build-id optionYann E. MORIN"1-0/+8
Add an option to configure gcc with --enable-linker-build-id. Reported-by: Bryan Hundven <bryanhundven@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-30libc/eglibc: Add option that allows for getting svn over http://Yann E. MORIN"1-1/+7
Instead of getting eglibc over standard svn://svn.eglibc.org Add an option that allows the user to get source from http://www.eglibc.org/svn This is useful if you are behind a firewall or proxy. If you are behind a proxy, don't forget to configure ${HOME}/.subversion/servers In the [global] section setup your proxy configuration. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com> [yann.morin.1998@anciens.enib.fr: removed useless 'default n'] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-28cc/gcc: remove --enable-symver optionYann E. MORIN"1-4/+0
That option is coming from the original crosstool, and is not entirely understand here. Moreover, it breaks with newer gcc-s: 4.6.1 now breaks while configuring libjava (and probably some other libs as well, untested). There is an related bug report to the gcc BZ: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49555 If need be, the old behavior can be restored with: CC_CORE_EXTRA_CONFIG_ARRAY="--enable-symver=gnu" CC_EXTRA_CONFIG_ARRAY="--enable-symver=gnu" Reported-by: Bryan Hundven <bryanhundven@gmail.com> Reviewed-by: Bryan Hundven <bryanhundven@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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>