From 1b8b4baf6af53c22b3571765b4e18dd03c0cfb53 Mon Sep 17 00:00:00 2001 From: occheung Date: Wed, 11 Aug 2021 12:21:56 +0800 Subject: [PATCH] ksupport: fix panic, libc, unwind --- artiq/firmware/ksupport/Cargo.toml | 2 ++ artiq/firmware/ksupport/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/artiq/firmware/ksupport/Cargo.toml b/artiq/firmware/ksupport/Cargo.toml index fbedbd792..5556eb15e 100644 --- a/artiq/firmware/ksupport/Cargo.toml +++ b/artiq/firmware/ksupport/Cargo.toml @@ -20,3 +20,5 @@ dyld = { path = "../libdyld" } board_misoc = { path = "../libboard_misoc" } board_artiq = { path = "../libboard_artiq" } riscv = { version = "0.6.0", features = ["inline-asm"] } +libc = { path = "../libc" } +unwind = { path = "../libunwind" } diff --git a/artiq/firmware/ksupport/lib.rs b/artiq/firmware/ksupport/lib.rs index b4a430289..bbbea4c02 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -1,5 +1,5 @@ #![feature(lang_items, asm, panic_unwind, libc, unwind_attributes, - panic_implementation, panic_info_message, nll)] + panic_handler, panic_info_message, nll)] #![no_std] extern crate libc; @@ -51,7 +51,7 @@ macro_rules! recv { } #[no_mangle] // https://github.com/rust-lang/rust/issues/{38281,51647} -#[panic_implementation] +#[panic_handler] pub fn panic_fmt(info: &core::panic::PanicInfo) -> ! { if let Some(location) = info.location() { send(&Log(format_args!("panic at {}:{}:{}",