<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Build breaks on OpenBSD when linking shared libs"
   href="https://llvm.org/bugs/show_bug.cgi?id=25534">25534</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Build breaks on OpenBSD when linking shared libs
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>sisnkemp@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When linking libLTO.so, the build aborts, complaining about undefined
references to assert2, cxa_exit, etc.

The solution is not not use the -z,defs option when building a shared library
on OpenBSD. This is option is also avoided on FreeBSD, Darwin, Win32 or Cygwin.
A diff to make the build go through on OpenBSD is given at:
<a href="http://reviews.llvm.org/D14236">http://reviews.llvm.org/D14236</a>

Linking explictly against libc does not work for the reasons described here:
<a href="http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151102/309783.html">http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151102/309783.html</a></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>