Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
9a14e4a
ci: Don't set `fail-fast` in 0.2 CI
tgross35 Jun 23, 2026
e5862a2
build(deps): bump vmactions/solaris-vm from 1.3.2 to 1.3.3
dependabot[bot] Apr 20, 2026
a2ba3b9
cargo: use workspace-level lints
xtqqczze Apr 25, 2026
00fabab
apple: add missing kqueue constants
kamalmarhubi Apr 25, 2026
444412e
refactor: use slice::fill
xtqqczze Apr 27, 2026
b227685
solarish: add AI_CANONNAME
psumbera Apr 27, 2026
5330b7c
linux: add SO_DETACH_REUSEPORT_BPF
swananan Apr 25, 2026
f82e16c
chore: SHA-pin actions
JohnTitor Apr 25, 2026
0eee72b
Delete FreeBSD 13 CI job
asomers May 1, 2026
70e6f36
build(deps): bump taiki-e/install-action from 2.75.21 to 2.76.0
dependabot[bot] May 4, 2026
8d9f888
solarish: Add IP TTL and IPv6 Hop Limit consts
taspelund Apr 29, 2026
1da5aed
cygwin: fix cpuset_t typo in CPU_ZERO
phdye May 7, 2026
80b7ee0
build(deps): bump taiki-e/install-action from 2.76.0 to 2.77.6
dependabot[bot] May 11, 2026
3aea668
build(deps): bump MarcoIeni/release-plz-action from 0.5.128 to 0.5.129
dependabot[bot] May 11, 2026
549a94b
Add pthread mutex initializer constants for riscv64
SpriteOvO May 1, 2026
f28f0eb
Add ENOTCAPABLE for macOS
Thomasdezeeuw Jan 12, 2026
3b2189b
Add swapped_count to vm_statistics64 on macOS
Thomasdezeeuw Jan 12, 2026
d414948
android: add POSIX_SPAWN_* constants
dylan-conway May 14, 2026
8282cb7
Use rustup for Solaris CI
psumbera May 18, 2026
df55998
chore(cargo): remove deprecated package authors field
xtqqczze May 18, 2026
8006bdf
build(deps): bump taiki-e/install-action from 2.77.6 to 2.79.1
dependabot[bot] May 18, 2026
9d22bdb
chore: migrate to `release-plz/action`
JohnTitor May 13, 2026
91b8273
nuttx: add SO_KEEPALIVE and TCP keepalive constants
no1wudi May 22, 2026
45e8a51
build(deps): bump vmactions/solaris-vm from 1.3.3 to 1.3.5
dependabot[bot] May 25, 2026
f08289c
Feat(apple): Add `PROC_PIDT_SHORTBSDINFO` and `proc_bsdshortinfo`
PaulDance May 19, 2026
ae66540
build(deps): bump taiki-e/install-action from 2.79.1 to 2.79.7
dependabot[bot] May 25, 2026
4723b79
musl: add renameat2 binding
jiang1997 May 24, 2026
e7c893c
redox: Add *at and dirent functions
willnode May 27, 2026
d78d8e5
feat(android): add timer_[create, delete, getoverrun, gettime, settime]
nickrobinson May 18, 2026
3bef69a
build(deps): bump taiki-e/install-action from 2.79.7 to 2.81.2
dependabot[bot] Jun 2, 2026
34b748d
build(deps): bump actions/checkout from 6.0.2 to 6.0.3
dependabot[bot] Jun 2, 2026
3b557cc
build(deps): bump vmactions/netbsd-vm from 1.3.8 to 1.3.9
dependabot[bot] Jun 2, 2026
54990ba
build(deps): bump vmactions/solaris-vm from 1.3.5 to 1.3.6
dependabot[bot] Jun 2, 2026
c8da2f7
aarch64: add missing SYS_sendfile and SYS_fadvise64 constants
fullzer4 Jun 1, 2026
543add8
Remove unnecessary clones in match statements
FranciscoTGouveia Jun 4, 2026
f6203fa
build(deps): bump vmactions/freebsd-vm from 1.4.5 to 1.4.6
dependabot[bot] Jun 2, 2026
75b9c7a
Fix constants accidentally removed for Linux uClibc targets
operutka Jun 4, 2026
d1fb5da
build(deps): bump vmactions/netbsd-vm from 1.3.9 to 1.4.0
dependabot[bot] Jun 8, 2026
a3ccd41
build(deps): bump taiki-e/install-action from 2.81.2 to 2.81.8
dependabot[bot] Jun 8, 2026
2126619
build(deps): bump vmactions/solaris-vm from 1.3.6 to 1.3.7
dependabot[bot] Jun 8, 2026
5684db6
fix: remove unused imports
JohnTitor Jun 10, 2026
85d0cf5
emscripten: fix pthread type sizes for wasm64 (MEMORY64)
gergelyvagujhelyi Jun 8, 2026
9cb224a
triagebot: enable no-merges feature
JohnTitor Jun 14, 2026
af8768f
linux: add futex_waitv bindings
JohnTitor May 31, 2026
19291e7
fix: replace raw pointer casts with pointer::cast
xtqqczze Apr 27, 2026
deadf22
fix: replace raw pointer casts with ptr::null
xtqqczze Apr 28, 2026
eb78eb9
build(deps): bump taiki-e/install-action from 2.81.8 to 2.81.10
dependabot[bot] Jun 15, 2026
db9a440
build(deps): bump release-plz/action from 0.5.129 to 0.5.130
dependabot[bot] Jun 15, 2026
cb2da90
apple: Make bsdshortinfo.pbsi_rfu nonpublic
tgross35 Jun 17, 2026
c606f6c
qurt: fix type and definition inaccuracies against SDK headers
androm3da Apr 30, 2026
9d4e37a
qurt: add missing pthread functions from QuRT SDK headers
androm3da Apr 30, 2026
09d3047
qurt: add mqueue subsystem (message queues, select/pselect)
androm3da Apr 30, 2026
eabae8b
qurt: add POSIX timer functions
androm3da Apr 30, 2026
4a05068
qurt: add missing unistd process and file functions
androm3da Apr 30, 2026
96cdce0
linux: add `sockaddr_iucv`
clayton615 Apr 2, 2026
9ade6a2
`_lwp_park`: `ts` pointer is mutable
joboet Jun 15, 2026
7a5b931
ci: Switch Linux runners to ubuntu-26.04
tgross35 Jun 18, 2026
eaad342
ci: Log libc version
tgross35 Jun 18, 2026
442af65
linux: Remove `KERN_REALROOTDEV` and `VM_LAPTOP_MODE`
tgross35 Jun 18, 2026
f55a5d6
refactor: adjust definition of `off_t` in wasi
dybucc Jun 1, 2026
eb94ae1
procctl for freebsd 15 upgrade.
devnexen Aug 15, 2025
91195f0
refactor: change type of `time_t` in teeos
dybucc Jun 1, 2026
154b06f
android: Add getpwent/setpwent/endpwent
sylfn Jun 10, 2026
c1b7e6a
refactor: annotate `ELAST` constants as unstable
dybucc May 27, 2026
44f267d
adding OPEN_TREE_NAMESPACE and fsopen/fsconfig/fsmount/fspick constan…
devnexen Jun 6, 2026
d29bf13
linux: Move `mount.h` API to `src/new`
tgross35 Jun 19, 2026
aa04be7
linux: Move `if_packet.h` API to `src/new`
tgross35 Jun 19, 2026
53c06b4
linux: Move IFLA_* constants to an anonymous enum to match source
tgross35 Jun 19, 2026
6d91817
linux: Move `if_link.h` API to `src/new`
tgross35 Jun 19, 2026
54ee4c1
uclibc: fix build, enable CI, add unstable support of 64-bit time_t
Apr 7, 2026
e4b77ed
semver: move POSIX_SPAWN_SETSID from linux -> linux-{gnu,musl} as it …
May 8, 2026
5290691
uclibc: fix type of PRIO_PROCESS and friends
May 8, 2026
077e706
chore: Use zizmor to harden GHA usage
JohnTitor Apr 28, 2026
77ebaed
freebsd: Add SOL_LOCAL
mansiverma897993 Jun 21, 2026
2136794
linux(uclibc): move definition of `time_t`
dybucc Jun 4, 2026
96c5884
test: Don't `deny(warnings)`
tgross35 Jun 22, 2026
67c87e3
build(deps): bump taiki-e/install-action from 2.81.10 to 2.82.2
dependabot[bot] Jun 22, 2026
66675de
build(deps): bump actions/checkout from 6.0.2 to 7.0.0
dependabot[bot] Jun 22, 2026
60e70ed
build(deps): bump zizmorcore/zizmor-action from 0.5.3 to 0.5.7
dependabot[bot] Jun 22, 2026
f538e73
build(deps): bump vmactions/freebsd-vm from 1.4.6 to 1.4.8
dependabot[bot] Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 72 additions & 37 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
permissions: {}

