Skip to content

Revive L4Re target - #150885

Open
farao wants to merge 3 commits into
rust-lang:mainfrom
farao:main
Open

Revive L4Re target#150885
farao wants to merge 3 commits into
rust-lang:mainfrom
farao:main

Conversation

@farao

@farao farao commented Jan 9, 2026

Copy link
Copy Markdown

View all comments

This revives the target for the L4Re OS. It changes the way, linking is done and adds aarch64 support and documentation including a maintainer for the target.

The update of the libc crate is necessary since only in 0.2.179 and higher is the fixed support for L4Re on uclibc.

@rustbot

rustbot commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 9, 2026
@rustbot

rustbot commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator

r? @joboet

rustbot has assigned @joboet.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Jan 10, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in GUI tests.

cc @GuillaumeGomez

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @lolbinarycat

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-tidy Area: The tidy tool T-clippy Relevant to the Clippy team. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jan 10, 2026
@rustbot

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
Member

Wrong rebase.

@rustbot

This comment has been minimized.

@farao

farao commented Jan 10, 2026

Copy link
Copy Markdown
Author

Sorry for rebasing on an old commit by mistake

@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #151107) made this pull request unmergeable. Please resolve the merge conflicts.

@joboet joboet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can only comment on the library changes, those seem mostly fine to me.

View changes since this review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does L4Re truly not support networking? All the necessary functions seem to be available in libc. What happens if you remove the L4Re special case from sys/net/connection/mod.rs?

@farao farao Jan 29, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Regarding the libc functions: L4Re's uclibc adaptation has a variety of these function which will when called just return an error or a disabled status code. I decided to put these in the libc crate because that should imo just bluntly mirror the functions when they exist, no matter if they are somehow disabled.

Comment thread library/std/src/os/l4re/fs.rs Outdated
#[allow(deprecated)]
fn as_raw_stat(&self) -> &raw::stat {
unsafe { &*(self.as_inner().as_inner() as *const libc::stat64 as *const raw::stat) }
panic!("as_raw_stat not supported for L4Re");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How that? stat does appear in libc.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You're right, I'll change it back.

@farao

farao commented Jan 29, 2026

Copy link
Copy Markdown
Author

Thanks for having a look! I realised that I need to disable some std tests for the std test suite to run through, I will make a small update to this PR this or next week.

Regarding networking (and to a somewhat lesser extent for fs): We do have initial support but that's opt-in and likely about to change, therefore we decided that this should be/stay disabled for now.

@joboet

joboet commented Feb 7, 2026

Copy link
Copy Markdown
Member

I'm just a bit worried about this removing the stable AsFd/... implementations for the sockets...

@joboet

joboet commented Feb 7, 2026

Copy link
Copy Markdown
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 7, 2026
@rustbot

rustbot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Any special-casing of Miri in the standard library requires review.

cc @rust-lang/miri

@rustbot

rustbot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

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.

@farao

farao commented Jul 25, 2026

Copy link
Copy Markdown
Author

Rebased and moved to libc v. 0.2.189 for std because it includes important updates for L4Re.

Comment thread library/std/tests/pipe_subprocess.rs Outdated
@@ -1,6 +1,10 @@
fn main() {
// No `Command` on Miri and emscripten

@RalfJung RalfJung Jul 25, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment needs updating.

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oh yes, thanks. Fixed.

@farao
farao force-pushed the main branch 2 times, most recently from 3126dcf to af5aece Compare July 25, 2026 19:27
@farao

farao commented Jul 28, 2026

Copy link
Copy Markdown
Author

@joboet if you don't have the time to do the review, would you mind recommending or directly assigning a new reviewer for it?

@joboet joboet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry for the delay, I've had some very busy weeks... the library changes look good (modulo two nits). I'll reassign for the compiler changes.

View changes since this review

Comment thread library/std/src/sys/random/mod.rs
Comment thread library/std/src/sys/net/connection/mod.rs Outdated
@joboet

joboet commented Jul 29, 2026

Copy link
Copy Markdown
Member

r? compiler

@rustbot rustbot assigned adwinwhite and unassigned joboet Jul 29, 2026
@saethlin saethlin assigned saethlin and unassigned adwinwhite Jul 29, 2026
@saethlin

Copy link
Copy Markdown
Member

Compiler changes look contained to l4re, so I'm inclined to approve as soon as the library comments are addressed.

Fixes the builds of rustc and library/std for the L4Re target OS.
A major change was done in linking binaries: The need for the L4Bender
tool was removed and linking parameters are now fully configured in the
rustc target config.
@farao

farao commented Jul 30, 2026

Copy link
Copy Markdown
Author

Yeah, thanks for the review :) I fixed the two comments.

@joboet

joboet commented Jul 30, 2026

Copy link
Copy Markdown
Member

@bors r=@saethlin,joboet

@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1ba6fd2 has been approved by saethlin,joboet

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 30, 2026
Revive L4Re target

This revives the target for the L4Re OS. It changes the way, linking is done and adds aarch64 support and documentation including a maintainer for the target.

The update of the libc crate is necessary since only in 0.2.179 and higher is the fixed support for L4Re on uclibc.
rust-bors Bot pushed a commit that referenced this pull request Jul 30, 2026
Rollup of 14 pull requests

Successful merges:

 - #159817 (Rename splat to avoid stable name collisions)
 - #160204 (Sync from portable simd 2026 07 30)
 - #150885 (Revive L4Re target)
 - #158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - #160125 (Fix typing mode handling in transmute checks and rustc_dump_layout)
 - #160152 (Create on-demand CI job for testing EC2 instances)
 - #159214 (std: improve the documentation of the random feature)
 - #159818 (Resolve vars before calling `unnormalized_obligations`)
 - #160040 (Split function parsing out of `item.rs` to a new module.)
 - #160044 (Add regression tests for fixed dead-code issues)
 - #160144 (renovate: group lockfiles PRs)
 - #160149 (Fix Windows on Arm PAC default)
 - #160175 (Try to recover less from incorrectly parsed const arg)
 - #160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #160222 (comment)

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 30, 2026
@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#160222), which was unapproved.

View changes since this unapproval

@rust-bors

rust-bors Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #160238) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-tidy Area: The tidy tool O-unix Operating system: Unix-like S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants