Fixes for building libstd (real)
This commit is contained in:
parent
d9f263728d
commit
da3f9558d9
10 changed files with 51 additions and 30 deletions
|
@ -3,5 +3,10 @@ name = "panic_unwind"
|
|||
version = "0.0.0"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
|
||||
[lib]
|
||||
path = "../../rust/src/libpanic_unwind/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = { path = "../libc/" }
|
||||
redox_syscall = { path = "../../syscall/" }
|
||||
unwind = { path = "../unwind/" }
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
#![no_std]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(panic_runtime)]
|
||||
#![panic_runtime]
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8), data: *mut u8,
|
||||
_data_ptr: *mut usize, _vtable_ptr: *mut usize) -> u32 {
|
||||
f(data);
|
||||
0
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 {
|
||||
core::intrinsics::abort();
|
||||
}
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
pub extern fn eh_personality() {}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[no_mangle]
|
||||
/// Required to handle panics
|
||||
pub unsafe extern "C" fn _Unwind_Resume() -> ! {
|
||||
core::intrinsics::abort();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue