aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/libc/glibc.sh
Commit message (Collapse)AuthorAgeFilesLines
* libc/glibc: Add workaround for makeinfo build issueChris Packham2025-06-041-0/+4
| | | | | | | | | Newer versions of makeinfo fail to build the older versions of the glibc manual triggering build failures. Add a workaround for this my disabling makeinfo for the glibc build where needed. Fixes #2358 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* glibc: fix the broken build for glibc 2.19 with gcc 13.Hao Li2024-03-011-2/+2
| | | | | | macos silicon SDK does not contain stat64 (and other LFS extension), and glibc 2.19 makes use of it. Signed-off-by: Hao Li <hayatelee@gmail.com>
* glibc: Add option for building libcryptChris Packham2023-08-251-0/+4
| | | | | | | As of glibc-2.38 libcrypt is not built by default. Add an option to allow building libcrypt support into glibc. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* glibc: configure adding debug symbols in glibc buildGuillermo E. Martinez2022-06-211-1/+5
| | | | | | | | | | After building the cross toolchain and compile a simple C program, objdump reports debug information even though -g modifier was not used. These debug segments are in glibc library and CRT files. So a new config entry: CT_GLIBC_ENABLE_DEBUG was added to control when we want to add debug information to glibc, by default is enabled. Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
* glibc: Reinstate support for the bundled portsChris Packham2022-05-181-0/+3
| | | | | | | | | | | Commit 6d5227b6 ("Remove obsolete glibc 2.12.1") removed supports for the separate glibc-ports but also removed GLIBC_USE_PORTS_ADDON. Glibc versions up to 2.20 bundled support from some architectures in the ports directory so GLIBC_USE_PORTS_ADDON is required to support these older glibc versions. Fixes #1736 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Remove obsolete glibc 2.12.1Chris Packham2022-05-101-17/+0
| | | | | | | | | glibc 2.12.1 was marked as obsolete. Now that the 1.25.0 release is out this version can be removed completely. As glibc 2.12.1 was the last remaining version supported by glibc-ports support for glibc-ports is also removed. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Fold libc_start_files into libcAlexey Neyman2022-02-111-166/+35
| | | | | | | | | | | | | | | | | | | | | | After 557b9d4, libc_start_files and libc_main steps are performed one after another. It doesn't make sense, especially since some of the libcs (glibc, uClibc-ng) go to great lengths to first install start files in the first step, libc_start_files, only to remove them immediately in the second step, libc_main. Current build steps also break in the xtensa newlib configurations, as it needs to install the custom xtensa headers before building the libgcc and after 557b9d4, the headers are not installed before libgcc is built in pass-1. Therefore, finish what 557b9d4 mentioned but did not do: move header installation into a new step, libc_headers, and combine libc_start_files and libc_main into a single step. This also allows to combine the core pass-1/pass-2 steps, to be done in a subsequent commit. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix build of older Glibc using GCC >=10Nik Konyuchenko2021-06-241-0/+4
| | | | | | | | | | | | | Issue #1535 GCC 10 changed the default to -fno-common, which leads to a linking error in GLibc older than 2.30. This change adds -fcommon cflag for the target GLibc versions <=2.29 and GCC >=10. This change also adds additional cflags for the target GLibc to disable new GCC11 checks that lead to compilation errors. Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
* glibc: set glibc build system default_cflags emptyHans-Christian Noren Egtvedt2020-10-051-0/+2
| | | | | | | | | | By setting glibc build system default_cflags to be empty before building, we will enforce the build system to only use the crosstool-ng CFLAGS when building glibc. Properly solves the issue identified in #1396. Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
* prevent the glibc build from overwriting flagsNorbert Lange2019-10-271-1/+4
| | | | | | | | | The glibc will append the content of the CFLAGS variable, overriding previous flags. If unset, the CFLAGS variable is not empty, so explicitly set it. Instead prepend the default CFLAGS flags. Signed-off-by: Norbert Lange <nolange79@gmail.com>
* Rename JOBSFLAGS -> CT_JOBSFLAGSAlexey Neyman2019-04-041-7/+7
| | | | | | ... so that it is saved/restored when restarting the build. Signed-off-by: Alexey Neyman <stilor@att.net>
* Disable CXX while building glibcAlexey Neyman2019-02-161-3/+4
| | | | | | | Otherwise, glibc 2.29 tries to use it - but we haven't built libstdc++ yet. We really need to implement #808... Until now, pass empty CXX to make. Signed-off-by: Alexey Neyman <stilor@att.net>
* Disable -fstack-protector* from being used by glibcAlexey Neyman2018-12-071-0/+8
| | | | | | ... until it was fixed (to some extent) in 2.25. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add configuration options for enabling SSPAlexey Neyman2018-12-041-0/+4
| | | | | | | | | | | ... in uClibc and glibc. Fixes #681. While here, relocate additional "sources" for uClibc/binutils into packages/ directory. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add moxiebox as a choice for libcAlexey Neyman2018-12-011-23/+28
| | | | | | | | | | | | | | | | | This required some rework of the libc selection, as moxiebox is a layer on top of another libc - newlib. Also, moxiebox'es host VM (`sandbox`) needs a libcrypto on the host. We will not have it if we're cross-compiling a canadian cross. Fortunately, all moxiebox needs from libcrypto is SHA256, and it already includes a standalone implementation of SHA256 in its runtime. Provide a little wrapper that allows moxiebox use that implementation for the host binary, too. Also, automate collecting/printing the list of all packages in a given category (e.g. LIBC or COMP_TOOLS), generate a list of all Kconfig symbols for a given category. Signed-off-by: Alexey Neyman <stilor@att.net>
* Create glibc-ports symlink inside CT_SRC_DIRAlexey Neyman2018-10-161-2/+2
| | | | | | | | ... so that it works in both "bundled" and "bundled,local" cases. Fixes #1060. Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix up timestamps after patchingAlexey Neyman2018-09-281-1/+0
| | | | | | ... so that autotools-based packages do not re-run autoconf/autoheader/automake. Signed-off-by: Alexey Neyman <stilor@att.net>
* Avoid adding arch/cpu/tune flags for target to GCC buildAlexey Neyman2018-06-051-1/+1
| | | | | | ... as it may need to override them for building runtime-selectable code. Signed-off-by: Alexey Neyman <stilor@att.net>
* Too many fixes need backporting for GCC8...Alexey Neyman2018-05-141-7/+1
| | | | | | ... so instead, disable -Werror for older versions of glibc. Signed-off-by: Alexey Neyman <stilor@att.net>
* First batch of fixesAlexey Neyman2018-05-121-0/+7
| | | | | | | | - Incompatible function type for ifunc alias - Multiple statements macro expansion in strftime - if_nametoindex size checking Signed-off-by: Alexey Neyman <stilor@att.net>
* Use the new SuperH fixes in the two multilib samplesAlexey Neyman2017-09-031-0/+1
| | | | | | | | | | | - Glibc configure args and tuple need adjustment on SuperH - Only allow "both endian" and "with CPU" for unspecified arch variant. May reconsider endianness (was breaking things before adjusting glibc tuple) - Retire non-multilib sample, it should be a subset of the multilib one now. Signed-off-by: Alexey Neyman <stilor@att.net>
* Workaround for static uClibc-ng issue with -lpthreadAlexey Neyman2017-09-031-36/+36
| | | | | | Also, preserve .config when running test-package.sh. Signed-off-by: Alexey Neyman <stilor@att.net>
* config: Add package versioning flexibilityNathan Chancellor2017-09-011-2/+2
| | | | | | | | | | | | | | 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>
* Make --enable-obsolete-rpc an option in ct-ngAlexey Neyman2017-08-261-2/+3
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix glibc-ports with the new frameworkAlexey Neyman2017-08-261-4/+8
| | | | | | | 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>
* Building packages using the new frameworkAlexey Neyman2017-07-081-2/+2
| | | | | | (fails at building GMP off the VCS because it needs to run bootstrap scripts) Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix the references to old config variablesAlexey Neyman2017-07-081-103/+24
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Convert the rest of packages to new frameworkAlexey Neyman2017-07-081-23/+23
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* MinGW-W64 fixesAlexey Neyman2017-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - libpthread requires iteration over multilibs, unlike the core, it does not detect and build multilibs by itself. - Disable parallel builds for mingw-w64 components; until mingw-w64 core builds clean, I am not trusting it. - Make the list of tools to build configurable - Turn on multilib in x86_64 sample. - Make warnings about tuple less redundant. As in, "one WARN is enough, no need to shout it three times". - Messages about various steps/substeps are more aligned with the rest of the components. - Use 'make' instead of ${make} to invoke the companion make just built, if applicable. Signed-off-by: Alexey Neyman <stilor@att.net>
* Move tools alias creation to a common functionAlexey Neyman2017-03-121-0/+2
| | | | | | | | ... and in addition to final toolchain aliasing, use it when configuring multilibs for glibc/musl. Note that uClibc does not need it, it is explicitly selecting the tools using CROSS_PREFIX. Signed-off-by: Alexey Neyman <stilor@att.net>
* Merge pull request #635 from stilor/macos-skip-localesAlexey Neyman2017-03-071-1/+1
|\ | | | | Skip locales on macos
| * Skip building locales on macos, tooAlexey Neyman2017-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | --enable-hacker-mode is not sufficient, in 2.25 configure then fails while checking for sysdeps fragments that apply to a given configuration, and with that worked around, fails on binutils & compiler version check. In brief: if someone wants locales on cygwin/macos, you'd have to implement cross-localedef (similar to cross-rpcgen) in glibc and submit it upstream. Signed-off-by: Alexey Neyman <stilor@att.net>
* | glibc: hide native c++ executable from buildDan McGregor2017-03-011-0/+4
| | | | | | | | | | | | | | | | | | If glibc's configure finds the host c++ executable it assumes that c++ should be enabled for the build. In case we don't have cross g++ built yet (ie, for headers), this causes the build to fail creating C++ headers. So hide C++ from the build. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
* | Bring in FreeBSD supportDan McGregor2017-03-011-1/+9
|/ | | | | | Check for FreeBSD specific issues, it is mostly the same as Darwin. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
* Skip locale build on CygwinAlexey Neyman2017-02-281-0/+9
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Revert "Determine whether -E/-r option selects extended regexp"Alexey Neyman2017-02-261-3/+3
| | | | This reverts commit 7bcf18bfab84374d3305c7a088f95ac1219ddf93.
* Determine whether -E/-r option selects extended regexpAlexey Neyman2017-02-131-3/+3
| | | | | | | | | | | | | | ... 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>
* External addons supported by glibc even nowAlexey Neyman2017-02-091-27/+24
| | | | | | ... though none are provided by default. Signed-off-by: Alexey Neyman <stilor@att.net>
* Revert "glibc: Remove support for downloading and extracting add-ons"Alexey Neyman2017-02-091-0/+67
| | | | This reverts commit 39273e0843cc5f7f91d50651b299a0472f59f472.
* Fix location where libc manual is builtAlexey Neyman2017-01-301-2/+2
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Run all configure scripts using ${CONFIG_SHELL}Alexey Neyman2017-01-251-0/+1
| | | | | | ... as its help message says in menuconfig. Signed-off-by: Alexey Neyman <stilor@att.net>
* Use ${CT_CC} instead of gcc ...Alexey Neyman2017-01-131-6/+6
| | | | | | ... when refering to target's compiler. Signed-off-by: Alexey Neyman <stilor@att.net>
* Unify fetching Linaro components.Alexey Neyman2017-01-121-11/+10
| | | | | | Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib. Signed-off-by: Alexey Neyman <stilor@att.net>
* Darwin needs -liconv when building glibc.Alexey Neyman2017-01-101-7/+2
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Avoid trampling user's LDFLAGS_FOR_HOST...Alexey Neyman2017-01-101-7/+11
| | | | | | | | | ... by passing BUILD_LDFLAGS twice (the 2nd argument overrides the first). Also, no need to pass -I/-L for BUILD_CFLAGS/LDFLAGS, they are already included by crosstool-NG.sh (but keep for BUILD_CPPFLAGS, as we set it up here). Remove -Wl,-Bstatic/-Wl,-Bdynamic (we only build static complibs). Signed-off-by: Alexey Neyman <stilor@att.net>
* Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.Alexey Neyman2016-11-201-13/+13
| | | | | | | | | | | | | | | | | | 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>
* build/glibc: Improve confusing commentKirill K. Smirnov2016-09-151-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>
* Support multilib in sh/uClibc.Alexey Neyman2016-08-231-105/+17
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Treat multiroots differently.Alexey Neyman2016-08-231-10/+46
| | | | | | | | | | '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>
* Change multilib functions to set the variable.Alexey Neyman2016-08-231-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>