Skip to content

Separate L4Re code, add aarch64 and enable tests #4383

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

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

Conversation

farao
Copy link

@farao farao commented Apr 7, 2025

Description

The L4Re code was previously attached to the Linux code which was not correct in many ways. This commit separates the L4Re code and enables the libc-tests and includes the fixes for the failing tests. Aarch64 is added as a second supported architecture (more to come).

Sources

L4Re-adapted version of uclibc: https://github.com/kernkonzept/l4re-core/tree/master/uclibc/lib.

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

@rustbot
Copy link
Collaborator

rustbot commented Apr 7, 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
Copy link
Collaborator

rustbot commented Apr 7, 2025

Some changes occurred in solarish module

cc @jclulow, @pfmooney

@farao farao force-pushed the main branch 3 times, most recently from 7de90e1 to f452341 Compare April 7, 2025 12:20
@farao
Copy link
Author

farao commented Apr 7, 2025

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Sorry, I accidentally submitted a format change. I fixed it, there's no change to the solarish module anymore now.

@farao
Copy link
Author

farao commented Apr 7, 2025

edit: resolved (see below)

@tgross35 The nightly freebsd fails are not due to this change. But I don't understand why the style check of src/l4re/mod.rs fails. I executed cargo fmt before submitting and

rustfmt --config-path rustfmt.toml src/l4re/mod.rs --check

is locally successful for me (with rustfmt 1.8.0-nightly (2fa8b11f09 2025-04-06) from current rust nightly in rustup).

Any idea why?

@farao farao force-pushed the main branch 2 times, most recently from ddd5281 to e83d80f Compare April 7, 2025 13:53
@farao
Copy link
Author

farao commented Apr 7, 2025

@tgross35 The nightly freebsd fails are not due to this change. But I don't understand why the style check of src/l4re/mod.rs fails. I executed cargo fmt before submitting and

rustfmt --config-path rustfmt.toml src/l4re/mod.rs --check

is locally successful for me (with rustfmt 1.8.0-nightly (2fa8b11f09 2025-04-06) from current rust nightly in rustup).

Any idea why?

This was because I did not run the style check with the extra_traits feature. I fixed that.

However it now shows that

sort -C libc-test/semver/l4re.txt

fails but also that succeeds for me locally and I sorted the file via sort before checking it in.

Update: sort apparently sorts differently depending on LC_ALL, I sorted again with LC_ALL=C

@farao farao force-pushed the main branch 3 times, most recently from 592e367 to d54c3e6 Compare April 11, 2025 11:06
The L4Re code was previously attached to the Linux code which was not
correct in many ways. This commit separates the L4Re code and enables
the libc-tests and includes the fixes for the failing tests. Aarch64 is
added as a second supported architecture (more to come).
@tgross35
Copy link
Contributor

Thanks for this PR, I'll try to take a look soon. We recently decided to do some reorganization that would flip the module order around, so e.g. uclibc is a top-level module and its code can be reused across both Linux and L4re. Are you okay holding off for a couple of weeks on this? If we can get that in progress first, it should eliminate a lot of the duplicated definitions here.

@farao
Copy link
Author

farao commented Apr 16, 2025

Good idea to turn the order around! The thing is that much of the L4Re support was incorrect while still attached to the linux code path and the change also removes unnecessary l4re exceptions from the unix, linux_like and linux mods. So I think, the refactoring (turning the order around) would be easier if we applied this change first. I also can help with the refactoring once you want to start with it.

Additionally, since we would like to bring aarch64 support for L4Re into the main rust repo (to be able to build for this arch) and the support in this crate is a precondition, my preference would be to have it merged before the refactoring.

Would that be ok for you?

@farao
Copy link
Author

farao commented Apr 26, 2025

@tgross35 any thoughts about this? do you think we can get the aarch64 support into the next libc release?

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.

3 participants