aboutsummaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
Commit message (Collapse)AuthorAgeFilesLines
* Remove the need for configure substitutions in scriptsAlexey Neyman2018-04-071-722/+0
| | | | | | ... so that scripts/ directory can be installed verbatim. Signed-off-by: Alexey Neyman <stilor@att.net>
* Ncurses fixes for 6.1Alexey Neyman2018-01-291-0/+1
| | | | | | | | | | | - Update to 20180129 - Throw in --disable-db-install if database is disabled; otherwise 'make install' tries to run tic which is not built. - Select appropriate strip utility for the host; otherwise non-x86 architectures fail to install (unless --disable-stripping is also added) Signed-off-by: Alexey Neyman <stilor@att.net>
* Workaround for static uClibc-ng issue with -lpthreadAlexey Neyman2017-09-031-0/+13
| | | | | | Also, preserve .config when running test-package.sh. Signed-off-by: Alexey Neyman <stilor@att.net>
* config: Add package versioning flexibilityNathan Chancellor2017-09-011-1/+5
| | | | | | | | | | | | | | Some users (like myself) may want to omit the crosstool-NG version from the binaries' versioning output, as it can be incredibly long and not too helpful. Add a config option to disable it. The possible combinations are as follows: - crosstool-NG version (default) - crosstool-NG version - custom toolchain ID - Custom toolchain ID - No crosstool-NG version OR custom toolchain ID Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* Fix glibc-ports with the new frameworkAlexey Neyman2017-08-261-1/+1
| | | | | | | While here, also consider patched by anything other than "bundled patches" as per-target sources. Add scary warnings in case of a failure. Signed-off-by: Alexey Neyman <stilor@att.net>
* Save export status for environment varsAlexey Neyman2017-08-211-17/+16
| | | | | | | | ... and limit our modifications to our variables. Fixes #762. Signed-off-by: Alexey Neyman <stilor@att.net>
* Reject set-but-empty environment variablesAlexey Neyman2017-08-211-11/+11
| | | | | | | | ... which also lead to cryptic failures. Fixed #743. Signed-off-by: Alexey Neyman <stilor@att.net>
* Check for config file changes when restartingAlexey Neyman2017-08-211-1/+1
| | | | | | | | Also, save/restore per-target source directory. Fixes #800. Signed-off-by: Alexey Neyman <stilor@att.net>
* Builds comp.libs from VCSAlexey Neyman2017-07-081-2/+5
| | | | | | | ... fails on DUMA because it cannot be compiled by newer C++, and patches are not applied to checkouts from VCS. Signed-off-by: Alexey Neyman <stilor@att.net>
* Building packages using the new frameworkAlexey Neyman2017-07-081-1/+2
| | | | | | (fails at building GMP off the VCS because it needs to run bootstrap scripts) Signed-off-by: Alexey Neyman <stilor@att.net>
* Set CT_BUILD_DIR prior to using itChris Packham2017-06-151-1/+1
| | | | | | | | | Fixes #731 CT_BUILD_DIR is used in CT_DoExecLog. We need to ensure that it is set before the first call to CT_DoExecLog. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Simplified error message for CCbRad2017-05-101-2/+1
|
* Fixed up representation of PATH env. var in error messagebRad2017-05-101-1/+1
|
* Added CT_TestAndAbort trivial sanity checks for CC and CXX to avoid ↵bRad2017-05-101-0/+3
| | | | libiconnv build failures https://github.com/crosstool-ng/crosstool-ng/issues/711
* cross-gdb: account for canadian/crossnative toolchainsAlexey Neyman2017-03-291-5/+5
| | | | | | | | | | ... when determining if it can be linked statically, and if Python scripting should default to y. Prompted by a failure of i686-w64-mingw32,nios2-spico-elf sample on a system where configure didn't report static linking support. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix up the sysroot issue for sh4 in a different wayAlexey Neyman2017-03-261-0/+3
| | | | | | | | | | | (see the comments in the code for details on the issue) Old workaround in 100-gcc.sh stopped working (probably, due to one of GCC version upgrades), so switch to the other approach originally described there: adjust the list of multilibs to not include the default target explicitly. Signed-off-by: Alexey Neyman <stilor@att.net>
* Merge pull request #627 from dankm/freebsdAlexey Neyman2017-03-071-2/+2
|\ | | | | FreeBSD build support
| * Use BUILD_PREFIX and BUILD_SUFFIX for gcc versionDan McGregor2017-03-011-1/+1
| | | | | | | | | | | | | | It's possible that "gcc" is not the compiler being used for the build, so respect BUILD_PREFIX and BUILD_SUFFIX when finding its version. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
| * Use configure to find the processor countDan McGregor2017-03-011-1/+1
| | | | | | | | | | | | | | | | configure.ac now finds how to count the CPUs in a system. Currently the getconf method and sysctl methods are supported. Adding more is easy enough. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
* | Sanitize CT_PREFIX_DIR, tooAlexey Neyman2017-03-051-3/+5
|/ | | | | | Having .. in it breaks GCC's relocatability. Signed-off-by: Alexey Neyman <stilor@att.net>
* Require GNU sedAlexey Neyman2017-02-261-1/+1
| | | | | | | | | | | | After much struggling with macos (BSD) sed and even getting everything work in crosstool-ng itself, I had to abandon that because some components rely on GNU syntax. Specifically, GNU libc uses '/.../{H;g}' (note absense of the separator after 'g'). So, revert the -r/-E detection and check for sed's being of GNU origin. MacOS people, sorry, but you'd have to install GNU sed. Signed-off-by: Alexey Neyman <stilor@att.net>
* Revert "Determine whether -E/-r option selects extended regexp"Alexey Neyman2017-02-261-2/+2
| | | | This reverts commit 7bcf18bfab84374d3305c7a088f95ac1219ddf93.
* Determine whether -E/-r option selects extended regexpAlexey Neyman2017-02-131-2/+2
| | | | | | | | | | | | | | ... and then use the right option. See the note in scripts/functions on where we should use ${foo} and where just 'foo'; this boils down to whether we can expect the build tools override to be in effect (e.g. in the actual build scripts) or not (i.e. outside of scripts/build). While running in scripts/functions, or in scripts/crosstool-NG.sh the build tools override directory (.build/tools/bin) may have not been set up (yet, or at all). Also, modify the installed scripts (populate, xldd) accordingly. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add install wrapperAlexey Neyman2017-01-301-2/+6
| | | | | | ... to work around Gentoo's wrapper idiosyncrasy. Signed-off-by: Alexey Neyman <stilor@att.net>
* Allow for per-tool templates when creating overridesAlexey Neyman2017-01-301-12/+16
| | | | | | | | ... will be used to implement a smarter install wrapper. While there, correct the spelling of "OVERIDE". Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix log saving/restoringAlexey Neyman2017-01-251-2/+2
| | | | | | after the CT_Log{Enable,Disable} changes. Signed-off-by: Alexey Neyman <stilor@att.net>
* Make build-all rely on kconfig options.Alexey Neyman2017-01-191-7/+5
| | | | | | | | | | | | | For that, make CT_BUILD_TOP_DIR a non-settable config option (so that it is recursively expanded with CT_HOST/CT_TARGET). Use a common prefix, with same default as for regular sample build. Use showConfig.sh to determine host toolchain path (for canadian crosses) and build directory to be removed. Remove LIBC_SYSROOT_ARG (unused). Signed-off-by: Alexey Neyman <stilor@att.net>
* Get rid of .config.2.Alexey Neyman2017-01-191-4/+0
| | | | | | Now handled by CT_LoadConfig. Signed-off-by: Alexey Neyman <stilor@att.net>
* Install canadian crosses into a separate subdir.Alexey Neyman2017-01-191-28/+8
| | | | | | | | | | | | Makes them sorted out by host, and removes the need for similar hack in samples.mk. Change how canadian crosses are named: using `=' character resulted in Glibc build failure. Move loading config into a common function, CT_LoadConfig. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add MacOS options.Alexey Neyman2017-01-101-0/+23
| | | | | | Needed for linking gettext/libiconv. Signed-off-by: Alexey Neyman <stilor@att.net>
* For simple cross or native pick up both build/host flags.Alexey Neyman2017-01-101-3/+17
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Point FOR_BUILD flags to buildtools/{include,lib}.Alexey Neyman2017-01-101-5/+6
| | | | | | | Similarly to FOR_HOST; recent change in 100-gcc.sh that switched FOR_HOST->FOR_BUILD broke simple cross configurations on macos. Signed-off-by: Alexey Neyman <stilor@att.net>
* Kill CT_INSTALL_DIR.Alexey Neyman2016-12-191-10/+9
| | | | | | We now use CT_PREFIX and expect the resulting toolchain to be relocatable. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add 'companion tools for host' step.Alexey Neyman2016-12-021-0/+11
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Move companion tool build into a separate step.Alexey Neyman2016-12-021-7/+1
| | | | | | | Also, rename "build" -> "for_build", since we're going to have a "for_host" as well. Signed-off-by: Alexey Neyman <stilor@att.net>
* cross: Only make 'build tools' for the 'build'Bryan Hundven2016-08-261-2/+2
| | | | | | | | | | For a cross-compiler, we only need to make the 'build tools' for the 'build'. We also build the 'build tools' for the 'host' when building a cross-canadian toolchain. Closes #430 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* libc/*.sh: Deprecate libc_check_config step.Alexey Neyman2016-08-231-3/+1
| | | | | | | | | | | | | | | | | | This step was only used in uClibc. However, with upcoming multilib, the config management will have to be done for each variant differently, anyway. uClibc was the only user of libc_check_config step, as well as CT_CONFIG_DIR directory. Retire these. Two other clean-ups in uClibc.sh: - KERNEL_HEADERS check seems to be bogus, this config option is not present even in 0.9.30 - which is not supported already. - SHARED_LIB_LOADER_PREFIX was renamed to MULTILIB_DIR in 0.9.31, according to ChangeLog - and MULTILIB_DIR is passed from command line instead. Signed-off-by: Alexey Neyman <stilor@att.net>
* libc/*.sh: handle combinations of multilib root/dir.Alexey Neyman2016-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | Install startfiles for libc variants into the most specific combination (suffixed sysroot, if applicable + suffixed multi-os dir, if applicable). Install headers once in every suffixed sysroot (although it seems that GCC picks up headers from top-level sysroot, GCC manual claims that sysroot suffix affects headers search path). In uClibc, this requires a better sanitization of the directory: it creates symlinks from {sysroot}/usr/lib/{multi_os_dir} to {sysroot}/lib/{multi_os_dir} and to do so, it counts the number of path components in the libdir. This breaks if one of such components is `..' - symlinks contain an extra `../..' then. Since such sanitization had to be implemented anyway, use it in other places to print more sensible directory names. Also, fix the description of configure --host/--target per musl's configure help message (and its actual code). Signed-off-by: Alexey Neyman <stilor@att.net>
* multilib: Determine which options may pass through.Alexey Neyman2016-08-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some arches (e.g. MIPS) the options like -mabi do not work if specified more than once (see the comment in 100-gcc.sh). Therefore, we need to determine which of the options produced by <arch>.sh can be passed to multilib builds and which must be removed (i.e., which options vary among the multilibs). This presents a chicken-and-egg problem. GCC developers, in their infinite wisdom, do not allow arbitrary multilib specification to be supplied to GCC's configure. Instead, the target (and sometimes some extra options) determine the set of multilibs - which may include different CPUs, different ABIs, different endianness, different FPUs, different floating-point ABIs, ... That is, we don't know which parts vary until we build GCC and ask it. So, the solution implemented here is: - For multilib builds, start with empty CT_ARCH_TARGET_CFLAGS/LDFLAGS. - For multilib builds, require core pass 1. Pass 1 does not build any target binaries, so at that point, our target options have not been used yet. - Provide an API to modify the environment variables for the steps that follow the current one. - As a part of multilib-related housekeeping, determine the variable part of multilibs and filter out these options; pass the rest into CT_TARGET_CFLAGS/LDFLAGS. This still does not handle extra dependencies between GCC options (like -ma implying -mcpu=X -mtune=Y, etc.) but I feel that would complicate matters too much. Let's leave this until there's a compelling case for it. Also, query GCC's sysroot suffix for targets that use it (SuperH, for example) - the default multilib may not work if the command line specifies the default option explicitly (%sysroot_suffix_spec is not aware of multilib defaults). Signed-off-by: Alexey Neyman <stilor@att.net>
* crosstool-NG.sh.in: Don't make lots of symlinks to lib folderRay Donnelly2016-08-231-30/+4
| | | | | | | | | | | | | | | | | | | | | | | For 4 different folders: ${CT_PREFIX_DIR} ${CT_SYSROOT_DIR} ${CT_SYSROOT_DIR}/usr ${CT_PREFIX_DIR}/${CT_TARGET} .. symlinks from 'lib32' and 'lib64' to 'lib' were created. This was untidy and incorrect for multilib (the bitness of the libraries in 'lib32' and 'lib64' will not be the same) We can not know which folders this toolchain configuration will require at this time so let them be created on-demand instead. Changed by Alexey Neyman: original change removed too much; we still need to create the default directories because the os directories are based off them (e.g. `lib/../lib64'). Signed-off-by: Ray Donnelly <mingw.android@gmail.com> Signed-off-by: Alexey Neyman <stilor@att.net>
* Unbreak static cross-gdb.Alexey Neyman2016-04-011-0/+2
| | | | | | | | | | | GDB's configure mishandles the libexpat.{so,a} libraries when it is given -static in CFLAGS AND --with-libexpat-prefix in configure's args: it checks for <prefix>/lib/libexpat.so and finding that, attempts to link it as `gcc -static .. conftest.c <prefix>/lib/libexpat.so`; this obviously fails (.so cannot be statically linked), so configure assumes libexpat is unusable. Thus, --with-libexpat-prefix is dangerous and should be avoided; instead, configure should find the libraries via the supplied CC/LD definitions.
* env: Bail out if CPATH and friends are setBryan Hundven2016-02-041-0/+4
| | | | | | | | | If CPATH, C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, or OBJC_INCLUDE_PATH are set, bail out. These environment variables are known to break crosstool-ng's build. This closes #327 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* consistency: Use exported variables of required toolsBryan Hundven2015-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | We check for apps: * make * sed * grep * awk * libtool/libtoolize * install * patch * and more ...during configure. Our scripts should be consistent about using the variables that define where the found tool was found. Of course, we do hard-link these tools in buildtools, but that should be a backup for the components we are building. Our scripts should always use the tools we find. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* Use install-strip target for gcc optionallyIlya Lyubimov2015-11-111-1/+1
|
* Sanity check for number of parallel jobs.Alexey Neyman2015-10-301-1/+6
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Implement 'ct-ng source'.Alexey Neyman2015-10-301-0/+3
| | | | | | | Provides a simpler alternative to editing config to enable CT_ONLY_DOWNLOAD, doing ct-ng build and then restoring .config. Signed-off-by: Alexey Neyman <stilor@att.net>
* scripts: Update crosstool-NG internals for multiple compilers.Ray Donnelly2015-06-021-4/+4
| | | | | | | | | This change updates the CC.* references to CC_GCC.* in the internal scripts. Signed-off-by: Ray Donnelly <mingw.android@gmail.com> Reviewed-by: Bryan Hundven <bryanhundven@gmail.com> Reviewed-by: Yann Diorcet <diorcetyann@gmail.com>
* multi_cc: Prepare ct-ng for multiple compilersRay Donnelly2015-05-291-1/+1
| | | | | | | | | | | This commit moves gcc.sh to 100-gcc.sh to accomodate for other cross-compilers that crosstool-ng might be able to build. The first, to come soon, is llvm/clang. Signed-off-by: Ray Donnelly <mingw.android@gmail.com> Reviewed-by: Bryan Hundven <bryanhundven@gmail.com> Reviewed-by: Yann Diorcet <diorcetyann@gmail.com>
* scripts: If paths.sh is included, use the variablesBryan Hundven2015-05-091-1/+1
| | | | | | | This commit changes sed, awk, and grep to use the ones we found during configure time. This helps make the build more consistent. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* scripts/crosstool-NG.sh.in: patch regex to work with BSD grepJason T. Masker2014-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BSD grep does not interpret a null alteration. It complains about an empty sub-expression, e.g.: $ grep --version && grep -E '^(# |)CT_' .config grep (BSD grep) 2.5.1-FreeBSD grep: empty (sub)expression This patch replaces the null alteration with a zero or once quantifier which works with both BSD & GNU grep. $ grep --version && grep -E '^(# )?CT_' .config grep (BSD grep) 2.5.1-FreeBSD CT_CONFIGURE_has_xz=y CT_CONFIGURE_has_svn=y ... $ ggrep --version && ggrep -E '^(# )?CT_' .config ggrep (GNU grep) 2.20 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>. CT_CONFIGURE_has_xz=y CT_CONFIGURE_has_svn=y ... Signed-off-by: Jason T. Masker <jason@masker.net> Tested-by: Andreas Bießmann <andreas@biessmann.de> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>