Skip to content

Commit 691782d

Browse files
committed
Use better cfg name for arm-linux tests
1 parent 77ca63c commit 691782d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

build.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,9 @@ fn main() {
424424
}
425425

426426
// To filter away some flaky test (see src/float/add.rs for details)
427-
if llvm_target.last().unwrap().contains("gnueabi") {
428-
println!("cargo:rustc-cfg=gnueabi")
427+
if llvm_target[0].starts_with("arm") &&
428+
llvm_target.last().unwrap().contains("gnueabi") {
429+
println!("cargo:rustc-cfg=arm-linux")
429430
}
430431

431432
// To compile intrinsics.rs for thumb targets, where there is no libc

src/float/add.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ macro_rules! add {
184184
add!(__addsf3: f32);
185185
add!(__adddf3: f64);
186186

187-
// NOTE(cfg) for some reason, on arm-unknown-linux-gnueabi*, our implementation doesn't
187+
// NOTE(cfg) for some reason, on arm*-unknown-linux-gnueabi*, our implementation doesn't
188188
// match the output of its gcc_s or compiler-rt counterpart. Until we investigate further, we'll
189189
// just avoid testing against them on those targets. Do note that our implementation gives the
190190
// correct answer; gcc_s and compiler-rt are incorrect in this case.
191-
#[cfg(all(test, not(gnueabi)))]
191+
#[cfg(all(test, not(arm-linux)))]
192192
mod tests {
193193
use core::{f32, f64};
194194
use qc::{F32, F64};

0 commit comments

Comments
 (0)