1 |
commit: fc7f769a1d485d97e35eed22615bad218fc392d0 |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 2 12:55:52 2020 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 2 12:55:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc7f769a |
7 |
|
8 |
dev-libs/rocm-comgr: Remove unused patches |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
12 |
|
13 |
.../files/rocm-comgr-2.6.0-correctly-install.patch | 44 ------ |
14 |
.../files/rocm-comgr-2.6.0-dependencies.patch | 38 ----- |
15 |
.../files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch | 30 ---- |
16 |
.../rocm-comgr-2.7.0-llvm-interface-change.patch | 176 --------------------- |
17 |
4 files changed, 288 deletions(-) |
18 |
|
19 |
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-correctly-install.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-correctly-install.patch |
20 |
deleted file mode 100644 |
21 |
index 74206760f39..00000000000 |
22 |
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-correctly-install.patch |
23 |
+++ /dev/null |
24 |
@@ -1,44 +0,0 @@ |
25 |
-From 98f589636729b1e25625db6880fbd7820dcf9e40 Mon Sep 17 00:00:00 2001 |
26 |
-From: Craig Andrews <candrews@××××××××××××.com> |
27 |
-Date: Wed, 31 Jul 2019 10:04:11 -0400 |
28 |
-Subject: [PATCH] Install to standard locations using GNUInstallDirs |
29 |
- |
30 |
-Some distributions require 64 bit libraries to be installed to lib64, for example. |
31 |
-Using GNUInstallDirs ensures that files are installed to the expected locations. |
32 |
---- |
33 |
- CMakeLists.txt | 8 +++++--- |
34 |
- 1 file changed, 5 insertions(+), 3 deletions(-) |
35 |
- |
36 |
-diff --git a/CMakeLists.txt b/CMakeLists.txt |
37 |
-index 454b830..a89af16 100644 |
38 |
---- a/CMakeLists.txt |
39 |
-+++ b/CMakeLists.txt |
40 |
-@@ -1,5 +1,7 @@ |
41 |
- cmake_minimum_required(VERSION 3.2.0) |
42 |
- |
43 |
-+include (GNUInstallDirs) |
44 |
-+ |
45 |
- # Build ROCM-Compiler-Support with ccache if the package is present. |
46 |
- set(ROCM_COMPILER_SUPPORT_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build") |
47 |
- if(ROCM_COMPILER_SUPPORT_CCACHE_BUILD) |
48 |
-@@ -146,17 +148,17 @@ configure_file("cmake/${AMD_COMGR_CONFIG_NAME}.in" |
49 |
- |
50 |
- install(TARGETS amd_comgr |
51 |
- EXPORT amd_comgr_export |
52 |
-- DESTINATION lib) |
53 |
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
54 |
- |
55 |
- install(FILES |
56 |
- "include/amd_comgr.h" |
57 |
-- DESTINATION include) |
58 |
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) |
59 |
- |
60 |
- install(FILES |
61 |
- "README.md" |
62 |
- "LICENSE.txt" |
63 |
- "NOTICES.txt" |
64 |
-- DESTINATION share/amd_comgr) |
65 |
-+ DESTINATION ${CMAKE_INSTALL_DATADIR}/amd_comgr) |
66 |
- |
67 |
- # Generate the install-tree package. |
68 |
- set(AMD_COMGR_PREFIX_CODE " |
69 |
|
70 |
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch |
71 |
deleted file mode 100644 |
72 |
index bce19d168b0..00000000000 |
73 |
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-dependencies.patch |
74 |
+++ /dev/null |
75 |
@@ -1,38 +0,0 @@ |
76 |
-https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/19 |
77 |
- |
78 |
---- comgr/CMakeLists.old 2019-07-19 17:19:26.080276421 +0200 |
79 |
-+++ comgr/CMakeLists.txt 2019-07-19 18:17:25.780163592 +0200 |
80 |
-@@ -185,7 +185,11 @@ |
81 |
- include_directories(./yaml-cpp/include) |
82 |
- |
83 |
- set(CLANG_LIBS |
84 |
-- clangFrontendTool) |
85 |
-+ clangFrontendTool |
86 |
-+ clangFrontend |
87 |
-+ clangBasic |
88 |
-+ clangDriver |
89 |
-+ clangSerialization) |
90 |
- |
91 |
- set(LLD_LIBS |
92 |
- lldELF |
93 |
-@@ -193,8 +197,19 @@ |
94 |
- |
95 |
- llvm_map_components_to_libnames(LLVM_LIBS |
96 |
- ${LLVM_TARGETS_TO_BUILD} |
97 |
-+ Option |
98 |
- DebugInfoDWARF |
99 |
-- Symbolize) |
100 |
-+ Symbolize |
101 |
-+ Support |
102 |
-+ Object |
103 |
-+ BitWriter |
104 |
-+ MC |
105 |
-+ MCParser |
106 |
-+ MCDisassembler |
107 |
-+ Core |
108 |
-+ IRReader |
109 |
-+ CodeGen |
110 |
-+ Linker) |
111 |
- |
112 |
- target_link_libraries(amd_comgr |
113 |
- PUBLIC |
114 |
|
115 |
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch |
116 |
deleted file mode 100644 |
117 |
index d61f4c2a200..00000000000 |
118 |
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.6.0-unbundle-yaml-cpp.patch |
119 |
+++ /dev/null |
120 |
@@ -1,30 +0,0 @@ |
121 |
-diff --git a/lib/comgr/CMakeLists.txt b/lib/comgr/CMakeLists.txt |
122 |
-index 454b830..70e2526 100644 |
123 |
---- a/CMakeLists.txt |
124 |
-+++ b/CMakeLists.txt |
125 |
-@@ -90,12 +90,8 @@ if (UNIX) |
126 |
- -Wl,--no-undefined) |
127 |
- endif() |
128 |
- endif() |
129 |
-- # FIXME: Remove when yaml-cpp is removed from the build. |
130 |
-- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") |
131 |
- else() |
132 |
- list(APPEND AMD_COMGR_PRIVATE_COMPILE_OPTIONS "/W0" "/wd4244") |
133 |
-- # FIXME: Make this private once yaml-cpp is removed from the build. |
134 |
-- add_definitions(-D_HAS_EXCEPTIONS=0) |
135 |
- endif() |
136 |
- |
137 |
- # Windows is strict about visibility of exports in shared libraries, so we ask |
138 |
-@@ -179,10 +175,8 @@ install(EXPORT amd_comgr_export |
139 |
- DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}" |
140 |
- FILE "${AMD_COMGR_TARGETS_NAME}") |
141 |
- |
142 |
--set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE) |
143 |
--set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE) |
144 |
--add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL) |
145 |
--include_directories(./yaml-cpp/include) |
146 |
-+find_package(yaml-cpp REQUIRED) |
147 |
-+include_directories(${YAML_CPP_INCLUDE_DIR}) |
148 |
- |
149 |
- set(CLANG_LIBS |
150 |
- clangFrontendTool) |
151 |
|
152 |
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-2.7.0-llvm-interface-change.patch b/dev-libs/rocm-comgr/files/rocm-comgr-2.7.0-llvm-interface-change.patch |
153 |
deleted file mode 100644 |
154 |
index dc8ed42fc46..00000000000 |
155 |
--- a/dev-libs/rocm-comgr/files/rocm-comgr-2.7.0-llvm-interface-change.patch |
156 |
+++ /dev/null |
157 |
@@ -1,176 +0,0 @@ |
158 |
-From a73e4ce7c686787840454e206a17973685b03e62 Mon Sep 17 00:00:00 2001 |
159 |
-From: Michael LIAO <michaelhongbin.liao@×××.com> |
160 |
-Date: Thu, 15 Aug 2019 13:25:58 -0400 |
161 |
-Subject: [PATCH] Fix comgr build due to LLVM interface change. |
162 |
- |
163 |
-Change-Id: I66c2203f09b683dd06807860eeb5f517cd200f0e |
164 |
---- |
165 |
- src/comgr-objdump.cpp | 68 +++++++++++++++++++++++---------- |
166 |
- 1 file changed, 47 insertions(+), 21 deletions(-) |
167 |
- |
168 |
-diff --git a/src/comgr-objdump.cpp b/src/comgr-objdump.cpp |
169 |
-index bf490b6..59a9d05 100644 |
170 |
---- a/src/comgr-objdump.cpp |
171 |
-+++ b/src/comgr-objdump.cpp |
172 |
-@@ -307,15 +307,18 @@ class SectionFilter { |
173 |
- FilterPredicate Predicate; |
174 |
- llvm::object::ObjectFile const &Object; |
175 |
- }; |
176 |
-+ |
177 |
- SectionFilter ToolSectionFilter(llvm::object::ObjectFile const &O) { |
178 |
- return SectionFilter( |
179 |
- [](llvm::object::SectionRef const &S) { |
180 |
- if (FilterSections.empty()) |
181 |
- return true; |
182 |
-- llvm::StringRef String; |
183 |
-- std::error_code error = S.getName(String); |
184 |
-- if (error) |
185 |
-+ Expected<StringRef> SecNameOrErr = S.getName(); |
186 |
-+ if (!SecNameOrErr) { |
187 |
-+ consumeError(SecNameOrErr.takeError()); |
188 |
- return false; |
189 |
-+ } |
190 |
-+ StringRef String = *SecNameOrErr; |
191 |
- return is_contained(FilterSections, String); |
192 |
- }, |
193 |
- O); |
194 |
-@@ -394,6 +397,18 @@ report_error(StringRef ArchiveName, const object::Archive::Child &C, |
195 |
- report_error(ArchiveName, NameOrErr.get(), std::move(E), ArchitectureName); |
196 |
- } |
197 |
- |
198 |
-+static LLVM_ATTRIBUTE_NORETURN void report_error(llvm::Error E, |
199 |
-+ StringRef File) { |
200 |
-+ report_error(File, std::move(E)); |
201 |
-+} |
202 |
-+ |
203 |
-+template <typename T, typename... Ts> |
204 |
-+T unwrapOrError(Expected<T> EO, Ts &&... Args) { |
205 |
-+ if (EO) |
206 |
-+ return std::move(*EO); |
207 |
-+ report_error(EO.takeError(), std::forward<Ts>(Args)...); |
208 |
-+} |
209 |
-+ |
210 |
- static const Target *getTarget(const ObjectFile *Obj = nullptr) { |
211 |
- // Figure out the target triple. |
212 |
- llvm::Triple TheTriple("unknown-unknown-unknown"); |
213 |
-@@ -822,13 +837,13 @@ static void printRelocationTargetName(const MachOObjectFile *O, |
214 |
- for (const SectionRef &Section : ToolSectionFilter(*O)) { |
215 |
- std::error_code ec; |
216 |
- |
217 |
-- StringRef Name; |
218 |
- uint64_t Addr = Section.getAddress(); |
219 |
- if (Addr != Val) |
220 |
- continue; |
221 |
-- if ((ec = Section.getName(Name))) |
222 |
-- report_error(O->getFileName(), ec); |
223 |
-- fmt << Name; |
224 |
-+ Expected<StringRef> NameOrErr = Section.getName(); |
225 |
-+ if (!NameOrErr) |
226 |
-+ report_error(O->getFileName(), NameOrErr.takeError()); |
227 |
-+ fmt << *NameOrErr; |
228 |
- return; |
229 |
- } |
230 |
- |
231 |
-@@ -854,7 +869,11 @@ static void printRelocationTargetName(const MachOObjectFile *O, |
232 |
- section_iterator SI = O->section_begin(); |
233 |
- // Adjust for the fact that sections are 1-indexed. |
234 |
- advance(SI, Val - 1); |
235 |
-- SI->getName(S); |
236 |
-+ Expected<StringRef> SOrErr = SI->getName(); |
237 |
-+ if (!SOrErr) |
238 |
-+ consumeError(SOrErr.takeError()); |
239 |
-+ else |
240 |
-+ S = *SOrErr; |
241 |
- } |
242 |
- |
243 |
- fmt << S; |
244 |
-@@ -1362,8 +1381,7 @@ void llvm::DisassemHelper::DisassembleObject(const ObjectFile *Obj, |
245 |
- DataRefImpl DR = Section.getRawDataRefImpl(); |
246 |
- SegmentName = MachO->getSectionFinalSegmentName(DR); |
247 |
- } |
248 |
-- StringRef name; |
249 |
-- error(Section.getName(name)); |
250 |
-+ StringRef name = unwrapOrError(Section.getName(), Obj->getFileName()); |
251 |
- |
252 |
- if ((SectionAddr <= StopAddress) && |
253 |
- (SectionAddr + SectSize) >= StartAddress) { |
254 |
-@@ -1675,8 +1693,7 @@ void llvm::DisassemHelper::PrintRelocations(const ObjectFile *Obj) { |
255 |
- for (const SectionRef &Section : ToolSectionFilter(*Obj)) { |
256 |
- if (Section.relocation_begin() == Section.relocation_end()) |
257 |
- continue; |
258 |
-- StringRef secname; |
259 |
-- error(Section.getName(secname)); |
260 |
-+ StringRef secname = unwrapOrError(Section.getName(), Obj->getFileName()); |
261 |
- OutS << "RELOCATION RECORDS FOR [" << secname << "]:\n"; |
262 |
- for (const RelocationRef &Reloc : Section.relocations()) { |
263 |
- bool hidden = getHidden(Reloc); |
264 |
-@@ -1699,8 +1716,7 @@ void llvm::DisassemHelper::PrintSectionHeaders(const ObjectFile *Obj) { |
265 |
- "Idx Name Size Address Type\n"; |
266 |
- unsigned i = 0; |
267 |
- for (const SectionRef &Section : ToolSectionFilter(*Obj)) { |
268 |
-- StringRef Name; |
269 |
-- error(Section.getName(Name)); |
270 |
-+ StringRef Name = unwrapOrError(Section.getName(), Obj->getFileName()); |
271 |
- uint64_t Address = Section.getAddress(); |
272 |
- uint64_t Size = Section.getSize(); |
273 |
- bool Text = Section.isText(); |
274 |
-@@ -1717,9 +1733,8 @@ void llvm::DisassemHelper::PrintSectionHeaders(const ObjectFile *Obj) { |
275 |
- void llvm::DisassemHelper::PrintSectionContents(const ObjectFile *Obj) { |
276 |
- std::error_code EC; |
277 |
- for (const SectionRef &Section : ToolSectionFilter(*Obj)) { |
278 |
-- StringRef Name; |
279 |
- StringRef Contents; |
280 |
-- error(Section.getName(Name)); |
281 |
-+ StringRef Name = unwrapOrError(Section.getName(), Obj->getFileName()); |
282 |
- uint64_t BaseAddr = Section.getAddress(); |
283 |
- uint64_t Size = Section.getSize(); |
284 |
- if (!Size) |
285 |
-@@ -1797,7 +1812,11 @@ void llvm::DisassemHelper::PrintSymbolTable(const ObjectFile *o, |
286 |
- section_iterator Section = *SectionOrErr; |
287 |
- StringRef Name; |
288 |
- if (Type == SymbolRef::ST_Debug && Section != o->section_end()) { |
289 |
-- Section->getName(Name); |
290 |
-+ Expected<StringRef> NameOrErr = Section->getName(); |
291 |
-+ if (!NameOrErr) |
292 |
-+ consumeError(NameOrErr.takeError()); |
293 |
-+ else |
294 |
-+ Name = *NameOrErr; |
295 |
- } else { |
296 |
- Expected<StringRef> NameOrErr = Symbol.getName(); |
297 |
- if (!NameOrErr) |
298 |
-@@ -1846,8 +1865,7 @@ void llvm::DisassemHelper::PrintSymbolTable(const ObjectFile *o, |
299 |
- StringRef SegmentName = MachO->getSectionFinalSegmentName(DR); |
300 |
- OutS << SegmentName << ","; |
301 |
- } |
302 |
-- StringRef SectionName; |
303 |
-- error(Section->getName(SectionName)); |
304 |
-+ StringRef SectionName = unwrapOrError(Section->getName(), o->getFileName()); |
305 |
- OutS << SectionName; |
306 |
- } |
307 |
- |
308 |
-@@ -1978,7 +1996,11 @@ void llvm::DisassemHelper::printRawClangAST(const ObjectFile *Obj) { |
309 |
- Optional<object::SectionRef> ClangASTSection; |
310 |
- for (auto Sec : ToolSectionFilter(*Obj)) { |
311 |
- StringRef Name; |
312 |
-- Sec.getName(Name); |
313 |
-+ auto NameOrErr = Sec.getName(); |
314 |
-+ if (!NameOrErr) // FIXME: Need better error handling. |
315 |
-+ consumeError(NameOrErr.takeError()); |
316 |
-+ else |
317 |
-+ Name = *NameOrErr; |
318 |
- if (Name == ClangASTSectionName) { |
319 |
- ClangASTSection = Sec; |
320 |
- break; |
321 |
-@@ -2015,7 +2037,11 @@ void llvm::DisassemHelper::printFaultMaps(const ObjectFile *Obj) { |
322 |
- |
323 |
- for (auto Sec : ToolSectionFilter(*Obj)) { |
324 |
- StringRef Name; |
325 |
-- Sec.getName(Name); |
326 |
-+ auto NameOrErr = Sec.getName(); |
327 |
-+ if (!NameOrErr) // FIXME: Need better error handling. |
328 |
-+ consumeError(NameOrErr.takeError()); |
329 |
-+ else |
330 |
-+ Name = *NameOrErr; |
331 |
- if (Name == FaultMapSectionName) { |
332 |
- FaultMapSection = Sec; |
333 |
- break; |