0014-libcxx-Add-compiler-runtime-library-to-link-step-for.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From fbe1464c92e5b4e078390c040f0a7f446cda81f0 Mon Sep 17 00:00:00 2001
  2. From: Jeremy Puhlman <jpuhlman@mvista.com>
  3. Date: Thu, 16 Jan 2020 21:16:10 +0000
  4. Subject: [PATCH] libcxx: Add compiler runtime library to link step for libcxx
  5. This corrects "undefined reference to __divti3"
  6. Upstream-Status: Inappropriate [configuration]
  7. Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
  8. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  9. ---
  10. libcxx/src/CMakeLists.txt | 4 ++--
  11. 1 file changed, 2 insertions(+), 2 deletions(-)
  12. diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
  13. index 9ff2a62e9394..e76625d5a5ac 100644
  14. --- a/libcxx/src/CMakeLists.txt
  15. +++ b/libcxx/src/CMakeLists.txt
  16. @@ -200,7 +200,7 @@ if (LIBCXX_ENABLE_SHARED)
  17. add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
  18. target_include_directories(cxx_shared PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
  19. target_link_libraries(cxx_shared PUBLIC cxx-headers
  20. - PRIVATE ${LIBCXX_LIBRARIES})
  21. + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)")
  22. set_target_properties(cxx_shared
  23. PROPERTIES
  24. COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
  25. @@ -294,7 +294,7 @@ if (LIBCXX_ENABLE_STATIC)
  26. add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
  27. target_include_directories(cxx_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
  28. target_link_libraries(cxx_static PUBLIC cxx-headers
  29. - PRIVATE ${LIBCXX_LIBRARIES}
  30. + PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)"
  31. PRIVATE libcxx-abi-static)
  32. set_target_properties(cxx_static
  33. PROPERTIES