[llvm-branch-commits] [clang] d843bde - [clang][driver] Fix float128 diagnostics with glibc >= 2.32
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 8 19:23:31 PST 2022
Author: Timm Bäder
Date: 2022-03-08T19:22:37-08:00
New Revision: d843bde69aab7fbb3efff34229e8876b1ce80a5b
URL: https://github.com/llvm/llvm-project/commit/d843bde69aab7fbb3efff34229e8876b1ce80a5b
DIFF: https://github.com/llvm/llvm-project/commit/d843bde69aab7fbb3efff34229e8876b1ce80a5b.diff
LOG: [clang][driver] Fix float128 diagnostics with glibc >= 2.32
Fix checking for an unsupported stdlib++.
Differential Revision: https://reviews.llvm.org/D121209
(cherry picked from commit 5b7941ad7c893b4bb019e3c96b760b0f2670ccfc)
Added:
Modified:
clang/lib/Driver/ToolChains/PPCLinux.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/PPCLinux.cpp b/clang/lib/Driver/ToolChains/PPCLinux.cpp
index e480d8bd8703c..2fea262fd109c 100644
--- a/clang/lib/Driver/ToolChains/PPCLinux.cpp
+++ b/clang/lib/Driver/ToolChains/PPCLinux.cpp
@@ -76,9 +76,11 @@ bool PPCLinuxToolChain::SupportIEEEFloat128(
if (Args.hasArg(options::OPT_nostdlib, options::OPT_nostdlibxx))
return true;
+ CXXStdlibType StdLib = ToolChain::GetCXXStdlibType(Args);
bool HasUnsupportedCXXLib =
- ToolChain::GetCXXStdlibType(Args) == CST_Libcxx &&
- GCCInstallation.getVersion().isOlderThan(12, 1, 0);
+ StdLib == CST_Libcxx ||
+ (StdLib == CST_Libstdcxx &&
+ GCCInstallation.getVersion().isOlderThan(12, 1, 0));
return GlibcSupportsFloat128(Linux::getDynamicLinker(Args)) &&
!(D.CCCIsCXX() && HasUnsupportedCXXLib);
More information about the llvm-branch-commits
mailing list