summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
AgeCommit message (Collapse)AuthorFilesLines
2012-01-03cc/gcc: build core compilers for canadianYann E. MORIN"1-1/+1
Currently, we rely on an existing external cross-compiler targetting the target, to build the C library. This can pause quite a few problems if that compiler is different from the one we are building, because it could introduce some ABI issues. This patch removes this dependency, by building the core compilers as we do for standard cross, and also by building the binutils and gcc, for running on the build machine. This means we no longer need to offer the cross-sompiler selection in the menuconfig. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-25complibs: fixup the host complibs install dirYann E. MORIN"1-2/+13
It's easier to have as much as possible stuff in the same place to ease backup/restore, and make things easier to follow. Move the host companion libraries install dir as a sub-dir of the build-tools install dir (but not directly in it, it would break for canadian or cross-native). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-01cc/gcc: install the core compilers in the build-tools dirYann E. MORIN"1-12/+2
There really is no good reason to install the core compilers in their own places, one for each pass. We can install them with the other build tools. Also, this implies that: - there are fewer directories to save/restore - there are fewer symlinks to create for binutils - the PATH is shorter Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2012-01-16scripts: fix tools overrideYann E. MORIN"1-2/+4
The tools found by the new autostuff configure can contain arguments, for example: grep -E This needs separating the paths set for the Makfile from the paths set for the scripts. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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>
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>
2011-11-30scripts: use CT_CONFIG_SHELL instead of CT_SHELLTitus von Boxberg"1-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>
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-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-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-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-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-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-02scripts: try the mirror even if downloads are forbiddenYann E. MORIN"1-21/+17
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17misc: fix more typos here and there...Yann E. MORIN"1-3/+3
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"1-1/+1
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-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-06-03kconfig: prepend CT-NG's version tag to PKGVERSIONBenoît THÉBAUDEAU"1-0/+3
"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-05-19scripts: munge .config to handle array variablesYann E. MORIN"1-2/+6
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"1-2/+2
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-04-06complibs: disable building shared libsYann E. MORIN"1-8/+1
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-03-19scripts: leave changelog in build dir, copy to install dirYann E. MORIN"1-20/+7
Users tend to look for the build log in the current working directory, rather than in the toolchain's installation dir. While bundling the build log in the toolchain installation dir is nice for distribution and review, it can be easier to have the build log readily available in the working directory, as it is quicker to get to it. So, the build log stays in the working directory until the toolchain is completely and successfully built, and then a (compressed) copy is made. Reported-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-19buildtools: the buildtools dir is in fact a prefixYann E. MORIN"1-8/+8
Consider the buildtools install directory as a prefix directory, that is, install buildtools in prefix/bin/, not in prefix/. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-12-23buildtools: move to working directoryYann E. MORIN"1-8/+8
There is absolutely *no* reason for the buildtools (wrappers to gcc, g++, as, ld... for the local machine) to be in the toolchain directory. Moreover, they are removed after the build completes. Move them out of the toolchain directory, and into the build directory (but yet the part specific to the current toolchain). This means we no longer need to explicitly remove them either, BTW, but we need to save/restore them for the restart feature. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-02-20buildtools: store path to buildtools in a variableYann E. MORIN"1-7/+8
Currently, the buildtools are installed relative to ${CT_PREFIX_DIR}. Change that by introducing ${CT_BUILDTOOLS_DIR}, which is still set relative to ${CT_PREFIX_DIR}, but which will make it easy to change in the future. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22scripts: create the makeinfo wrapper before we set PATHYann E. MORIN"1-7/+7
If we set PATH to the tools wrappers before we create the makeinfo wrapper, then we may well wrap an existing wrapper from a previous run. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-26scripts: squash the multi-slash in the sysroot symlinkYann E. MORIN"1-3/+4
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-28config: add an option not to remove the destination directoryYann E. MORIN"1-1/+1
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-25scripts: fix double slash in pathsYann E. MORIN"1-0/+2
Computed paths may contain double slashes. This is not an issue but it is just ugly to look at. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-25config: add an option to name the sysroot directoryYann E. MORIN"1-4/+11
Depending on local policies, some users have expressed a need to have the sysroot be named differently than the hard-coded name. Add an option for that. Default to 'sysroot' to match the existing literature. While at it, replace 'sys-root' with 'sysroot' everywhere we reference the sysroot. Reported-by: Alexey Kuznetsov <Alexey.KUZNETSOV@youtransactor.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-22scripts: PARALLELMFLAGS is evil, renameYann E. MORIN"1-4/+3
The reunification of the glibc/eglibc code paths exposed a nasty bug in the glibc build: use of PARALLELMFLAGS breaks the build. See the explanations in that bug report against FC6: https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=212111 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-01scripts: also overide LANGYann E. MORIN"1-1/+4
On some systems, we also need to overide LANG as well as LC_ALL. Reported-by: Geoffrey Lee <geoffl@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-31scripts: do not provide to-sysroot include symlinkYann E. MORIN"1-2/+0
Do not provide the PREFIX/TUPLE/include -> SYSROOT/usr/include symlink, and let gcc install its dependable C++ headers were it sees fit to install them. See the test by Anthony (by the end of the messages): http://sourceware.org/ml/crossgcc/2010-10/msg00129.html http://sourceware.org/ml/crossgcc/2010-10/msg00134.html See also the comment by Arnaud: http://sourceware.org/ml/crossgcc/2010-10/msg00157.html Reported-by: Anthony Foiani <anthony.foiani@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-10-07scripts: always create lib32 and lib64 symlinksYann E. MORIN"1-17/+16
Unconditionally create the lib32 -> lib/ and lib64 -> lib/ symlinks. This is reportedly a fix to build a toolchain for a 32-bit target on a 'pure' 64-bit host (eg. on Fedora FC12, host libs are in lib64/, and there is no lib -> lib64 symlink, as we can see on other distors, as Debian). As gcc only puts static host lib in lib64/ (along with target files in subdirs), we can safely create the symlinks. Also note that the symlinks are summarily removed at the end of the build. Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com> [Yann E. MORIN: fix a comment, rephrase the commit log] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-09-10scripts: hack-in lib32->lib symlinksYann E. MORIN"1-4/+12
Some archs (eg. ppc64 with n32 ABI) will install their variants in lib32/ instead of lib/, so do for lib32 as we do for lib64->lib symlinks. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-05-27scripts: add option to strip all toolchain executablesRemy Bohmer1-0/+3
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-07-29scripts: remove . from $PATHYann E. MORIN"1-0/+3
Add CT_SanitizePath function which removes entries referring to ., /tmp and non-existing directories from $PATH, and call it early in the build script. If . is in PATH, gcc-4.4.4 build breaks: [ALL ] checking what assembler to use... /tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as ... [ALL ] config.status: creating as i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler, but config.status creates a local "as" script which is calling the host assembler. Signed-off-by: Johannes Stezenbach <js@sig21.net> [Yann E. MORIN: style fixes + explanations] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-05-22test-suite: apply cleanup passYann E. MORIN"1-1/+1
Remove all non-modifiable items (target tuple, gcc version, toolchain path...) Makefile syntax ( use $(...) instead of ${...} ) Update doc Space-damage cleanups
2010-05-19test-suite: Added new test suite feature (experimental)Martin Lund1-0/+7
This patch adds support for installing the gcc test suite. A helper Makefile is provided for building and running the gcc tests. The default configuration runs all gcc tests and requires automatic ssh/scp login access to a networked target board. See README for more details. Note: Current feature is tested with the powerpc-unknown-linux-gnu sample but it should work with others as well. Signed-off-by: Martin Lund <mgl@doredevelopment.dk>
2010-05-19scripts/crosstool-NG.sh.in: On MacOS/BSD use the output of CT_DoConfigGuess ↵Titus von Boxberg1-3/+3
for CT_BUILD. On 64bit MacOS `gcc -dumpmachine` gives i686 for the host machine. This conflicts with the expectations of some following configure scripts that a 64bit x86 is given as x86_64; i686 is understood as a 32 bit machine. config.guess sets the host machine in CT_BUILD correctly. yann.morin.1998@anciens.enib.fr: As suggested by Khem RAJ on the ML, always use config.guess.
2010-05-19crosstool-NG.sh: suppress failure message from uname -oTitus von Boxberg1-2/+1
On non-GNU systems (BSD/MacOS) there is no uname -o. Suppress the failure message on these systems in the call to set CT_SYS_OS (uname -s actually sets this variable). yann.morin.1998@anciens.enib.fr: remove 'uname -o' altogether.
2010-04-28scripts: don't set LD_PRELOAD with static companion librariesYann E. MORIN"1-4/+3
When cpmpanion libraries are built statically, it is useless to set LD_PRELOAD. Worse, it might break the build in some corner cases.
2010-04-20scripts: also prepare include symlink to sysroot/includeYann E. MORIN"1-2/+5
2010-04-19scripts: check g++ only for hostYann E. MORIN"1-1/+5
g++ is only needed when building additonal libs on the HOST, so check wheter g++ is available for the HOST compiler only Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> [Yann E. MORIN: fix space damage] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-04-15scripts: don't print the build system guess warningYann E. MORIN"1-1/+0
2010-04-11complibs: save directory with static complibs for stop/restartYann E. MORIN"1-0/+1
2010-04-11complibs: don't install in toolchain dir when built as staticYann E. MORIN"1-0/+5
2010-03-16tools: move sstrip to the binary utilities menuYann E. MORIN"1-3/+3
sstrip is now alone in its 'tools' menu, and we will probably never gain any other 'tool'. Besides, sstrip is just strip, but a little bit more agressive, so it deserves going to the 'binary utilities' menu.