c558f2 import clang-10.0.0-1.module+el8.3.0+6367+3467b552

Authored and Committed by centosrcm 4 years ago
    import clang-10.0.0-1.module+el8.3.0+6367+3467b552
    
        
file modified
+3 -2
.clang.metadata CHANGED
@@ -1,2 +1,3 @@
1
- 6977cf7a802a053c57fa74138d3648b563e71e88 SOURCES/cfe-9.0.0.src.tar.xz
2
- ac64403321d8486699d8bea5376b2438663dbb41 SOURCES/clang-tools-extra-9.0.0.src.tar.xz
1
+ cfaa4c4e89a45b604e6f3057f984d73365074727 SOURCES/clang-10.0.0.src.tar.xz
2
+ e41467d4e8c6afe917c9f9c44b1d6a95a85adadb SOURCES/clang-tools-extra-10.0.0.src.tar.xz
3
+ 32fa4b0193960f05064f2ab31b5a89c7cf48a0b9 SOURCES/hans-gpg-key.asc
file modified
+3 -2
.gitignore CHANGED
@@ -1,2 +1,3 @@
1
- SOURCES/cfe-9.0.0.src.tar.xz
2
- SOURCES/clang-tools-extra-9.0.0.src.tar.xz
1
+ SOURCES/clang-10.0.0.src.tar.xz
2
+ SOURCES/clang-tools-extra-10.0.0.src.tar.xz
3
+ SOURCES/hans-gpg-key.asc
SOURCES/0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch DELETED
@@ -1,27 +0,0 @@
1
- From 20ffd5bc4e45980dc804c5fa422e5182cbc975b7 Mon Sep 17 00:00:00 2001
2
- From: Tom Stellard <tstellar@redhat.com>
3
- Date: Tue, 13 Aug 2019 13:38:40 -0700
4
- Subject: [PATCH] Fix Driver/modules.cpp test to work when build directory name
5
- contains '.s'
6
-
7
- ---
8
- clang/test/Driver/modules.cpp | 3 ++-
9
- 1 file changed, 2 insertions(+), 1 deletion(-)
10
-
11
- diff --git a/clang/test/Driver/modules.cpp b/clang/test/Driver/modules.cpp
12
- index 7c549c1..9e06151 100644
13
- --- a/clang/test/Driver/modules.cpp
14
- +++ b/clang/test/Driver/modules.cpp
15
- @@ -15,7 +15,8 @@
16
- // RUN: %clang -std=c++2a %t/module.pcm -S -o %t/module.pcm.o -v 2>&1 | FileCheck %s --check-prefix=CHECK-COMPILE
17
- //
18
- // CHECK-COMPILE: -cc1 {{.*}} {{-emit-obj|-S}}
19
- -// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}}
20
- +// Check for extra space to avoid failures when the build directory contains '.s' in its path.
21
- +// CHECK-COMPILE-SAME: -o {{.*}}.{{pcm.o|s}}{{ }}
22
- // CHECK-COMPILE-SAME: -x pcm
23
- // CHECK-COMPILE-SAME: {{.*}}.pcm
24
-
25
- --
26
- 1.8.3.1
27
-
SOURCES/0001-Fix-uninitialized-value-in-ABIArgInfo.patch DELETED
@@ -1,37 +0,0 @@
1
- From bae24f2020f7dc9db372c7e3f38d77fc5fa320d0 Mon Sep 17 00:00:00 2001
2
- From: serge-sans-paille <sguelton@redhat.com>
3
- Date: Fri, 1 Feb 2019 06:39:13 +0000
4
- Subject: [PATCH] Fix uninitialized value in ABIArgInfo
5
-
6
- GCC-9 takes advantage of this uninitialized values to optimize stuff,
7
- which ends up in failing validation when compiling clang.
8
- ---
9
- clang/include/clang/CodeGen/CGFunctionInfo.h | 10 +++++-----
10
- 1 file changed, 5 insertions(+), 5 deletions(-)
11
-
12
- diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h
13
- index 1f81072..caf7105 100644
14
- --- a/clang/include/clang/CodeGen/CGFunctionInfo.h
15
- +++ b/clang/include/clang/CodeGen/CGFunctionInfo.h
16
- @@ -110,13 +110,13 @@ private:
17
- }
18
-
19
- ABIArgInfo(Kind K)
20
- - : TheKind(K), PaddingInReg(false), InReg(false) {
21
- - }
22
- + : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
23
- + TheKind(K), PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false),
24
- + IndirectRealign(false), SRetAfterThis(false), InReg(false),
25
- + CanBeFlattened(false), SignExt(false) {}
26
-
27
- public:
28
- - ABIArgInfo()
29
- - : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
30
- - TheKind(Direct), PaddingInReg(false), InReg(false) {}
31
- + ABIArgInfo() : ABIArgInfo(Direct) {}
32
-
33
- static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
34
- llvm::Type *Padding = nullptr,
35
- --
36
- 1.8.3.1
37
-
SOURCES/0001-Make-funwind-tables-the-default-for-all-archs.patch ADDED
@@ -0,0 +1,39 @@
1
+ From 690373af5a5d50cf115ed6e4d2849bb786f9dc8e Mon Sep 17 00:00:00 2001
2
+ From: serge-sans-paille <sguelton@redhat.com>
3
+ Date: Tue, 10 Dec 2019 09:18:03 +0000
4
+ Subject: [PATCH] Make -funwind-tables the default for all archs
5
+
6
+ ---
7
+ clang/lib/Driver/ToolChain.cpp | 2 +-
8
+ clang/lib/Driver/ToolChains/Gnu.cpp | 2 +-
9
+ 2 files changed, 2 insertions(+), 2 deletions(-)
10
+
11
+ diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
12
+ index b1fddb0af55..43af40ed0e8 100644
13
+ --- a/clang/lib/Driver/ToolChain.cpp
14
+ +++ b/clang/lib/Driver/ToolChain.cpp
15
+ @@ -244,7 +244,7 @@ std::string ToolChain::getInputFilename(const InputInfo &Input) const {
16
+ }
17
+
18
+ bool ToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
19
+ - return false;
20
+ + return true;
21
+ }
22
+
23
+ Tool *ToolChain::getClang() const {
24
+ diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
25
+ index 33cdd3585c2..15e82be8f3a 100644
26
+ --- a/clang/lib/Driver/ToolChains/Gnu.cpp
27
+ +++ b/clang/lib/Driver/ToolChains/Gnu.cpp
28
+ @@ -2535,7 +2535,7 @@ void Generic_GCC::printVerboseInfo(raw_ostream &OS) const {
29
+ }
30
+
31
+ bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
32
+ - return getArch() == llvm::Triple::x86_64;
33
+ + return true;
34
+ }
35
+
36
+ bool Generic_GCC::isPICDefault() const {
37
+ --
38
+ 2.20.1
39
+
SOURCES/0001-clang-Don-t-install-static-libraries.patch ADDED
@@ -0,0 +1,25 @@
1
+ From 856b789b9de0895786ba23681c4337172676e01e Mon Sep 17 00:00:00 2001
2
+ From: Tom Stellard <tstellar@redhat.com>
3
+ Date: Fri, 31 Jan 2020 11:04:57 -0800
4
+ Subject: [PATCH] clang: Don't install static libraries
5
+
6
+ ---
7
+ clang/cmake/modules/AddClang.cmake | 2 +-
8
+ 1 file changed, 1 insertion(+), 1 deletion(-)
9
+
10
+ diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
11
+ index cbd618e..9cf076a 100644
12
+ --- a/clang/cmake/modules/AddClang.cmake
13
+ +++ b/clang/cmake/modules/AddClang.cmake
14
+ @@ -97,7 +97,7 @@ macro(add_clang_library name)
15
+ if(TARGET ${name})
16
+ target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
17
+
18
+ - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
19
+ + if (ARG_SHARED AND (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN))
20
+ set(export_to_clangtargets)
21
+ if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
22
+ "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
23
+ --
24
+ 1.8.3.1
25
+
empty file added
empty file added
file modified
+75 -39
SPECS/clang.spec CHANGED
@@ -1,44 +1,41 @@
1
1
%global compat_build 0
2
2
3
- %global maj_ver 9
3
+ %global maj_ver 10
4
4
%global min_ver 0
5
5
%global patch_ver 0
6
- #%%global rc_ver 3
7
- %global baserelease 5
6
+ #%%global rc_ver 6
7
+ %global baserelease 1
8
-
9
- #i686 disabled because llvm-test is not built for this target
10
- # other targets disables because of failing tests
11
- %ifnarch s390x i686 ppc64le %{arm}
12
- %global enable_test_pkg 1
13
- %endif
14
8
15
9
%global clang_tools_binaries \
16
- %{_bindir}/clangd \
17
10
%{_bindir}/clang-apply-replacements \
18
11
%{_bindir}/clang-change-namespace \
12
+ %{_bindir}/clang-check \
19
13
%{_bindir}/clang-doc \
14
+ %{_bindir}/clang-extdef-mapping \
15
+ %{_bindir}/clang-format \
16
+ %{_bindir}/clang-import-test \
20
17
%{_bindir}/clang-include-fixer \
18
+ %{_bindir}/clang-move \
19
+ %{_bindir}/clang-offload-bundler \
20
+ %{_bindir}/clang-offload-wrapper \
21
21
%{_bindir}/clang-query \
22
22
%{_bindir}/clang-refactor \
23
- %{_bindir}/clang-reorder-fields \
24
23
%{_bindir}/clang-rename \
25
- %{_bindir}/clang-tidy
24
+ %{_bindir}/clang-reorder-fields \
25
+ %{_bindir}/clang-scan-deps \
26
+ %{_bindir}/clang-tidy \
27
+ %{_bindir}/clangd \
28
+ %{_bindir}/diagtool \
29
+ %{_bindir}/hmaptool \
30
+ %{_bindir}/pp-trace
26
31
27
32
%global clang_binaries \
28
33
%{_bindir}/clang \
29
34
%{_bindir}/clang++ \
30
35
%{_bindir}/clang-%{maj_ver} \
31
36
%{_bindir}/clang++-%{maj_ver} \
32
- %{_bindir}/clang-check \
33
37
%{_bindir}/clang-cl \
34
38
%{_bindir}/clang-cpp \
35
- %{_bindir}/clang-extdef-mapping \
36
- %{_bindir}/clang-format \
37
- %{_bindir}/clang-import-test \
38
- %{_bindir}/clang-offload-bundler \
39
- %{_bindir}/clang-scan-deps \
40
- %{_bindir}/diagtool \
41
- %{_bindir}/hmaptool
42
39
43
40
%if 0%{?compat_build}
44
41
%global pkg_name clang%{maj_ver}.%{min_ver}
@@ -66,11 +63,11 @@
66
63
%global build_install_prefix %{buildroot}%{install_prefix}
67
64
68
65
%ifarch ppc64le
69
- # Too many threads on 32 core ppc64 systems causes OOM errors.
66
+ # Too many threads on ppc64 systems causes OOM errors.
70
67
%global _smp_mflags -j8
71
68
%endif
72
69
73
- %global clang_srcdir cfe-%{version}%{?rc_ver:rc%{rc_ver}}.src
70
+ %global clang_srcdir clang-%{version}%{?rc_ver:rc%{rc_ver}}.src
74
71
%global clang_tools_srcdir clang-tools-extra-%{version}%{?rc_ver:rc%{rc_ver}}.src
75
72
76
73
Name: %pkg_name
@@ -80,15 +77,33 @@ Summary: A C language family front-end for LLVM
80
77
81
78
License: NCSA
82
79
URL: http://llvm.org
83
- Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_srcdir}.tar.xz
80
+ %if 0%{?rc_ver:1}
81
+ Source0: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_srcdir}.tar.xz
82
+ Source3: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_srcdir}.tar.xz.sig
83
+ %else
84
+ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_srcdir}.tar.xz
85
+ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_srcdir}.tar.xz.sig
86
+ %endif
84
87
%if !0%{?compat_build}
85
- Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz
88
+ %if 0%{?rc_ver:1}
89
+ Source1: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_tools_srcdir}.tar.xz
90
+ Source2: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_tools_srcdir}.tar.xz.sig
91
+ %else
92
+ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz
93
+ Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz.sig
86
94
%endif
95
+ %endif
96
+ Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
87
97
88
98
Patch4: 0002-gtest-reorg.patch
89
- Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch
90
99
Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
91
- Patch12: 0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch
100
+ Patch13: 0001-Make-funwind-tables-the-default-for-all-archs.patch
101
+
102
+ ### Fix crash with kernel bpf self-tests
103
+ ##Patch14: 0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch
104
+
105
+ # Not Upstream
106
+ Patch15: 0001-clang-Don-t-install-static-libraries.patch
92
107
93
108
BuildRequires: gcc
94
109
BuildRequires: gcc-c++
@@ -143,6 +158,9 @@ Requires: emacs-filesystem
143
158
144
159
Provides: clang(major) = %{maj_ver}
145
160
161
+ Conflicts: compiler-rt < %{version}
162
+ Conflicts: compiler-rt > %{version}
163
+
146
164
%description
147
165
clang: noun
148
166
1. A loud, resonant, metallic sound.
@@ -156,6 +174,9 @@ as libraries and designed to be loosely-coupled and extensible.
156
174
%package libs
157
175
Summary: Runtime library for clang
158
176
Recommends: compiler-rt%{?_isa} = %{version}
177
+ # libomp-devel is required, so clang can find the omp.h header when compiling
178
+ # with -fopenmp.
179
+ Recommends: libomp-devel%{_isa} = %{version}
159
180
Recommends: libomp%{_isa} = %{version}
160
181
161
182
%description libs
@@ -167,8 +188,8 @@ Summary: Development header files for clang
167
188
Requires: %{name}%{?_isa} = %{version}-%{release}
168
189
# The clang CMake files reference tools from clang-tools-extra.
169
190
Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release}
170
- %endif
171
191
Requires: %{name}-libs = %{version}-%{release}
192
+ %endif
172
193
173
194
%description devel
174
195
Development header files for clang.
@@ -199,14 +220,14 @@ A set of extra tools built using Clang's tooling API.
199
220
# just want clang.
200
221
%package -n git-clang-format
201
222
Summary: Integration of clang-format for git
202
- Requires: %{name}%{?_isa} = %{version}-%{release}
223
+ Requires: %{name}-tools-extra = %{version}-%{release}
203
224
Requires: git
204
225
Requires: python3
205
226
206
227
%description -n git-clang-format
207
228
clang-format integration for git.
208
229
209
-
230
+
210
231
%package -n python3-clang
211
232
Summary: Python3 bindings for clang
212
233
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -232,9 +253,12 @@ pathfix.py -i %{__python3} -pn \
232
253
%setup -q -n %{clang_srcdir}
233
254
234
255
%patch4 -p1 -b .gtest
235
- %patch9 -p2 -b .abi-arginfo
236
256
%patch11 -p1 -b .libcxx-fix
237
- %patch12 -p2 -b .module-test-fix
257
+ %patch13 -p2 -b .unwind-all
258
+ %patch15 -p2 -b .no-install-static
259
+
260
+
261
+ #%patch14 -p2 -b .bpf-fix
238
262
239
263
mv ../%{clang_tools_srcdir} tools/extra
240
264
@@ -272,8 +296,8 @@ cd _build
272
296
-DPYTHON_EXECUTABLE=%{__python3} \
273
297
-DCMAKE_INSTALL_RPATH:BOOL=";" \
274
298
%ifarch s390 s390x %{arm} %ix86 ppc64le
275
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
276
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
299
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
300
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
277
301
%endif
278
302
%if 0%{?compat_build}
279
303
-DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver}.%{min_ver}-%{__isa_bits} \
@@ -304,10 +328,11 @@ cd _build
304
328
-DLLVM_ENABLE_RTTI=ON \
305
329
-DLLVM_BUILD_DOCS=ON \
306
330
-DLLVM_ENABLE_SPHINX=ON \
307
- -DCLANG_LINK_CLANG_DYLIB=OFF \
331
+ -DCLANG_LINK_CLANG_DYLIB=ON \
308
332
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
309
333
\
310
334
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
335
+ -DBUILD_SHARED_LIBS=OFF \
311
336
-DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat} %{version}-%{release}"
312
337
313
338
%ninja_build -l 8
@@ -349,6 +374,8 @@ rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
349
374
350
375
# TODO: Package html docs
351
376
rm -Rvf %{buildroot}%{_pkgdocdir}
377
+ rm -Rvf %{buildroot}%{install_prefix}/share/clang/clang-doc-default-stylesheet.css
378
+ rm -Rvf %{buildroot}%{install_prefix}/share/clang/index.js
352
379
353
380
# TODO: What are the Fedora guidelines for packaging bash autocomplete files?
354
381
rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
@@ -387,15 +414,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
387
414
%if !0%{?compat_build}
388
415
%files
389
416
%{clang_binaries}
390
- %{_bindir}/c-index-test
391
417
%{_mandir}/man1/clang.1.gz
392
418
%{_mandir}/man1/clang++.1.gz
393
419
%{_mandir}/man1/clang-%{maj_ver}.1.gz
394
420
%{_mandir}/man1/clang++-%{maj_ver}.1.gz
395
- %{_mandir}/man1/diagtool.1.gz
396
- %{_emacs_sitestartdir}/clang-format.el
397
- %{_datadir}/clang/clang-format.py*
398
- %{_datadir}/clang/clang-format-diff.py*
399
421
%endif
400
422
401
423
%files libs
@@ -433,10 +455,15 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
433
455
434
456
%files tools-extra
435
457
%{clang_tools_binaries}
458
+ %{_bindir}/c-index-test
436
459
%{_bindir}/find-all-symbols
437
460
%{_bindir}/modularize
461
+ %{_mandir}/man1/diagtool.1.gz
462
+ %{_emacs_sitestartdir}/clang-format.el
438
463
%{_emacs_sitestartdir}/clang-rename.el
439
464
%{_emacs_sitestartdir}/clang-include-fixer.el
465
+ %{_datadir}/clang/clang-format.py*
466
+ %{_datadir}/clang/clang-format-diff.py*
440
467
%{_datadir}/clang/clang-include-fixer.py*
441
468
%{_datadir}/clang/clang-tidy-diff.py*
442
469
%{_datadir}/clang/run-clang-tidy.py*
@@ -451,6 +478,15 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
451
478
452
479
%endif
453
480
%changelog
481
+ * Thu Apr 9 2020 sguelton@redhat.com - 10.0.0-1
482
+ - 10.0.0 final
483
+
484
+ * Fri Jan 10 2020 Tom Stellard <tstellar@redhat.com> - 9.0.1-2
485
+ - Fix crash with kernel bpf self-tests
486
+
487
+ * Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> - 9.0.1-1
488
+ - 9.0.1 Release
489
+
454
490
* Fri Nov 15 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-5
455
491
- Fix typo from previous patch: move clang-libs dep to correct sub-package
456
492