Skip to content

Conversation

Gelbpunkt
Copy link
Contributor

Description

The Linux kernel only defines MAP_32BIT in the asm/mman.h header on x86. Remove the erraneous definitions for any other architectures on Linux targets.

This makes libc-test somewhat compile on powerpc64le musl (except semver, I'll follow up on that as well).

Sources

See https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/mman.h#L5

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

^ didn't test the other two targets, but this is definitely correct. semver tests only tested for this on x86 already

@tgross35
Copy link
Contributor

tgross35 commented Jul 2, 2025

For mk68 and wasm-wali I'm okay to drop this immediately. I think we should give a warning to powerpc users though, could you mark this deprecated instead on that platform?

If it's causing test failures, just add it as a skip in libc-test/build.rs

@Gelbpunkt
Copy link
Contributor Author

I think we should give a warning to powerpc users though, could you mark this deprecated instead on that platform?

Even for the main branch? I get that'd be good for 0.2, just wondering why that'd be the case for the development branch

@tgross35
Copy link
Contributor

tgross35 commented Jul 2, 2025

Yes please; that just makes things easier for the time being since the branches remain more in sync (read: fewer conflicts for me to resolve doing cherry picks), it will be easy to delete all deprecated items once we get closer to 1.0.

@Gelbpunkt Gelbpunkt force-pushed the map-32bit-arches branch 2 times, most recently from 077e84e to 6166e51 Compare July 2, 2025 08:26
@Gelbpunkt
Copy link
Contributor Author

Should be done now, please double-check the deprecation message

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Thanks!

@tgross35 tgross35 enabled auto-merge July 2, 2025 08:52
The Linux kernel only defines MAP_32BIT in the asm/mman.h header
on x86. Remove the erraneous definitions for any other architectures
on Linux targets.

See https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/mman.h#L5

This makes libc-test somewhat compile on powerpc64le musl.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
@tgross35 tgross35 force-pushed the map-32bit-arches branch from 00ef346 to 9332d56 Compare July 2, 2025 08:52
@tgross35 tgross35 added this pull request to the merge queue Jul 2, 2025
Merged via the queue into rust-lang:main with commit 3c43114 Jul 2, 2025
50 of 51 checks passed
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jul 8, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jul 29, 2025
The Linux kernel only defines MAP_32BIT in the asm/mman.h header
on x86. Remove the erraneous definitions for any other architectures
on Linux targets.

See https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/mman.h#L5

This makes libc-test somewhat compile on powerpc64le musl.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>

(backport <rust-lang#4511>)
(cherry picked from commit 9332d56)
@tgross35 tgross35 mentioned this pull request Jul 29, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 29, 2025
The Linux kernel only defines MAP_32BIT in the asm/mman.h header
on x86. Remove the erraneous definitions for any other architectures
on Linux targets.

See https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/mman.h#L5

This makes libc-test somewhat compile on powerpc64le musl.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>

(backport <#4511>)
(cherry picked from commit 9332d56)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-gnu O-linux O-musl O-unix stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants