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

Definitions for i686-unknown-linux-musl, arm and asmjs musl #122

Merged
merged 2 commits into from
Jan 30, 2016

Conversation

brson
Copy link
Contributor

@brson brson commented Dec 29, 2015

I've tested x86 against C locally, but not arm or asmjs.
I added the arm definitions because asmjs's C is derived from arms.

Mysteriously, my locally-built musl does not contain a
definition for _SC_2_C_VERSION, so I just removed it.

Some of these conditions, particularly in notbsd, could be pushed further down the tree.

@brson
Copy link
Contributor Author

brson commented Jan 5, 2016

Looking at the build failures now.

@brson brson force-pushed the musl branch 3 times, most recently from a2ccd82 to 6d132c4 Compare January 5, 2016 22:03
@brson
Copy link
Contributor Author

brson commented Jan 5, 2016

Remaining failure looks bogus.

pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
#[cfg(any(target_arch = "x86",
target_arch = "arm",
target_arch = "asmjs"))]
Copy link
Member

Choose a reason for hiding this comment

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

Could these #[cfg] blocks be avoided by splitting this into a musl/$arch.rs-style configuration like with Linux?

@alexcrichton
Copy link
Member

Yeah I think build failures are unrelated, I'm prepping a PR that should bring them all in line

@brson
Copy link
Contributor Author

brson commented Jan 21, 2016

I've moved some of the definitions around as requested.

__reserved: [::c_long; 3],
}
// This definition is slightly different on aarch64
#[cfg(not(target_arch = "aarch64"))]
Copy link
Member

Choose a reason for hiding this comment

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

Do we actually have aarch64 support?

Stylistically I also tend to prefer copying things around instead of using #[cfg] and/or #[cfg(not)] (even though it's a little wordier), but doesn't matter too much here, it can just be cleaned up later if it becomes a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but I noticed in passing these definitions are weird and just added these defensively. I can remove them.

@brson
Copy link
Contributor Author

brson commented Jan 26, 2016

Updated for most recent reviews.

@@ -108,7 +111,8 @@ s! {
pub dli_saddr: *mut ::c_void,
}

#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"),
#[cfg_attr(any(all(target_arch = "x86", not(target_env = "musl")),
target_arch = "x86_64"),
Copy link
Member

Choose a reason for hiding this comment

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

This line should be lined up with the a in all, right?

@alexcrichton
Copy link
Member

I'm fine merging whenever (just minor nits), but CI doesn't like two of the constants for MUSL

I've tested x86 against C locally, but not arm or asmjs.
I added the arm definitions because asmjs's C is derived from arms.

Mysteriously, my locally-built musl does not contain a
definition for _SC_2_C_VERSION, so I just removed it.
alexcrichton added a commit that referenced this pull request Jan 30, 2016
Definitions for i686-unknown-linux-musl, arm and asmjs musl
@alexcrichton alexcrichton merged commit 86cd81d into rust-lang:master Jan 30, 2016
@alexcrichton
Copy link
Member

📦

bors added a commit to rust-lang/rust that referenced this pull request Feb 6, 2016
Here's another go at adding emscripten support. This needs to wait again on new [libc definitions](rust-lang/libc#122) landing. To get the libc definitions right I had to add support for i686-unknown-linux-musl, which are very similar to emscripten's, which are derived from arm/musl.

This branch additionally removes the makefile dependency on the `EMSCRIPTEN` environment variable by not building the unused compiler-rt.

Again, this is not sufficient for actually compiling to asmjs since it needs additional LLVM patches.

r? @alexcrichton
danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
* added _mm_cvtps_pd

* added _mm_set_sd

* added _mm_set1_pd

* added _mm_set_pd1

* added _mm_set_pd

* added _mm_setr_pd

* added _mm_setzero_pd
Sign up for free to 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