Skip to content

Support crosstool for uclibc, musl, and newlib. #1087

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

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

Alexhuszagh
Copy link
Contributor

No description provided.

@Alexhuszagh Alexhuszagh requested a review from a team as a code owner October 19, 2022 19:13
@Alexhuszagh Alexhuszagh added the no changelog A valid PR without changelog (no-changelog) label Oct 19, 2022
@@ -32,6 +36,15 @@ pub struct ConfigureCrosstool {
/// The glibc version to configure for.
#[clap(long, env = "GLIBC_VERSION")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are all optional, and use default versions if not provided. It detects the correct libc to use by the name: if it contains gnu, it's a glibc target, uclibc is uclibc, musl is musl, and none is newlib.

let linux_patch = linux_versions.get(2).unwrap_or(&"0").parse::<u32>()?;
let ct_linux_v = format!(
"CT_LINUX_V_{linux_major}_{linux_minor}=y
if file_name.contains("linux") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we now support newlib targets, Linux needs to be optional.

Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

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

minor nit, otherwise looks good

@Alexhuszagh
Copy link
Contributor Author

minor nit

What's the nit?

@Emilgardis
Copy link
Member

minor nit

What's the nit?

eeh, strange, it didn't get added...

@Alexhuszagh
Copy link
Contributor Author

bors r=Emilgardis

bors bot added a commit that referenced this pull request Oct 20, 2022
1087: Support crosstool for uclibc, musl, and newlib. r=Emilgardis a=Alexhuszagh



Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
@Alexhuszagh
Copy link
Contributor Author

bors r-
This actually needs a mirror config option for pre-1.0 uclibc, which is required for some embedded systems.

@bors
Copy link
Contributor

bors bot commented Oct 20, 2022

Canceled.

@Alexhuszagh
Copy link
Contributor Author

Alexhuszagh commented Oct 20, 2022

Pre-1.0 uclibc support, at least from the configuration standpoint has been fixed. I'm diagnosing some other errors, but those are limited to compiler and Linux versions during the build process, and not the config itself (specifically, a missing sysnum.h).

Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 21, 2022

Build succeeded:

@bors bors bot merged commit e23ef05 into cross-rs:main Oct 21, 2022
@Alexhuszagh Alexhuszagh deleted the uclibc branch October 21, 2022 21:53
@Emilgardis Emilgardis added this to the v0.3.0 milestone Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement no changelog A valid PR without changelog (no-changelog)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants