Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 40 changed files with 256 additions and 368 deletions.
2 changes: 1 addition & 1 deletion conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ INHERIT += "clang"
# Do not include clang in SDK unless user wants to
CLANGSDK ??= "0"

LLVMVERSION = "18.1.8"
LLVMVERSION = "19.1.0"

require conf/nonclangable.conf
require conf/nonscanable.conf
4 changes: 2 additions & 2 deletions recipes-devtools/clang/clang.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ LLVM_DIR = "llvm${LLVM_RELEASE}"

LLVM_HTTP ?= "https://github.com/llvm"

MAJOR_VER = "18"
MAJOR_VER = "19"
MINOR_VER = "1"
PATCH_VER = "8"
PATCH_VER = "0"
# could be 'rcX' or 'git' or empty ( for release )
VER_SUFFIX = ""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ec5bd3bfc9f682c90ceba06f2d76aa5234a9c846 Mon Sep 17 00:00:00 2001
From 78c27664e7ffee1bc7a8beff604860ea194e27a5 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Sun, 27 Aug 2017 10:37:49 -0700
Subject: [PATCH] libcxxabi: Find libunwind headers when
Expand All @@ -14,14 +14,14 @@ LIBCXXABI_LIBUNWIND_INCLUDES if its there in environment
Upstream-Status: Pending
Signed-off-by: Khem Raj <[email protected]>
---
libcxxabi/CMakeLists.txt | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
libcxxabi/CMakeLists.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index da998d2221dc..936b78e4d6dd 100644
index 43400c6e8d9a..cc0841112c0c 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -422,7 +422,7 @@ set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH
@@ -423,7 +423,7 @@ set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH
"Specify path to libunwind source." FORCE)

if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
Expand All @@ -30,7 +30,7 @@ index da998d2221dc..936b78e4d6dd 100644
PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES}
${LIBCXXABI_LIBUNWIND_PATH}/include
${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES}
@@ -433,15 +433,21 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
@@ -434,18 +434,23 @@ if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
NO_CMAKE_FIND_ROOT_PATH
)

Expand All @@ -47,11 +47,13 @@ index da998d2221dc..936b78e4d6dd 100644
+ include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES}")
endif()

add_custom_target(cxxabi-test-depends
COMMENT "Build dependencies required to run the libc++abi test suite.")

+set(LIBCXXABI_LIBUNWIND_INCLUDES "${LIBCXXABI_LIBUNWIND_INCLUDES}" CACHE PATH
+ "Specify path to libunwind includes." FORCE)
+set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH
+ "Specify path to libunwind source." FORCE)
+
+
# Add source code. This also contains all of the logic for deciding linker flags
# soname, etc...
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ac1643e6e68697e6ee374535dd98413c92224076 Mon Sep 17 00:00:00 2001
From 1b0fd972d7cd2d78061bcf874c177969b19eeaab Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Sun, 19 Apr 2015 15:16:23 -0700
Subject: [PATCH] compiler-rt: support a new embedded linux target
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 3d969ae73698da3518f3230f9e40cb7bd6f2e6c3 Mon Sep 17 00:00:00 2001
From 11d8cadd76aaf434556eeb9f42ee794ca72802a4 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Thu, 19 May 2016 23:11:45 -0700
Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use
Expand All @@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index bbb4e8d7c333..583e5630b03c 100644
index 2207555b03a0..c28106378bdd 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -82,7 +82,16 @@ if (COMPILER_RT_STANDALONE_BUILD)
@@ -86,7 +86,16 @@ if (COMPILER_RT_STANDALONE_BUILD)
set(CMAKE_CXX_EXTENSIONS NO)

