Skip to content

[0.2] Backports #4476

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

Merged
merged 23 commits into from
Jun 3, 2025
Merged

Conversation

snogge and others added 14 commits June 3, 2025 20:21
(backport <rust-lang#4433>)
(cherry picked from commit 5f1eb6c)
Add new jobs for i686 in test_tier1 and arm and powerpc in test_tier2
where RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64.

Use artifact-tag to avoid artifact name collisions.

(backport <rust-lang#4433>)
(cherry picked from commit 352274a)
Set the basic types correctly for
gnu_time_bits64 (_TIME_BITS=64 and _FILE_OFFSET_BITS=64).

(backport <rust-lang#4433>)
(cherry picked from commit 739873b)
Set the link names of relevant symbols to use be the same as when a C
program is built against GNU libc with -D_TIME_BITS=64 -- which also
requires -D_FILE_OFFSET_BITS=64.

References:

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/fcntl.h
 fcntl on line 190

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/sys/poll.h
 ppoll on line 71

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/sys/stat.h
 difftime on line 86
 fstat on line 218
 fstat64 on line 249
 fstatat on line 270
 fstatat64 on line 296
 futimens on line 456
 gmtime on line 140
 gmtime_r on line 163
 localtime on line 141
 localtime_r on line 167
 lstat on line 318
 lstat64 on line 318
 mktime on line 88
 stat on line 214
 stat64 on line 214
 time on line 85
 timegm on line 249
 utimensat on line 439

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/utime.h
 utime on line 56

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/misc/sys/ioctl.h
 ioctl on line 45

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/misc/sys/select.h
 pselect on line 134
 select on line 108

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/posix/glob.h
 glob on line 154
 glob64 on line 174
 globfree on line 160
 globfree64 on line 180

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/posix/sched.h
 sched_rr_get_interval on line 81

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/posix/sys/wait.h
 wait4 on line 163

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/resource/sys/resource.h
 getrusage on line 93

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/rt/aio.h
 aio_suspend on line 197

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/rt/mqueue.h
 mq_timedreceive on line 91
 mq_timedsend on line 99

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/signal/signal.h
 sigtimedwait on line 279

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/socket/sys/socket.h
 getsockopt on line 260
 recvmmsg on line 219
 recvmsg on line 219
 sendmmsg on line 199
 sendmsg on line 178
 setsockopt on line 281

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/nptl/pthread.h
 pthread_cond_timedwait on line 1151
 pthread_mutex_timedlock on line 805

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/pthread/semaphore.h
 sem_timedwait on line 68

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/bits/time.h
 clock_adjtime on line 82

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/epoll.h
 epoll_pwait2 on line 146

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/prctl.h
 prctl on line 45

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/timerfd.h
 timerfd_gettime on line 67
 timerfd_settime on line 52

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/timex.h
 adjtimex on line 70
 ntp_adjtime on line 76
 ntp_gettime on line 72

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysvipc/sys/msg.h
 msgctl on line 65

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysvipc/sys/sem.h
 semctl on line 55

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysvipc/sys/shm.h
 shmctl on line 53

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/time/sys/time.h
 adjtime on line 102
 futimes on line 200
 gettimeofday on line 71
 lutimes on line 196
 settimeofday on line 98
 utimes on line 176

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/time/time.h
 clock_getres on line 299
 clock_gettime on line 302
 clock_nanosleep on line 328
 clock_settime on line 305
 ctime_r on line 206
 nanosleep on line 328
 timer_gettime on line 366
 timer_settime on line 361

(backport <rust-lang#4433>)
(cherry picked from commit 4c58e4b)
Use a GNU libc specific version of struct timespec in
unix/linux_like/linux/gnu and keep the version in unix for all other
unix libc's.

Big-endian platforms wants 32 bits of padding before tv_nsec,
little-endian after.

GNU libc always uses long for tv_nsec.

References:

https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/time/bits/types/struct_timespec.h

(backport <rust-lang#4433>)
(cherry picked from commit bbaa017)
Will make it easier to adapt for _TIME_BITS=64

(backport <rust-lang#4433>)
(cherry picked from commit 87d9e20)
For 64 bit time on 32 bit linux glibc timeval.tv_usec is actually
__suseconds64_t (64 bits) while suseconds_t is still 32 bits.

References:
https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/time/bits/types/struct_timeval.h

(backport <rust-lang#4433>)
(cherry picked from commit b63a652)
@rustbot
Copy link
Collaborator

rustbot commented Jun 3, 2025

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in the Android module

cc @maurer

Some changes occurred in OpenBSD module

cc @semarie

tgross35 and others added 9 commits June 3, 2025 21:05
`s_no_extra_traits!` doesn't derive `Debug` so there are a lot of
handwritten implementations. However, since we have a derive-like
solution for unions now (printing them like an opaque struct), there
really isn't any reason these can't all be derived.

Add `derive(Debug)` to `s_no_extra_traits`, still gated behind `feature
= "extra_traits"`, which allows getting rid of manual implementations.

(backport <rust-lang#4471>)
(cherry picked from commit 65c39bf)
In 872642a ("gnu: Add proper structs for fpos_t and fpos64_t"),
`fpos_t` was changed from an opaque struct to one with a definition on
Linux GNU, with the Unix fallback configured as for targets without a
GNU `target_env`. However, GNU hurd matches `target_env = "gnu"`, but
doesn't have a `fpos` implementation.

Fix the build by adjusting the fallback `cfg` to be more specific.
Eventually we probably want the same definition on Hurd as on Linux.

(backport <rust-lang#4472>)
(cherry picked from commit 72f49c9)
This job has been failing a lot due to failures installing packages:

     > [ 5/13] RUN apt-get install -y --no-install-recommends   file   wget   ca-certificates   python3   unzip   expect   openjdk-8-jre   libstdc++6:i386   libpulse0:
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb-randr0_1.17.0-2_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb-shm0_1.17.0-2_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb-sync1_1.17.0-2_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb-xfixes0_1.17.0-2_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxfixes/libxfixes3_6.0.0-2build1_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxshmfence/libxshmfence1_1.3-1build5_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxxf86vm/libxxf86vm1_1.1.4-1build4_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm-amdgpu1_2.4.122-1_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpciaccess/libpciaccess0_0.17-3build1_amd64.deb  403  Forbidden [IP: 185.125.190.82 80]
    8.400 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Assume that this is a temporary problem on the repository side and
disable the job for now.

Issue regarding Android CI: rust-lang#4297

(backport <rust-lang#4470>)
(cherry picked from commit eba1e9d)
Bumps [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/vmactions/solaris-vm/releases)
- [Commits](vmactions/solaris-vm@v1.1.3...v1.1.4)

---
updated-dependencies:
- dependency-name: vmactions/solaris-vm
  dependency-version: 1.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

(backport <rust-lang#4474>)
(cherry picked from commit c3cf1de)
(backport <rust-lang#4467>)
[ remove dependencies so this can remain a stub - Trevor ]
(cherry picked from commit 0763c65)
(backport <rust-lang#4475>)
(cherry picked from commit 187707b)
We check with `-Dwarnings` in CI, so these still get checked. This
change serves to prevent failures to compile downstream if the lint
expectations are not met on untested targets.

(backport <rust-lang#4473>)
(cherry picked from commit 260e357)
(backport <rust-lang#4473>)
(cherry picked from commit 0b6aa1b)
As discussed in [1], some changes to dead code warnings caused a lot of
code to be inaccurately reported as dead in `libc`. The change was
reverted and improved since then, so we no longer need to skip this
check.

Includes some changes to make things pass with the lint.

[1]: rust-lang#3740

(backport <rust-lang#4473>)
(cherry picked from commit 77a21a8)
@tgross35 tgross35 force-pushed the backport-scotch-bonnet branch from 09cef32 to 1a418ed Compare June 3, 2025 21:06
@rustbot
Copy link
Collaborator

rustbot commented Jun 3, 2025

⚠️ Warning ⚠️

  • Pull requests are usually filed against the main branch for this repo, but this one is against libc-0.2. Please double check that you specified the right target!

@tgross35 tgross35 enabled auto-merge June 3, 2025 21:20
@tgross35 tgross35 added this pull request to the merge queue Jun 3, 2025
Merged via the queue into rust-lang:libc-0.2 with commit 92347ec Jun 3, 2025
48 of 49 checks passed
@tgross35 tgross35 deleted the backport-scotch-bonnet branch June 3, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants