From 265fdacab9b3c63b2c17a42fb17c51996c703ef8 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 28 Jul 2022 16:02:04 +0100 Subject: [PATCH 1/2] Disable some PPC64 tests which are failing due to an LLVM(?) bug See https://github.com/rust-lang/rust/issues/99853 --- testcrate/tests/mem.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testcrate/tests/mem.rs b/testcrate/tests/mem.rs index 48ac95adc..5099d69ed 100644 --- a/testcrate/tests/mem.rs +++ b/testcrate/tests/mem.rs @@ -230,6 +230,8 @@ fn memmove_backward_aligned() { } } +// PowerPC tests are failing: https://github.com/rust-lang/rust/issues/99853 +#[cfg(not(target_arch = "powerpc64"))] #[test] fn memset_backward_misaligned_nonaligned_start() { let mut arr = gen_arr::<32>(); @@ -242,6 +244,8 @@ fn memset_backward_misaligned_nonaligned_start() { } } +// PowerPC tests are failing: https://github.com/rust-lang/rust/issues/99853 +#[cfg(not(target_arch = "powerpc64"))] #[test] fn memset_backward_misaligned_aligned_start() { let mut arr = gen_arr::<32>(); @@ -254,6 +258,8 @@ fn memset_backward_misaligned_aligned_start() { } } +// PowerPC tests are failing: https://github.com/rust-lang/rust/issues/99853 +#[cfg(not(target_arch = "powerpc64"))] #[test] fn memset_backward_aligned() { let mut arr = gen_arr::<32>(); From 81b22d4b0493cc0ffc4f9f5df57dd90943a6dd70 Mon Sep 17 00:00:00 2001 From: Ayush Singh Date: Thu, 28 Jul 2022 17:58:16 +0530 Subject: [PATCH 2/2] Use all of src/math for UEFI This is needed for libtest --- src/math.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/math.rs b/src/math.rs index 14a65395e..7337dabb9 100644 --- a/src/math.rs +++ b/src/math.rs @@ -72,6 +72,7 @@ no_mangle! { not(target_env = "wasi") ), target_os = "xous", + all(target_arch = "x86_64", target_os = "uefi"), all(target_arch = "xtensa", target_os = "none"), all(target_vendor = "fortanix", target_env = "sgx") ))] @@ -95,7 +96,7 @@ no_mangle! { fn tanf(n: f32) -> f32; } -#[cfg(target_os = "xous")] +#[cfg(any(target_os = "xous", target_os = "uefi"))] no_mangle! { fn sqrtf(x: f32) -> f32; fn sqrt(x: f64) -> f64; @@ -103,7 +104,8 @@ no_mangle! { #[cfg(any( all(target_vendor = "fortanix", target_env = "sgx"), - target_os = "xous" + target_os = "xous", + target_os = "uefi" ))] no_mangle! { fn ceil(x: f64) -> f64;