if (NOT LLVM_RUNTIMES_BUILD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From df831369b91c38565d73b56d452186eff0a63dd4 Mon Sep 17 00:00:00 2001
From 7791c1c014b5d2f86142a87a0ede3ad1dc9aea46 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Sat, 21 May 2016 00:33:20 +0000
Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are
Expand All @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
index 6bd922eed89e..9e15466f963a 100644
index 623cdb4b6e0b..18bb48beb702 100644
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
@@ -1348,6 +1348,9 @@ TLI_DEFINE_STRING_INTERNAL("fopen")
@@ -1368,6 +1368,9 @@ TLI_DEFINE_STRING_INTERNAL("fopen")
TLI_DEFINE_SIG_INTERNAL(Ptr, Ptr, Ptr)

/// FILE *fopen64(const char *filename, const char *opentype)
Expand All @@ -27,7 +27,7 @@ index 6bd922eed89e..9e15466f963a 100644
TLI_DEFINE_ENUM_INTERNAL(fopen64)
TLI_DEFINE_STRING_INTERNAL("fopen64")
TLI_DEFINE_SIG_INTERNAL(Ptr, Ptr, Ptr)
@@ -1426,7 +1429,9 @@ TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Long, Int)
@@ -1446,7 +1449,9 @@ TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Long, Int)
TLI_DEFINE_ENUM_INTERNAL(fseeko)
TLI_DEFINE_STRING_INTERNAL("fseeko")
TLI_DEFINE_SIG_INTERNAL(Int, Ptr, IntX, Int)
Expand All @@ -38,7 +38,7 @@ index 6bd922eed89e..9e15466f963a 100644
/// int fseeko64(FILE *stream, off64_t offset, int whence)
TLI_DEFINE_ENUM_INTERNAL(fseeko64)
TLI_DEFINE_STRING_INTERNAL("fseeko64")
@@ -1443,6 +1448,9 @@ TLI_DEFINE_STRING_INTERNAL("fstat")
@@ -1463,6 +1468,9 @@ TLI_DEFINE_STRING_INTERNAL("fstat")
TLI_DEFINE_SIG_INTERNAL(Int, Int, Ptr)

/// int fstat64(int filedes, struct stat64 *buf)
Expand All @@ -48,7 +48,7 @@ index 6bd922eed89e..9e15466f963a 100644
TLI_DEFINE_ENUM_INTERNAL(fstat64)
TLI_DEFINE_STRING_INTERNAL("fstat64")
TLI_DEFINE_SIG_INTERNAL(Int, Int, Ptr)
@@ -1468,6 +1476,9 @@ TLI_DEFINE_STRING_INTERNAL("ftello")
@@ -1488,6 +1496,9 @@ TLI_DEFINE_STRING_INTERNAL("ftello")
TLI_DEFINE_SIG_INTERNAL(IntPlus, Ptr)

/// off64_t ftello64(FILE *stream)
Expand All @@ -58,7 +58,7 @@ index 6bd922eed89e..9e15466f963a 100644
TLI_DEFINE_ENUM_INTERNAL(ftello64)
TLI_DEFINE_STRING_INTERNAL("ftello64")
TLI_DEFINE_SIG_INTERNAL(Int64, Ptr)
@@ -1678,6 +1689,9 @@ TLI_DEFINE_STRING_INTERNAL("lstat")
@@ -1698,6 +1709,9 @@ TLI_DEFINE_STRING_INTERNAL("lstat")
TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr)

/// int lstat64(const char *path, struct stat64 *buf);
Expand All @@ -68,7 +68,7 @@ index 6bd922eed89e..9e15466f963a 100644
TLI_DEFINE_ENUM_INTERNAL(lstat64)
TLI_DEFINE_STRING_INTERNAL("lstat64")
TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr)
@@ -2090,6 +2104,9 @@ TLI_DEFINE_STRING_INTERNAL("stat")
@@ -2125,6 +2139,9 @@ TLI_DEFINE_STRING_INTERNAL("stat")
TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr)

/// int stat64(const char *path, struct stat64 *buf);
Expand All @@ -78,7 +78,7 @@ index 6bd922eed89e..9e15466f963a 100644
TLI_DEFINE_ENUM_INTERNAL(stat64)
TLI_DEFINE_STRING_INTERNAL("stat64")
TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr)
@@ -2315,6 +2332,9 @@ TLI_DEFINE_STRING_INTERNAL("tmpfile")
@@ -2350,6 +2367,9 @@ TLI_DEFINE_STRING_INTERNAL("tmpfile")
TLI_DEFINE_SIG_INTERNAL(Ptr)

