aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/cc
Commit message (Collapse)AuthorAgeFilesLines
* Add symlinks from the libraries' original location to the new one.Alexey Neyman2017-03-291-0/+3
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix up the sysroot issue for sh4 in a different wayAlexey Neyman2017-03-261-52/+2
| | | | | | | | | | | (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>
* Do not create multilib symlinks if not using sysrootAlexey Neyman2017-03-231-1/+1
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Add an option to "demultilib"Alexey Neyman2017-03-171-20/+38
| | | | | | | | | | | It turns out buildroot does not currently accept a toolchain where a dynamic linker does not reside in the multi-os-directory. Unfortunately this is how glibc installs itself on AArch64 without any extra tricks. So, provide an option to force everything into /lib or /usr/lib; patch to buildroot will be worked on separately. Signed-off-by: Alexey Neyman <stilor@att.net>
* Create ld.so.confAlexey Neyman2017-03-131-1/+1
| | | | | | | Also a fix for CT_IterateMultilibs: it didn't pass multi_os_dir_gcc, so it only worked if the caller did *not* declare it as a local variable. Signed-off-by: Alexey Neyman <stilor@att.net>
* When moving gcc libs, prefer the same directory as libcAlexey Neyman2017-03-091-3/+12
| | | | | | | If libc ended up in a directory other than /lib, place GCC's libs in that directory as well. Signed-off-by: Alexey Neyman <stilor@att.net>
* Only add clang-specific flags to clangAlexey Neyman2017-03-061-4/+32
| | | | | | I.e., only to CFLAGS_FOR_BUILD if the build is canadian. Signed-off-by: Alexey Neyman <stilor@att.net>
* 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>