<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dimitry@andric.com" title="Dimitry Andric <dimitry@andric.com>"> <span class="fn">Dimitry Andric</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - ld.lld -v reports "no input files" error, conflicts with libtool test"
   href="https://bugs.llvm.org/show_bug.cgi?id=31582">bug 31582</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>dimitry@andric.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>FIXED
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - ld.lld -v reports "no input files" error, conflicts with libtool test"
   href="https://bugs.llvm.org/show_bug.cgi?id=31582#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - ld.lld -v reports "no input files" error, conflicts with libtool test"
   href="https://bugs.llvm.org/show_bug.cgi?id=31582">bug 31582</a>
              from <span class="vcard"><a class="email" href="mailto:dimitry@andric.com" title="Dimitry Andric <dimitry@andric.com>"> <span class="fn">Dimitry Andric</span></a>
</span></b>
        <pre>I just encountered this again while running a (autoconf-produced) configure
script:

[...]
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries...
/usr/bin/ld: error: no input files
/usr/bin/ld: error: target emulation unknown: -m or at least one .o file
required
yes

Note that the configure script did detect the shared library support correctly,
but the double error is confusing, to say the least.

It would really be nice if we could fix this up somehow.  It looks like -v and
--version are a bit strange, in the sense that with other arguments on the
command line, it still continues to link, after printing version information.

The most compatible behavior would be:

-v with no other arguments: print version line and exit(0).
-v with arguments: print version line, proceed with regular operation.
--version with no other arguments: print version line, optionally
copyright/disclaimer, and exit(0).
--version with arguments: ignore arguments, print version line, optionally
copyright/disclaimer, and exit(0).</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>