summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch')
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch b/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch
new file mode 100644
index 00000000000..9d722a57d2a
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-4.3.0_strip-usr-include.patch
@@ -0,0 +1,16 @@
+On Gentoo, ROCM_PATH=/usr we do not need to set -I${ROCM_PATH}/include.
+Actually it is harmful to the `include_next`s.
+
+Index: ROCm-CompilerSupport-rocm-4.3.0/lib/comgr/src/comgr-compiler.cpp
+===================================================================
+--- comgr/src/comgr-compiler.cpp
++++ comgr/src/comgr-compiler.cpp
+@@ -927,8 +927,6 @@ AMDGPUCompiler::addTargetIdentifierFlags
+
+ amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
+ HIPIncludePath = (Twine(env::getHIPPath()) + "/include").str();
+- // HIP headers depend on hsa.h which is in ROCM_DIR/include.
+- ROCMIncludePath = (Twine(env::getROCMPath()) + "/include").str();
+ ClangIncludePath =
+ (Twine(env::getLLVMPath()) + "/lib/clang/" + CLANG_VERSION_STRING).str();
+ ClangIncludePath2 = (Twine(env::getLLVMPath()) + "/lib/clang/" +