summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang/0028-Add-libgcc-to-link-step-for-libcxx.patch
blob: 93165993ae815cd17c9d8e605e1685f7c5039885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 397bd558b83ce7ff3ea69c1c8fb6f36c624b9ca6 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 16 Jan 2020 21:16:10 +0000
Subject: [PATCH] Add libgcc to link step for libcxx

This corrects "undefined reference to __divti3"

Upstream-Status: Inappropriate [configuration]

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
 libcxx/src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 31cd24333a5..d8ae826d7f5 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -234,7 +234,7 @@ if (LIBCXX_ENABLE_SHARED)
     llvm_setup_rpath(cxx_shared)
   endif()
   cxx_link_system_libraries(cxx_shared)
-  target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES})
+  target_link_libraries(cxx_shared PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)")
   set_target_properties(cxx_shared
     PROPERTIES
       COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
-- 
2.13.3