[llvm-bugs] [Bug 43604] ubuntu bionic x86_64: static libc++.a version 9 cannot be used in shared libraries since build without -fPIC
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 27 11:24:12 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=43604
Louis Dionne <ldionne at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Fixed By Commit(s)| |21c24ae9029a1fcd1c76b61b1c4
| |8b81b5c66c606
--- Comment #18 from Louis Dionne <ldionne at apple.com> ---
This should be fixed by:
commit 21c24ae9029a1fcd1c76b61b1c48b81b5c66c606
Author: Louis Dionne <ldionne.2 at gmail.com>
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 http://llvm.org/PR43604.
Differential Revision: https://reviews.llvm.org/D104328
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?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210727/b73e606b/attachment-0001.html>
More information about the llvm-bugs
mailing list