<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 - Wrong output of llvm-config --system-libs"
   href="https://bugs.llvm.org/show_bug.cgi?id=50194">50194</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wrong output of llvm-config --system-libs
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>OpenBSD
          </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>cmake
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vincent@rischmann.fr
          </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=24818" name="attach_24818" title="cmake function patch">attachment 24818</a> <a href="attachment.cgi?id=24818&action=edit" title="cmake function patch">[details]</a></span>
cmake function patch

Hello,

I built LLVM 12 from the release/12.x branch on OpenBSD 6.9, the output of the
command `llvm-config --system-libs` is wrong, I get this:

    -lpthread -lm -lz.so.5.0 -lcurses.so.14.0

It should be this:

    -lpthread -lm -lz -lcurses

I've found that it can be fixed by changing the get_library_name cmake function
(<a href="https://github.com/llvm/llvm-project/blob/release/12.x/llvm/cmake/modules/GetLibraryName.cmake">https://github.com/llvm/llvm-project/blob/release/12.x/llvm/cmake/modules/GetLibraryName.cmake</a>)
with the attached patch.

I don't know if this is the proper way to fix this, I've only been able to test
it on openbsd and linux.</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>