Skip to content
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

Add new cfg gnu_file_offset_bits64 corresponding to _FILE_OFFSET_BITS=64 #4345

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6fbaf53
ci: Use $PWD instead of $(pwd) in run-docker
snogge Dec 11, 2024
a2b2bb0
ci: Add matrix env variables to the environment
snogge Mar 14, 2025
899fb69
ci: Always upload successfully created artifacts
snogge Mar 14, 2025
7e684c4
gnu: build settings for _FILE_OFFSET_BITS=64
snogge Mar 14, 2025
c85a253
gnu: Set up the CI for _FILE_OFFSET_BITS=64
snogge Mar 14, 2025
5234c5d
gnu: Handle basic file types for 32bit with _FILE_OFFSET_BITS=64
snogge Dec 16, 2024
19ac1c2
gnu: Update F_GETLK for gnu_file_offset_bits64
snogge Mar 20, 2023
3ab45a3
gnu: Update F_SETLK and F_SETLKW for gnu_file_offset_bits64
snogge Mar 20, 2023
a7272c8
gnu: Set RLIM_INFINITY for mips with gnu_file_offset_bits64
snogge Mar 11, 2025
304076e
gnu: Use _FILE_OFFSET_BITS=64 versions of glibc symbols
snogge Nov 21, 2024
bce5501
gnu powerpc: Use a separate stat struct for powerpc
snogge Mar 18, 2025
f4ccd52
gnu sparc: Use a separate stat struct for 32bit powerpc
snogge Mar 20, 2025
8d49d3a
gnu: Adapt struct stat for gnu_file_offset_bits64
snogge Dec 19, 2024
374cd9d
gnu: Adapt stat64 for gnu_file_offset_bits64
snogge Mar 18, 2025
40e9b2b
gnu: Correct the struct stat64 padding for 32bit mips
snogge Mar 20, 2025
fed7cba
gnu: Correct struct stat64 for sparc
snogge Mar 20, 2025
415f87f
gnu: Add the __f_unused field to struct statvfs for sparc
snogge Mar 17, 2025
6885c2a
gnu: Add missing f_flags field to struct statfs for sparc
snogge Mar 18, 2025
a8e6918
gnu: Add proper structs for fpos_t and fpos64_t
snogge Nov 21, 2024
0533a56
gnu: Update struct aiocb for gnu_file_offset_bits64
snogge Mar 20, 2023
cf9c316
gnu: Adapt struct flock on mips for gnu_file_offset_bits64
snogge Mar 11, 2025
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
Prev Previous commit
Next Next commit
gnu: Set up the CI for _FILE_OFFSET_BITS=64
Add new jobs for i686 in test_tier1 and arm and powerpc in test_tier2
where RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS=64.

Use artifact-tag to avoid artifact name collisions.
snogge committed Mar 24, 2025
commit c85a253db4a4d3ce02ca168e3c3fba53c240c08d
27 changes: 21 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -66,6 +66,12 @@ jobs:
- target: i686-unknown-linux-gnu
docker: true
os: ubuntu-24.04
- target: i686-unknown-linux-gnu
docker: true
os: ubuntu-24.04
artifact-tag: offset-bits64
env:
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
- target: x86_64-unknown-linux-gnu
docker: true
os: ubuntu-24.04
@@ -118,7 +124,7 @@ jobs:
- uses: actions/upload-artifact@v4
if: always() && steps.create_artifacts.outcome == 'success'
with:
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
path: ${{ env.ARCHIVE_PATH }}
retention-days: 5

@@ -138,15 +144,11 @@ jobs:
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- arm-linux-androideabi
- arm-unknown-linux-gnueabihf
- arm-unknown-linux-musleabihf
- i686-linux-android
- i686-unknown-linux-musl
- loongarch64-unknown-linux-gnu
- loongarch64-unknown-linux-musl
# FIXME(ppc): SIGILL running tests, see
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
# - powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
@@ -161,6 +163,19 @@ jobs:
# FIXME: It seems some items in `src/unix/mod.rs`
# aren't defined on redox actually.
# - x86_64-unknown-redox
include:
- target: arm-unknown-linux-gnueabihf
- target: arm-unknown-linux-gnueabihf
env:
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
artifact-tag: offset-bits64
# FIXME(ppc): SIGILL running tests, see
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
# - target: powerpc-unknown-linux-gnu
# - target: powerpc-unknown-linux-gnu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you keep the FIXME(ppc): SIGILL running tests ... note?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I meant to include that.

# env:
# RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
# artifact-tag: offset-bits64
timeout-minutes: 25
env:
TARGET: ${{ matrix.target }}
@@ -189,7 +204,7 @@ jobs:
- uses: actions/upload-artifact@v4
if: always() && steps.create_artifacts.outcome == 'success'
with:
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
path: ${{ env.ARCHIVE_PATH }}
retention-days: 5

1 change: 1 addition & 0 deletions ci/run-docker.sh
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ run() {
--user "$(id -u)":"$(id -g)" \
--env LIBC_CI \
--env LIBC_CI_ZBUILD_STD \
--env RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS \
--env CARGO_HOME=/cargo \
--env CARGO_TARGET_DIR=/checkout/target \
--volume "$CARGO_HOME":/cargo \
9 changes: 7 additions & 2 deletions ci/verify-build.sh
Original file line number Diff line number Diff line change
@@ -74,6 +74,11 @@ test_target() {
if [ "$os" = "linux" ]; then
# Test with the equivalent of __USE_TIME_BITS64
RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64=1 $cmd
case "$target" in
# Test with the equivalent of __FILE_OFFSET_BITS=64
arm*-gnu*|i*86*-gnu|powerpc-*-gnu*|mips*-gnu|sparc-*-gnu|thumb-*gnu*)
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS=64 $cmd;;
esac
fi

# Test again without default features, i.e. without "std"
@@ -91,7 +96,7 @@ test_target() {
stable-x86_64-*freebsd*) do_freebsd_checks=1 ;;
nightly-i686*freebsd*) do_freebsd_checks=1 ;;
esac

if [ -n "${do_freebsd_checks:-}" ]; then
for version in $freebsd_versions; do
export RUST_LIBC_UNSTABLE_FREEBSD_VERSION="$version"
@@ -296,7 +301,7 @@ filter_and_run() {
if [ "$target" = "wasm32-wasip2" ] && [ "$supports_wasi_pn" = "0" ]; then
return
fi

test_target "$target" "$no_dist"
some_tests_run=1
fi