Skip to content

Commit 3e7fb1f

Browse files
committed
Disable add_f3 for arm-linux-gnueabi
1 parent befda78 commit 3e7fb1f

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/float/add.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,14 @@ macro_rules! add {
181181
}
182182
}
183183

184+
// NOTE(cfg) These are disabled for gnueabihf due to
185+
// https://github.com/rust-lang-nursery/compiler-builtins/issues/90
186+
#[cfg(not(gnueabi))]
184187
add!(__addsf3: f32);
188+
#[cfg(not(gnueabi))]
185189
add!(__adddf3: f64);
186190

187-
#[cfg(test)]
191+
#[cfg(all(test, not(gnueabi)))]
188192
mod tests {
189193
use core::{f32, f64};
190194
use qc::{F32, F64};
@@ -194,21 +198,13 @@ mod tests {
194198
a: F32,
195199
b: F32)
196200
-> Option<F32> {
197-
if option_env!("TARGET") != Some("arm-unknown-linux-gnueabi") {
198-
Some(F32(f(a.0, b.0)))
199-
} else {
200-
None
201-
}
201+
Some(F32(f(a.0, b.0)))
202202
}
203203

204204
fn __adddf3(f: extern fn(f64, f64) -> f64,
205205
a: F64,
206206
b: F64) -> Option<F64> {
207-
if option_env!("TARGET") != Some("arm-unknown-linux-gnueabi") {
208-
Some(F64(f(a.0, b.0)))
209-
} else {
210-
None
211-
}
207+
Some(F64(f(a.0, b.0)))
212208
}
213209
}
214210
}

0 commit comments

Comments
 (0)