linux: complete siginfo_t definition - #5345
Conversation
siginfo_t definitionsiginfo_t definition
This comment was marked as outdated.
This comment was marked as outdated.
|
Would you mind using this as an opportunity to move Also fyi, @xtqqczze found https://github.com/sailfishos-mirror/glibc as a mirror for glibc that's much easier to search and less flaky, that's fine to link (as is sourceware, of course). |
|
There will be quite a bit less to review after that, so will hold off taking a closer look. Let me know if you need help figuring out the module structure. @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
This comment has been minimized.
This comment has been minimized.
a6ba6f4 to
bd71182
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
b02986c to
08192fa
Compare
d0d15ea to
f8ca28d
Compare
Replace references to `siginfo_t` in the regular repository layout with a crate-relative path that uses the reexport from the `new` module. This allows the next few patches to all work as individual revisions.
Replace alignment/padding fields with a one-to-one definition as that used upstream. These have been incorporated as definitions in the `new` module to avoid huge repetition across target triples without overrides. The glibc definitions are mostly the same across target architectures except for MIPS, SPARC and x86. x86 is confusing because there's only an override when running under x86_64 and compiling for x32. I'm not sure how Rust handles this, so the `#[path]`-redirected files for that architecture are the same as the generic ones. See [^1] for the generic file and the following list for the architecture-specific overrides. - `mips`: <https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h> - `sparc`: <https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h> - `x86`: <https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h> [^1]: <https://github.com/sailfishos-mirror/glibc/blob/4a07bb292f921c10e71fbf48c4a7f44391feb06c/sysdeps/unix/sysv/linux/bits/types/siginfo_t.h>
f8ca28d to
64b8345
Compare
Remove older bindings to `siginfo_t` using dummy fields instead of the upstream `union`. This follows from the patch providing a full definition for glibc bindings. Add reexports for `siginfo_t` under the `new` module. This has required renaming the reexport for the `nptl` module as it also contains a `bits` module of the same name as the `bits::types::siginfo_t` module path under `sysdeps`.
Replace alignment/padding fields with a mirrored definition of the upstream `union`. See [^1] for details. [^1]: <https://github.com/kraj/musl/blob/a42e9dee266f398026a33d0793c66225c7997755/include/signal.h>
71bbc5f to
76b6884
Compare
Remove older bindings to `siginfo_t` using dummy fields instead of the upstream `union`. This follows from the patch providing a full definition for musl bindings. Add modified bindings under `new`.
76b6884 to
1e7631c
Compare
Replace alignment/padding dummy fields with a mirrored definition fitting that of upstream's `union`. uClibc supports targets for which we have no support in Rust. No architecture-specific definition has been provided for those. See [^1] for details on the generic definition and [^2] for details on the MIPS definition. [^1]: <https://github.com/wbx-github/uclibc-ng/blob/60d8e8c0cb9be8a241f6f2645daba260c8aec33c/libc/sysdeps/linux/common/bits/siginfo.h> [^2]: <https://github.com/wbx-github/uclibc-ng/blob/60d8e8c0cb9be8a241f6f2645daba260c8aec33c/libc/sysdeps/linux/mips/bits/siginfo.h>
Remove older bindings to `siginfo_t` using dummy fields instead of the upstream `union`. This follows from the patch providing a full definition for uClibc bindings. Add modified bindings to `new` module.
1e7631c to
72a1606
Compare
|
I'm not sure what, but I had something else to do in this patchset. Hopefully @rustbot ready |
Description
Completes the
siginfo_tdefinition under Linux targets to attempt closing#716.
See the patch messages for details on each of the GNU targets, uClibc targets
and musl targets.
Checklist
libc-test/semverhave been updated*LASTor*MAXhave the standarddoc comment
cargo test -p libc-test --target mytarget);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated