Skip to content

Commit 22f76e3

Browse files
authored
Merge pull request rust-lang#223 from paoloteti/be
Skip aeabi_cdcmp and aeabi_cfcmp on big-endian targets
2 parents bf912e6 + 083f107 commit 22f76e3

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

build.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5430,10 +5430,6 @@ mod c {
54305430
if target_arch == "arm" && target_os != "ios" {
54315431
sources.extend(
54325432
&[
5433-
"arm/aeabi_cdcmp.S",
5434-
"arm/aeabi_cdcmpeq_check_nan.c",
5435-
"arm/aeabi_cfcmp.S",
5436-
"arm/aeabi_cfcmpeq_check_nan.c",
54375433
"arm/aeabi_dcmp.S",
54385434
"arm/aeabi_div0.c",
54395435
"arm/aeabi_drsub.c",
@@ -5467,6 +5463,21 @@ mod c {
54675463
// "arm/udivsi3.S",
54685464
],
54695465
);
5466+
5467+
// First of all aeabi_cdcmp and aeabi_cfcmp are never called by LLVM.
5468+
// Second are little-endian only, so build fail on big-endian targets.
5469+
// Temporally workaround: exclude these files for big-endian targets.
5470+
if !llvm_target[0].starts_with("thumbeb") &&
5471+
!llvm_target[0].starts_with("armeb") {
5472+
sources.extend(
5473+
&[
5474+
"arm/aeabi_cdcmp.S",
5475+
"arm/aeabi_cdcmpeq_check_nan.c",
5476+
"arm/aeabi_cfcmp.S",
5477+
"arm/aeabi_cfcmpeq_check_nan.c",
5478+
],
5479+
);
5480+
}
54705481
}
54715482

54725483
if llvm_target[0] == "armv7" {

0 commit comments

Comments
 (0)