Skip to content

Commit e829333

Browse files
authored
Merge pull request #568 from nikic/fix-float80-builtins
Only add 80-bit long double source on x86
2 parents ab849ed + 1f6ca44 commit e829333

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -290,17 +290,23 @@ mod c {
290290
sources.extend(&[
291291
("__divdc3", "divdc3.c"),
292292
("__divsc3", "divsc3.c"),
293-
("__divxc3", "divxc3.c"),
294293
("__extendhfsf2", "extendhfsf2.c"),
295294
("__muldc3", "muldc3.c"),
296295
("__mulsc3", "mulsc3.c"),
297-
("__mulxc3", "mulxc3.c"),
298296
("__negdf2", "negdf2.c"),
299297
("__negsf2", "negsf2.c"),
300-
("__powixf2", "powixf2.c"),
301298
("__truncdfhf2", "truncdfhf2.c"),
302299
("__truncsfhf2", "truncsfhf2.c"),
303300
]);
301+
302+
if target_arch == "x86" || target_arch == "x86_64" {
303+
// Only add 80-bit long double sources on x86.
304+
sources.extend(&[
305+
("__divxc3", "divxc3.c"),
306+
("__mulxc3", "mulxc3.c"),
307+
("__powixf2", "powixf2.c"),
308+
]);
309+
}
304310
}
305311

306312
// When compiling in rustbuild (the rust-lang/rust repo) this library

0 commit comments

Comments
 (0)