on:
merge_group:
Expand All @@ -23,10 +24,12 @@ defaults:
jobs:
style_check:
name: Style check
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Rust toolchain
run: ./ci/install-rust.sh && rustup component add rustfmt
- name: Check style
Expand All @@ -36,13 +39,15 @@ jobs:
name: Clippy on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-26, windows-2025]
os: [ubuntu-26.04, macos-26, windows-2025]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- run: rustup update stable --no-self-update
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
# Here we use the latest stable Rust toolchain already installed by GitHub
# Ideally we should run it for every target, but we cannot rely on unstable toolchains
# due to Clippy not being consistent between them.
Expand All @@ -64,18 +69,22 @@ jobs:
only: '(aarch64|x86_64)' # just a spot check for beta
- toolchain: stable
- toolchain: 1.65.0 # msrv
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
timeout-minutes: 25
env:
TOOLCHAIN: ${{ matrix.toolchain }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Rust toolchain
run: ./ci/install-rust.sh

- name: Install semver-checks
uses: taiki-e/install-action@cargo-semver-checks
uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2.82.2
if: matrix.toolchain == 'stable'
with:
tool: cargo-semver-checks

- name: Retrieve semver baseline
if: matrix.toolchain == 'stable'
Expand All @@ -84,7 +93,7 @@ jobs:
# FIXME(ci): These `du` statements are temporary for debugging cache
- name: Target size before restoring cache
run: du -sh target | sort -k 2 || true
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
key: ${{ matrix.os }}-${{ matrix.toolchain }}
- name: Target size after restoring cache
Expand All @@ -106,14 +115,15 @@ jobs:
test_tier1:
name: Test tier1
strategy:
fail-fast: false # Speed up 0.2 backport CI
matrix:
include:
- target: aarch64-apple-darwin
os: macos-26
- target: aarch64-pc-windows-msvc
os: windows-11-arm
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
os: ubuntu-26.04-arm
- target: i686-pc-windows-gnu
os: windows-2025
- target: i686-pc-windows-msvc
Expand All @@ -124,15 +134,17 @@ jobs:
- target: x86_64-pc-windows-msvc
os: windows-2025
- target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-24.04' }}
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-26.04' }}
timeout-minutes: 25
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Rust toolchain
run: ./ci/install-rust.sh
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
key: ${{ matrix.target }}

Expand All @@ -154,7 +166,7 @@ jobs:
id: create_artifacts
if: always()
run: python3 ci/create-artifacts.py
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always() && steps.create_artifacts.outcome == 'success'
with:
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
Expand All @@ -164,9 +176,8 @@ jobs:
# Unlike `main` this job doesn't have `needs`, in order to speed up backports a bit
test_tier2:
name: Test tier2
needs: [test_tier1, style_check]
strategy:
fail-fast: true
fail-fast: false # Speed up 0.2 backport CI
max-parallel: 16
matrix:
include:
Expand Down Expand Up @@ -221,15 +232,17 @@ jobs:
# FIXME(ppc): SIGILL running tests, see
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
# - target: powerpc-unknown-linux-gnu
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-24.04' }}
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-26.04' }}
timeout-minutes: 25
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Rust toolchain
run: ./ci/install-rust.sh
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
key: ${{ matrix.target }}

Expand All @@ -251,7 +264,7 @@ jobs:
id: create_artifacts
if: always()
run: ./ci/create-artifacts.py
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always() && steps.create_artifacts.outcome == 'success'
with:
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
Expand All @@ -262,12 +275,9 @@ jobs:
name: Test tier2 VM
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false # Speed up 0.2 backport CI
matrix:
include:
# FIXME(#4740): FreeBSD 13 tests are extremely flaky and fail most of the time
# - release: "13.4"
# target: x86_64-unknown-freebsd
- release: "15.0"
target: i686-unknown-freebsd
- release: "14.4"
Expand All @@ -278,9 +288,11 @@ jobs:
- target: x86_64-unknown-netbsd
timeout-minutes: 25
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Test on FreeBSD
uses: vmactions/freebsd-vm@v1.4.5
uses: vmactions/freebsd-vm@b84ab5559b5a1bb4b8ee2737d2506a16e1737636 # v1.4.8
if: contains(matrix.target, 'freebsd')
with:
release: ${{ matrix.release }}
Expand All @@ -300,7 +312,7 @@ jobs:
./ci/run.sh ${{ matrix.target }}

- name: test on Solaris
uses: vmactions/solaris-vm@v1.3.2
uses: vmactions/solaris-vm@d30dd6c228c8661ade859e36ead7660b9a62efcc # v1.3.7
if: contains(matrix.target, 'solaris')
with:
release: "11.4-gcc"
Expand All @@ -309,15 +321,18 @@ jobs:
copyback: false
prepare: |
set -ex
source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
rustc --version
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--profile minimal --default-toolchain nightly -y
uname -a
run: |
export PATH=$HOME/.rust_solaris/bin:$PATH
set -ex
. "$HOME/.cargo/env"
which rustc
rustc -Vv
./ci/run.sh ${{ matrix.target }}

- name: Test on NetBSD
uses: vmactions/netbsd-vm@v1
uses: vmactions/netbsd-vm@99816dccf75edf233ed6cd00a159e3a5b85ea373 # v1.4.0
if: contains(matrix.target, 'netbsd')
with:
release: "10.1"
Expand All @@ -338,20 +353,37 @@ jobs:

docs:
name: Ensure docs build
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
timeout-minutes: 10
steps:
- uses: actions/checkout@master
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install Rust
run: rustup update nightly --no-self-update && rustup default nightly
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- run: cargo doc --workspace --no-deps

zizmor:
name: Zizmor (Static analysis for GitHub Actions)
runs-on: ubuntu-24.04
permissions:
security-events: write
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Run zizmor
uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7

# One job that "summarizes" the success state of this pipeline. This can then be added to branch
# protection, rather than having to add each job separately.
success:
name: success
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
needs:
- style_check
- test_tier1
Expand All @@ -360,11 +392,14 @@ jobs:
- verify_build
- docs
- clippy
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
- zizmor
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
env:
NEEDS: ${{ toJson(needs) }}
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
run: jq --exit-status 'all(.result == "success")' <<< "$NEEDS"
5 changes: 3 additions & 2 deletions .github/workflows/publish_0.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Install Rust (rustup)
run: rustup update stable --no-self-update && rustup default stable
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
uses: release-plz/action@e8792575c7f2366cf6ff3ccc33ead9ace5b691c7 # v0.5.130
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down
11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ keywords = ["libc", "ffi", "bindings", "operating", "system"]
categories = ["external-ffi-bindings", "no-std", "os"]
exclude = ["/ci/*", "/.github/*", "/triagebot.toml", "cherry-pick-stable.sh"]
description = "Raw FFI bindings to platform libraries like libc."
authors = ["The Rust Project Developers"]
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/libc"
Expand Down Expand Up @@ -184,14 +183,11 @@ members = [
"libc-test",
]

# FIXME(msrv): These should be renamed as `[workspace.lints.*]` once MSRV is above 1.64
# This way all crates can use it with `[lints] workspace=true` section

[lints.rust]
[workspace.lints.rust]
# FIXME(cleanup): make ident usage consistent in each file
unused_qualifications = "allow"

[lints.clippy]
[workspace.lints.clippy]
# Enable pedantic lints - use this manually once in a while, but don't enable by default
# pedantic = { level = "warn", priority = -1 }

Expand All @@ -211,6 +207,9 @@ uninlined_format_args = "allow"
unnecessary_cast = "allow" # some casts like `as usize` are only needed for some targets
used_underscore_binding = "allow"

[lints]
workspace = true

[package.metadata.cargo-semver-checks.lints]
# Alignment is an internal detail that users must not rely upon
repr_align_removed = "warn"
Expand Down
9 changes: 7 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ fn main() {
}
}

