1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- From a096db3cc09b352c027799ae05feeca468a0e6e2 Mon Sep 17 00:00:00 2001
- From: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- Date: Tue, 9 Nov 2021 10:24:03 +0800
- Subject: [PATCH 15/34] libcxx: Add compiler runtime library to link step for
- libcxx
- This corrects "undefined reference to __divti3"
- Upstream-Status: Inappropriate [configuration]
- Rebased to LLVM 14.0.0 by Jun Yuan Tan
- Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
- Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Signed-off-by: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- ---
- libcxx/src/CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
- diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
- index 0bcfb1776271..488206d8324d 100644
- --- a/libcxx/src/CMakeLists.txt
- +++ b/libcxx/src/CMakeLists.txt
- @@ -196,7 +196,7 @@ split_list(LIBCXX_LINK_FLAGS)
- if (LIBCXX_ENABLE_SHARED)
- add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
- target_link_libraries(cxx_shared PUBLIC cxx-headers
- - PRIVATE ${LIBCXX_LIBRARIES})
- + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)")
- set_target_properties(cxx_shared
- PROPERTIES
- COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
- @@ -274,7 +274,7 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
- if (LIBCXX_ENABLE_STATIC)
- add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
- target_link_libraries(cxx_static PUBLIC cxx-headers
- - PRIVATE ${LIBCXX_LIBRARIES})
- + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)")
- set_target_properties(cxx_static
- PROPERTIES
- COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
- --
- 2.33.1
|