source: projects/specs/trunk/l/llvm/llvm-vl.spec @ 12474

Revision 12474, 30.3 KB checked in by tomop, 4 years ago (diff)

updated 6 packages

brotli-1.0.7-5

graphviz-2.44.1-1

llvm-10.0.1-1

libplist-2.2.0-2

libpwquality-1.4.2-2

python-nose-1.3.7-2

Line 
1%bcond_with test
2
3%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
4
5%define ver_suffix %(echo "%{version}" | cut -d . -f 1)
6
7%define _unpackaged_files_terminate_build 1
8
9# Build options:
10# Components skipped by default:
11%bcond_with doxygen
12%bcond_with ocaml
13%bcond_with force_gold
14%bcond_with lld_libs
15%bcond_with clang_tools_extra
16
17# Documentation install path
18%global llvmdocdir() %{_docdir}/%1-%{version}
19
20%define _unpackaged_files_terminate_build 1
21
22Summary:        The Low Level Virtual Machine
23Summary(ja):    LLVM - 低レベルバーチャルマシン
24Name:           llvm
25Version:        10.0.1
26Release:        1%{?_dist_release}
27Group:          programming
28Vendor:         Project Vine
29Distribution:   Vine Linux
30
31License:        NCSA
32URL:            https://llvm.org/
33Source0:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz
34Source1:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz
35Source2:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
36Source3:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
37Source4:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
38%if %{with clang_tools_extra}
39Source5:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
40%endif
41Source6:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/openmp-%{version}.src.tar.xz
42
43# multilib fixes
44Source10:        llvm-config.h
45Source11:        clang-config.h
46
47# patches
48
49# llvm
50Patch0:         0001-Filter-out-cxxflags-not-supported-by-clang.patch
51# TODO: I'm not sure why this is needed.  Could be a change in newer version
52# of gold.
53Patch1:         0001-Pass-target-to-gold-linker-to-avoid-faliures-on-i686.patch
54Patch2:         0001-CMake-Split-static-library-exports-into-their-own-ex.patch
55Patch3:         0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
56
57# clang
58Patch100:       0002-gtest-reorg.patch
59Patch101:       0001-Fix-uninitialized-value-in-ABIArgInfo.patch
60Patch102:       0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
61Patch103:       0001-Fix-Driver-modules.cpp-test-to-work-when-build-direc.patch
62
63# compiler-rt
64Patch200:       0001-PATCH-std-thread-copy.patch
65
66# lld
67Patch400:       0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
68
69# Vine Patch
70Patch1000: clang-3.8.1-driver-ld.gold.patch
71Patch1002: clang-3.8.1-driver-vine.patch
72
73BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
74
75BuildRequires:  binutils-devel
76BuildRequires:  cmake
77BuildRequires:  ninja
78BuildRequires:  bison
79BuildRequires:  python3
80BuildRequires:  python3-rpm-macros
81BuildRequires:  chrpath
82BuildRequires:  flex
83BuildRequires:  git
84BuildRequires:  gcc-c++ >= 3.4
85BuildRequires:  groff
86BuildRequires:  libffi-devel >= 3.3
87BuildRequires:  libstdc++-devel
88BuildRequires:  libstdc++-static
89BuildRequires:  libtool-ltdl-devel
90BuildRequires:  libxml2-devel
91%if %{with ocaml}
92BuildRequires:  ocaml-findlib
93BuildRequires:  ocaml-ctypes
94BuildRequires:  ocaml-ounit
95%endif
96# for DejaGNU test suite
97BuildRequires:  dejagnu tcl-devel
98%if %{with doxygen}
99BuildRequires:  doxygen graphviz
100%endif
101# pod2man
102BuildRequires:  perl
103# lldb
104BuildRequires:  swig
105BuildRequires:  libedit-devel
106BuildRequires:  python3-devel
107# lld
108BuildRequires: ncurses-devel
109BuildRequires: zlib-devel
110
111Requires:       llvm%{ver_suffix}-libs = %{version}-%{release}
112
113# LLVM is not supported on PPC64
114# http://llvm.org/bugs/show_bug.cgi?id=3729
115ExcludeArch:    ppc64
116
117%description
118LLVM is a compiler infrastructure designed for compile-time,
119link-time, runtime, and idle-time optimization of programs from
120arbitrary programming languages.  The compiler infrastructure includes
121mirror sets of programming tools as well as libraries with equivalent
122functionality.
123
124
125%package devel
126Summary:        Libraries and header files for LLVM
127Summary(ja):    LLVM のライブラリおよびヘッダファイル
128Group:          programming
129Requires:       %{name} = %{version}-%{release}
130Requires:       libstdc++-devel
131Requires:       libffi-devel
132Requires:       libedit-devel
133
134%description devel
135This package contains library and header files needed to develop new
136native programs that use the LLVM infrastructure.
137
138
139%package doc
140Summary:        Documentation for LLVM
141Summary(ja):    LLVM のドキュメント
142Group:          documentation
143BuildArch:      noarch
144Requires:       %{name} = %{version}-%{release}
145# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
146Obsoletes:      %{name}-doc < %{version}-%{release}
147
148%description doc
149Documentation for the LLVM compiler infrastructure.
150
151
152%package -n llvm%{ver_suffix}-libs
153Summary:        LLVM shared libraries
154Summary(ja):    LLVM 共有ライブラリ
155Group:          system
156Provides:       llvm-libs = %{version}-%{release}
157Obsoletes:      llvm-libs <= 7.0.0
158
159%description -n llvm%{ver_suffix}-libs
160Shared libraries for the LLVM compiler infrastructure.
161
162%description -n llvm%{ver_suffix}-libs -l ja
163LLVM コンパイラ基盤の共有ライブラリです.
164
165%package static
166Summary:        LLVM static libraries
167Summary(ja):    LLVM 静的ライブラリ
168Group:          programming
169Requires:       llvm-devel = %{version}-%{release}
170
171%description static
172Static libraries for the LLVM compiler infrastructure.
173
174%description static -l ja
175LLVM コンパイラ基盤の静的ライブラリです.
176
177
178%package -n clang
179Summary:        A C language family front-end for LLVM
180Summary(ja):    LLVM の C 言語フロントエンド
181License:        NCSA
182Group:          programming
183Requires:       %{name} = %{version}-%{release}
184# clang requires gcc, clang++ requires libstdc++-devel
185Requires:       libstdc++-devel
186# remove clang-doc pacakge
187Obsoletes:      clang-doc < %{version}-%{release}
188
189%description -n clang
190clang: noun
191    1. A loud, resonant, metallic sound.
192    2. The strident call of a crane or goose.
193    3. C-language family front-end toolkit.
194
195The goal of the Clang project is to create a new C, C++, Objective C
196and Objective C++ front-end for the LLVM compiler. Its tools are built
197as libraries and designed to be loosely-coupled and extensible.
198
199%Package -n clang-libs
200Summary:        Runtime library for clang
201Summary(ja):    Clang のランタイムライブラリ
202Group:          system
203
204%description -n clang-libs
205Runtime library for clang.
206
207%description -n clang-libs -l ja
208Clang のランタイムライブラリです.
209
210%package -n clang-devel
211Summary:        Header files for clang
212Summary(ja):    Clang のヘッダファイル
213Group:          programming
214Requires:       clang = %{version}-%{release}
215
216%description -n clang-devel
217This package contains header files for the Clang compiler.
218
219%description -n clang-devel -l ja
220Clang コンパイラのヘッダファイル集です.
221
222%package -n clang-analyzer
223Summary:        A source code analysis framework
224Summary(ja):    ソースコード分析フレームワーク
225License:        NCSA
226Group:          programming
227Requires:       clang = %{version}-%{release}
228# not picked up automatically since files are currently not instaled
229# in standard Python hierarchies yet
230Requires:       python3
231
232%description -n clang-analyzer
233The Clang Static Analyzer consists of both a source code analysis
234framework and a standalone tool that finds bugs in C and Objective-C
235programs. The standalone tool is invoked from the command-line, and is
236intended to run in tandem with a build of a project or code base.
237
238%package -n python3-clang
239Summary: Python3 bindings for clang
240Group:          programming
241Requires: %{name}%{ver_suffix}-libs%{?_isa} = %{version}-%{release}
242Requires: python3
243%description -n python3-clang
244Python3 bindings for clang
245
246
247#%package -n clang-doc
248#Summary:        Documentation for Clang
249#Summary(ja):    Clang のドキュメント
250#Group:          Documentation
251#Requires:       %{name} = %{version}-%{release}
252#
253#%description -n clang-doc
254#Documentation for the Clang compiler front-end.
255
256%package -n lldb
257Summary:        Next generation high-performance debugger
258Summary(ja):    高性能デバッガー
259License:        NCSA
260Group:          programming
261Requires:       %{name} = %{version}-%{release}
262
263%description -n lldb
264LLDB is a next generation, high-performance debugger. It is built as a set
265of reusable components which highly leverage existing libraries in the
266larger LLVM Project, such as the Clang expression parser and LLVM
267disassembler.
268
269%package -n lldb-devel
270Summary:        Header files for LLDB
271Summary(ja):    LLDB のヘッダファイル
272Group:          programming
273Requires:       lldb = %{version}-%{release}
274
275%description -n lldb-devel
276This package contains header files for the LLDB debugger.
277
278
279%package -n lld
280Summary:        The LLVM Linker
281Summary(ja):    LLVMリンカー
282License:        NCSA
283Group:          programming
284
285%description -n lld
286The LLVM project linker.
287
288%if %{with lld_libs}
289%package -n lld-libs
290Summary:        LLD shared libraries
291Summary(ja):    LLD 共有ライブラリ
292License:        NCSA
293Group:          programming
294
295%description -n lld-libs
296Shared libraries for LLD.
297
298
299%package -n lld-devel
300Summary:        Libraries and header files for LLD
301Summary(ja):    LLD 用ライブラリとヘッダファイル
302License:        NCSA
303Group:          programming
304Requires:       lld-libs = %{version}-%{release}
305
306%description -n lld-devel
307This package contains library and header files needed to develop new native
308programs that use the LLD infrastructure.
309%endif
310
311%if %{with doxygen}
312%package apidoc
313Summary:        API documentation for LLVM
314Summary(ja):    LLVM の API ドキュメント
315Group:          documentation
316BuildArch:      noarch
317Requires:       %{name}-docs = %{version}-%{release}
318
319%description apidoc
320API documentation for the LLVM compiler infrastructure.
321
322%package -n clang-apidoc
323Summary:        API documentation for Clang
324Summary(ja):    Clang の API ドキュメント
325Group:          Documentation
326BuildArch:      noarch
327
328%description -n clang-apidoc
329API documentation for the Clang compiler.
330%endif
331
332
333%package -n python3-lldb
334Summary:        Python3 module for LLDB
335Summary(ja):    LLDB用Python3モジュール
336Group:          programming
337BuildRequires:  python-devel
338Requires:       python-six
339
340%description -n python3-lldb
341The package contains the LLDB Python3 module.
342
343
344%package -n libomp
345Summary:        OpenMP runtime for clang
346Summary(ja):    clang用OpenMPランタイム
347Group:          system
348
349%description -n libomp
350The package contains the OpenMP runtime for clang.
351
352
353%package -n libomp-devel
354Summary:        OpenMP header files
355Summary(ja):    OpenMPヘッダファイル
356Group:          programming
357Requires:       clang-devel%{?isa} = %{version}
358
359%description -n libomp-devel
360The package contains the OpenMP header files.
361
362
363%if %{with ocaml}
364%package        ocaml
365Summary:        OCaml binding for LLVM
366Summary(ja):    LLVM の OCaml バインディング
367Group:          system
368Requires:       %{name} = %{version}-%{release}
369Requires:       ocaml
370
371%description    ocaml
372OCaml binding for LLVM.
373
374%package        ocaml-devel
375Summary:        Development files for %{name}-ocaml
376Summary(ja):    %{name}-ocaml の開発ファイル
377Group:          programming
378Requires:       %{name}-devel = %{version}-%{release}
379Requires:       %{name}-ocaml = %{version}-%{release}
380Requires:       ocaml
381
382%description    ocaml-devel
383The %{name}-ocaml-devel package contains libraries and signature files
384for developing applications that use %{name}-ocaml.
385
386%package ocaml-doc
387Summary:        Documentation for %{name}-ocaml
388Summary(ja):    %{name}-ocaml のドキュメント
389Group:          documentation
390BuildArch:      noarch
391Requires:       %{name}-ocaml = %{version}-%{release}
392# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
393Obsoletes:      %{name}-ocaml-doc < %{version}-%{release}
394
395%description ocaml-doc
396HTML documentation for LLVM's OCaml binding.
397
398%endif
399
400# compat32'
401%package -n compat32-%{name}%{ver_suffix}-libs
402Summary:        LLVM shared libraries
403Summary(ja):    LLVM 共有ライブラリ
404Group:          system
405Provides:       compat32-llvm-libs = %{version}-%{release}
406Requires:       %{name}%{ver_suffix}-libs = %{version}-%{release}
407
408%description -n compat32-%{name}%{ver_suffix}-libs
409Shared libraries for the LLVM compiler infrastructure.
410
411
412%prep
413%setup -q -a1 -a2 -a3 -a4 -a6 -n llvm-%{version}.src
414
415#%patch0 -p2
416#%patch1 -p2
417#%patch2 -p2
418##patch3 -p2
419
420rm -rf tools/clang tools/lld tools/lldb projects/compiler-rt
421mv clang-%{version}.src tools/clang
422mv compiler-rt-%{version}.src projects/compiler-rt
423mv lldb-%{version}.src tools/lldb
424mv lld-%{version}.src tools/lld
425mv openmp-%{version}.src projects/openmp
426
427%if %{with clang_tools_extra}
428tar xvf %{SOURCE5}
429mv clang-tools-extra-%{version}.src tools/clang/tools/extra
430%endif
431
432pushd tools/clang
433##patch100 -p1
434#%patch101 -p2
435#%patch102 -p1
436#%patch103 -p2
437popd
438
439pushd projects/compiler-rt
440#%patch200 -p1
441popd
442
443pushd tools/lld
444#%patch400 -p1
445popd
446
447# Vine Linux
448%if %{with force_gold}
449pushd tools/clang
450%patch1000 -p1 -b .driver-ld.gold
451popd
452%endif
453#%patch1002 -p1 -b .driver-vine
454
455sed -i -e 's/"i686-linux-gnu",/"i686-linux-gnu","i686-vine-linux","i686-vine-linux-gnu",/' tools/clang/lib/Driver/ToolChains/Gnu.cpp
456sed -i -e 's/"x86_64-linux-gnu",/"x86_64-linux-gnu","x86_64-vine-linux","x86_64-vine-linux-gnu",/' tools/clang/lib/Driver/ToolChains/Gnu.cpp
457
458sed -i -e 's/"ld"/"ld.gold"/' tools/clang/include/clang/Driver/ToolChain.h
459
460%build
461mkdir build
462cd build
463
464%ifarch s390 s390x %{arm} %ix86
465# Decrease debuginfo verbosity to reduce memory consumption during final library linking
466%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
467%endif
468
469#CFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security -fPIC"
470#CXXFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security -fPIC -std=c++11"
471#TMP_PWD=$(pwd)
472#LDFLAGS="%{?__global_ldflags} -L$TMP_PWD/%{_lib} -lpthread -ldl"
473
474%cmake .. \
475        -GNinja \
476        -DBUILD_SHARED_LIBS:BOOL=OFF \
477        -DLLVM_PARALLEL_LINK_JOBS=1 \
478        -DCMAKE_BUILD_TYPE=Release \
479        -DCMAKE_INSTALL_RPATH=";" \
480%if 0%{?__isa_bits} == 64
481        -DLLVM_LIBDIR_SUFFIX=64 \
482%else
483        -DLLVM_LIBDIR_SUFFIX= \
484%endif
485        -DLLVM_TARGETS_TO_BUILD=all \
486        -DLLVM_ENABLE_LIBCXX:BOOL=OFF \
487        -DLLVM_ENABLE_ZLIB:BOOL=ON \
488        -DLLVM_ENABLE_FFI:BOOL=ON \
489        -DLLVM_ENABLE_RTTI:BOOL=ON \
490        -DLLVM_ENABLE_EH=ON \
491        -DLLVM_BINUTILS_INCDIR=%{_includedir} \
492        -DLLVM_BUILD_RUNTIME:BOOL=ON \
493        -DLLVM_INCLUDE_TOOLS:BOOL=ON \
494        -DLLVM_BUILD_TOOLS:BOOL=ON \
495        -DLLVM_INCLUDE_TESTS:BOOL=ON \
496        -DLLVM_BUILD_TESTS:BOOL=ON \
497        -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
498        -DLLVM_BUILD_EXAMPLES:BOOL=OFF \
499        -DLLVM_INCLUDE_UTILS:BOOL=ON \
500        -DLLVM_INSTALL_UTILS:BOOL=OFF \
501        -DLLVM_INCLUDE_DOCS:BOOL=ON \
502        -DLLVM_ENABLE_SPHINX:BOOL=OFF \
503%if %{with doxygen}
504        -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
505%else
506        -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
507%endif
508        -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
509        -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
510        -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
511        -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
512        -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON \
513        \
514        -DCLANG_ENABLE_ARCMT:BOOL=ON \
515        -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
516        -DCLANG_INCLUDE_DOCS:BOOL=ON \
517        -DCLANG_INCLUDE_TESTS:BOOL=ON \
518        -DCLANG_PLUGIN_SUPPORT:BOOL=ON \
519        -DCLANG_BUILD_EXAMPLES:BOOL=OFF \
520        -DCLANG_LINK_CLANG_DYLIB=ON \
521        -DCLANG_REPOSITORY_STRING="Vine Linux %{version}-%{release}" \
522        -DLIB_SUFFIX= \
523        \
524        -DLLDB_DISABLE_CURSES:BOOL=OFF \
525        -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
526        -DLLDB_DISABLE_PYTHON:BOOL=OFF \
527        \
528        -DLLDB_LINK_LLVM_DYLIB:BOOL=ON \
529        \
530        -DLIBOMP_INSTALL_ALIASES=OFF \
531        -DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{version}/include \
532        \
533        -DPYTHON_EXECUTABLE:STRING=%{__python3} \
534        -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
535
536# workaround for all-in-one build
537#TMP_PWD=$(pwd)
538#LD_LIBRARY_PATH="$TMP_PWD/%{_lib}" make %{?_smp_mflags}
539
540%ninja_build
541
542%install
543rm -rf %{buildroot}
544
545cd build
546%ninja_install
547
548# llvm
549
550install -m755 ./bin/lli-child-target %{buildroot}%{_bindir}/lli-child-target
551
552# fix multi-lib
553mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
554ln -sf llvm-config-%{__isa_bits} %{buildroot}%{_bindir}/llvm-config
555mv -v %{buildroot}%{_includedir}/llvm/Config/llvm-config{,-%{__isa_bits}}.h
556install -m 0644 %{SOURCE10} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h
557
558# clang
559
560# remove static libraries
561rm -fv %{buildroot}%{_libdir}/libclang*.a
562
563# install clang python bindings
564mkdir -p %{buildroot}%{python3_sitelib}/clang/
565install -p -m644 ../tools/clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
566
567mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h
568install -m 0644 %{SOURCE11} %{buildroot}%{_includedir}/clang/Config/config.h
569
570# remove git integration
571rm -vf %{buildroot}%{_bindir}/git-clang-format
572# remove editor integrations (bbedit, sublime, emacs, vim)
573rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript
574rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
575rm -vf %{buildroot}%{_datadir}/clang/clang-format.el
576rm -vf %{buildroot}%{_datadir}/clang/clang-format.py*
577# remove diff reformatter
578rm -vf %{buildroot}%{_datadir}/clang/clang-format-diff.py*
579
580
581# lldb
582
583# remove static libraries
584rm -fv %{buildroot}%{_libdir}/liblldb*.a
585
586# python: fix binary libraries location
587liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
588ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
589
590# remove bundled six.py
591rm -f %{buildroot}%{python3_sitearch}/six.*
592
593
594# lld
595
596# remove static libraries
597rm -fv %{buildroot}%{_libdir}/liblld*.a
598
599# Remove rpath
600chrpath --delete %{buildroot}%{_bindir}/*lld
601chrpath --delete %{buildroot}%{_bindir}/lld-link
602chrpath --delete %{buildroot}%{_bindir}/wasm-ld
603find %{buildroot}%{_libdir} -type f -name 'liblld*.so*' | \
604  grep -v 'liblldb' | \
605  xargs chrpath --delete
606
607%if !%{with lld_libs}
608  rm -rf %{buildroot}%{_includedir}/lld
609%endif
610
611# compiler-rt
612
613# move sanitizer lists to better place
614mkdir -p %{buildroot}%{_libdir}/clang/%{version}
615for file in asan_blacklist.txt msan_blacklist.txt dfsan_blacklist.txt cfi_blacklist.txt dfsan_abilist.txt; do
616        mv -v %{buildroot}%{_prefix}/${file} %{buildroot}%{_libdir}/clang/%{version}/ || :
617done
618
619# move sanitizer libs to better place
620#mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib
621#mv -v %{buildroot}%{_prefix}/lib/linux/libclang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib
622#mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/
623#pushd %{buildroot}%{_libdir}/clang/%{version}/lib
624#for i in *.a *.syms *.so; do
625#        ln -s ../$i linux/$i
626#done
627
628#rm -rf %{buildroot}%{_libdir}/python*
629
630rm -f %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
631rm -f %{buildroot}%{_datadir}/clang/clang-rename.el
632rm -f %{buildroot}%{_datadir}/clang/clang-rename.py
633
634%if %{with test}
635%check
636ninja -C build check
637ninja -C build check-clang
638ninja -C build check-lldb
639ninja -C build check-lld
640%endif
641
642%clean
643rm -rf %{buildroot}
644
645
646%post -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
647%postun -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
648
649%post -n clang-libs -p /sbin/ldconfig
650%postun -n clang-libs -p /sbin/ldconfig
651
652%post -n lldb -p /sbin/ldconfig
653%postun -n lldb -p /sbin/ldconfig
654
655%post -n lld
656  /sbin/alternatives --install /usr/bin/ld ld \
657  /usr/bin/ld.lld 20
658
659%preun -n lld
660if [ $1 = 0 ]; then
661  /sbin/alternatives --remove ld /usr/bin/ld.lld
662fi
663
664%if %{with lld_libs}
665%post -n lld-libs -p /sbin/ldconfig
666%postun -n lld-libs -p /sbin/ldconfig
667%endif
668
669%posttrans devel
670# link llvm-config to the platform-specific file;
671# use ISA bits as priority so that 64-bit is preferred
672# over 32-bit if both are installed
673alternatives \
674  --install \
675  %{_bindir}/llvm-config \
676  llvm-config \
677  %{_bindir}/llvm-config-%{__isa_bits} \
678  %{__isa_bits}
679
680%postun devel
681if [ $1 -eq 0 ]; then
682  alternatives --remove llvm-config \
683    %{_bindir}/llvm-config-%{__isa_bits}
684fi
685exit 0
686
687
688%files
689%defattr(-,root,root,-)
690%doc CREDITS.TXT README.txt
691%{_bindir}/bugpoint
692%{_bindir}/dsymutil
693%{_bindir}/llc
694%{_bindir}/lli
695%{_bindir}/lli-child-target
696%{_bindir}/obj2yaml
697%{_bindir}/sancov
698%{_bindir}/sanstats
699%{_bindir}/verify-uselistorder
700%{_bindir}/yaml2obj
701%exclude %{_bindir}/llvm-config
702%exclude %{_bindir}/llvm-config-%{__isa_bits}
703%{_bindir}/llvm*
704%{_bindir}/opt
705%exclude %{_mandir}/man1/scan-build.1.*
706%doc %{_mandir}/man1/*.1.*
707%{_datadir}/opt-viewer
708
709%files devel
710%defattr(-,root,root,-)
711#doc %{llvmdocdir %{name}-devel}/
712%{_bindir}/llvm-config
713%{_bindir}/llvm-config-%{__isa_bits}
714%{_includedir}/%{name}
715%{_includedir}/%{name}-c
716#{_libdir}/BugpointPasses.so
717%{_libdir}/libLLVM.so
718%{_libdir}/libLTO.so*
719%{_libdir}/libRemarks.so
720%{_libdir}/LLVMgold.so
721%{_libdir}/cmake/llvm
722#exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
723
724%files -n llvm%{ver_suffix}-libs
725%defattr(-,root,root,-)
726%doc LICENSE.TXT
727#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
728#dir %{_libdir}/%{name}
729%{_libdir}/libLLVM-*.so
730%{_libdir}/libRemarks.so.*
731#exclude %{_libdir}/LLVMHello.so
732
733%files static
734%{_libdir}/*.a
735#{_libdir}/cmake/llvm/LLVMStaticExports.cmake
736
737%files -n clang
738%defattr(-,root,root,-)
739#doc %{llvmdocdir clang}/
740%{_bindir}/clang*
741%{_bindir}/c-index-test
742%{_bindir}/diagtool
743%{_bindir}/hmaptool
744%{_libdir}/clang
745
746%files -n clang-libs
747%defattr(-,root,root,-)
748%{_libdir}/libclang.so
749%{_libdir}/libclang.so.*
750%{_libdir}/libclang-cpp.so
751%{_libdir}/libclang-cpp.so.*
752
753%files -n clang-devel
754%defattr(-,root,root,-)
755#doc %{llvmdocdir clang-devel}/
756%{_includedir}/clang
757%{_includedir}/clang-c
758%dir %{_datadir}/clang/
759%{_libdir}/cmake/*
760
761%files -n clang-analyzer
762%defattr(-,root,root,-)
763%{_bindir}/scan-build
764%{_bindir}/scan-view
765#%{_libdir}/CheckerDependencyHandlingAnalyzerPlugin.so
766#%{_libdir}/CheckerOptionHandlingAnalyzerPlugin.so
767#%{_libdir}/SampleAnalyzerPlugin.so
768%{_libexecdir}/ccc-analyzer
769%{_libexecdir}/c++-analyzer
770%{_datadir}/scan-view
771%{_datadir}/scan-build
772%{_mandir}/man1/scan-build.1.*
773
774%files -n python3-clang
775%{python3_sitelib}/clang/
776
777%files -n lldb
778%defattr(-,root,root,-)
779#doc %{llvmdocdir lldb}/
780%{_bindir}/lldb*
781%{_libdir}/liblldb*.so.*
782
783%files -n lldb-devel
784%defattr(-,root,root,-)
785%{_includedir}/lldb
786%{_libdir}/liblldb*.so
787
788%files -n python3-lldb
789%{python3_sitearch}/lldb
790
791%files -n lld
792%defattr(-,root,root,-)
793%{_bindir}/lld*
794%{_bindir}/ld.lld
795%{_bindir}/ld64.lld
796%{_bindir}/wasm-ld
797%exclude %{_bindir}/lldb*
798
799%if %{with lld_libs}
800%files -n lld-libs
801%{_libdir}/liblld*.so.*
802%exclude %{_libdir}/liblldb*.so.*
803
804%files -n lld-devel
805%{_includedir}/lld
806%{_libdir}/liblld*.so
807%exclude %{_libdir}/liblldb*.so
808%endif
809
810%files -n libomp
811%{_libdir}/libarcher.so
812%{_libdir}/libomp.so
813%{_libdir}/libomptarget.so
814
815%files -n libomp-devel
816%{_libdir}/clang/%{version}/include/omp.h
817%{_libdir}/clang/%{version}/include/omp-tools.h
818%{_libdir}/clang/%{version}/include/ompt.h
819
820%files doc
821%defattr(-,root,root,-)
822%doc docs/*
823#doc %{llvmdocdir %{name}-doc}/
824
825%if %{with ocaml}
826%files ocaml
827%defattr(-,root,root,-)
828%{_libdir}/ocaml/*.cma
829%{_libdir}/ocaml/*.cmi
830%{_libdir}/ocaml/*.so
831%{_libdir}/ocaml/META.llvm*
832
833%files ocaml-devel
834%defattr(-,root,root,-)
835%{_libdir}/ocaml/*.a
836%{_libdir}/ocaml/*.cmx*
837%{_libdir}/ocaml/*.mli
838
839%files ocaml-doc
840%defattr(-,root,root,-)
841#doc %{llvmdocdir %{name}-ocaml-doc}/
842%endif
843
844%if 0%{?_with_doxygen}
845%files apidoc
846%defattr(-,root,root,-)
847%doc %{llvmdocdir %{name}-apidoc}/
848
849%files -n clang-apidoc
850%defattr(-,root,root,-)
851%doc %{llvmdocdir clang-apidoc}/
852%endif
853
854%if %{build_compat32}
855%files -n compat32-%{name}%{ver_suffix}-libs
856%defattr(-,root,root)
857%doc LICENSE.TXT
858#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
859%exclude %{_libdir}/libLTO.so
860#exclude %{_libdir}/BugpointPasses.so
861%exclude %{_libdir}/libclang*.so
862%exclude %{_libdir}/liblld*.so
863%exclude %{_libdir}/LLVMGold.so
864%exclude %{_libdir}/LLVMHello.so
865%{_libdir}/*.so
866%{_libdir}/libLTO.so.*
867%endif
868
869%changelog
870* Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.1-1
871- new upstream release.
872
873* Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-2
874- rebuilt with libffi-3.3.
875
876* Fri Mar 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-1
877- new upstream release.
878
879* Sun Dec 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
880- new upstream release.
881
882* Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-2
883- dropped all patches.
884- switched build-system to ninja.
885- switched python to python3.
886
887* Fri Sep 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-1
888- new upstream release.
889- added OpenMP.
890
891* Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.1-1
892- fixed %%files.
893
894* Wed Dec 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.0-1
895- new upstream release.
896- dropped Patch0, 4, 5, 100 and 200.
897- imported Patch3, 7, 12, 15, 100, 101, 102 and 400 from rawhide.
898- renamed a subpackage "llvm-libs".
899- added a subpackage "lld".
900
901* Tue Jan 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-2
902- added subpackages "llvm-static", "python-lldb" and "python-clang".
903
904* Mon Jan 01 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-1
905- new upstream release.
906- dropped Patch1 and 2: fixed in upstream.
907- imported Patch0, 3-5, 100 and 200 from rawhide.
908- disabled Patch1002: no longer needed?
909
910* Fri Aug  5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.1-1
911- new upstream release.
912- switched to cmake.
913- disable ocaml binding as default.
914- updated Patch1000 and 1002.
915- disabled Patch1000 as default.
916- cleanup patches.
917
918* Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2
919- rebuild with gcc-5.4.0
920
921* Sat Sep  5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.2-1
922- new upstream release
923- added BR: ocaml-ctypes
924
925* Thu Jun  4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.1-1
926- new upstream release
927- dropt Patch 1, 201 and 1001
928- updated Patch 1000
929
930* Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1
931- updated to 3.5.1
932- added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora
933- added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage
934- obsoleted clang-doc
935- built with ocaml 4.02.1
936
937* Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
938- fix <BTS:2832>
939  - fix configure option "--with-c-include-dirs"
940  - update Patch1000: clang-3.5.0-driver-ld.gold.patch
941  - update Patch1001: clang-3.5.0-driver-lib64.patch
942  - update Patch1002: clang-3.5.0-driver-vine.patch
943
944* Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1
945- update to 3.5.0
946- remove Patch11 (clang-hardfloat-hack.patch)
947
948* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
949- rebuild with libffi-3.0.13
950
951* Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
952- update to 3.3
953
954* Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
955- ld.gold (patch1000,1001)
956- add /%{_lib} to ld search path
957- add support *-vine-linux gcc (patch1002)
958
959* Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
960- update to 3.1
961
962* Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
963- updated to 3.0 release
964
965* Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
966- added patch 2-4 to support -O4 link-time optimization
967
968* Fri Sep  9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2
969- disable -fno-var-tracking-assignments on ppc
970  (seems like gcc-4.4.5 still doesn't support this)
971
972* Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1
973- new upstream release
974- add BR: libffi-devel
975- add R: libffi-devel to -devel
976
977* Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
978- initial build for Vine Linux
979
980* Sun May  2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
981- Update to final 2.7 release
982
983* Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
984- Update to first 2.7 pre-release
985
986* Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
987- Update to 2.6 pre-release2
988- -devel subpackage now virtually provides -static
989
990* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
991- Disable var tracking assignments on PPC
992
993* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
994- Don't adjust clang include dir; files there are noarch (bz#521893)
995- Enable clang unit tests
996- clang and clang-analyzer renamed; no longer depend on llvm at runtime
997
998* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
999- Package Clang's static analyzer tools
1000
1001* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
1002- PIC is now enabled by default; explicitly disable on %%{ix86}
1003
1004* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
1005- First 2.6 prerelease
1006- Enable Clang front-end
1007- Enable debuginfo generation
1008
1009* Sat Sep  5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
1010- Disable assertions (needed by OpenGTL, bz#521261)
1011- Align spec file with upstream build instructions
1012- Enable unit tests
1013
1014* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
1015- Only disable PIC on %%ix86; ppc actually needs it
1016
1017* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
1018- Disable use of position-independent code on 32-bit platforms
1019  (buggy in LLVM <= 2.5)
1020
1021* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
1022- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1023
1024* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
1025- Remove build scripts; they require the build directory to work
1026
1027* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
1028- Update to 2.5
1029- Package build scripts (bug #457881)
1030
1031* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
1032- Patched build process for the OCaml binding
1033
1034* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
1035- Update to 2.4
1036- Package Ocaml binding
1037
1038* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
1039- Add dependency on groff
1040
1041* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
1042- LLVM 2.3
1043
1044* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
1045- fix license tags
1046
1047* Wed Mar  5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
1048- Fix compilation problems with gcc 4.3
1049
1050* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
1051- Autorebuild for GCC 4.3
1052
1053* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
1054- Fix review comments
1055
1056* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
1057- Initial version
Note: See TracBrowser for help on using the repository browser.