[llvm-bugs] [Bug 38063] New: Failed Checking missing-syscalls for O32

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 5 02:51:05 PDT 2018


            Bug ID: 38063
           Summary: Failed Checking missing-syscalls for O32
           Product: clang
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lesliezhai at llvm.org.cn
                CC: llvm-bugs at lists.llvm.org

Hi LLVM developers,

I am building Linux Kernel[1] with LLVM toolchain[2] for mips64el.
But it failed Checking missing-syscalls for O32:

error: ABI 'o32' is not supported on CPU 'mips64r2'
Kbuild:98: recipe for target 'missing-syscalls' failed
make[1]: *** [missing-syscalls] Error 1

GCC is able to work:

Checking missing-syscalls for O32
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h

So ugly workaround patch:

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.

1. Linux Kernel 4.9 branch https://github.com/loongson-community/linux-stable
2. Loongson clang version 7.0.0 (git at github.com:llvm-mirror/clang.git
ef356db5c03a0f052c09ebd0a964b9eda3852847) (git at github.com:llvm-mirror/llvm.git
ab9920d16bc0acaa2a458b49a43b3aaa9bcda8e6) (based on LLVM 7.0.0svn)
Target: mips64el-redhat-linux
Thread model: posix
InstalledDir: /opt/llvm-git/bin
Found candidate GCC installation: /usr/lib/gcc/mips64el-redhat-linux/4.9.3
Selected GCC installation: /usr/lib/gcc/mips64el-redhat-linux/4.9.3
Candidate multilib: .;
Selected multilib: .;

Leslie Zhai

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180705/37f6f5c2/attachment-0001.html>

More information about the llvm-bugs mailing list