let uclibc_use_time64 = env_flag("CARGO_CFG_LIBC_UNSTABLE_UCLIBC_TIME64");
if target_env == "uclibc" && uclibc_use_time64 {
set_cfg("linux_time_bits64");
}

let linux_time_bits64 = env::var("RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64").is_ok();
println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64");
if linux_time_bits64 {
Expand All @@ -151,10 +156,10 @@ fn main() {
) {
(Ok(_), Ok(_)) => panic!("Do not set both RUST_LIBC_UNSTABLE_GNU_TIME_BITS and RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS"),
(Err(_), Err(_)) => (defaultbits.clone(), defaultbits.clone()),
(Ok(tb), Err(_)) if tb == "64" => (tb.clone(), tb.clone()),
(Ok(tb), Err(_)) if tb == "64" => (tb.clone(), tb),
(Ok(tb), Err(_)) if tb == "32" => (tb, defaultbits.clone()),
(Ok(_), Err(_)) => panic!("Invalid value for RUST_LIBC_UNSTABLE_GNU_TIME_BITS, must be 32 or 64"),
(Err(_), Ok(fb)) if fb == "32" || fb == "64" => (defaultbits.clone(), fb),
(Err(_), Ok(fb)) if fb == "32" || fb == "64" => (defaultbits, fb),
(Err(_), Ok(_)) => panic!("Invalid value for RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS, must be 32 or 64"),
};
let valid_bits = ["32", "64"];
Expand Down
8 changes: 3 additions & 5 deletions ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \
qemu-user \
xz-utils

RUN mkdir /toolchain

RUN curl --retry 5 -L https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2021.11-1.tar.bz2 | \
tar xjf - -C /toolchain --strip-components=1
RUN /toolchain/relocate-sdk.sh
ARG TEST_UCLIBC_TIME64
COPY install-uclibc.sh /
RUN /install-uclibc.sh "$TEST_UCLIBC_TIME64"

ENV PATH=$PATH:/rust/bin:/toolchain/bin \
STAGING_DIR=/toolchain/armv7-buildroot-linux-uclibceabihf/sysroot \
Expand Down
20 changes: 20 additions & 0 deletions ci/install-uclibc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
#
# Installs the appropriate uclibc toolchain into /toolchain

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

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

/toolchain/relocate-sdk.sh
Loading