summaryrefslogtreecommitdiff
path: root/scripts/build/cc
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25Run all configure scripts using ${CONFIG_SHELL}Alexey Neyman1-16/+18
... as its help message says in menuconfig. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-16Merge pull request #535 from stilor/broke-newlib-cxx-canadianAlexey Neyman1-0/+7
Restore copying headers for gcc_build
2017-01-14Restore copying headers for gcc_build.Alexey Neyman1-0/+7
Only needed in canadian configurations to build libstdc++. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-14Use ${CT_CC} instead of gcc ...Alexey Neyman1-12/+12
... when refering to target's compiler. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-14Merge pull request #526 from stilor/double-includeAlexey Neyman1-3/+0
Avoid creating include/include
2017-01-13Unify fetching Linaro components.Alexey Neyman1-24/+12
Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-13No need to copy header; libc_start_file does it.Alexey Neyman1-3/+0
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-10Select libintl from gettext we built.Alexey Neyman1-2/+10
Also, require gettext for NLS, and require iconv/ncurses for gettext. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-10Kill CT_COMPLIBS_SHARED.Alexey Neyman1-14/+12
There is no such option so the check is always true. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-12-17Pass original multi_os_dir to iterator.Alexey Neyman1-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>
2016-11-29Pass FOR_BUILD flags when building the pass-1/2 core GCC.Alexey Neyman1-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>
2016-11-21Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.Alexey Neyman1-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>
2016-11-10Do not run 'make install' in parallel in GCC.Alexey Neyman1-3/+12
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-10-07Fine-tune moving gcc libraries to sysroot.Alexey Neyman1-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>
2016-10-04Merge branch 'master' into x86-muslAlexey Neyman1-2/+27
2016-10-03GCC uses multi_os_dir for libgcc, not multi_dir.Alexey Neyman1-1/+1
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-10-02Fix issue #449.Alexey Neyman1-2/+27
After building final gcc, place the libraries in non-sysroot libs into sysroot. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-09-23Add a checkbox for libmpx build.Alexey Neyman1-0/+9
Disable libmpx for musl builds. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23libc/*.sh: handle combinations of multilib root/dir.Alexey Neyman1-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>
2016-08-23multilib: Determine which options may pass through.Alexey Neyman1-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>
2016-08-23crosstool-NG.sh.in: Don't make lots of symlinks to lib folderRay Donnelly1-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>
2016-06-10gcc: Add --with-multilib-list optionRay Donnelly1-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>
2016-06-10Enable multiarch support in pass-1 GCC.Alexey Neyman1-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>
2016-03-15scripts/build/cc: pass FLAGS_FOR_TARGET in do_gcc_core_backendMax Filippov1-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>
2016-01-18Remove GCC dependency to libelfMatthias Weisser1-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>
2016-01-07gcc: fix previous commitBryan Hundven1-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>
2016-01-06gcc: Fix CC_GCC_ENABLE_CXX_FLAGS for mode=baremetalBryan Hundven1-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>
2016-01-06gcc: remove CC_GCC_EXTRA_ENV_ARRAYBryan Hundven1-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>
2016-01-06gcc: Sync backend functionsBryan Hundven1-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>
2016-01-03gcc: Add new linaro download pathBryan Hundven1-3/+4
It seems that linaro is changing where they release, again. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-12-08Whitespace: We don't use tabs in shell or kconfig filesBryan Hundven1-10/+10
We indent by multiples of 4. This change cleans up whitespace in offending files. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-12-08scripts: Update usage of CT_GetCustomBryan Hundven1-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>
2015-11-30gcc: Gnu OpenMP support depends on threadingBryan Hundven1-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>
2015-11-30gcc: CLooG should be optional for configureBryan Hundven1-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>
2015-11-30PPL: Remove support for PPL and CLooG/PPLBryan Hundven1-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>
2015-11-30gcc: Remove gcc <= 4.7.xBryan Hundven1-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>
2015-11-22Clang: Use {C,CXX}FLAG -fbracket-depth=512 for GCC buildRay Donnelly1-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>
2015-11-17consistency: Use exported variables of required toolsBryan Hundven1-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>
2015-11-13xtensa: add support for the configurable Xtensa architecture.Chris Zankel1-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>
2015-11-11Use install-strip target for gcc optionallyIlya Lyubimov1-1/+5
2015-10-27Clean up *.la after installing compiler/libraries.Alexey Neyman1-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>
2015-10-09Using "all" and "install" targets in do_gcc_core_backend if configured.Jasmin Jessich1-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>
2015-10-07Merge pull request #187 from jasmin-j/sync_ltoBryan Hundven1-0/+2
Synchronize CC_GCC_USE_LTO parameter setting II
2015-10-07Merge pull request #184 from jasmin-j/add_gcc_env_arrayBryan Hundven1-2/+7
Add additional environment variables for gcc build.
2015-10-07Merge pull request #182 from jasmin-j/add_missing_lib_optsBryan Hundven1-0/+15
Adding missing if/else blocks in do_gcc_core_backend.
2015-09-24Synchronize CT_CC_GCC_USE_LTO parameter setting in do_gcc_backend with the oneJasmin Jessich1-0/+2
from do_gcc_core_backend, by adding "--enable-lto"/"--disable-lto". Signed-off-by: Jasmin Jessich <jasmin@anw.
2015-09-21Added additional environment variables for gcc build (make) with new optionJasmin Jessich1-2/+7
GCC_EXTRA_ENV_ARRAY. Signed-off-by: Jasmin Jessich <jasmin@anw.at>
2015-09-21Removed doubled setting of --disable-libmudflap in do_gcc_core_backend.Jasmin Jessich1-1/+0
Signed-off-by: Jasmin Jessich <jasmin@anw.at>
2015-09-21Adding missing if/else blocks in do_gcc_core_backend for CT_CC_GCC_LIBSSP,Jasmin Jessich1-0/+15
CT_CC_GCC_HAS_LIBQUADMATH and CT_CC_GCC_LIBQUADMATH (--en/disable-libssp, --en/disable-libquadmath, --en/disable-libquadmath-support) from function do_gcc_backend. Signed-off-by: Jasmin Jessich <jasmin@anw.at>
2015-09-01Fix for issue #142:Jasmin Jessich1-3/+3
Configure for for core GCC did not use Core gcc extra config. Use now config variable CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY. Signed-off-by: Jasmin Jessich <jasmin@anw.at>