<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 - Regression with Musl after adding support for outputting to /dev/null"
   href="https://bugs.llvm.org/show_bug.cgi?id=32425">32425</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression with Musl after adding support for outputting to /dev/null
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dima@golovin.in
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18172" name="attach_18172" title="revert regressive commit">attachment 18172</a> <a href="attachment.cgi?id=18172&action=edit" title="revert regressive commit">[details]</a></span>
revert regressive commit

I believe that the regression was introduced with revision 291485 "Support
outputting to /dev/null."

I really don't know why is this the case, but it is proven to work. The patch
doesn't seem to affect anything with compilation process, but it does.


Symptoms:

LLVM builds fine, musl builds fine, linking with musl always fails with this
error message:

    ld.lld: error: ../crt/crt1.c:(function _start_c): cannot preempt symbol
'__libc_start_main' defined in /path/to/sysroot/bin/../lib/libc.so
    ld.lld: error: hello.c:(function main): cannot preempt symbol 'printf'
defined in /path/to/sysroot/bin/../lib/libc.so
    clang-5.0: error: linker command failed with exit code 1 (use -v to see
invocation)


Steps to reproduce:

1. Build llvm with clang, lld and compiler-rt.
2. Build musl with resulting compiler.
3. Build a "Hello, World!" program and try to link it with musl.

It fails with anything newer than revision 291485. It will not fail if attached
patch is applied (but /dev/null as an output will also be unsupported).</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>