summaryrefslogtreecommitdiff
path: root/scripts/build/libc
AgeCommit message (Collapse)AuthorFilesLines
2016-12-02Fix use of custom location if it is a directory.Alexey Neyman2-2/+2
In that case, CT_GetCustom just creates a symlink to the original. In that case, 'cp -a <path> .' gives an error and 'cp -a <path> <newdir>' creates <newdir> as a symlink (which will then run the build inside the shared directory, .build/src/<package>). Signed-off-by: Alexey Neyman <stilor@att.net>
2016-11-21Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.Alexey Neyman6-41/+41
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-11Merge remote-tracking branch 'upstream/master'Dmitry Pankratov2-1/+7
2016-10-24Merge branch 'master' into janitorialBryan Hundven1-0/+5
2016-10-05Fix m68k with uClibc-ng >= 1.0.15.Alexey Neyman1-0/+5
1.0.15 only kept a single LINUXTHREADS option, and renamed it, making it no longer option-compatible with uClibc. The option for "1.0.14 or later" version of uClibc-ng is not currently used; rename it to "1.0.15 or later" and use it to handle newer uClibc-ng's linuxthreads. m68k happens to be the only sample using linuxthreads. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-10-01Merge branch 'master' of https://github.com/crosstool-ng/crosstool-ngDmitry Pankratov7-550/+435
2016-09-14build/glibc: Improve confusing commentKirill K. Smirnov1-1/+2
Up until cset 4e2227e8a5537a8553c503e55d2cb2190f2a0d2f there was an 'if' statement with a comment. The abovementioned changeset removed the conditional statement but the comment survived. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
2016-08-29uClibc: propagate SHARED_LIBS option.Kirill K. Smirnov1-0/+6
This patch synchronizes crosstool CT_SHARED_LIBS and uclibc HAVE_SHARED options. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
2016-08-29uClibc: install native utilsKirill K. Smirnov1-1/+1
This change adds native ldd and ldconfig utils to sysroot. For glibc just 'make install' installs everything including utils. For uclibc there exists a separate goal 'install_utils'. Make it. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
2016-08-23musl: Add multilib support.Alexey Neyman2-36/+59
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23uClibc: move ldso check to post_cc.Alexey Neyman1-43/+54
It turns out that core GCC on binfmt architectures (m68k, for example) cannot produce the final executable (looks for ld.real in the wrong place). Need to wait for the final gcc to become available. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23Support multilib in sh/uClibc.Alexey Neyman2-188/+59
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23Treat multiroots differently.Alexey Neyman2-17/+83
'ld' does not search for dependency libraries in multi_os_directory, so if there's both multi_os_directory and multi_root, and there is only one configuration in each multi_root, forgo the multi_os_directory suffix. Needed for sh4-multilib-linux-uclibc. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23First stab at multilib/uClibc.Alexey Neyman1-14/+130
Create a separate 'libc_backend_once', install headers into a subdirectory (different sets of headers are installed for 32- and 64-bit architectures), and create a symlink for the dynamic linker location expected by GCC. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23uClibc: Split configuration tweaker into per-arch functions.Alexey Neyman1-113/+17
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23Change multilib functions to set the variable.Alexey Neyman1-2/+3
Rather than echo-ing the new value, set the value into the variable with the name passed as an argument (similar to CT_SanitizeVarDir). This allows to use CT_DoLog in these functions. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23libc/*.sh: Deprecate libc_check_config step.Alexey Neyman7-71/+10
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-23uclibc: merge startfiles/final into single backend.Alexey Neyman1-160/+109
In preparation for multilib support, use the same "backend" model that is already employed by glibc and musl. Also, the verbosity setting descriptions were swapped. V=2 is actually less verbose than V=1: V=1 prints full commands, while V=2 prints 'CC <file> <defines>'. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23uClibc.sh: typo, local -> locale.Alexey Neyman1-13/+13
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23glibc.sh: cleanupsAlexey Neyman1-55/+33
- Dump CT_LIBC_EXTRA_CC_ARGS: instead, treat CT_LIBC_EXTRA_CFLAGS as arguments to CC (or they are not applied to .S, for example). Combine them with multi_flags and CT_TARGET_CFLAGS in proper order. - Analyze thus combined flags to determine --with-fp/--without-fp. Don't need to check CT_ARCH_FLOAT - it is reflected in CT_TARGET_CFLAGS anyway. Check more soft/hard float options defined on different architectures. - Drop checking for endianness flags: they are not reflected in configure arguments in any way, and they're already present in CFLAGS (either via multi_flags or via CT_TARGET_CFLAGS). Besides, CT_ARCH_ENDIAN_OPT was actually called CT_ARCH_ENDIAN_CFLAG, so this was a no-op anyway. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-08-23libc/*.sh: handle combinations of multilib root/dir.Alexey Neyman3-157/+145
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-3/+19
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-23glibc: Build manuals and locales lastRay Donnelly1-3/+17
Rather then building the manuals and locales for each multilib target, only build the manuals on the last multilib target. If you are not building a multilib toolchain, then the first libc build will be the last. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-08-23glibc.sh: Use --print-multi-os-directoryAlexey Neyman1-41/+44
GCC makes the distinction between: multilib (-print-multi-lib) and multilib-os (--print-multi-os-directory) as the GCC library and GCC sysroot library paths, respecitively. Use this to build libc into the correct locations, the same applies to the dummy libc.so Changed by Alexey Neyman: restore missing CT_EndStep. Signed-off-by: Ray Donnelly <mingw.android@gmail.com> Signed-off-by: Alexey Neyman <stilor@att.net>
2016-06-18Merge remote-tracking branch 'upstream/master'Dmitry Pankratov1-5/+38
2016-06-10glibc.sh: build dummy libc.so with correct extra flagsAlexey Neyman1-1/+2
Signed-off-by: Alexey Neyman <stilor@att.net>
2016-06-10glibc: Use common arch call to get multilib targetsRay Donnelly1-1/+18
The previous patch added the function 'CT_DoMultilibTarget()' to scripts/build/arch/*.sh. This patch calls the common function to (currently) get just the target tuple for the current multilib target. This patch was originally by: Cody P Schafer Changed by Alexey Neyman: first, try `gcc -print-multiarch`. If it is supported, use whatever it reports. Otherwise, fall back to our guesswork. Move "i486" quirk into glibc.sh, as it is specific to glibc (e.g. uclibc will need i386, which is what GCC reports). 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-10glibc: do not add bogus optionsAlexey Neyman1-2/+2
If a multilib configuration contains an endianness option, the ${endian_extra} is set to, for example, 'mb' (note, no dash!). It is then added to CFLAGS, resulting in bogus flags like 'mb -mb'. But it is not even needed, as ${extra_flags} already contains the very same option! Found by experimenting with multilibs with different endianness on SH, which still didn't work, but that's another story... Signed-off-by: Alexey Neyman <stilor@att.net>
2016-04-02Unbreak sparc-unknown-linux-gnu.Alexey Neyman1-2/+17
GLIBC 2.23 dropped support for pre-v9 SPARC in pthreads. Pass host triplet with s/sparc/sparcv9/ replacement for 2.23. Signed-off-by: Alexey Neyman <stilor@att.net>
2016-03-30Merge remote-tracking branch 'upstream/master'Dmitry Pankratov1-0/+11
2016-03-08newlib: add option to enable nano formatted ioBryan Hundven1-0/+3
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-03-08newlib: add option to enable nano mallocBryan Hundven1-0/+3
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-03-08newlib: disable multilib if it is not enabledBryan Hundven1-0/+5
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-03-07MinGW: add C++11 posix threads supportDmitry Pankratov1-0/+27
2016-03-01musl-libc: Rewrite musl.sh build scriptBryan Hundven1-50/+67
This commit moves the do_libc_configure function to do_libc_backend and switches do_libc_start_files and do_libc_final to call do_libc_backend. The major reason for the rewrite is that musl => 1.1.13 has had it's own build system rewritten and can now build out-of-tree. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-02-24glibc: Mirror extra_config flags from do_libc_backend_onceBryan Hundven1-0/+1
In do_libc_backend_once: ``` # Also, if those two are missing, iconv build breaks extra_config+=( --disable-debug --disable-sanity-checks ) ``` But in do_libc_locales we only add ```--disable-debug```. This change adds ```--disable-sanity-checks``` to do_libc_locales to mirror this, as I've seen iconv break this way. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-02-24glibc: remove do_libc_locales_extract; it's emptyBryan Hundven1-10/+0
No point in calling an empty function. Must be left over from the glibc/eglibc split up... then re-merge. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-02-24glibc: Remove support for downloading and extracting add-onsBryan Hundven1-67/+0
Since external add-ons were removed in 2.17, and we only support >= 2.18, this support is no longer needed. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-02-24glibc: reformat glibc build scriptBryan Hundven1-66/+64
Move crosstool-ng hook functions to be in the normal locations. This commit has no functional changes. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-12-08scripts: Update usage of CT_GetCustomBryan Hundven5-55/+15
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-23uClibc: Add kconfig option to enable IPv6 supportBryan Hundven1-0/+7
This commit adds a kconfig option to enable IPv6 support. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-21uClibc: remove references to sh64*Bryan Hundven1-1/+0
As per the change notes of GCC-6: https://gcc.gnu.org/gcc-6/changes.html and conversations I've had with the buildroot folks, there is no need to support sh5/sh64. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-17consistency: Use exported variables of required toolsBryan Hundven6-52/+52
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/+9
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-13Merge pull request #239 from diorcety-ctng/cc-cygwin-mingw-linuxBryan Hundven1-0/+14
Canadian cross build = x86_64 Cygwin host = x86_64 MinGW_W64 target = x86_64 GNU/Linux
2015-11-13Add gettext and libiconv as companion libsRay Donnelly1-0/+14
.. they're needed for the RPC generation in glibc on both Cygwin and MinGW-w64. Neither are built on GNU/Linux and iconv is not built on Darwin. Two patches for gettext are needed, one so that -O0 works and one so that static builds can be made. They can take a good while to build, so if not needed for_host or for_build then they are not built. Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
2015-11-13uClibc: Fall back to default configs if not providedBryan Hundven1-1/+4
I've added the .config files to contrib/uClibc-defconfigs from buildroot to use as default configs if they are not provided in the sample. If a particular architecture really needs an option set, it should be either updated in the manange_uClibc_config function in scripts/build/libc/uClibc.sh or a custom ${uclibc_name}.config should be added to the sample (usually via `ct-ng saveconfig`). Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-13uClibc: Add support for uClibc-ngBryan Hundven1-10/+17
This commit adds uClibc-ng 1.0.8. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-13uClibc: rewrite mungeuClibcConfig to manage_uClibc_configBryan Hundven1-219/+177
This commit updates uClibc to use the new CT_Kconfig options from the previous commit. The older sed method of sanity checking the uClibc .config was error prone and clumsy. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-11uClibc: Reduce supported versionsBryan Hundven1-8/+1
This commit reduces the number of supported versions to: * 0.9.33.2 * custom location Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>