loongson-community / linux-stable

Linux kernel source tree for Loongson
Other
67 stars 21 forks source link

[Compiler] Failed Checking missing-syscalls for O32 #4

Open xiangzhai opened 6 years ago

xiangzhai commented 6 years ago

Hi Loonger,

I reported PR38063 to LLVM, because GCC is able to work, but I argue that ugly workaround will not be merged by upstream:

diff --git a/lib/Basic/Targets/Mips.cpp b/lib/Basic/Targets/Mips.cpp
index cbd5a01..59dd34b 100644
--- a/lib/Basic/Targets/Mips.cpp
+++ b/lib/Basic/Targets/Mips.cpp
@@ -207,8 +207,7 @@ bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {
   // FIXME: It's valid to use O32 on a 64-bit CPU but the backend can't handle
   //        this yet. It's better to fail here than on the backend assertion.
   if (processorSupportsGPR64() && ABI == "o32") {
-    Diags.Report(diag::err_target_unsupported_abi) << ABI << CPU;
-    return false;
+    return true;
   }

   // 64-bit ABI's require 64-bit CPU's.

Please give me some hint to make the patch looks good, thanks a lot!

Regards, Leslie Zhai