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 HelenOS support #4355

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add HelenOS support #4355

wants to merge 3 commits into from

Conversation

mvolfik
Copy link

@mvolfik mvolfik commented Mar 27, 2025

Description

Add support for HelenOS. I would like to get this backported to 0.2, because I also have a stdlib support ready, which depends on libc 0.2. I'll be sending that patch to rust-lang/rust rather soon (this or next week), I hope.

@rustbot label stable-nominated

Sources

All HelenOS source code is at https://github.com/HelenOS/helenos/. There are comments in this patch attributing each section to a specific header file. Files from common/ and abi/ get included in HelenOS libc by the build system there, from uspace/lib we use c, inet and posix, so that's what we link. libstartfiles is HelenOS' version of crt* files, because they don't distribute them along with the compiler toolchain, but instead as a library.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

Tested locally as cargo test (without the --target flag), testing for HelenOS targets will require support here in ctest2, I hope for a tier3 target, it is ok to go without these tests for now?

@rustbot
Copy link
Collaborator

rustbot commented Mar 27, 2025

r? @tgross35

rustbot has assigned @tgross35.
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

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Mar 27, 2025
@mvolfik
Copy link
Author

mvolfik commented Mar 27, 2025

Ugh, the only error is missing HelenOS target... I planned to merge the compiler and stdlib support at once. But this makes it seem like I will need to first merge no-std support for HelenOS in compiler, then this libc patch can go through, and only then the stdlib PR makes sense?

@tgross35
Copy link
Contributor

tgross35 commented Apr 1, 2025

Is there a proposal for adding the target to Rust? The changes look pretty reasonable to me, but getting it at least okayed for rustc is a prerequisite for libc changes.

Ugh, the only error is missing HelenOS target... I planned to merge the compiler and stdlib support at once. But this makes it seem like I will need to first merge no-std support for HelenOS in compiler, then this libc patch can go through, and only then the stdlib PR makes sense?

It is usually preferable to do this anyway; the compiler changes are usually pretty easy and can get merged as soon as the proposal is accepted. Then library changes can build up from there and things don't get slowed down by having a large diff to review at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants