summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2011-12-14libc/eglibc: fix localedef 2.14 buildBenoît Thébaudeau"1-0/+1
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> (transplanted from 4cd9134739b594451794cf61a6e1b137422cdafd)
2011-12-13scripts: fix dumping execution backtraceYann E. MORIN"1-43/+43
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> (transplanted from 4193d6e6a17430a177fa88c287879c2c35e319f3)
2011-12-12binutils/binutils: fix extra config array variable nameBenoît Thébaudeau"1-1/+1
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> (transplanted from 8946dd980d9e6c3da3b8f63fe7e35f4af94acf2f)
2011-12-12scripts: unset CONFIG_SITEYann E. MORIN"1-0/+2
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> (transplanted from 21f4f28e60ec0342133086c9a51e7f0e5b181fb8)
2011-12-07scripts: create CT_HEADERS_DIRZhenqiang Chen1-1/+1
"${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> (transplanted from bdff4164a1227ebdd538e0ad3c9b6862b3c5a253)
2011-11-30scripts: use CT_CONFIG_SHELL instead of CT_SHELLTitus von Boxberg1-3/+3
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> (transplanted from cf509170838f4e289fe25617e3f3db1d6d6ffc41)
2011-11-22scripts/functions: extract: portable call for old and defective tarsTitus von Boxberg1-6/+6
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> (transplanted from 49af7802dcd538ec3cb64337030b03ac2c6344d2)
2011-11-18cc/gcc: Apply CT_CC_GCC_DISABLE_PCH to do_cc_core.Zhenqiang Chen1-0/+2
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> (transplanted from e3e1c9d45bddfbfb433ee9d583faf42fa31f50c0)
2011-11-17arch/x86: prescott is an i686Titus von Boxberg1-0/+1
let CT_ARCH_ARCH=prescott result in a i686 tuple prefix Signed-off-by: Titus von Boxberg <titus@v9g.de> (transplanted from d063b1ae8c1b30c7006b110d0f9045e6d7c34f13)
2011-10-16complibs/cloog: auto-reconf for 0.15.10 and laterYann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from 47199f966983bab6a68b2b5da2e1542adbd9388a)
2011-10-16complibs/cloog: fix extractionYann E. MORIN"1-18/+9
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> (transplanted from f070d922facf42b0395b7db909e1867d45b245dd)
2011-11-15debug/gdb: fix tic install path, tell ncurses where to find itWilly Tarreau1-5/+3
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> (transplanted from bd17cca444ae09af0aae3e2390fa068147e2f4e3)
2011-10-21scripts: fix missing space when using CT_EXTRA_FLAGS_FOR_HOSTMichael Hope1-1/+1
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-18misc: change references to point to the new websiteYann E. MORIN"2-5/+5
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-16arch/powerpc: fix tuple for uClibcYann E. MORIN"1-5/+8
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-07scripts/functions: Fix CT_ExtractGit function.Yann E. MORIN"1-12/+15
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-14scripts: check host features with host compilerYann E. MORIN"1-0/+13
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-16config: use '0' for automatic number of jobsYann E. MORIN"1-4/+3
Also, make it the default. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-09scripts: execute each steps in a subshellYann E. MORIN"1-1/+1
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-11libc/glibc: run ./configure in CONFIG_SHELLYann E. MORIN"1-0/+3
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-11config: simplify setting CONFIG_SHELL, add a bit to the help entryYann E. MORIN"1-13/+3
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-09complibs/cloog: catch autogen.sh's outputYann E. MORIN"1-1/+1
Run autogen.sh through CT_DoExecLog to catch its output. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-08debug/gdb: new option to enable/disable use of pythonYann E. MORIN"1-0/+5
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-09binutils/binutils: ensure gold is staticaly-linked if neededYann E. MORIN"1-2/+2
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-05scripts: support extra host compiler flagsYann E. MORIN"1-1/+2
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-07libc/glibc: add log messages for glibc addons dirs and symlinksYann E. MORIN"1-2/+2
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-05scripts: update config.{guess,sub}Yann E. MORIN"2-6/+18
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-10-05Pass CXXFLAGS to binutils/gold.Michael Hope1-0/+1
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-09-28config: add a 'auto' value for the number of parallel jobsMichael Hope1-1/+5
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-26kernel/linux: prepare for 3.1 and aboveYann E. MORIN"1-9/+11
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-22kernel/linux: use a custom kernel source directoryYann E. MORIN"1-12/+20
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-21kernel/linux: add alternate download locationsYann E. MORIN"1-1/+5
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-14cc/gcc: speed up the build a little bitYann E. MORIN"1-6/+6
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-17gcc: add support for the PowerPC EABIYann E. MORIN"1-5/+11
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-12libc/uClibc: enable NPTL choice for uClibc >= 0.9.32Yann E. MORIN"1-3/+4
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-09scripts/functions: only use passive FTPYann E. MORIN"1-6/+8
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-09scripts/functions: only use one download programYann E. MORIN"1-12/+4
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-06scripts: fix sysroot prefix dirYann E. MORIN"1-2/+4
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-08-28libc/newlib: add a config option allowing to disable builtin syscallsKévin PETIT1-0/+5
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-25configure: xz-utils alone can also handle LZMA-compressed tarballsYann E. MORIN"1-2/+15
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-25configure: check for lzmaYann E. MORIN"1-0/+4
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-22debug/ltrace: Fix HOST_OS and arTitus von Boxberg"1-0/+2
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-21complibs/libelf: use target ranlibTitus von Boxberg"1-0/+1
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-17debug/gdb: we don't care if the host tic is shared or staticYann E. MORIN"1-1/+4
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-18debug/gdb: use ncurses-5.9Yann E. MORIN"1-1/+1
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-08-16kernel/linux: fix using custom tarballYann E. MORIN"1-1/+1
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-18scripts: simplify and fix the toolchain config scriptYann E. MORIN"1-5/+1
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-14scripts/functions: add xz supportYann E. MORIN"1-0/+4
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-05-03scripts/functions: test for decompressors before useYann E. MORIN"1-6/+14
./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-08-14scripts/functions: commonalise tar options in CT_EXtractYann E. MORIN"1-3/+7
This shortens command lines, so it's good! :-) Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>