aboutsummaryrefslogtreecommitdiff
path: root/scripts/functions
Commit message (Collapse)AuthorAgeFilesLines
* scripts: Save toolchain config as regular fileChris Packham2024-07-291-4/+3
| | | | | | | | | | | | | | | | Since commit 16c6cc99 ("Save the toolchain configuration to its own file, as an auto-extracting shell script:") we've been saving the configuration as a self extracting script. This is a little non-obvious as it looks like it should be a regular file but the bzipped payload means it can be easily inspected. It may also cause alarm for users who should rightly be suspicious of unexpected binaries that get shipped along with packaged toolchains. It also assumes that bzip2 (or at least bzcat) is available on the machine running the toolchain. Instead of the self extracting shell script save the config as a regular compressed file with an obvious file extension. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* scripts/functions: Update sourceware mirrorsChris Packham2024-06-051-2/+3
| | | | | | | Add https mirror for sourceware.org. Use https instead of http for kernel.org and gnu.org. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Add mold linker buildArnaud Vrac2024-06-051-0/+1
| | | | | | | | | | | | | | | Allows building the #mold linker, which can then be used in the cross-toolchain by passing the -fuse-ld=mold to the gcc flags. It is much faster than ld or gold. This requires a C++20 compiler and cmake. Initially implemented by Arnaud, and HC added configure check for cmake. Outstanding task to validate compiler is C++20 compatible. Signed-off-by: Arnaud Vrac <avrac@freebox.fr> Signed-off-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
* scripts/functions: Use CT_Abort when paths.sh is missingChris Packham2024-04-241-1/+1
| | | | | | | | | Code added to deal with --enable-local used the non-existent CT_Error instead of CT_Abort. Use the correct function so the build aborts with a useful error message. Fixes #2141 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Add more caching to the CIQuentin Boswank2023-10-041-0/+1
| | | | | | | | | | | more specificaly to the tarballs download. The function CT_Fetch now touches the already existing files to be comparable to the not used ones that can araise when a package is updated. This comparsion is needed because if it would not exist the tarball would grow in size due to not used but still cached packages. This would take time but is definitly something to worry about. Signed-off-by: Quentin Boswank <qubos@outlook.de>
* Add option for experimental bundled patchesBryan Hundven2023-03-161-24/+30
| | | | | | | | | | | | | | | | | | This adds 3 new options to patch order: * bundled + bundled_exp * bundled + bundled_exp + local * local + bundled + bundled_exp The path for bundled experimental patches is: ${CT_LIB_DIR}/packages/${pkg_dir}/experimental and patches that are still being reviewed, but not yet applied upstream may be toggled with ENABLE_EXPERIMENTAL_BUNDLED_PATCHES. Also fix modelines for editors on bootstrap and scripts/functions, and fix mix whitespace in scripts/functions. Closes: #1916 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* Detect if a package src_dir is missingJoakim Nohlgård2022-12-041-1/+2
| | | | | | | | If a user deletes the package directory under .build/src/ but fails to remove the hidden stamp files the CT_DoExtractPatch function will detect this, delete the stamps and perform the full extract-and-patch step. Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
* linux: Add 6.0.2 bump LTSChris Packham2022-10-181-1/+1
| | | | | | | | | | | | | Add 6.0.2 Bump 5.19.2 -> 5.19.16 Bump 5.15.58 -> 5.15.74 Bump 5.10.134 -> 5.10.148 Bump 5.4.208 -> 5.4.218 Bump 4.9.325 -> 4.9.330 Bump 4.19.254 -> 4.19.261 Bump 4.14.290 -> 4.14.295 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Remove obsolete bionic/android supportChris Packham2022-05-101-1/+0
| | | | | | | | The bionic libc support was out of date and relied on downloading binaries from the internet. It was already marked as obsolete. Now that the 1.25.0 release is out it can be completely removed. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* scripts/functions: collect license files named COPYRIGHT*Dima Krasner2022-05-031-1/+1
| | | | Signed-off-by: Dima Krasner <dima@dimakrasner.com>
* [scripts/functions]: Fix quoting issue in comparisonElliot Saba2022-04-221-1/+1
| | | | | | | | | | | | | | | On my Ubuntu machine (with `dash` version `0.5.10` and `bash` version `5.0.17`), I would get errors such as the following: ``` crosstool-ng/scripts/functions: line 730: [: !=: unary operator expected ``` This is generally because a variable is not set, and expands to an empty string causing the test operator to mis-parse the expression. To fix this, I have added quotes around the variable. Signed-off-by: Elliot Saba <staticfloat@gmail.com>
* Retire obsoleted milestonesAlexey Neyman2022-02-111-1/+1
| | | | | | | | | | | | ... 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>
* Support common local patch directoryStephanos Ioannidis2021-07-141-3/+5
| | | | | | | | | | | | This commit updates the patching process such that the local patches can be applied in a version-independent manner, as with the patches provided by the crosstool-ng packages. This is done by reading the patch files from `${CT_LOCAL_PATCH_DIR}/(package_name)` rather than from `${CT_LOCAL_PATCH_DIR}/(package_name)/(version)`. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
* CT_Mirrors: make use of kernel cdnChris Packham2021-07-061-6/+5
| | | | | | | | cdn.kernel.org automatically redirects to a geographically close mirror. Make use of this instead of www.kernel.org or mirrors.edge.kernel.org. While were at it make sure we use https. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* scripts/functions: Add better support for annotanted git tagsChristoph Muellner2021-05-061-1/+7
| | | | | | | | | | | | | | | | | Annotated git tags are git objects with their own ID. They contain the commit ID where they point to. When downloading from annotated tags, we currently get the following warning: "Revision being fetched changed to ${new_unique_id};" The old unique_id is the ID of the annotated tag and the new unique_id is the commit it points to. Let's resolve this by first assuming to have an annotated tag and let git ls-remote dereference it. If that fails (e.g. if it can't be dereferenced because it is not an annotated tag), then let's proceed as before and don't do any dereferencing. Signed-off-by: Christoph Muellner <cmuellner@linux.com>
* Merge branch 'picolibc-multiarch' of ↵Chris Packham2020-09-201-1/+1
|\ | | | | | | git://github.com/keith-packard/crosstool-ng into master
| * Map picolibc to suitable CT_TARGET_SYS valuesKeith Packard2020-09-161-1/+1
| | | | | | | | | | | | | | picolibc is another bare-metal C library, and so should be mapped to CT_TARGET_SYS just like newlib does. Signed-off-by: Keith Packard <keithp@keithp.com>
* | Patches: search package patches in the top package directoryMikhail Falaleev2020-09-101-3/+5
|/ | | | | | | | | Before patches for specific package were searched in packages/${pkg_name}/${version}. This means that with usage of custom version, patches wont be applied. This commit makes ct-ng search bundled patches also in packages/${pkg_name} directory. That means that we can put some patches in this directory, that will be applied to any version of this component.
* Set --with-cpu-{32,64} for multilib buildsAlexey Neyman2020-02-261-11/+33
| | | | | | | GLIBC 2.31 needs --with-cpu=ultrasparc for both 32/64-bits now, and --with-cpu only sets the CPU model for the "primary" bitness. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add Linux versionsAlexey Neyman2019-10-011-1/+1
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Make lzip an optional dependencyAlexey Neyman2019-02-281-2/+14
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Add debug output to Kconfig manipulation functionsAlexey Neyman2019-02-191-0/+3
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Improve error detectionAlexey Neyman2019-02-141-7/+9
| | | | | | | | | ... by filtering the messages that contain a *word* "warning" or "error", i.e. is preceded by a space or is at the beginning of the line. This improves the output from new uClibc-ng releases - which produce a warning about an unused label, `mprot_error`. Signed-off-by: Alexey Neyman <stilor@att.net>
* Implement an option to store downloads in subdirsAlexey Neyman2019-02-131-17/+40
| | | | | | ... following the buildroot model. Signed-off-by: Alexey Neyman <stilor@att.net>
* Coding style fixes in functionsDima Krasner2019-01-231-3/+3
| | | | Signed-off-by: Dima Krasner <dima@dimakrasner.com>
* Moved uClibc configuration installation to uClibc.shDima Krasner2019-01-231-0/+11
| | | | Signed-off-by: Dima Krasner <dima@dimakrasner.com>
* Dump how multilib iterator is invokedAlexey Neyman2019-01-141-0/+6
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Add config flags for omitting 'arch' and 'vendor'Alexey Neyman2018-12-101-18/+32
| | | | | | | | ... parts of the config tuple. While here, remove parts that are setting portions of the target tuple to a value that's already the default. Signed-off-by: Alexey Neyman <stilor@att.net>
* Set ALL_TARGET_CFLAGS initially for !MULTILIBAlexey Neyman2018-12-071-3/+6
| | | | | | Fixes #1107. Signed-off-by: Alexey Neyman <stilor@att.net>
* Consider it success if DoForceRmdir removes only the contentAlexey Neyman2018-12-011-21/+27
| | | | | | Fixes #929. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add moxiebox as a choice for libcAlexey Neyman2018-12-011-19/+7
| | | | | | | | | | | | | | | | | 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>
* Add moxie architectureAlexey Neyman2018-11-281-5/+10
| | | | | | and a moxie-unknown-elf target (which is what #1088 apparently wanted). Signed-off-by: Alexey Neyman <stilor@att.net>
* Add DTC as a companion toolAlexey Neyman2018-11-281-17/+24
| | | | | | (needed for cross-gdb targeting the moxie-* targets) Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix installation of the license fileAlexey Neyman2018-11-121-12/+6
| | | | | | | | | | | | | | | ... for ct-ng configured without --enable-local. Also, install licenses in subdirectories of the components. Also, ct-ng configured with --enable-local removed the scripts directory upon `ct-ng distclean`. Also, misspelled CT_WGET/CT_CURL variables prevented use of `ct-ng updatetools`. Fixes #1091. Signed-off-by: Alexey Neyman <stilor@att.net>
* Merge pull request #1084 from antmak/collect_licencesAlexey Neyman2018-11-071-0/+31
|\ | | | | Collect licenses for the distribution
| * Collect licenses for the distributionAnton Maklakov2018-11-051-0/+31
| |
* | Fix detection of missing overlaysAlexey Neyman2018-11-061-2/+1
| | | | | | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* | Add an ability to use a regular directory for overlaying. If it doesn't ↵Anton Maklakov2018-11-051-4/+8
|/ | | | exist, the tarball is still used
* Add an ability to modify an exported variableAlexey Neyman2018-11-011-2/+8
| | | | | | | | | | ... and use that ability to permanently set CTNG_LD_IS in case gold is default linker and we're building glibc. Fixes #988. This was a long-standing breakage in crosstool-NG (at least since it began to run each step in a sub-shell). Signed-off-by: Alexey Neyman <stilor@att.net>
* Detect errors in CT_SaveLocalAlexey Neyman2018-10-271-8/+32
| | | | | | | | | | | | The function is called from a conditional and therefore, the CT_OnError handler is not invoked on failures. Need to return an error and check for the error return in the caller. Also, while here, fix the issue that was causing the failure - move can fail if it crosses a filesystem, so fall back to 'cp+rm' in that case. Signed-off-by: Alexey Neyman <stilor@att.net>
* Add comment about preventing Bash from searching $PATHAustin Beer2018-10-251-2/+2
|
* Prevent Bash from searching $PATH when sourcing the .config fileAustin Beer2018-10-241-2/+2
|
* Try to use 'git fetch --depth 1' if possibleAlexey Neyman2018-10-201-15/+65
| | | | | | | | | It should be possible if fetching a tag/branch, and it may be possible if fetching a changeset if a server is configured to allow it. Fixes #986 Signed-off-by: Alexey Neyman <stilor@att.net>
* Fix up timestamps after patchingAlexey Neyman2018-09-281-0/+14
| | | | | | ... so that autotools-based packages do not re-run autoconf/autoheader/automake. Signed-off-by: Alexey Neyman <stilor@att.net>
* Make patch order overridable by individual packagesAlexey Neyman2018-06-061-3/+8
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Detect errors from gasAlexey Neyman2018-06-051-0/+1
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* Support out-of-tree local buildsAlexey Neyman2018-04-071-2/+15
| | | | Signed-off-by: Alexey Neyman <stilor@att.net>
* config.sub/config.guess must either be executableAlexey Neyman2018-04-071-4/+4
| | | | | | or be run through shell Signed-off-by: Alexey Neyman <stilor@att.net>
* Avoid calling CT_Abort from CT_MirrorsAlexey Neyman2018-02-151-4/+13
| | | | | | | ... see the comment for the reason. Defer aborting until the result of CT_Mirrors is actually used (if it is used). Signed-off-by: Alexey Neyman <stilor@att.net>
* Make comp.libs use generated templates, tooAlexey Neyman2017-11-291-9/+33
| | | | | | | | This allows us to include the component-to-package relation in the generated kconfig files and make use of that information in the show-config.sh script. Signed-off-by: Alexey Neyman <stilor@att.net>