<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 - Dynamic linking: undefined references when linking libLTO.so"
   href="https://bugs.llvm.org/show_bug.cgi?id=37591">37591</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Dynamic linking: undefined references when linking libLTO.so
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Sun
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Solaris
          </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>lto
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>phantall@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I'm building on Solaris 10 / sparcv9, though I suspect this isn't solaris or
sparc specific.

I built with the following:

    cmake ../src/llvm \
    -DCMAKE_C_COMPILER=gcc-7.2.0 \
    -DCMAKE_CXX_COMPILER=g++-7.2.0 \
    -DGCC_INSTALL_PREFIX=$(dirname $(dirname $(which gcc-7.2.0))) \
    -DBUILD_SHARED_LIBS=ON \
    -DLINK_LLVM_DYLIB=ON \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo

    make -j32

I'll explain why I built using those options in a separate comment.

When linking libLTO.so it fails with undefined references to the following:

    LLVMDisasmDispose
    LLVMCreateDisasmCPU
    LLVMCreateDisasm
    LLVMDisasmInstruction
    LLVMSetDisasmOptions

If I remove those entries from tools/lto/lto.exports then it links fine.</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>