summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
AgeCommit message (Collapse)AuthorFilesLines
2018-04-07Remove the need for configure substitutions in scriptsAlexey Neyman1-722/+0
... so that scripts/ directory can be installed verbatim. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-01-30Ncurses fixes for 6.1Alexey Neyman1-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>
2017-09-03Workaround for static uClibc-ng issue with -lpthreadAlexey Neyman1-0/+13
Also, preserve .config when running test-package.sh. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-01config: Add package versioning flexibilityNathan Chancellor1-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>
2017-08-26Fix glibc-ports with the new frameworkAlexey Neyman1-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>
2017-08-21Save export status for environment varsAlexey Neyman1-17/+16
... and limit our modifications to our variables. Fixes #762. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-21Reject set-but-empty environment variablesAlexey Neyman1-11/+11
... which also lead to cryptic failures. Fixed #743. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-21Check for config file changes when restartingAlexey Neyman1-1/+1
Also, save/restore per-target source directory. Fixes #800. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08Builds comp.libs from VCSAlexey Neyman1-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>
2017-07-08Building packages using the new frameworkAlexey Neyman1-1/+2
(fails at building GMP off the VCS because it needs to run bootstrap scripts) Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-15Set CT_BUILD_DIR prior to using itChris Packham1-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>
2017-05-10Simplified error message for CCbRad1-2/+1
2017-05-10Fixed up representation of PATH env. var in error messagebRad1-1/+1
2017-05-10Added CT_TestAndAbort trivial sanity checks for CC and CXX to avoid ↵bRad1-0/+3
libiconnv build failures https://github.com/crosstool-ng/crosstool-ng/issues/711
2017-03-30cross-gdb: account for canadian/crossnative toolchainsAlexey Neyman1-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>
2017-03-27Fix up the sysroot issue for sh4 in a different wayAlexey Neyman1-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>
2017-03-07Merge pull request #627 from dankm/freebsdAlexey Neyman1-2/+2
FreeBSD build support
2017-03-06Sanitize CT_PREFIX_DIR, tooAlexey Neyman1-3/+5
Having .. in it breaks GCC's relocatability. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-02Use BUILD_PREFIX and BUILD_SUFFIX for gcc versionDan McGregor1-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>
2017-03-02Use configure to find the processor countDan McGregor1-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>
2017-02-27Require GNU sedAlexey Neyman1-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>
2017-02-27Revert "Determine whether -E/-r option selects extended regexp"Alexey Neyman1-2/+2
This reverts commit 7bcf18bfab84374d3305c7a088f95ac1219ddf93.
2017-02-14Determine whether -E/-r option selects extended regexpAlexey Neyman1-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>
2017-01-30Add install wrapperAlexey Neyman1-2/+6
... to work around Gentoo's wrapper idiosyncrasy. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-30Allow for per-tool templates when creating overridesAlexey Neyman1-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>
2017-01-25Fix log saving/restoringAlexey Neyman1-2/+2
after the CT_Log{Enable,Disable} changes. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-20Make build-all rely on kconfig options.Alexey Neyman1-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>
2017-01-20Get rid of .config.2.Alexey Neyman1-4/+0
Now handled by CT_LoadConfig. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-20Install canadian crosses into a separate subdir.Alexey Neyman1-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>
2017-01-10Add MacOS options.Alexey Neyman1-0/+23
Needed for linking gettext/libiconv. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-10For simple cross or native pick up both build/host flags.Alexey Neyman1-3/+17
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-10Point FOR_BUILD flags to buildtools/{include,lib}.Alexey Neyman1-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>
2016-12-19Kill CT_INSTALL_DIR.Alexey Neyman1-10/+9
We now use CT_PREFIX and expect the resulting toolchain to be relocatable. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-12-02Add 'companion tools for host' step.Alexey Neyman1-0/+11
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-12-02Move companion tool build into a separate step.Alexey Neyman1-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>
2016-08-26cross: Only make 'build tools' for the 'build'Bryan Hundven1-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>
2016-08-23libc/*.sh: Deprecate libc_check_config step.Alexey Neyman1-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>
2016-08-23libc/*.sh: handle combinations of multilib root/dir.Alexey Neyman1-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>
2016-08-23multilib: Determine which options may pass through.Alexey Neyman1-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>
2016-08-23crosstool-NG.sh.in: Don't make lots of symlinks to lib folderRay Donnelly1-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>
2016-04-02Unbreak static cross-gdb.Alexey Neyman1-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.
2016-02-04env: Bail out if CPATH and friends are setBryan Hundven1-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>
2015-11-17consistency: Use exported variables of required toolsBryan Hundven1-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>
2015-11-11Use install-strip target for gcc optionallyIlya Lyubimov1-1/+1
2015-10-30Sanity check for number of parallel jobs.Alexey Neyman1-1/+6
Signed-off-by: Alexey Neyman <stilor@att.net>
2015-10-30Implement 'ct-ng source'.Alexey Neyman1-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>
2015-06-01scripts: Update crosstool-NG internals for multiple compilers.Ray Donnelly1-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>
2015-05-29multi_cc: Prepare ct-ng for multiple compilersRay Donnelly1-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>
2015-05-10scripts: If paths.sh is included, use the variablesBryan Hundven1-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>
2014-12-05scripts/crosstool-NG.sh.in: patch regex to work with BSD grepJason T. Masker1-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>