-
Notifications
You must be signed in to change notification settings - Fork 1.3k
uclibc fix kernel constant tests + docker ci build fixes #5261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
skrap
wants to merge
4
commits into
rust-lang:main
Choose a base branch
from
skrap:bugfix/uclibc-docker-ci-build-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,26 @@ | ||
| FROM ubuntu:23.10 | ||
| FROM ubuntu:25.04 | ||
|
|
||
| # FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time | ||
| RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ | ||
| /etc/apt/sources.list && \ | ||
| apt-get update && apt-get install -y --no-install-recommends \ | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| ca-certificates \ | ||
| curl \ | ||
| file \ | ||
| gcc \ | ||
| libc6-dev \ | ||
| patch \ | ||
| qemu-system-arm \ | ||
| qemu-user \ | ||
| bzip2 \ | ||
| gzip \ | ||
| cpio \ | ||
| unzip \ | ||
| rsync \ | ||
| bc \ | ||
| xz-utils | ||
|
|
||
| ARG TEST_UCLIBC_TIME64 | ||
| ARG UCLIBC_TOOLCHAIN_URL | ||
| COPY install-uclibc.sh / | ||
| RUN /install-uclibc.sh "$TEST_UCLIBC_TIME64" | ||
| RUN /install-uclibc.sh "$UCLIBC_TOOLCHAIN_URL" | ||
|
|
||
| ENV PATH=$PATH:/rust/bin:/toolchain/bin \ | ||
| STAGING_DIR=/toolchain/armv7-buildroot-linux-uclibceabihf/sysroot \ | ||
| CC_armv7_unknown_linux_uclibceabihf=arm-buildroot-linux-uclibcgnueabihf-gcc \ | ||
| CARGO_TARGET_ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF_LINKER=arm-buildroot-linux-uclibcgnueabihf-gcc \ | ||
| CARGO_TARGET_ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF_RUNNER="qemu-arm -L /toolchain/arm-buildroot-linux-uclibcgnueabihf/sysroot/" | ||
| CARGO_TARGET_ARMV7_UNKNOWN_LINUX_UCLIBCEABIHF_RUNNER="qemu-arm -L /toolchain/arm-buildroot-linux-uclibcgnueabihf/sysroot/" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,18 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Installs the appropriate uclibc toolchain into /toolchain | ||
| # Builds a buildroot uclibc toolchain into /buildroot/output/host/ | ||
| # | ||
| # usage: install-uclibc.sh BUILDROOT_TOOLCHAIN_URL | ||
|
|
||
| set -eux | ||
|
|
||
| time64="$1" | ||
|
|
||
| if [ "${time64:-0}" != "0" ]; then | ||
| version='bleeding-edge-2025.08-1' | ||
| else | ||
| version='bleeding-edge-2024.02-1' # last version with 32-bit time_t | ||
| fi | ||
| toolchain_url="$1" | ||
|
|
||
| mkdir /toolchain | ||
|
|
||
| curl --retry 5 -L "https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--${version}.tar.bz2" | | ||
| tar xjf - -C /toolchain --strip-components=1 | ||
|
|
||
| curl --retry 5 -L "$toolchain_url" | tar xzf - -C /toolchain --strip-components=1 | ||
| if ! [ -f /toolchain/relocate-sdk.sh ]; then | ||
| echo "ERROR: toolchain does not contain relocate-sdk.sh, expecting a buildroot SDK." | ||
| exit 1 | ||
| fi | ||
| /toolchain/relocate-sdk.sh | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,8 +50,17 @@ run() { | |
|
|
||
| if [ -n "${TEST_UCLIBC_TIME64:-}" ]; then | ||
| build_args+=("--build-arg=TEST_UCLIBC_TIME64=1") | ||
| export RUSTFLAGS="$RUSTFLAGS --cfg=libc_unstable_uclibc_time64" | ||
| export RUSTFLAGS="${RUSTFLAGS:-} --cfg=libc_unstable_uclibc_time64" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "uclibc: move to configurable external prebuilt toolchain": maybe just |
||
| fi | ||
| if [[ "$run_target" = *-linux-uclibc* ]]; then | ||
| if [ "${UCLIBC_TOOLCHAIN_URL:-}" ]; then | ||
| build_args+=("--build-arg=UCLIBC_TOOLCHAIN_URL=$UCLIBC_TOOLCHAIN_URL") | ||
| else | ||
| echo "Expected a URL to a UCLIBC toolchain in \$UCLIBC_TOOLCHAIN_URL" | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
|
|
||
| # use -f so we can use ci/ as build context | ||
| docker build "${build_args[@]}" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"uclibc: move to configurable external prebuilt toolchain": missing trailing
\n