mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-12 00:10:52 +00:00
23 lines
928 B
Diff
23 lines
928 B
Diff
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp~ b/clang/lib/Driver/ToolChains/Gnu.cpp
|
|
index 2ad4509..4d0b060 100644
|
|
--- a/clang/lib/Driver/ToolChains/Gnu.cpp~
|
|
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
|
|
@@ -483,7 +483,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|
if (OnlyLibstdcxxStatic)
|
|
CmdArgs.push_back("-Bdynamic");
|
|
}
|
|
- CmdArgs.push_back("-lm");
|
|
}
|
|
// Silence warnings when linking C code with a C++ '-stdlib' argument.
|
|
Args.ClaimAllArgs(options::OPT_stdlib_EQ);
|
|
@@ -513,6 +512,9 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
|
|
|
|
+ if (D.CCCIsCXX())
|
|
+ CmdArgs.push_back("-lm");
|
|
+
|
|
// LLVM support for atomics on 32-bit SPARC V8+ is incomplete, so
|
|
// forcibly link with libatomic as a workaround.
|
|
// TODO: Issue #41880 and D118021.
|