/// FILE *tmpfile64(void)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a160c086ee25bb5db31bc497e910c3615681e948 Mon Sep 17 00:00:00 2001
From 347fa4394fc2f70ce199ef6edee17d19d64bf74a Mon Sep 17 00:00:00 2001
From: Martin Kelly <[email protected]>
Date: Fri, 19 May 2017 00:22:57 -0700
Subject: [PATCH] llvm: allow env override of exe and libdir path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From af511db3b78d27f21af09877c1c188b1c0c2ce0a Mon Sep 17 00:00:00 2001
From ff55b613cb917ba96e30ff5c0a09942e52beea7e Mon Sep 17 00:00:00 2001
From: Dan McGregor <[email protected]>
Date: Wed, 26 Apr 2017 20:29:41 -0600
Subject: [PATCH] clang: driver: Check sysroot for ldso path
Expand All @@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
index 4300a2bdff17..fe1bea2bde9d 100644
index 2265138edbff..4067f7560140 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -499,7 +499,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
@@ -510,7 +510,11 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
Triple.getEnvironment() == llvm::Triple::GNUEABIHF ||
tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard;

Expand All @@ -31,7 +31,7 @@ index 4300a2bdff17..fe1bea2bde9d 100644
Loader = HF ? "ld-linux-armhf.so.3" : "ld-linux.so.3";
break;
}
@@ -554,11 +558,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
@@ -565,11 +569,19 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
LibDir = "lib64";
Loader =
(tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
Expand All @@ -49,9 +49,9 @@ index 4300a2bdff17..fe1bea2bde9d 100644
+ LibDir = "lib";
+ }
break;
case llvm::Triple::riscv32: {
StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple);
@@ -580,6 +592,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
case llvm::Triple::riscv32:
case llvm::Triple::riscv64: {
@@ -587,6 +599,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
case llvm::Triple::sparcv9:
LibDir = "lib64";
Loader = "ld-linux.so.2";
Expand All @@ -62,7 +62,7 @@ index 4300a2bdff17..fe1bea2bde9d 100644
break;
case llvm::Triple::systemz:
LibDir = "lib";
@@ -594,6 +610,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
@@ -601,6 +617,10 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {

LibDir = X32 ? "libx32" : "lib64";
Loader = X32 ? "ld-linux-x32.so.2" : "ld-linux-x86-64.so.2";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a842a494f82f68c92a562aa40e6861f792d5b703 Mon Sep 17 00:00:00 2001
From db1a59d2537f4d843d51e0a628b8d9596fa3e1d1 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Thu, 19 May 2016 21:11:06 -0700
Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl
Expand All @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 6 insertions(+)

diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index e5e1b1d77269..7b43cde6b884 100644
index 543f3965dfd4..668b56db37c6 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -628,6 +628,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
@@ -632,6 +632,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
if (IsIAMCU)
CmdArgs.push_back("-lgloss");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 53b47e96f7c69bea46d16489dd6887561245c23f Mon Sep 17 00:00:00 2001
From 58b2cb10360b5188be51c1f535412d7fef3c1fef Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Thu, 16 Mar 2017 09:02:13 -0700
Subject: [PATCH] clang: Prepend trailing '/' to sysroot
Expand All @@ -25,10 +25,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
index fe1bea2bde9d..9cfc135ed2c0 100644
index 4067f7560140..d4b26fc986d9 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -219,7 +219,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
@@ -222,7 +222,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
Multilibs = GCCInstallation.getMultilibs();
SelectedMultilibs.assign({GCCInstallation.getMultilib()});
llvm::Triple::ArchType Arch = Triple.getArch();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From fd99d9521a7f9ce8c8de7c05a9636efa5a5c34e2 Mon Sep 17 00:00:00 2001
From b54a26dfbdef65bc829779cc84e937fe850e777e Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Thu, 16 Mar 2017 19:06:26 -0700
Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime
Expand All @@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 388030592b48..c59700b4a7ab 100644
index 20a555afb809..e6d285795337 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -15,6 +15,7 @@
Expand All @@ -27,7 +27,7 @@ index 388030592b48..c59700b4a7ab 100644
#include "clang/Config/config.h"
#include "clang/Driver/Action.h"
#include "clang/Driver/Driver.h"
@@ -595,7 +596,10 @@ StringRef ToolChain::getOSLibName() const {
@@ -619,7 +620,10 @@ StringRef ToolChain::getOSLibName() const {
}

std::string ToolChain::getCompilerRTPath() const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a310e5638205777893228a1c0853bd5494e7d02c Mon Sep 17 00:00:00 2001
From faf6d96205dad549a7d8214774927f320e3689b0 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Sat, 20 Mar 2021 16:09:16 -0700
Subject: [PATCH] clang: Define / releative gcc installation dir
Expand All @@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 7b43cde6b884..1ea6927d06f3 100644
index 668b56db37c6..e6961b023b5a 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2913,19 +2913,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
@@ -2916,19 +2916,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
// Whether this library suffix is relevant for the triple.
bool Active;
} Suffixes[] = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From bc21d17ff434af5efdb2fac86392862230c6f9e6 Mon Sep 17 00:00:00 2001
From 7c8bd8b6aeb817bd313517b00a2a54ed187986cf Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Wed, 31 Jul 2019 22:51:39 -0700
Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static
Expand All @@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 2 insertions(+)

diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index 2b916f000336..de823347a527 100644
index 019df16a909f..00d608c0c095 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -2179,6 +2179,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D,
@@ -2183,6 +2183,8 @@ static void AddUnwindLibrary(const ToolChain &TC, const Driver &D,
CmdArgs.push_back("-lunwind");
} else if (LGT == LibGccType::StaticLibGcc) {
CmdArgs.push_back("-l:libunwind.a");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a48c97d8a0f5eee9729cad03eac5be677c9963e8 Mon Sep 17 00:00:00 2001
From 4af5f0a010f3a7c3af40110b8d049486baa8b647 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <[email protected]>
Date: Thu, 26 Dec 2019 12:56:16 -0800
Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build
Expand All @@ -11,10 +11,10 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 1 insertion(+)

diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
index 55bf3be75642..71b09ec05b68 100644
index 39b4abaa0d93..a47afde7f85d 100644
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -90,6 +90,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
@@ -92,6 +92,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_TESTS=OFF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4e96e75d77d0d59399f0b8ad7aa0555e39e7b5cc Mon Sep 17 00:00:00 2001
From 23cf856d4896656d1625f7ed96c3b33aabc91cdc Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Mon, 18 Nov 2019 17:00:29 -0800
Subject: [PATCH] Check for atomic<double> intrinsics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From c0a66d4f358b24bf3acd89910e0f7fc780d16a11 Mon Sep 17 00:00:00 2001
From cd5e6c265165b4aa31d211ee961c9e0218dee7e1 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <[email protected]>
Date: Thu, 16 Jan 2020 21:16:10 +0000
Subject: [PATCH] libcxx: Add compiler runtime library to link step for libcxx
Expand All @@ -14,22 +14,22 @@ Signed-off-by: Khem Raj <[email protected]>
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 1b80625304a4..fe706c9e920f 100644
index 0dfc9647558d..08ddad95a42e 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -198,7 +198,7 @@ if (LIBCXX_ENABLE_SHARED)
@@ -200,7 +200,7 @@ if (LIBCXX_ENABLE_SHARED)
add_library(cxx_shared SHARED ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
target_include_directories(cxx_shared PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(cxx_shared PUBLIC cxx-headers
target_link_libraries(cxx_shared PUBLIC cxx-headers libcxx-libc-shared
- PRIVATE ${LIBCXX_LIBRARIES})
+ PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)")
set_target_properties(cxx_shared
PROPERTIES
COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
@@ -291,7 +291,7 @@ if (LIBCXX_ENABLE_STATIC)
@@ -293,7 +293,7 @@ if (LIBCXX_ENABLE_STATIC)
add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
target_include_directories(cxx_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(cxx_static PUBLIC cxx-headers
target_link_libraries(cxx_static PUBLIC cxx-headers libcxx-libc-static
- PRIVATE ${LIBCXX_LIBRARIES}
+ PRIVATE ${LIBCXX_LIBRARIES} "$$($$CC --print-libgcc-file-name)"
PRIVATE libcxx-abi-static)
Expand Down
Loading

0 comments on commit 5820cb9

Please sign in to comment.