-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #812 - malbarbo:x32, r=alexcrichton
Initial fixes for linux x32 Tested with a local build of rustc. The main test can be compiled but fails to execute (receives SIGTRAP, which I think in this case indicates memory violation, I will open an issue in the rustc repo). This PR is important because it fixes the definition of `c_long` and `c_ulong`. Without these fixes, rustc crash with the error: ``` Cannot emit physreg copy instruction UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778! ``` Related rust-lang/rust#37976
- Loading branch information
Showing
12 changed files
with
134 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
pub type c_long = i64; | ||
pub type c_ulong = u64; | ||
|
||
pub const SYS_uselib: ::c_long = 134; | ||
pub const SYS__sysctl: ::c_long = 156; | ||
pub const SYS_create_module: ::c_long = 174; | ||
pub const SYS_get_kernel_syms: ::c_long = 177; | ||
pub const SYS_query_module: ::c_long = 178; | ||
pub const SYS_nfsservctl: ::c_long = 180; | ||
pub const SYS_set_thread_area: ::c_long = 205; | ||
pub const SYS_get_thread_area: ::c_long = 211; | ||
pub const SYS_epoll_ctl_old: ::c_long = 214; | ||
pub const SYS_epoll_wait_old: ::c_long = 215; | ||
pub const SYS_vserver: ::c_long = 236; | ||
|
||
#[link(name = "util")] | ||
extern { | ||
pub fn sysctl(name: *mut ::c_int, | ||
namelen: ::c_int, | ||
oldp: *mut ::c_void, | ||
oldlenp: *mut ::size_t, | ||
newp: *mut ::c_void, | ||
newlen: ::size_t) | ||
-> ::c_int; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub type c_long = i32; | ||
pub type c_ulong = u32; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters