fuchsia: clean up module#5127
Conversation
399a0a5 to
cc9e351
Compare
cc9e351 to
ddbf270
Compare
This comment has been minimized.
This comment has been minimized.
ddbf270 to
3783462
Compare
This comment has been minimized.
This comment has been minimized.
|
CI actually passes. There seems to be an issue with a glob import that is not used, but this has not |
3783462 to
53b65df
Compare
This comment has been minimized.
This comment has been minimized.
|
@rustbot blocked Like other deprecations, holding off until we can actually give the users an alternative. |
|
(https://snoozeth.is/db3wDy9dFKA) I will wait until Wed, 19 Aug 2026 08:31:22 UTC and then add label S-waiting-on-review and remove label S-blocked. @rustbot claim. |
53b65df to
b8d548c
Compare
This comment has been minimized.
This comment has been minimized.
|
There's some problems in Fuchsia. Each vendored libc implementation has a different implementation. Sometimes they can be unified. Other times it's not possible. An example of the latter is Should I also expose |
5d7d0ae to
48d5e6a
Compare
This comment has been minimized.
This comment has been minimized.
66e4bed to
dd07b99
Compare
off64_t type in Fuchsia70bef1c to
48d1e3d
Compare
|
@tgross35 The PR has been remade. It now cleans up the The description is hopefully clearer. The details of the changes are included there. There should be no need for additional One deprecation causes CI to fail. Its uses are Style checks for reasons unknown. The indentation is right. The diagnosed code does not fit the code in my branch. That's likely related to macro expansion issues. @rustbot ready review |
There was a problem hiding this comment.
There is a lot of orthogonal changes going on here. Could you split it into separate commits to make this more clear? Each section of the PR description could be its own commit, but at a minimum please be sure to separate things like non-functional cleanup and deprecations from anything that's a behavior change. All of this in the same PR is completely fine of course.
(Splitting changes that can stand on their own is good practice in general, see https://www.kernel.org/doc/html/v7.0/process/submitting-patches.html#separate-your-changes for some of the canonical guidelines. Any descriptions/links can also live in the commit messages, it's fine to say "see commit messages for details" in the top post.)
Paths are relative to the downloadable SDK. Look under the
objdirectory. Changes have been made relative to allNEXTrelease
In case you haven't come across it, web sources are at https://cs.opensource.google/fuchsia/fuchsia.
Testing is pending. This time testing is required. Two supported Fuchsia targets are tier 2. There's no CI job for them.
It's not required - T2 targets are only "guaranteed to build", which the "verify build" jobs do. We do test a handful of T2 targets, but that's out of convenience rather than requirement.
That said, of course testing everything is ideal. I'll ping the Fuschia maintainers after history gets split.
| // FIXME(i128): __reserved is meant to be an array of `long double`s. That | ||
| // requires native support for `i128`. This is currently missing. |
There was a problem hiding this comment.
If you have a source for long double being f128, mind posting it at rust-lang/rust#140417? I would have assumed f64.
Also this comment says i128 but should be f128.
|
Reminder, once the PR becomes ready for a review, use |
Each fuchsia target should only support a single libc. I don't see that listed in https://doc.rust-lang.org/rustc/platform-support/fuchsia.html but perhaps it should be? You could probably open a r-l/r PR updating that if there is a straightforward answer, or an issue if there isn't. |
48d1e3d to
3bd66a6
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. |
I did come across the source browser. That's were I got confused by the vendored libc implementations. The SDK provides a single set of headers. This makes searches more "coherent." The testing part was not meant for others. It was a personal reminder. But I understood the testing policy wrong. Just reread "Platform Support" in the rustc book. Thanks. |
There are type definitions that do not exist upstream. There are records with wrong fields. There are records with wrong alignment. There are incorrect pollyfils for macros. This patch fixes most of it. But there's stuff I've missed.
3bd66a6 to
b1c93ad
Compare
Description
This is a clean-up patch. Changes are concerned with the
fuchsiamodule.There were lacking definitions. There were records with the wrong alignment. There were types that don't exist upstream. This has been fixed. But there's more stuff to fix.
Testing is pending. This time testing is required. Two supported Fuchsia targets are tier 2. There's no CI job for them.
Sources
Paths are relative to the downloadable SDK. Look under the
objdirectory. Changes have been made relative to allNEXTreleases.wchar_tis not different across architectures. No specific definition was found. Verifying the current definition was not possible.nlink_tis not different across architectures.blksize_tis not different across architectures.ssizet_thad a wrong definition. Other_t-terminated types had similar issues. Those will not be further repeated in this list.cs.opensource.google. This includes suffixed offset types. These are omitted from further mention.stathad a mismatched definition.glob_thad a mismatched definition.signal.htypes often had a mismatched definition. This header file appears later on in this source list. They refer to different paths. They contain different definitions.siginfo_t.sigevent.sigaction.SIG_DFLand others are function pointers. They are cast to function pointers from integers. They are sometimesNULL. This is not allowed in Rust. I have wrapped them inOption. They are allNonenow. They should not all beNone. Transmutation from a pointer without provenance to a function pointer is required. This causes compile-time errors.stat64doesn't exist.ipc_permdoesn't exist.epoll_datadoesn't exist. Deprecation lints here keep popping up. I've attempted to silence them. My attempts have been futile.epoll_eventdoesn't exist.ff_effectdoesn't exist.termios2doesn't exist.sysinfodoesn't exist.mq_attrdoesn't exist.sockaddr_nldoesn't exist.RLIM_SAVED_MAXdoesn't exist.RLIM_SAVED_CURdoesn't exist.RLIM_INFINITYdoesn't exist.RLIMIT_RTTIMEdoesn't exist.RLIMIT_NLIMITSdoesn't exist.There were conditional checks against 32-bit targets. Rust does not support 32-bit Fuchsia targets. The Fuchsia project does not support 32-bit machine word targets.
There was an oddity with
pthread.htypes. They were defined with a single field. This field sometimes had size equivalent to the sum of upstream fields. This has been replaced with the real fields. This has also fixed some size and alignment mismatches.This has required changes in macros. An attempt has been made to fit the POSIX definitions. This means expanding
staticinitializers to{ 0 }. The new type definitions get all their fields zeroed. Some are made into null pointers. Should they be made intoOption::Nones? They are not function pointer fields.Macros needed fixing. Their definition did not return a value. But a value was returned upstream. Some types needed small fixes.
m_contexthad a mismatched definition. Some modules didn't have a definition.u_contexthad a mismatched definition. Some modules didn't have a definition.Checklist
libc-test/semverhave been updated*LASTor*MAXare included (see #3131)cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI@rustbot label +stable-nominated