summaryrefslogtreecommitdiff
path: root/scripts/build/libc/newlib.sh
AgeCommit message (Collapse)AuthorFilesLines
2022-02-11Fold libc_start_files into libcAlexey Neyman1-4/+3
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>
2020-01-22Merge pull request #1274 from maxmorozov/masterAlexey Neyman1-1/+3
CT_LIBC_NEWLIB_REGISTER_FINI is processed correctly
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-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-04-05Rename JOBSFLAGS -> CT_JOBSFLAGSAlexey Neyman1-1/+1
... so that it is saved/restored when restarting the build. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01Add moxiebox as a choice for libcAlexey Neyman1-16/+6
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-09-26Merge pull request #984 from slash3g/masterAlexey Neyman1-4/+4
Properly handle newlib configuration flags
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 Neyman1-1/+1
... as it may need to override them for building runtime-selectable code. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08Separate the notions of package name/labelAlexey Neyman1-1/+0
Also, remove resolved TBDs. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08Kconfigize choice/menu itemsAlexey Neyman1-1/+1
Also, add a poor man's upgrade script. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08Fix the references to old config variablesAlexey Neyman1-29/+6
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-25Run all configure scripts using ${CONFIG_SHELL}Alexey Neyman1-0/+1
... as its help message says in menuconfig. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-14Merge pull request #526 from stilor/double-includeAlexey Neyman1-7/+1
Avoid creating include/include
2017-01-13Unify fetching Linaro components.Alexey Neyman1-9/+12
Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-13AVR32 support has been retired.Alexey Neyman1-4/+0
Scripts no longer download avr-headers. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-13install_root has no effect on newlib install.Alexey Neyman1-1/+1
And never had, at least since newlib 1.17 (first version added to crosstool-ng). Apparently, copy-pasted from glibc.sh. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-13Remove 2nd copy of the option.Alexey Neyman1-2/+0
Added above, as part of the list. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-09Support building Newlib with Link Time OptimisationAlastair D'Silva1-10/+13
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2017-01-09Add more newlib optionsAlastair D'Silva1-16/+33
2016-11-21Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.Alexey Neyman1-5/+5
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-08-23libc/*.sh: Deprecate libc_check_config step.Alexey Neyman1-4/+0
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-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>
2015-12-08scripts: Update usage of CT_GetCustomBryan Hundven1-8/+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-17consistency: Use exported variables of required toolsBryan Hundven1-4/+4
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-10-31gcc: Support only the latest branch releases of gccBryan Hundven1-19/+0
This change, as per #222, reduces the number of supported releases of gcc to the latest branch releases. I noticed while doing this work that gcc-4.5.4 was never added, so I moved patches for gcc-4.5.3 to 4.5.4 and updated the bfin-unknown-linux-uclibc example. Also, 120-siginfo.patch was fixed upstream in the 4.5.4 release, so this patch is omitted. I also bumped the avr sample to 4.9.3 from 4.9.2. With the addition of gcc-5.x, the gcc release team now releases the major.minor.0 versions, while updates to the branch are available in svn/git. We'll address that when we get to issue #219. This change just removes CC_GCC_5_1 and moves CC_GCC_5_2 to CC_GCC_5, and removes CC_GCC_5_1_or_later and moves CC_GCC_5_2_or_later to CC_GCC_5_or_later. This is the first of two part changes, as mentioned in #222. This change is slated for release in 1.22.0. The next change will be slated for 1.23.0, and will limit gcc versions to what is on https://gcc.gnu.org under "Release Series and Status", which is currently 4.9.3 and 5.2.0, although I will also support the previous supported version. In this example that would be 4.8.5. Last, but not least, this change also retires AVR32 support. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-09-14Added additional newlib specific target flags with new optionJasmin Jessich1-1/+4
LIBC_NEWLIB_TARGET_CFLAGS. Signed-off-by: Jasmin Jessich <jasmin@anw.at>
2015-06-21avr-libc: add support for avr-libc C libraryErico Nunes1-0/+4
This commit adds support for the avr-libc C library. According to the project page at http://www.nongnu.org/avr-libc , the avr-libc package provides a subset of the standard C library for Atmel AVR 8-bit RISC microcontrollers. In addition, the library provides the basic startup code needed by most applications. Support for this library in crosstool-ng is only enabled for the AVR 8-bit target. The avr-libc manual and most distributions build the AVR 8-bit gcc toolchain with the "avr" (non-canonical) target. Some experimentation also led to the conclusion that other (canonical) targets are not very well supported, so we force the "avr" target for crosstool-ng as well. The manual also recommends building avr-libc after the final gcc build. To accomplish this with crosstool-ng, a new do_libc_post_cc step is added, in which currently only avr-libc performs its build, and is a no-op for the other libc options. Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2015-02-02scripts/*/*.sh: prioritize http downloadsBryan Hundven1-1/+2
Prirotize http downloads before ftp downloads. By having http download first, those using proxy will work with the current download mechnism. This tells me that that mechnism needs to be updated. (proxy support and/or kconfig toggles) closes #3 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-01-16libc: newlib: Add NewLib 2.2.0, Linaro NewLib 2.2.0-2015.01 and 2.1.0-2014.09Cristoforo Cataldo1-2/+9
This commit allows to choose, download and build latest NewLib: - newlib-2.2.0 - newlib-linaro-2.2.0-2015.01 - newlib-linaro-2.1.0-2014.09 Signed-off-by: Cristoforo Cataldo <cristoforo.cataldo@gmail.com>
2015-01-01libc/newlib: Add do_libc_start_files to copy headers to CT_HEADERS_DIRDavid Holsgrove1-4/+4
Require access to newlibs headers in gcc.sh, matching other libc components. Resolves issue with headers not found. Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
2014-02-25newlib: fix extract process for custom versionTrevor Woerner1-1/+1
newlib: fix extract process for custom version If the user specifies the use of a custom newlib version, the logic in the extract function was reversed, so this step would fail. Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org> [yann.morin.1998@free.fr: keep leading indentation] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <c727adf1b7bd2c1e891d.1393353347@openSUSE-i7> Patchwork-Id: 324060
2013-12-31libc/newlib: fix variables for avr32 headersYann E. MORIN"1-6/+10
Some of the avr32headers related variables are used in different functions, so have to be declared globally, not locally. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-08-01libc/newlib: add HTTP mirrorMichael Hope1-1/+2
Add well-known HTTP mirror as a fallback. This lets crosstool-ng work when behind a HTTP/HTTPS only proxy. Signed-off-by: Michael Hope <michaelh@juju.net.nz> [yann.morin.1998@free.fr: split patch in two] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <aeb4a850d0786ee62dc2.1375559989@wanda> Patchwork-Id: 264436
2013-03-31arch/avr32: Fix download of header filesMartin Guy1-9/+10
This patch fixes the download of the avr32 headers in crosstool-ng by fetching them directly from Atmel's web site instead of the now-broken URL given by the original author of the avr32-header-fetching modification, who fetched them from a copy on his own, now-defunct server. It also adds the necessary logic to extract from a zip file, as that is how the headers are packaged. To configure it for avr32 after launching ct-ng menuconfig in an empty directory: Paths and misc options -> Shell to use as CONFIG_SHELL = sh Target options -> Target Architecture = avr32 Toolchain options -> Tuple's alias = avr32 Binary utilities -> binutils version = 2.18a C compiler gcc version = 4.2.2 C-library newlib version = 1.17.0 Enable IOs on long long = yes Enable IOs on floats and doubles = yes Disable the syscalls supplied with newlib = yes CONFIG_SHELL is necessary to get round the "fragment: command not found" bug when binutils-2.18 is configured using bash. Prepared against crosstool-ng mercurial trunk on 31 March 2012. Signed-off-by: Martin Guy <martinwguy@gmail.com> [yann.morin.1998@free.fr: update bundles sample accordingly] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <CAL4-wQrg_NQ7jm-NCADqeyQr9twyhtx42OUGNThP6gWeqZc=kw@mail.gmail.com> Patchwork-Id: 232612
2013-03-03libc/newlib: update fetch locationTrevor Woerner1-1/+1
The menu system provides an option to allow a user to request newlib version 2.0.0. newlib-2.0.0, however, is not available at the download location currently being used. It is, however, available (as are other supported versions of newlib) at an alternate location. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Message-Id: <75ab5151c7f5dc9086e3.1362334313@suse64> Patchwork-Id: 224561
2013-01-10libc: get rid of libc_finishYann E. MORIN"1-4/+0
At long last, we no longer have any libc that requries a libc_finish. Yeah! Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-01-10libc/newlib: install AVR32 headers during the start-files-and-headers phaseYann E. MORIN"1-9/+11
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-30libc/newlib: remove getting from CVSYann E. MORIN"1-21/+7
We now have the ability to use a custom local directory/tarball, so it no longer makes sense to have the ability to use the CVS repository. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-11libc/newlib: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustomDavid Holsgrove1-1/+10
CUSTOM_LOCATION config options only presented in menuconfig if component CUSTOM version selected. Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com> [yann.morin.1998@free.fr: fix indentation] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Message-Id: <d02252752d4dc5e68ae3.1349931202@localhost.localdomain> PatchWork-Id: 190795
2011-07-17libc/newlib: build newlib in the proper stepYann E. MORIN"1-4/+4
Currently, newlib is built in the start_file step, which is wrong, but was needed when the baremetal integration was... well, 'unfinished'. Now that we build the baremetal compiler from the final cc step, and a proper core gcc in pass-1 and pass-2, we can move the newlib build to the step do_libc, where it belongs. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-12-15libc/newlib: build manual for newlibYann E. MORIN"1-0/+15
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org> [yann.morin.1998@anciens.enib.fr: copy with a single call to 'cp'] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-11-28libc/newlib: remove hard-coded "-O"Zhenqiang Chen1-1/+1
With hard-coded "-O", users can not customize CFLAGS_FOR_TARGET by CT_TARGET_CFLAGS. If "-O" is needed, users can input it in CT_TARGET_CFLAGS. By default, "-Os" is enabled. Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2011-11-22libc/newlib: add option to optimise for sizeZhenqiang Chen1-0/+2
Add an option to build with -Os instead of the default -O. Reviewed-by: Michael Hope Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>