<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LTO plugin uses wrong ABI for LTO objects on riscv"
   href="https://bugs.llvm.org/show_bug.cgi?id=51247">51247</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LTO plugin uses wrong ABI for LTO objects on riscv
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>12.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>gold-plugin
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>schwab@suse.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>It looks like the LTO plugin fails to properly set the target-abi for the LTO
object.

$ clang -flto hello.c -v
clang version 12.0.1
Target: riscv64-suse-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib64/gcc/riscv64-suse-linux/10
Found candidate GCC installation: /usr/bin/../lib64/gcc/riscv64-suse-linux/11
Found candidate GCC installation: /usr/bin/../lib64/gcc/riscv64-suse-linux/9
Found candidate GCC installation: /usr/lib64/gcc/riscv64-suse-linux/10
Found candidate GCC installation: /usr/lib64/gcc/riscv64-suse-linux/11
Found candidate GCC installation: /usr/lib64/gcc/riscv64-suse-linux/9
Selected GCC installation: /usr/bin/../lib64/gcc/riscv64-suse-linux/11
 "/usr/bin/clang-12.0.1" -cc1 -triple riscv64-suse-linux-gnu -emit-llvm-bc
-flto -flto-unit -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name hello.c -mrelocation-model static -mframe-pointer=all
-fmath-errno -fno-rounding-math -mconstructor-aliases -target-feature +m
-target-feature +a -target-feature +f -target-feature +d -target-feature +c
-target-feature +relax -target-feature -save-restore -target-abi lp64d
-msmall-data-limit 8 -fno-split-dwarf-inlining -debugger-tuning=gdb -v
-resource-dir /usr/lib64/clang/12.0.1 -internal-isystem /usr/local/include
-internal-isystem /usr/lib64/clang/12.0.1/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -fdebug-compilation-dir
/suse/schwab/src/test -ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1
-fcolor-diagnostics -faddrsig -o /tmp/hello-229842.o -x c hello.c
clang -cc1 version 12.0.1 based upon LLVM 12.0.1 default target
riscv64-suse-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib64/clang/12.0.1/include
 /usr/include
End of search list.
 "/usr/bin/ld" -z relro --hash-style=gnu --hash-style=both --build-id
--enable-new-dtags --eh-frame-hdr -m elf64lriscv -dynamic-linker
/lib/ld-linux-riscv64-lp64d.so.1 -o a.out
/usr/bin/../lib64/gcc/riscv64-suse-linux/11/../../../../lib64/crt1.o
/usr/bin/../lib64/gcc/riscv64-suse-linux/11/crti.o
/usr/bin/../lib64/gcc/riscv64-suse-linux/11/crtbegin.o
-L/usr/bin/../lib64/gcc/riscv64-suse-linux/11
-L/usr/bin/../lib64/gcc/riscv64-suse-linux/11/../../../../lib64
-L/usr/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib64/lp64d
-L/usr/lib64/lp64d
-L/usr/bin/../lib64/gcc/riscv64-suse-linux/11/../../../../riscv64-suse-linux/lib
-L/usr/bin/../lib64/gcc/riscv64-suse-linux/11/../../.. -L/usr/bin/../lib -L/lib
-L/usr/lib -plugin /usr/bin/../lib64/LLVMgold.so /tmp/hello-229842.o -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/bin/../lib64/gcc/riscv64-suse-linux/11/crtend.o
/usr/bin/../lib64/gcc/riscv64-suse-linux/11/crtn.o
/usr/bin/ld: /tmp/lto-llvm-5c94e7.o: can't link soft-float modules with
double-float modules
/usr/bin/ld: failed to merge target specific data of file
/tmp/lto-llvm-5c94e7.o
clang-12.0: error: linker command failed with exit code 1 (use -v to see
invocation)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>