@@ -288,17 +288,23 @@ mod c {
288
288
sources. extend ( & [
289
289
( "__divdc3" , "divdc3.c" ) ,
290
290
( "__divsc3" , "divsc3.c" ) ,
291
- ( "__divxc3" , "divxc3.c" ) ,
292
291
( "__extendhfsf2" , "extendhfsf2.c" ) ,
293
292
( "__muldc3" , "muldc3.c" ) ,
294
293
( "__mulsc3" , "mulsc3.c" ) ,
295
- ( "__mulxc3" , "mulxc3.c" ) ,
296
294
( "__negdf2" , "negdf2.c" ) ,
297
295
( "__negsf2" , "negsf2.c" ) ,
298
- ( "__powixf2" , "powixf2.c" ) ,
299
296
( "__truncdfhf2" , "truncdfhf2.c" ) ,
300
297
( "__truncsfhf2" , "truncsfhf2.c" ) ,
301
298
] ) ;
299
+
300
+ if target_arch == "x86" || target_arch == "x86_64" {
301
+ // Only add 80-bit long double sources on x86.
302
+ sources. extend ( & [
303
+ ( "__divxc3" , "divxc3.c" ) ,
304
+ ( "__mulxc3" , "mulxc3.c" ) ,
305
+ ( "__powixf2" , "powixf2.c" ) ,
306
+ ] ) ;
307
+ }
302
308
}
303
309
304
310
// When compiling in rustbuild (the rust-lang/rust repo) this library
@@ -594,7 +600,12 @@ mod c {
594
600
build_aarch64_out_of_line_atomics_libraries ( & src_dir, cfg) ;
595
601
596
602
// Some run-time CPU feature detection is necessary, as well.
597
- sources. extend ( & [ ( "__aarch64_have_lse_atomics" , "cpu_model.c" ) ] ) ;
603
+ let cpu_model_src = if src_dir. join ( "cpu_model.c" ) . exists ( ) {
604
+ "cpu_model.c"
605
+ } else {
606
+ "cpu_model/aarch64.c"
607
+ } ;
608
+ sources. extend ( & [ ( "__aarch64_have_lse_atomics" , cpu_model_src) ] ) ;
598
609
}
599
610
600
611
let mut added_sources = HashSet :: new ( ) ;
0 commit comments