[llvm-bugs] [Bug 31582] ld.lld -v reports "no input files" error, conflicts with libtool test

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 4 10:40:16 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=31582

Dimitry Andric <dimitry at andric.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dimitry at andric.com
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #9 from Dimitry Andric <dimitry at andric.com> ---
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).

-- 
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/20171204/f94695fa/attachment.html>


More information about the llvm-bugs mailing list