[clang] [Clang][Driver][Hurd] Enable __float128 support on x86 on Hurd (PR #153925)
Pino Toscano via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 15 22:00:28 PDT 2025
https://github.com/pinotree created https://github.com/llvm/llvm-project/pull/153925
It works fine, and this makes the Hurd driver more consistent with other drivers.
>From 9187bc22e1d65ac34644e1c1bf00bf55591ceec6 Mon Sep 17 00:00:00 2001
From: Pino Toscano <toscano.pino at tiscali.it>
Date: Sat, 16 Aug 2025 06:56:17 +0200
Subject: [PATCH] [Clang][Driver][Hurd] Enable __float128 support on x86 on
Hurd
It works fine, and this makes the Hurd driver more consistent with other
drivers.
---
clang/lib/Basic/Targets/OSTargets.h | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h
index 94b018a0751d1..8d3e232dde1a5 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -325,9 +325,21 @@ class LLVM_LIBRARY_VISIBILITY HurdTargetInfo : public OSTargetInfo<Target> {
Builder.defineMacro("_REENTRANT");
if (Opts.CPlusPlus)
Builder.defineMacro("_GNU_SOURCE");
+ if (this->HasFloat128)
+ Builder.defineMacro("__FLOAT128__");
}
public:
- using OSTargetInfo<Target>::OSTargetInfo;
+ HurdTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
+ : OSTargetInfo<Target>(Triple, Opts) {
+ switch (Triple.getArch()) {
+ default:
+ break;
+ case llvm::Triple::x86:
+ case llvm::Triple::x86_64:
+ this->HasFloat128 = true;
+ break;
+ }
+ }
};
// Linux target
More information about the cfe-commits
mailing list