aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Determine whether -E/-r option selects extended regexp"Alexey Neyman2017-02-261-1/+1
| | | | This reverts commit 7bcf18bfab84374d3305c7a088f95ac1219ddf93.
* Added new gcc config option CC_GCC_CONFIG_TLSJasmin Jessich2017-02-211-0/+12
| | | | | | | Adding new tristate configuration for TLS (Thread Local Storage) to add "--enable-tls" (y), "--disable-tls" (n) or nothing (m). Signed-off-by: Jasmin Jessich <jasmin@anw.at>
* More garbage collectionAlexey Neyman2017-02-181-14/+6
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Have LTO depend-on non-static buildsAlexey Neyman2017-02-181-0/+2
| | | | | | | | | Loading a dynamic library (LTO plugin) from a static binary fails on ArchLinux. It is also prone to break if a system is ever upgraded. Also, disable plugins if not enabled explicitly. Signed-off-by: Alexey Neyman <stilor@att.net>
* More GCAlexey Neyman2017-02-181-22/+16
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Garbage collection for GCC options that are sameAlexey Neyman2017-02-181-12/+10
| | | | | | ... on all supported versions. Signed-off-by: Alexey Neyman <stilor@att.net>
* Determine whether -E/-r option selects extended regexpAlexey Neyman2017-02-131-1/+1
| | | | | | | | | | | | | | ... 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>
* Run all configure scripts using ${CONFIG_SHELL}Alexey Neyman2017-01-251-16/+18
| | | | | | ... as its help message says in menuconfig. Signed-off-by: Alexey Neyman <stilor@att.net>
* Merge pull request #535 from stilor/broke-newlib-cxx-canadianAlexey Neyman2017-01-161-0/+7
|\ | | | | Restore copying headers for gcc_build
| * Restore copying headers for gcc_build.Alexey Neyman2017-01-141-0/+7
| | | | | | | | | | | | Only needed in canadian configurations to build libstdc++. Signed-off-by: Alexey Neyman <stilor@att.net>
* | Use ${CT_CC} instead of gcc ...Alexey Neyman2017-01-131-12/+12
|/ | | | | | ... when refering to target's compiler. Signed-off-by: Alexey Neyman <stilor@att.net>
* Merge pull request #526 from stilor/double-includeAlexey Neyman2017-01-131-3/+0
|\ | | | | Avoid creating include/include
| * No need to copy header; libc_start_file does it.Alexey Neyman2017-01-121-3/+0
| | | | | | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* | Unify fetching Linaro components.Alexey Neyman2017-01-121-24/+12
|/ | | | | | Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib. Signed-off-by: Alexey Neyman <stilor@att.net>
* Select libintl from gettext we built.Alexey Neyman2017-01-101-2/+10
| | | | | | Also, require gettext for NLS, and require iconv/ncurses for gettext. Signed-off-by: Alexey Neyman <stilor@att.net>
* Kill CT_COMPLIBS_SHARED.Alexey Neyman2017-01-101-14/+12
| | | | | | There is no such option so the check is always true. Signed-off-by: Alexey Neyman <stilor@att.net>
* Pass original multi_os_dir to iterator.Alexey Neyman2016-12-171-2/+3
| | | | | | | | This is needed for callbacks that use that directory to look inside GCC internal directories, e.g. moving the libraries. This broke when I made libexpat for target honor ${CT_SHARED_LIBS}. Signed-off-by: Alexey Neyman <stilor@att.net>
* Pass FOR_BUILD flags when building the pass-1/2 core GCC.Alexey Neyman2016-11-281-7/+8
| | | | | | | | | | | | Current build passes {CFLAGS,LDFLAGS}_FOR_HOST - which breaks canadian cross (e.g. tried building for x86_64-unknown-linux-uclibc host). This dates back to the days of yore when CFLAGS were set directly in the do_gcc_core_backend (and that function is used as the final gcc's backend). do_gcc_core_backend is now passed with CFLAGS/LDFLAGS to use, so let the pass-1/pass-2/final-for-build steps pass the appropriate flags. Signed-off-by: Alexey Neyman <stilor@att.net>
* Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.Alexey Neyman2016-11-201-27/+27
| | | | | | | | | | | | | | | | | | The referenced commit replaced 'make' with '${make}' everywhere. This is wrong for at least the utilities that we may build as companion tools (make, libtool): this will always invoke the version detected by configure by supplying the absolute path. In other words, the wrappers in .build/tools/bin are not fallbacks - they are either temporary (in case a respective companion tool is built) or permanent redirectors. This is the reason why the PATH= has .build/*/buildtools/bin at higher precedence than .build/tools/bin; the latter has the versions detected by configure and the former has the versions built as companion tools. Revert the rest of the gang (grep/sed/...) for consistency. After all, we may decide to supply some of them as well (awk, for instance). Signed-off-by: Alexey Neyman <stilor@att.net>
* Do not run 'make install' in parallel in GCC.Alexey Neyman2016-11-091-3/+12
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Fine-tune moving gcc libraries to sysroot.Alexey Neyman2016-10-071-0/+12
| | | | | | | | | | | 1. Check if anything was installed outside sysroot; on some [baremetal only?] configurations GCC doesn't install anything to ${CT_PREFIX_DIR}/${CT_TARGET}/lib. 2. We need to create <sysroot>/lib/<multilib> if it doesn't exist (MUSL only installs in <sysroot>/usr/lib). 3. Do not move the linker scripts; elf2flt expects to find them in gcc's dir, not sysroot. Signed-off-by: Alexey Neyman <stilor@att.net>
* Merge branch 'master' into x86-muslAlexey Neyman2016-10-041-2/+27
|\
| * GCC uses multi_os_dir for libgcc, not multi_dir.Alexey Neyman2016-10-021-1/+1
| | | | | | | | Signed-off-by: Alexey Neyman <stilor@att.net>
| * Fix issue #449.Alexey Neyman2016-10-021-2/+27
| | | | | | | | | | | | | | After building final gcc, place the libraries in non-sysroot libs into sysroot. Signed-off-by: Alexey Neyman <stilor@att.net>
* | Add a checkbox for libmpx build.Alexey Neyman2016-09-221-0/+9
|/ | | | | | Disable libmpx for musl builds. Signed-off-by: Alexey Neyman <stilor@att.net>
* libc/*.sh: handle combinations of multilib root/dir.Alexey Neyman2016-08-231-3/+5
| | | | | | | | | | | | | | | | | | | | | 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-51/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-31/+43
| | | | | | | | | | | | | | | | | | | | | | | 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>
* gcc: Add --with-multilib-list optionRay Donnelly2016-06-091-0/+6
| | | | | | | | | | Written by Bryan Hundven. Modified by Alexey Neyman to actually add the option to gcc.in. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com> Signed-off-by: Ray Donnelly <mingw.android@gmail.com> Signed-off-by: Alexey Neyman <stilor@att.net>
* Enable multiarch support in pass-1 GCC.Alexey Neyman2016-06-091-3/+12
| | | | | | | | | By default, it is 'auto' - which means, it is enabled if there are multilibs directories detected in the installation location for libgcc. Thus, it is not detected for pass-1 GCC: the installation location is empty at this point. Signed-off-by: Alexey Neyman <stilor@att.net>
* scripts/build/cc: pass FLAGS_FOR_TARGET in do_gcc_core_backendMax Filippov2016-03-151-0/+3
| | | | | | | | Pass CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET and LDFLAGS_FOR_TARGET to gcc configure in do_gcc_core_backend as they may be used to build libstdc++ for bare-metal target. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* Remove GCC dependency to libelfMatthias Weisser2016-01-181-4/+0
| | | | | | As crosstools-ng only support GCC >= 4.8 we do not need libelf for gcc. GCC dropped this dependency with 4.6. Signed-off-by: Matthias Weisser <m.weisser.m@gmail.com>
* gcc: fix previous commitBryan Hundven2016-01-071-1/+1
| | | | | | | | | In a5057713a0394d189adc8b9abb0eb65592ecfc49 ...I forgot to add a line continuation at the break in the 'if' statement. Reported-by: asavah <asavah@avh.od.ua> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gcc: Fix CC_GCC_ENABLE_CXX_FLAGS for mode=baremetalBryan Hundven2016-01-061-0/+6
| | | | | | | When creating a baremetal toolchain, CC_GCC_ENABLE_CXX_FLAGS has no effect. This closes #298 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gcc: remove CC_GCC_EXTRA_ENV_ARRAYBryan Hundven2016-01-061-8/+3
| | | | | | | | | | I was noticing that $extra_user_env was inconsistently used in 100-gcc.sh. I don't feel comfortable having just any make flag or environment variable passed to make from a config file. If a specific option needs to be passed to make for gcc, then a specific kconfig option should be added for that make flag/option/env. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gcc: Sync backend functionsBryan Hundven2016-01-061-36/+35
| | | | | | | | | | The two gcc backend functions are getting very close to being duplicated code. To help in the process of merging the two backends, this change syncronizes the two functions so they are easier to diff. This commit has no functional changes. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gcc: Add new linaro download pathBryan Hundven2016-01-021-3/+4
| | | | | | It seems that linaro is changing where they release, again. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* Whitespace: We don't use tabs in shell or kconfig filesBryan Hundven2015-12-081-10/+10
| | | | | | | We indent by multiples of 4. This change cleans up whitespace in offending files. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* scripts: Update usage of CT_GetCustomBryan Hundven2015-12-081-7/+2
| | | | | | | This commit updates the build scripts to match the new usage of CT_GetCustom from the previous change. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gcc: Gnu OpenMP support depends on threadingBryan Hundven2015-11-291-1/+0
| | | | | | | | Instead of checking if thread support is enabled during the build, move the check to kconfig-time. Since if threading support is not availble, libgomp should not be available either. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gcc: CLooG should be optional for configureBryan Hundven2015-11-291-2/+6
| | | | | | | | | Because >= gcc-5.x does not require cloog, it should not be forced on the command line arguments for configure if graphite is enabled. Make CLooG optionally added, if it is needed (aka: <= gcc-4.9). Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* PPL: Remove support for PPL and CLooG/PPLBryan Hundven2015-11-291-18/+0
| | | | | | | | | | | | | | | | | | | | | Now that versions of gcc that required PPL are no longer supported ( >= gcc-4.5.x AND <= gcc-4.7.x ) ...we no longer require PPL or CLooG/PPL. This commit: * Removes PPL * Removes CLooG/PPL * Updates the documentation * Updates build script for CLooG and GCC * Removes PPL and CLooG/PPL from scripts/addToolVersion.sh and scripts/showSamples.sh * Adds ISL to scripts/addToolVersion.sh and scripts/showSamples.sh I know that sounds like a lot for one commit, but it was all kind of inter-tangled. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gcc: Remove gcc <= 4.7.xBryan Hundven2015-11-291-21/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | As per #222, in crosstool-NG >= 1.23.0, we will only support: [upstream supported gcc versions] - 1 As of this writing, these versions are: * 5.2.0 * 4.9.3 * 4.8.5 (the -1, since development on 4.8.x is now closed) I plan to keep 4.8.5 around because of some architectures having issues with over-optimization or just faulty optimization in the 4.9.x and possibly newer versions. I also cleaned up a requirement for glibc to depend on >= gcc-4.6.x for >= glibc-2.20, but since the lowest gcc we support after this change is >= 4.8.5, this condition can go away. Patches for older gcc versions are removed in the next commit. This closes #222 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* Clang: Use {C,CXX}FLAG -fbracket-depth=512 for GCC buildRay Donnelly2015-11-221-0/+13
| | | | | | | https://llvm.org/bugs/show_bug.cgi?id=19650 https://gcc.gnu.org/ml/gcc/2014-05/msg00014.html Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
* consistency: Use exported variables of required toolsBryan Hundven2015-11-171-22/+22
| | | | | | | | | | | | | | | | | | | | | | 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>
* xtensa: add support for the configurable Xtensa architecture.Chris Zankel2015-11-131-0/+4
| | | | | | | | | | | | | | | The Xtensa processor architecture is a configurable, extensible, and synthesizable 32-bit RISC processor core. Processor and SOC vendors can select from various processor options and even create customized instructions in addition to a base ISA to tailor the processor for a particular application. Because of the configurability, the build process requires one additional step for gcc, binutils, and gdb to update the default configuration. These configurations are packed into an 'overlay' tar image, and are simply untarred on top of the default configuration during the build. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* Use install-strip target for gcc optionallyIlya Lyubimov2015-11-111-1/+5
|
* Clean up *.la after installing compiler/libraries.Alexey Neyman2015-10-261-0/+19
| | | | | | | | | Having *.la in the installation directory breaks ltrace: in ltrace, libtool somehow considers libsupc++ to be an "accessory library" and does not add -lsupc++ to the link flags. Neither Ubuntu, nor RedHat include *.la files into their packages for libstdc++. Signed-off-by: Alexey Neyman <stilor@att.net>
* Using "all" and "install" targets in do_gcc_core_backend if configured.Jasmin Jessich2015-10-101-9/+47
| | | | | | | | | | | | | | | | | - New configurations: - CC_GCC_TARGET_FINAL: Use the default targets "all" and "install" for the final compiler for bare metal. - Adding parameter "build_step" to function do_gcc_core_backend: do_gcc_core_backend is used for the core compiler and in case of bare metal for the final compiler, too. To have better control over the parameters for the final compiler "build_step" is used. - Used for proper logging. - Use CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY or CT_CC_GCC_EXTRA_CONFIG_ARRAY. - If CT_CC_GCC_TARGET_FINAL is set and the final compiler is build then the make targets for the final compiler are used ("all", "install"). Signed-off-by: Jasmin Jessich <jasmin@anw.at>
* Merge pull request #187 from jasmin-j/sync_ltoBryan Hundven2015-10-071-0/+2
|\ | | | | Synchronize CC_GCC_USE_LTO parameter setting II