summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch')
-rw-r--r--recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch b/recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch
new file mode 100644
index 0000000..9cdce5b
--- /dev/null
+++ b/recipes-devtools/clang/clang/0022-libcxx-Add-compiler-runtime-library-to-link-step-for.patch
@@ -0,0 +1,37 @@
1From ecde714829d04ed0a3ee30827e60502aabc516b0 Mon Sep 17 00:00:00 2001
2From: Jeremy Puhlman <jpuhlman@mvista.com>
3Date: Thu, 16 Jan 2020 21:16:10 +0000
4Subject: [PATCH] libcxx: Add compiler runtime library to link step for libcxx
5
6This corrects "undefined reference to __divti3"
7
8Upstream-Status: Inappropriate [configuration]
9
10Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 libcxx/src/CMakeLists.txt | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
17index 120505fe18d..b337fa2e403 100644
18--- a/libcxx/src/CMakeLists.txt
19+++ b/libcxx/src/CMakeLists.txt
20@@ -160,7 +160,7 @@ if (LIBCXX_ENABLE_SHARED)
21 if(COMMAND llvm_setup_rpath)
22 llvm_setup_rpath(cxx_shared)
23 endif()
24- target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES})
25+ target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)")
26 set_target_properties(cxx_shared
27 PROPERTIES
28 COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
29@@ -238,7 +238,7 @@ endif()
30 # Build the static library.
31 if (LIBCXX_ENABLE_STATIC)
32 add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
33- target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES})
34+ target_link_libraries(cxx_static PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)")
35 set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
36 set_target_properties(cxx_static
37 PROPERTIES