Skip to content

MSRV 1.59: Remove libc requirement for x86_64-*-linux-none - #461

Closed
briansmith wants to merge 3 commits into
rust-random:masterfrom
briansmith:b/syscall-x86_64
Closed

MSRV 1.59: Remove libc requirement for x86_64-*-linux-none#461
briansmith wants to merge 3 commits into
rust-random:masterfrom
briansmith:b/syscall-x86_64

Conversation

@briansmith

Copy link
Copy Markdown
Contributor

No description provided.

@briansmithbriansmith changed the title Remove libc requirement for x86_64-*-linux-* and support x86_64-*-linux-noneMSRV 1.59: Remove libc requirement for x86_64-*-linux-* and support x86_64-*-linux-noneJun 6, 2024
Comment threadsrc/linux_android.rs
@briansmith
briansmithforce-pushed the b/syscall-x86_64 branch 5 times, most recently from 6533252 to c60c94eCompareJune 6, 2024 20:24
Prepare for removing the libc dependency from it.
Make progress on reoving the libc dependency from util_unix, so we
can remove the libc dependency for x86_64-unknown-linux-none.
Comment threadsrc/linux_android.rs Outdated
}
match Word::try_from(ret) {
Ok(written) => {
const _:() = assert!(core::mem::size_of::<Word>() <= core::mem::size_of::<usize>());

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Depending on whether/how #463 is resolved, we may need to unpoison(dest, written) here.

Comment threadsrc/linux_android.rs
0,
)
};
const _:() = assert!(core::mem::size_of::<libc::c_long>() == core::mem::size_of::<isize>());

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

...and here.

@briansmith
briansmith marked this pull request as ready for review June 7, 2024 15:37
@briansmith

Copy link
Copy Markdown
ContributorAuthor

Since the current implementation already doesn't work in MSAN (on Linux), we don't have to block this on MSAN support.

@briansmith
briansmithforce-pushed the b/syscall-x86_64 branch 2 times, most recently from 3ad27bf to 37386afCompareJune 7, 2024 16:24
Comment threadsrc/linux_android.rs
//
// #[cfg(target_abi = "x832")]
// #[allow(non_upper_case_globals)]
// pub const SYS_getrandom: IWord = 318 | __X32_SYSCALL_BIT;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

It isn't clear to me that we actually need to use __X32_SYSCALL_BIT for x86_64-unknown-linux-gnux32 and other x32 targets. It seems like we could just use the 64-bit version of the syscall instead (i.e. same syscall number). But I am not so sure and it's hard for me to test x32.

…-none.
Remove the last libc dependency from `linux_android`, as a step
towards supporting x86_64-unknown-linux-none.
This requires bumping the MSRV to 1.59.
@briansmithbriansmith changed the title MSRV 1.59: Remove libc requirement for x86_64-*-linux-* and support x86_64-*-linux-noneMSRV 1.59: Remove libc requirement for x86_64-*-linux-none and support x86_64-*-linux-noneJun 7, 2024
@briansmithbriansmith changed the title MSRV 1.59: Remove libc requirement for x86_64-*-linux-none and support x86_64-*-linux-noneMSRV 1.59: Remove libc requirement for x86_64-*-linux-noneJun 7, 2024
@briansmithbriansmith mentioned this pull request Jun 10, 2024
@newpavlov

Copy link
Copy Markdown
Member

Closing in favor of #520

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@briansmith@newpavlov