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

Revision 12228, 29.7 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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