diff --git a/artiq/firmware/libbacktrace_artiq/lib.rs b/artiq/firmware/libbacktrace_artiq/lib.rs index cf06c8f5a..7e84e5e44 100644 --- a/artiq/firmware/libbacktrace_artiq/lib.rs +++ b/artiq/firmware/libbacktrace_artiq/lib.rs @@ -1,5 +1,4 @@ -#![feature(libc, panic_unwind, never_type)] -#![allow(non_upper_case_globals, non_camel_case_types)] +#![feature(libc, panic_unwind)] #![no_std] extern crate unwind; @@ -8,13 +7,6 @@ extern crate libc; use unwind as uw; use libc::c_void; -type _Unwind_Trace_Fn = extern "C" fn(*mut uw::_Unwind_Context, *mut c_void) - -> uw::_Unwind_Reason_Code; -extern { - fn _Unwind_Backtrace(trace_fn: _Unwind_Trace_Fn, arg: *mut c_void) - -> uw::_Unwind_Reason_Code; -} - pub fn backtrace(mut f: F) -> Result<(), uw::_Unwind_Reason_Code> where F: FnMut(usize) -> () { @@ -30,7 +22,7 @@ pub fn backtrace(mut f: F) -> Result<(), uw::_Unwind_Reason_Code> } unsafe { - match _Unwind_Backtrace(trace::, &mut f as *mut _ as *mut c_void) { + match uw::_Unwind_Backtrace(trace::, &mut f as *mut _ as *mut c_void) { uw::_URC_NO_REASON => Ok(()), err => Err(err) } diff --git a/artiq/firmware/runtime/Makefile b/artiq/firmware/runtime/Makefile index aa2e43b6f..187793ae4 100644 --- a/artiq/firmware/runtime/Makefile +++ b/artiq/firmware/runtime/Makefile @@ -6,7 +6,6 @@ CFLAGS += \ -I$(LIBUNWIND_DIRECTORY)/../unwinder/include \ LDFLAGS += -L../libbase \ - -L../libprintf \ -L../libunwind RUSTFLAGS += -Cpanic=abort @@ -19,7 +18,7 @@ $(RUSTOUT)/libruntime.a: runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o $(LD) $(LDFLAGS) -T $(RUNTIME_DIRECTORY)/runtime.ld -o $@ $^ \ - -lunwind-bare -lprintf-nofloat --eh-frame-hdr + -lunwind-bare @chmod -x $@ ksupport_data.o: ../ksupport/ksupport.elf