Commit Graph

373 Commits

Author SHA1 Message Date
Chris Packham
5a1dc8d95d scripts: Save toolchain config as regular file
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>
2024-07-29 13:13:26 +12:00
Chris Packham
b82f532f0b scripts/functions: Update sourceware mirrors
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>
2024-06-05 19:32:16 +12:00
Arnaud Vrac
f9ab04b63a Add mold linker build
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>
2024-06-05 19:31:45 +12:00
Chris Packham
6c54b50336 scripts/functions: Use CT_Abort when paths.sh is missing
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>
2024-04-24 18:13:48 +12:00
Quentin Boswank
cf6b1740a1 Add more caching to the CI
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>
2023-10-04 16:12:23 +13:00
Bryan Hundven
db942c3d0d Add option for experimental bundled patches
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>
2023-03-16 16:54:22 +13:00
Joakim Nohlgård
4f5c57fdb3 Detect if a package src_dir is missing
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>
2022-12-04 16:02:37 +13:00
Chris Packham
76849bafe9 linux: Add 6.0.2 bump LTS
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>
2022-10-18 17:28:34 +13:00
Chris Packham
53bbdc7425 Remove obsolete bionic/android support
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>
2022-05-10 19:46:53 +12:00
Dima Krasner
b6887d346f scripts/functions: collect license files named COPYRIGHT*
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2022-05-03 20:53:36 +12:00
Elliot Saba
7f84b9ab92 [scripts/functions]: Fix quoting issue in comparison
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>
2022-04-22 10:15:04 +12:00
Alexey Neyman
cc6b7fad46 Retire obsoleted milestones
... 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>
2022-02-11 00:47:50 -08:00
Stephanos Ioannidis
b48e1a31f3 Support common local patch directory
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>
2021-07-14 00:07:30 +09:00
Chris Packham
1aeeea6919 CT_Mirrors: make use of kernel cdn
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>
2021-07-06 20:23:49 +12:00
Christoph Muellner
1dc25bf611 scripts/functions: Add better support for annotanted git tags
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>
2021-05-06 02:21:33 +02:00
Chris Packham
ea386017b6 Merge branch 'picolibc-multiarch' of git://github.com/keith-packard/crosstool-ng into master 2020-09-20 21:17:28 +12:00
Keith Packard
c1c475d0a0 Map picolibc to suitable CT_TARGET_SYS values
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>
2020-09-16 11:52:58 -07:00
Mikhail Falaleev
4c4e5ba047 Patches: search package patches in the top package directory
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.
2020-09-10 17:14:39 +03:00
Alexey Neyman
d978290f39 Set --with-cpu-{32,64} for multilib builds
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>
2020-02-26 11:05:19 -08:00
Alexey Neyman
064711469c Add Linux versions
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-10-01 21:22:44 -07:00
Alexey Neyman
9b9e5c4162 Make lzip an optional dependency
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-28 17:13:12 -08:00
Alexey Neyman
16efa9d3e7 Add debug output to Kconfig manipulation functions
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-19 23:45:44 -08:00
Alexey Neyman
7c7eca2fab Improve error detection
... 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>
2019-02-14 15:08:01 -08:00
Alexey Neyman
2219aab336 Implement an option to store downloads in subdirs
... following the buildroot model.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-13 01:05:13 -08:00
Dima Krasner
de797aa99d Coding style fixes in functions
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-01-23 09:56:05 +02:00
Dima Krasner
2870ffae51 Moved uClibc configuration installation to uClibc.sh
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-01-23 09:52:04 +02:00
Alexey Neyman
92ad0fe0ab Dump how multilib iterator is invoked
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-14 23:58:22 -08:00
Alexey Neyman
5cf859d9d9 Add config flags for omitting 'arch' and 'vendor'
... 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>
2018-12-10 01:10:01 -08:00
Alexey Neyman
9d2a5f8413 Set ALL_TARGET_CFLAGS initially for !MULTILIB
Fixes #1107.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07 00:03:04 -08:00
Alexey Neyman
a4dc14dba4 Consider it success if DoForceRmdir removes only the content
Fixes #929.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01 14:44:08 -08:00
Alexey Neyman
40d5bf6440 Add moxiebox as a choice for libc
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-12-01 10:10:51 -08:00
Alexey Neyman
172308cb1b Add moxie architecture
and a moxie-unknown-elf target (which is what #1088 apparently wanted).

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-28 00:30:10 -08:00
Alexey Neyman
da76ae3ea3 Add DTC as a companion tool
(needed for cross-gdb targeting the moxie-* targets)

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-28 00:30:10 -08:00
Alexey Neyman
35bec76b63 Fix installation of the license file
... 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>
2018-11-12 01:19:04 -08:00
Alexey Neyman
4270b8e62e
Merge pull request #1084 from antmak/collect_licences
Collect licenses for the distribution
2018-11-07 11:26:45 -08:00
Alexey Neyman
4acea9cc95 Fix detection of missing overlays
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-06 23:48:51 -08:00
Anton Maklakov
b36e89d294 Add an ability to use a regular directory for overlaying. If it doesn't exist, the tarball is still used 2018-11-05 15:49:51 +08:00
Anton Maklakov
aec70d5310 Collect licenses for the distribution 2018-11-05 15:39:47 +08:00
Alexey Neyman
f232d6d09a Add an ability to modify an exported variable
... 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>
2018-11-01 15:50:12 -07:00
Alexey Neyman
21af769802 Detect errors in CT_SaveLocal
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>
2018-10-27 13:56:22 -07:00
Austin Beer
11e65e75f9 Add comment about preventing Bash from searching $PATH 2018-10-25 15:07:55 -06:00
Austin Beer
93d86b7e5c Prevent Bash from searching $PATH when sourcing the .config file 2018-10-24 18:56:12 -06:00
Alexey Neyman
ce7eea8003 Try to use 'git fetch --depth 1' if possible
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>
2018-10-20 23:33:14 -07:00
Alexey Neyman
efe65615d0 Fix up timestamps after patching
... so that autotools-based packages do not re-run autoconf/autoheader/automake.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-28 11:48:01 -07:00
Alexey Neyman
d7ee16cb28 Make patch order overridable by individual packages
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-06 00:50:36 -07:00
Alexey Neyman
4137c422c6 Detect errors from gas
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-05 00:16:37 -07:00
Alexey Neyman
4e7d0906c1 Support out-of-tree local builds
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 14:39:56 -07:00
Alexey Neyman
bc542408ca config.sub/config.guess must either be executable
or be run through shell

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
89181ae277 Avoid calling CT_Abort from CT_Mirrors
... 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>
2018-02-15 22:45:46 -08:00
Alexey Neyman
9fdb93cce0 Make comp.libs use generated templates, too
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>
2017-11-29 23:44:49 -08:00