[libcxx-commits] [PATCH] D104328: [libc++] Always build libc++ and libc++abi with -fPIC
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 26 13:43:14 PDT 2021
ldionne updated this revision to Diff 361782.
ldionne added a comment.
Herald added a project: libunwind.
Herald added a reviewer: libunwind.
Rebase onto main.
If nobody objects to this approach, I'd like to land it in time for
the LLVM 13 branch. As I said before, I don't mind whether we go
with this solution or D104327 <https://reviews.llvm.org/D104327>, but I care that we fix it.
If nobody has a strong opinion, I'll go with the fix in this patch
because I understand it better -- I'm more familiar with libc++ than
with the release scripts.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104328/new/
https://reviews.llvm.org/D104328
Files:
libcxx/src/CMakeLists.txt
libcxxabi/src/CMakeLists.txt
libunwind/src/CMakeLists.txt
Index: libunwind/src/CMakeLists.txt
===================================================================
--- libunwind/src/CMakeLists.txt
+++ libunwind/src/CMakeLists.txt
@@ -141,6 +141,7 @@
OUTPUT_NAME "unwind"
VERSION "1.0"
SOVERSION "1"
+ POSITION_INDEPENDENT_CODE ON
)
list(APPEND LIBUNWIND_BUILD_TARGETS "unwind_shared")
if (LIBUNWIND_INSTALL_SHARED_LIBRARY)
@@ -166,6 +167,7 @@
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
LINKER_LANGUAGE C
OUTPUT_NAME "unwind"
+ POSITION_INDEPENDENT_CODE ON
)
if(LIBUNWIND_HIDE_SYMBOLS)
Index: libcxxabi/src/CMakeLists.txt
===================================================================
--- libcxxabi/src/CMakeLists.txt
+++ libcxxabi/src/CMakeLists.txt
@@ -191,6 +191,7 @@
SOVERSION "1"
VERSION "${LIBCXXABI_LIBRARY_VERSION}"
DEFINE_SYMBOL ""
+ POSITION_INDEPENDENT_CODE ON
)
list(APPEND LIBCXXABI_BUILD_TARGETS "cxxabi_shared")
@@ -243,6 +244,7 @@
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
LINK_FLAGS "${LIBCXXABI_LINK_FLAGS}"
OUTPUT_NAME "c++abi"
+ POSITION_INDEPENDENT_CODE ON
)
if(LIBCXXABI_HERMETIC_STATIC_LIBRARY)
Index: libcxx/src/CMakeLists.txt
===================================================================
--- libcxx/src/CMakeLists.txt
+++ libcxx/src/CMakeLists.txt
@@ -198,6 +198,7 @@
VERSION "${LIBCXX_ABI_VERSION}.0"
SOVERSION "${LIBCXX_ABI_VERSION}"
DEFINE_SYMBOL ""
+ POSITION_INDEPENDENT_CODE ON
)
cxx_add_common_build_flags(cxx_shared)
cxx_set_common_defines(cxx_shared)
@@ -272,6 +273,7 @@
COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
OUTPUT_NAME "c++"
+ POSITION_INDEPENDENT_CODE ON
)
cxx_add_common_build_flags(cxx_static)
cxx_set_common_defines(cxx_static)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104328.361782.patch
Type: text/x-patch
Size: 1873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210726/d17cee8b/attachment.bin>
More information about the libcxx-commits
mailing list