[clang] 5b7941a - [clang][driver] Fix float128 diagnostics with glibc >= 2.32
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 8 07:15:04 PST 2022
Author: Timm Bäder
Date: 2022-03-08T15:49:01+01:00
New Revision: 5b7941ad7c893b4bb019e3c96b760b0f2670ccfc
URL: https://github.com/llvm/llvm-project/commit/5b7941ad7c893b4bb019e3c96b760b0f2670ccfc
DIFF: https://github.com/llvm/llvm-project/commit/5b7941ad7c893b4bb019e3c96b760b0f2670ccfc.diff
LOG: [clang][driver] Fix float128 diagnostics with glibc >= 2.32
Fix checking for an unsupported stdlib++.
Differential Revision: https://reviews.llvm.org/D121209
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 cfe-commits
mailing list