std: Fix rumprun build
Looks like the rumprun build has bitrotted over time, so this includes some libc fixes and some various libstd fixes which gets it back to bootstrapping.
This commit is contained in:
parent
552bf75e7d
commit
acaf151ade
@ -1 +1 @@
|
|||||||
Subproject commit af77843345ec6fc7e51113bfd692138d89024bc0
|
Subproject commit 91ff43c736de664f8d3cd351e148c09cdea6731e
|
@ -15,7 +15,6 @@ use cmp;
|
|||||||
#[cfg(not(target_env = "newlib"))]
|
#[cfg(not(target_env = "newlib"))]
|
||||||
use ffi::CString;
|
use ffi::CString;
|
||||||
use io;
|
use io;
|
||||||
use libc::PTHREAD_STACK_MIN;
|
|
||||||
use libc;
|
use libc;
|
||||||
use mem;
|
use mem;
|
||||||
use ptr;
|
use ptr;
|
||||||
@ -339,14 +338,20 @@ fn min_stack_size(attr: *const libc::pthread_attr_t) -> usize {
|
|||||||
});
|
});
|
||||||
|
|
||||||
match unsafe { __pthread_get_minstack } {
|
match unsafe { __pthread_get_minstack } {
|
||||||
None => PTHREAD_STACK_MIN as usize,
|
None => libc::PTHREAD_STACK_MIN as usize,
|
||||||
Some(f) => unsafe { f(attr) as usize },
|
Some(f) => unsafe { f(attr) as usize },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// No point in looking up __pthread_get_minstack() on non-glibc
|
// No point in looking up __pthread_get_minstack() on non-glibc
|
||||||
// platforms.
|
// platforms.
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(all(not(target_os = "linux"),
|
||||||
|
not(target_os = "netbsd")))]
|
||||||
fn min_stack_size(_: *const libc::pthread_attr_t) -> usize {
|
fn min_stack_size(_: *const libc::pthread_attr_t) -> usize {
|
||||||
PTHREAD_STACK_MIN as usize
|
libc::PTHREAD_STACK_MIN as usize
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "netbsd")]
|
||||||
|
fn min_stack_size(_: *const libc::pthread_attr_t) -> usize {
|
||||||
|
2048 // just a guess
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user