summaryrefslogtreecommitdiff
path: root/scripts/build/libc
AgeCommit message (Collapse)AuthorFilesLines
2022-02-11Unify core passesAlexey Neyman1-1/+1
With libc_headers step before pass-1, there is no need to distinguish pass-1 and pass-2; they are configured identically (note that with the current configuration, core pass-2 is only used for win32 - hence, uses build_libgcc=yes and mode=static). Signed-off-by: Alexey Neyman <stilor@att.net>
2022-02-11Fold libc_start_files into libcAlexey Neyman7-335/+79
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>
2022-02-11Retire obsoleted milestonesAlexey Neyman2-41/+23
... and the code dependent on them, after the latest wave of obsolete package removals. This concludes the glorious history of the original uClibc (non-NG) with lots of kludges removed. There was a choice here, whether to call the resulting libc "uClibc" or "uClibc-ng". I opted in favor of giving uClibc-ng the recognition it deserves, although it had some ripple effect in the ct-ng code. Signed-off-by: Alexey Neyman <stilor@att.net>
2021-06-24Fix build of older Glibc using GCC >=10Nik Konyuchenko1-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>
2021-01-09picolibc: Convert to companion libraryKeith Packard1-111/+0
This allows configurations to include picolibc without excluding another C library. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-10-15Don't remove XLOCALE support unconditionally.lancethepants1-1/+0
Signed-off-by: Lance Fredrickson <lancethepants@gmail.com>
2020-10-05glibc: set glibc build system default_cflags emptyHans-Christian Noren Egtvedt1-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>
2020-09-16picolibc: Use target architecture to drive picolibc configurationKeith Packard1-5/+5
This selects code matching the target architecture within picolibc. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-09-01Add picolibc support [v2]Keith Packard1-0/+111
This adds support for using picolibc instead of newlib on embedded systems. Signed-off-by: Keith Packard <keithp@keithp.com> v2: Add check for meson and ninja Sync option default values with current picolibc defaults Remove xtensa sys header file install as those aren't in picolibc
2020-02-16Merge pull request #1270 from nolange/prevent_glibc_cflags_overrideAlexey Neyman1-1/+4
prevent the glibc build from overwriting flags
2020-01-22Merge pull request #1274 from maxmorozov/masterAlexey Neyman1-1/+3
CT_LIBC_NEWLIB_REGISTER_FINI is processed correctly
2019-12-23Merge pull request #1280 from dimkr/musl-cflagsAlexey Neyman1-1/+2
Resepct CT_TARGET_{C,LD}FLAGS when building musl
2019-12-20Add newlib retargetable locking configurationStephanos Ioannidis1-0/+1
This commit adds support for the newlib configuration option '--enable-newlib-retargetable-locking'. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-12-04Resepct CT_TARGET_{C,LD}FLAGS when building muslDima Krasner1-1/+2
I was trying to build static binaries for a range of Broadcom soft-float ARMv7 SoCs and kept getting SIGILL, although I was targeting Cortex A7 (and A5, later), even on A9 and A15. I found out that once I add -msoft-float, +mp+sec is to blame: Attribute Section: aeabi File Attributes - Tag_CPU_name: "7VE" + Tag_CPU_name: "7" Tag_CPU_arch: v7 - Tag_CPU_arch_profile: Application - Tag_ARM_ISA_use: Yes Tag_THUMB_ISA_use: Thumb-2 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_rounding: Needed @@ -12,8 +10,5 @@ File Attributes Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_enum_size: int Tag_ABI_optimization_goals: Aggressive Size Tag_CPU_unaligned_access: v6 - Tag_MPextension_use: Allowed - Tag_DIV_use: Allowed in v7-A with integer division extension - Tag_Virtualization_use: TrustZone and Virtualization Extensions (This is the readelf -A diff, before and after armv7-a+nofp -> armv7+nofp). I kept getting SIGILL even after building my application with a toolchain built with the correct CFLAGS and found out that crosstool-ng doesn't pass the host CFLAGS when building musl, which pollutes my binary with these ARMv7 extensions. Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-11-04CT_LIBC_NEWLIB_FSEEK_OPTIMIZATION and CT_LIBC_NEWLIB_FVWRITE_IN_STREAMIO are ↵Morozov Max1-0/+2
took into account now
2019-11-03CT_LIBC_NEWLIB_REGISTER_FINI is processed correctlyMorozov Max1-1/+1
2019-10-27prevent the glibc build from overwriting flagsNorbert Lange1-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>
2019-04-05Merge pull request #1178 from stilor/masterAlexey Neyman6-12/+12
Last fixes for 1.24.0
2019-04-05Rename JOBSFLAGS -> CT_JOBSFLAGSAlexey Neyman6-12/+12
... so that it is saved/restored when restarting the build. Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-23Fix uClibc build for noMMU targetMax Filippov1-14/+16
uclibc_backend_once tries to build dummy shared libraries regardless of whether shared libraries support for target is enabled or not, resulting in build failure in noMMU bFLT configuration. Only build dummy shared libraries when shared library support for target is enabled. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2019-02-24Fix musl build when CT_SHARED_LIBS=nDima Krasner1-0/+5
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-02-20Select flat/FDPIC in accordance with ct-ng settingAlexey Neyman1-0/+9
uClibc-ng 1.0.31 enabled FDPIC as an option for ARM/no-MMU configurations and defaults to that option if not set explicitly. Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-20Stash the uClibc config after our modsAlexey Neyman1-0/+4
... before running `make olddefconfig`. This helps in debugging. Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-18Move moxiebox build to post_ccAlexey Neyman2-5/+4
core-2 gcc does not search the final prefix now for newlib's headers. Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-16Disable CXX while building glibcAlexey Neyman1-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>
2019-02-07Merge pull request #1134 from stilor/upgradingAlexey Neyman1-7/+0
Upgrade script + test suite
2019-01-30Config v2: select relevant parts of each package versionAlexey Neyman1-7/+0
Also, remove a couple of config options that dealt with package versions that have been since retired. Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-23Coding style fix in uClibc.shDima Krasner1-1/+1
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-01-23Moved uClibc configuration installation to uClibc.shDima Krasner1-0/+4
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2018-12-15Bionic modifies CT_TARGET_CFLAGSAlexey Neyman1-1/+5
... which, after a recent change, is not reflected into CT_ALL_TARGET_CFLAGS for non-multilib configurations. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07Remove a TBDAlexey Neyman1-8/+0
It only applied to core-pass-2 compiler; final compiler can locate the linker script just fine. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07Disable -fstack-protector* from being used by glibcAlexey Neyman1-0/+8
... until it was fixed (to some extent) in 2.25. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-05Add configuration options for enabling SSPAlexey Neyman2-3/+10
... 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>
2018-12-03Fix uClibc builds after moxie mergeAlexey Neyman2-13/+13
Broken because of the capitalization of the name. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01Add moxiebox as a choice for libcAlexey Neyman9-137/+163
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>
2018-10-16Create glibc-ports symlink inside CT_SRC_DIRAlexey Neyman1-2/+2
... so that it works in both "bundled" and "bundled,local" cases. Fixes #1060. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-28Fix up timestamps after patchingAlexey Neyman1-1/+0
... so that autotools-based packages do not re-run autoconf/autoheader/automake. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-26Merge pull request #984 from slash3g/masterAlexey Neyman1-4/+4
Properly handle newlib configuration flags
2018-09-25Restore *-android buildAlexey Neyman1-1/+7
Modify CT_TARGET_CFLAGS (which are passed to GCC's FOR_TARGET flags) rather than CT_ALL_TARGET_CFLAGS. Fixes #1006. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-22Merge pull request #990 from antmak/fix_newlib_multilib_optAlexey Neyman1-1/+1
Fix a wrong name for the newlib's multilib option
2018-06-15Fix a wrong name for the newlib's multilib optionAnton Maklakov1-1/+1
2018-06-11Properly handle newlib configuration flagsDaniele Baracchi1-4/+4
2018-06-05Avoid adding arch/cpu/tune flags for target to GCC buildAlexey Neyman3-3/+3
... as it may need to override them for building runtime-selectable code. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-05-15Too many fixes need backporting for GCC8...Alexey Neyman1-7/+1
... so instead, disable -Werror for older versions of glibc. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-05-12First batch of fixesAlexey Neyman1-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>
2018-05-04Preserve each variant of libwinpthread.dllAlexey Neyman1-0/+18
... in the corresponding /lib directory. Mingw-w64 installs it to /bin, so multiple variants in a multilib configuration override each other. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-02-10Make libiconv an option in the menu configAlexey Neyman1-0/+7
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-03Use the new SuperH fixes in the two multilib samplesAlexey Neyman1-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>
2017-09-03Workaround for static uClibc-ng issue with -lpthreadAlexey Neyman1-36/+36
Also, preserve .config when running test-package.sh. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-03Super-H multilib toolchain fixesAlexey Neyman1-2/+2
1. On SuperH, configuring GCC with explicit variant of the CPU (like "sh4") limits the default set of multilibs to just that CPU and requires --with-multilib-list to change. Allow for "unspecified" variant, so that we can defer to GCC to determine the list. 2. Support toolchains with both endiannesses at the same time. 3. Add a SuperH/newlib sample 4. Add more flags processing for uClibc Signed-off-by: Alexey Neyman <stilor@att.net>