diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-03-04 14:52:45 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-03-04 15:00:36 +0100 |
commit | 32aac875b800a161f22300eb4154124056d37e8f (patch) | |
tree | d80a5053c048c53e207f87e129b1b9d6e5ede189 /sys-devel/llvm-roc/files | |
parent | app-text/recode: Stabilize 3.7.13 ppc64, #899268 (diff) | |
download | gentoo-32aac875b800a161f22300eb4154124056d37e8f.tar.gz gentoo-32aac875b800a161f22300eb4154124056d37e8f.tar.bz2 gentoo-32aac875b800a161f22300eb4154124056d37e8f.zip |
sys-devel/llvm-roc: Remove last-rited package
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sys-devel/llvm-roc/files')
5 files changed, 0 insertions, 288 deletions
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch deleted file mode 100644 index f14ec4ac0db2..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch +++ /dev/null @@ -1,29 +0,0 @@ -Author: Wilfried (justxi) Holzke - -Adopted from https://github.com/justxi/rocm/blob/master/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch - -Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -=================================================================== ---- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp -+++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -@@ -326,11 +326,6 @@ void RocmInstallationDetector::AddHIPInc - // - // ROCm 3.5 does not fully support the wrapper headers. Therefore it needs - // a workaround. -- SmallString<128> P(D.ResourceDir); -- if (UsesRuntimeWrapper) -- llvm::sys::path::append(P, "include", "cuda_wrappers"); -- CC1Args.push_back("-internal-isystem"); -- CC1Args.push_back(DriverArgs.MakeArgString(P)); - } - - if (DriverArgs.hasArg(options::OPT_nogpuinc)) -@@ -341,8 +336,6 @@ void RocmInstallationDetector::AddHIPInc - return; - } - -- CC1Args.push_back("-internal-isystem"); -- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath())); - if (UsesRuntimeWrapper) - CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"}); - } diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch deleted file mode 100644 index 0f3398951b07..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -Naur a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h ---- a/include/llvm/Support/raw_ostream.h 2021-05-22 19:56:44.779955686 +0200 -+++ b/include/llvm/Support/raw_ostream.h 2021-05-22 20:00:49.449954752 +0200 -@@ -610,9 +610,7 @@ - /// See raw_ostream::write_impl. - void write_impl(const char *Ptr, size_t Size) override; - -- /// Return the current position within the stream, not counting the bytes -- /// currently in the buffer. -- uint64_t current_pos() const override { return OS.size(); } -+ uint64_t current_pos() const override; - - public: - explicit raw_string_ostream(std::string &O) : OS(O) { -diff -Naur a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp ---- a/lib/Support/raw_ostream.cpp 2021-05-22 19:59:05.651955148 +0200 -+++ b/lib/Support/raw_ostream.cpp 2021-05-22 20:01:22.929954625 +0200 -@@ -938,6 +938,10 @@ - // raw_string_ostream - //===----------------------------------------------------------------------===// - -+/// Return the current position within the stream, not counting the bytes -+/// currently in the buffer. -+uint64_t raw_string_ostream::current_pos() const { return OS.size(); } -+ - raw_string_ostream::~raw_string_ostream() { - flush(); - } diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch deleted file mode 100644 index f57989c8c8a3..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-add_GNU-stack.patch +++ /dev/null @@ -1,14 +0,0 @@ -Add .note.GNU-stack to mitigate QA notice according to -https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart -=================================================================== ---- llvm-project-rocm-5.0.0.orig/compiler-rt/lib/orc/elfnix_tls.x86-64.S -+++ llvm-project-rocm-5.0.0/compiler-rt/lib/orc/elfnix_tls.x86-64.S -@@ -61,4 +61,8 @@ ___orc_rt_elfnix_tls_get_addr: - popq %rbp - ret - -+#if defined(__linux__) && defined(__ELF__) -+ .section .note.GNU-stack,"",%progbits -+#endif -+ - #endif // defined(__x86_64__) diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch deleted file mode 100644 index 614a16d1e810..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-hip-location.patch +++ /dev/null @@ -1,206 +0,0 @@ -replace hardcoded hip finder with Gentoo paths. - -It is not necessary to check HIP runtime each time. - -Author: Benda Xu <heroxbd@gentoo.org> -Author: Yiyang Wu <xgreenlandforwyy@gmail.com> - -Index: llvm-project-rocm-5.0.1/clang/lib/Driver/ToolChains/AMDGPU.cpp -=================================================================== ---- llvm-project-rocm-5.0.1.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp -+++ llvm-project-rocm-5.0.1/clang/lib/Driver/ToolChains/AMDGPU.cpp -@@ -169,139 +169,8 @@ bool RocmInstallationDetector::parseHIPV - /// cached and populated only once. - const SmallVectorImpl<RocmInstallationDetector::Candidate> & - RocmInstallationDetector::getInstallationPathCandidates() { -- -- // Return the cached candidate list if it has already been populated. -- if (!ROCmSearchDirs.empty()) -- return ROCmSearchDirs; -- -- auto DoPrintROCmSearchDirs = [&]() { -- if (PrintROCmSearchDirs) -- for (auto Cand : ROCmSearchDirs) { -- llvm::errs() << "ROCm installation search path"; -- if (Cand.isSPACK()) -- llvm::errs() << " (Spack " << Cand.SPACKReleaseStr << ")"; -- llvm::errs() << ": " << Cand.Path << '\n'; -- } -- }; -- -- // For candidate specified by --rocm-path we do not do strict check, i.e., -- // checking existence of HIP version file and device library files. -- if (!RocmPathArg.empty()) { -- ROCmSearchDirs.emplace_back(RocmPathArg.str()); -- DoPrintROCmSearchDirs(); -- return ROCmSearchDirs; -- } else if (const char *RocmPathEnv = ::getenv("ROCM_PATH")) { -- if (!StringRef(RocmPathEnv).empty()) { -- ROCmSearchDirs.emplace_back(RocmPathEnv); -- DoPrintROCmSearchDirs(); -- return ROCmSearchDirs; -- } -- } -- -- // Try to find relative to the compiler binary. -- const char *InstallDir = D.getInstalledDir(); -- -- // Check both a normal Unix prefix position of the clang binary, as well as -- // the Windows-esque layout the ROCm packages use with the host architecture -- // subdirectory of bin. -- auto DeduceROCmPath = [](StringRef ClangPath) { -- // Strip off directory (usually bin) -- StringRef ParentDir = llvm::sys::path::parent_path(ClangPath); -- StringRef ParentName = llvm::sys::path::filename(ParentDir); -- -- // Some builds use bin/{host arch}, so go up again. -- if (ParentName == "bin") { -- ParentDir = llvm::sys::path::parent_path(ParentDir); -- ParentName = llvm::sys::path::filename(ParentDir); -- } -- -- // Detect ROCm packages built with SPACK. -- // clang is installed at -- // <rocm_root>/llvm-amdgpu-<rocm_release_string>-<hash>/bin directory. -- // We only consider the parent directory of llvm-amdgpu package as ROCm -- // installation candidate for SPACK. -- if (ParentName.startswith("llvm-amdgpu-")) { -- auto SPACKPostfix = -- ParentName.drop_front(strlen("llvm-amdgpu-")).split('-'); -- auto SPACKReleaseStr = SPACKPostfix.first; -- if (!SPACKReleaseStr.empty()) { -- ParentDir = llvm::sys::path::parent_path(ParentDir); -- return Candidate(ParentDir.str(), /*StrictChecking=*/true, -- SPACKReleaseStr); -- } -- } -- -- // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin -- // Some versions of the aomp package install to /opt/rocm/aomp/bin -- if (ParentName == "llvm" || ParentName.startswith("aomp")) -- ParentDir = llvm::sys::path::parent_path(ParentDir); -- // Some versions of the aomp package install to /opt/rocm/aomp/bin -- // and it seems ParentDir is already pointing to correct place. -- return Candidate(ParentDir.str(), /*StrictChecking=*/true); -- }; -- -- // Deduce ROCm path by the path used to invoke clang. Do not resolve symbolic -- // link of clang itself. -- ROCmSearchDirs.emplace_back(DeduceROCmPath(InstallDir)); -- -- // Deduce ROCm path by the real path of the invoked clang, resolving symbolic -- // link of clang itself. -- llvm::SmallString<256> RealClangPath; -- llvm::sys::fs::real_path(D.getClangProgramPath(), RealClangPath); -- auto ParentPath = llvm::sys::path::parent_path(RealClangPath); -- if (ParentPath != InstallDir) -- ROCmSearchDirs.emplace_back(DeduceROCmPath(ParentPath)); -- -- // Device library may be installed in clang or resource directory. -- auto ClangRoot = llvm::sys::path::parent_path(InstallDir); -- auto RealClangRoot = llvm::sys::path::parent_path(ParentPath); -- ROCmSearchDirs.emplace_back(ClangRoot.str(), /*StrictChecking=*/true); -- if (RealClangRoot != ClangRoot) -- ROCmSearchDirs.emplace_back(RealClangRoot.str(), /*StrictChecking=*/true); -- ROCmSearchDirs.emplace_back(D.ResourceDir, -- /*StrictChecking=*/true); -- -- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm", -- /*StrictChecking=*/true); -- -- // Find the latest /opt/rocm-{release} directory. -- std::error_code EC; -- std::string LatestROCm; -- llvm::VersionTuple LatestVer; -- // Get ROCm version from ROCm directory name. -- auto GetROCmVersion = [](StringRef DirName) { -- llvm::VersionTuple V; -- std::string VerStr = DirName.drop_front(strlen("rocm-")).str(); -- // The ROCm directory name follows the format of -- // rocm-{major}.{minor}.{subMinor}[-{build}] -- std::replace(VerStr.begin(), VerStr.end(), '-', '.'); -- V.tryParse(VerStr); -- return V; -- }; -- for (llvm::vfs::directory_iterator -- File = D.getVFS().dir_begin(D.SysRoot + "/opt", EC), -- FileEnd; -- File != FileEnd && !EC; File.increment(EC)) { -- llvm::StringRef FileName = llvm::sys::path::filename(File->path()); -- if (!FileName.startswith("rocm-")) -- continue; -- if (LatestROCm.empty()) { -- LatestROCm = FileName.str(); -- LatestVer = GetROCmVersion(LatestROCm); -- continue; -- } -- auto Ver = GetROCmVersion(FileName); -- if (LatestVer < Ver) { -- LatestROCm = FileName.str(); -- LatestVer = Ver; -- } -- } -- if (!LatestROCm.empty()) -- ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm, -- /*StrictChecking=*/true); -- -- DoPrintROCmSearchDirs(); -- return ROCmSearchDirs; -+ ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true); -+ return ROCmSearchDirs; - } - - RocmInstallationDetector::RocmInstallationDetector( -@@ -410,7 +279,7 @@ void RocmInstallationDetector::detectDev - // - ${ROCM_ROOT}/lib/bitcode/* - // so try to detect these layouts. - static constexpr std::array<const char *, 2> SubDirsList[] = { -- {"amdgcn", "bitcode"}, -+ {"lib/amdgcn", "bitcode"}, - {"lib", ""}, - {"lib", "bitcode"}, - }; -@@ -433,42 +302,7 @@ void RocmInstallationDetector::detectDev - } - - void RocmInstallationDetector::detectHIPRuntime() { -- SmallVector<Candidate, 4> HIPSearchDirs; -- if (!HIPPathArg.empty()) -- HIPSearchDirs.emplace_back(HIPPathArg.str(), /*StrictChecking=*/true); -- else -- HIPSearchDirs.append(getInstallationPathCandidates()); -- auto &FS = D.getVFS(); -- -- for (const auto &Candidate : HIPSearchDirs) { -- InstallPath = Candidate.Path; -- if (InstallPath.empty() || !FS.exists(InstallPath)) -- continue; -- // HIP runtime built by SPACK is installed to -- // <rocm_root>/hip-<rocm_release_string>-<hash> directory. -- auto SPACKPath = findSPACKPackage(Candidate, "hip"); -- InstallPath = SPACKPath.empty() ? InstallPath : SPACKPath; -- -- BinPath = InstallPath; -- llvm::sys::path::append(BinPath, "bin"); -- IncludePath = InstallPath; -- llvm::sys::path::append(IncludePath, "include"); -- LibPath = InstallPath; -- llvm::sys::path::append(LibPath, "lib"); -- -- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile = -- FS.getBufferForFile(BinPath + "/.hipVersion"); -- if (!VersionFile && Candidate.StrictChecking) -- continue; -- -- if (HIPVersionArg.empty() && VersionFile) -- if (parseHIPVersionFile((*VersionFile)->getBuffer())) -- continue; -- -- HasHIPRuntime = true; -- return; -- } -- HasHIPRuntime = false; -+ HasHIPRuntime = true; - } - - void RocmInstallationDetector::print(raw_ostream &OS) const { diff --git a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch b/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch deleted file mode 100644 index 80598c6f990d..000000000000 --- a/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch +++ /dev/null @@ -1,11 +0,0 @@ -LLVMOffloadArch should link libdl to fix undefined symbol 'dlsym' when linking ---- llvm.orig/lib/OffloadArch/offload-arch/CMakeLists.txt -+++ llvm/lib/OffloadArch/offload-arch/CMakeLists.txt -@@ -3,6 +3,7 @@ add_llvm_tool(offload-arch - ${CMAKE_CURRENT_SOURCE_DIR}/offload-arch.cpp - DEPENDS generated-table LLVMOffloadArch - ) -+target_link_libraries(LLVMOffloadArch PRIVATE ${CMAKE_DL_LIBS}) - target_link_libraries(offload-arch PRIVATE LLVMOffloadArch) - - if(CMAKE_HOST_UNIX) |