Various fixes for x86_64 on linux

Configure LLVM correctly, use the right data layout, add the readlink
function back, fix C constants, etc.
This commit is contained in:
Brian Anderson 2011-11-15 14:27:55 -08:00 committed by Niko Matsakis
parent 319f3b02f3
commit d2199e8716
5 changed files with 31 additions and 11 deletions

View file

@ -18,11 +18,16 @@ fn get_target_strs(target_os: session::os) -> target_strs::t {
}
session::os_win32. {
"e-p:32:32-f64:64:64-i64:64:64-f80:32:32-n8:16:32" //NDM i386
// FIXME: Test this. Copied from linux
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-"+
"f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-"+
"s0:64:64-f80:128:128-n8:16:32:64-S128"
}
session::os_linux. {
"e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32" //NDM i386
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-"+
"f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-"+
"s0:64:64-f80:128:128-n8:16:32:64-S128"
}
},

View file

@ -50,6 +50,7 @@ native mod libc {
fn unsetenv(n: str::sbuf) -> c_int;
fn pipe(buf: *mutable fd_t) -> c_int;
fn waitpid(pid: pid_t, &status: c_int, options: c_int) -> pid_t;
fn readlink(path: str::sbuf, buf: str::sbuf, bufsize: size_t) -> ssize_t;
}
mod libc_constants {

View file

@ -278,7 +278,7 @@ fn waitpid(pid: pid_t) -> int {
#[cfg(target_os = "linux")]
fn WEXITSTATUS(status: i32) -> i32 {
(status >> 8) & 0xff
(status >> 8i32) & 0xffi32
}
#[cfg(target_os = "macos")]

View file

@ -61,7 +61,7 @@ upcall_call_c_stack_float:
_upcall_call_c_stack_shim:
#else
.globl upcall_call_c_stack_shim
upcall_call_c_stack_shim
upcall_call_c_stack_shim:
#endif
push %rbp
mov %rsp,%rbp // save rsp