[clang] [Arch][X86] Raising FreeBSD low requirement to pentium4 (PR #183554)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 20 05:12:06 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-driver

Author: aokblast

<details>
<summary>Changes</summary>

Using pentium4 by default allows us to build 32bit compiler-rt.builtins on x86_64 platform since _Float16 requires SSE2, which is only available after pentium3. Since FreeBSD does not support x86 after 16-CURRENT. It makes sense to put the x86_64 compatibility first.

In FreeBSD's base, we set the target to i686 with -sse2 to build 32bit compiler-rt.builtins. But we don't ship x86 compiler-rt.builtins in our llvm port.

---
Full diff: https://github.com/llvm/llvm-project/pull/183554.diff


1 Files Affected:

- (modified) clang/lib/Driver/ToolChains/Arch/X86.cpp (-2) 


``````````diff
diff --git a/clang/lib/Driver/ToolChains/Arch/X86.cpp b/clang/lib/Driver/ToolChains/Arch/X86.cpp
index 61d512f9e093f..a39f4d32d970c 100644
--- a/clang/lib/Driver/ToolChains/Arch/X86.cpp
+++ b/clang/lib/Driver/ToolChains/Arch/X86.cpp
@@ -108,8 +108,6 @@ std::string x86::getX86TargetCPU(const Driver &D, const ArgList &Args,
   case llvm::Triple::Haiku:
   case llvm::Triple::OpenBSD:
     return "i586";
-  case llvm::Triple::FreeBSD:
-    return "i686";
   default:
     // Fallback to p4.
     return "pentium4";

``````````

</details>


https://github.com/llvm/llvm-project/pull/183554


More information about the cfe-commits mailing list