<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - ubuntu bionic x86_64: static libc++.a version 9 cannot be used in shared libraries since build without -fPIC"
   href="https://bugs.llvm.org/show_bug.cgi?id=43604">bug 43604</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Fixed By Commit(s)</td>
           <td>
                
           </td>
           <td>21c24ae9029a1fcd1c76b61b1c48b81b5c66c606
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - ubuntu bionic x86_64: static libc++.a version 9 cannot be used in shared libraries since build without -fPIC"
   href="https://bugs.llvm.org/show_bug.cgi?id=43604#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - ubuntu bionic x86_64: static libc++.a version 9 cannot be used in shared libraries since build without -fPIC"
   href="https://bugs.llvm.org/show_bug.cgi?id=43604">bug 43604</a>
              from <span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span></b>
        <pre>This should be fixed by:

    commit 21c24ae9029a1fcd1c76b61b1c48b81b5c66c606
    Author: Louis Dionne <<a href="mailto:ldionne.2@gmail.com">ldionne.2@gmail.com</a>>
    Date:   Tue Jun 15 18:47:38 2021 -0400

        [runtimes] Always build libc++, libc++abi and libunwind with -fPIC

        Building the libraries with -fPIC ensures that we can link an
executable
        against the static libraries with -fPIE. Furthermore, there is
apparently
        basically no downside to building the libraries with position
independent
        code, since modern toolchains are sufficiently clever.

        This commit enforces that we always build the runtime libraries with
-fPIC.
        This is another take on D104327, which instead makes the decision of
whether
        to build with -fPIC or not to the build script that drives the
runtimes'
        build.

        Fixes <a href="http://llvm.org/PR43604">http://llvm.org/PR43604</a>.

        Differential Revision: <a href="https://reviews.llvm.org/D104328">https://reviews.llvm.org/D104328</a>

That should have been committed in time for the LLVM 13 release. I had no
strong preference between the two approaches I proposed above, but I ended up
going with D104328 because I am more familiar with the runtimes' build scripts
than the release scripts.

If this patch causes an issue for someone, please contact me and we'll figure
something out.

Sylvestre (or someone else), can you please confirm whether you're still seeing
the issue after 21c24ae9029a1fcd1c76b61b1c48b81b5c66c606?</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>