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

add support for s390x #377

Merged
merged 3 commits into from
Sep 3, 2016
Merged

add support for s390x #377

merged 3 commits into from
Sep 3, 2016

Conversation

japaric
Copy link
Member

@japaric japaric commented Sep 3, 2016

tested by running libc-test on real s390x hardware.

r? @alexcrichton

pub const POSIX_FADV_DONTNEED: ::c_int = 4;
#[cfg(targe_arch = "s390x")]
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
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 be pushed down and duplicated everywhere except s390x?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was going to do that but too tired already :-)

@alexcrichton
Copy link
Member

tested by running libc-test on real s390x hardware.

Holy cow, nice!

Does qemu-s390x not work?

@japaric
Copy link
Member Author

japaric commented Sep 3, 2016

Does qemu-s390x not work?

Sadly, no. At least Ubuntu's doesn't. I also tried compiling QEMU 2.6 myself but that didn't work either. Both qemu-s390xs segfaulted with even the simplest cross compiled C program.

I just saw QEMU 2.7 was released. I'll try that one and hope that the issue got magically fixed.

@alexcrichton
Copy link
Member

Both qemu-s390xs segfaulted with even the simplest cross compiled C program

One thing I noticed recently was that qemu-mips in a docker container would segfault, but if you also install the qemu-system-mips package then the segfault magically went away. Not sure if that's the case here, but do you perhaps have a "stripped down installation of qemu" however ubuntu defines it maybe?

@japaric
Copy link
Member Author

japaric commented Sep 3, 2016

Oh, that sounds weird but I'm not that surprised. I've seen a 64-bit QEMU binary segfault whereas a 32-bit QEMU binary worked fine before. Sadly, the qemu-system-s390x package is only avaliable for the s390x architecture itself.

@japaric
Copy link
Member Author

japaric commented Sep 3, 2016

Could these be pushed down and duplicated everywhere except s390x?

Done, I think.

@alexcrichton
Copy link
Member

@bors: r+ 756d7ee

@bors
Copy link
Contributor

bors commented Sep 3, 2016

⌛ Testing commit 756d7ee with merge 3635c1a...

bors added a commit that referenced this pull request Sep 3, 2016
add support for s390x

tested by running libc-test on real s390x hardware.

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Sep 3, 2016

☀️ Test successful - status-appveyor, travis
Approved by: alexcrichton
Pushing 3635c1a to master...

@bors bors merged commit 756d7ee into rust-lang:master Sep 3, 2016
Susurrus pushed a commit to Susurrus/libc that referenced this pull request Mar 26, 2017
Added lseek and seek64

I have added lseek and seek64 to unistd, the last one targeting Linux/Android only. I wasn't sure where to place the Whence enum, or if it's a nice of doing, I am quite fresh to Rust.
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.

3 participants