[clang] Revert "[Driver][Haiku] Add /boot/system/develop/headers/gcc/include header path (#140189)" (PR #245206)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 23 03:58:23 PST 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-driver
Author: Brad Smith (brad0)
<details>
<summary>Changes</summary>
This reverts commit a23d18726d32172f855d451375df2816b815c191.
/boot/system/develop/headers/gcc/include is GCC's internal header
directory. Clang has its own copies of these headers in its resource
directory and should not search GCC's. With this path, include_next in
Clang's stdatomic.h picks up GCC's stdatomic.h, which breaks C11 atomics.
https://github.com/haikuports/haikuports/issues/15124
---
Full diff: https://github.com/llvm/llvm-project/pull/245206.diff
2 Files Affected:
- (modified) clang/lib/Driver/ToolChains/Haiku.cpp (-2)
- (modified) clang/test/Driver/haiku.c (-1)
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Haiku.cpp b/clang/lib/Driver/ToolChains/Haiku.cpp
index 36b07f888cc66..605fd793e765a 100644
--- a/clang/lib/Driver/ToolChains/Haiku.cpp
+++ b/clang/lib/Driver/ToolChains/Haiku.cpp
@@ -262,8 +262,6 @@ void Haiku::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
"/boot/system/develop/headers/gnu"));
addSystemInclude(DriverArgs, CC1Args, concat(D.SysRoot,
"/boot/system/develop/headers/posix"));
- addSystemInclude(DriverArgs, CC1Args, concat(D.SysRoot,
- "/boot/system/develop/headers/gcc/include"));
addSystemInclude(DriverArgs, CC1Args, concat(D.SysRoot,
"/boot/system/develop/headers"));
}
diff --git a/clang/test/Driver/haiku.c b/clang/test/Driver/haiku.c
index 8316ae83bd0f0..3d2529942ee65 100644
--- a/clang/test/Driver/haiku.c
+++ b/clang/test/Driver/haiku.c
@@ -35,7 +35,6 @@
// CHECK-C-HEADER-PATH: "-internal-isystem" "/boot/system/develop/headers/glibc"
// CHECK-C-HEADER-PATH: "-internal-isystem" "/boot/system/develop/headers/gnu"
// CHECK-C-HEADER-PATH: "-internal-isystem" "/boot/system/develop/headers/posix"
-// CHECK-C-HEADER-PATH: "-internal-isystem" "/boot/system/develop/headers/gcc/include"
// CHECK-C-HEADER-PATH: "-internal-isystem" "/boot/system/develop/headers"
// Check x86_64-unknown-haiku, X86_64
``````````
</details>
https://github.com/llvm/llvm-project/pull/245206
More information about the cfe-commits
mailing list