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

Revision 12506, 30.6 KB checked in by tomop, 3 years ago (diff)

updated 16 packages

bluez-5.55-1

firefox-78.4.0-1

llvm-11.0.0-2

libdrm-2.4.102-1

libmodsecurity-3.0.4-2

mesa-20.2.1-1

nginx-1.18.0-8

nspr-4.29-1

nss-3.58-1

oniguruma-6.9.5.rev1-3

python-mako-1.1.3-1

python-markupsafe-1.1.1-2

rust-1.47.0-1

thunderbird-78.4.0-1

tigervnc-1.11.0-1

xorg-x11-server-1.20.9-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:        11.0.0
26Release:        2%{?_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%debug_package
413
414
415%prep
416%setup -q -a1 -a2 -a3 -a4 -a6 -n llvm-%{version}.src
417
418#%patch0 -p2
419#%patch1 -p2
420#%patch2 -p2
421##patch3 -p2
422
423rm -rf tools/clang tools/lld tools/lldb projects/compiler-rt
424mv clang-%{version}.src tools/clang
425mv compiler-rt-%{version}.src projects/compiler-rt
426mv lldb-%{version}.src tools/lldb
427mv lld-%{version}.src tools/lld
428mv openmp-%{version}.src projects/openmp
429
430%if %{with clang_tools_extra}
431tar xvf %{SOURCE5}
432mv clang-tools-extra-%{version}.src tools/clang/tools/extra
433%endif
434
435pushd tools/clang
436##patch100 -p1
437#%patch101 -p2
438#%patch102 -p1
439#%patch103 -p2
440popd
441
442pushd projects/compiler-rt
443#%patch200 -p1
444popd
445
446pushd tools/lld
447#%patch400 -p1
448popd
449
450# Vine Linux
451%if %{with force_gold}
452pushd tools/clang
453%patch1000 -p1 -b .driver-ld.gold
454popd
455%endif
456#%patch1002 -p1 -b .driver-vine
457
458sed -i -e 's/"i686-linux-gnu",/"i686-linux-gnu","i686-vine-linux","i686-vine-linux-gnu",/' tools/clang/lib/Driver/ToolChains/Gnu.cpp
459sed -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
460
461sed -i -e 's/"ld"/"ld.gold"/' tools/clang/include/clang/Driver/ToolChain.h
462
463%build
464mkdir build
465cd build
466
467%ifarch s390 s390x %{arm} %ix86
468# Decrease debuginfo verbosity to reduce memory consumption during final library linking
469%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
470%endif
471
472#CFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security -fPIC"
473#CXXFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security -fPIC -std=c++11"
474#TMP_PWD=$(pwd)
475#LDFLAGS="%{?__global_ldflags} -L$TMP_PWD/%{_lib} -lpthread -ldl"
476
477%cmake .. \
478        -GNinja \
479        -DBUILD_SHARED_LIBS:BOOL=OFF \
480        -DLLVM_PARALLEL_LINK_JOBS=1 \
481        -DCMAKE_BUILD_TYPE=Release \
482        -DCMAKE_INSTALL_RPATH=";" \
483%if 0%{?__isa_bits} == 64
484        -DLLVM_LIBDIR_SUFFIX=64 \
485%else
486        -DLLVM_LIBDIR_SUFFIX= \
487%endif
488        -DLLVM_TARGETS_TO_BUILD=all \
489        -DLLVM_ENABLE_LIBCXX:BOOL=OFF \
490        -DLLVM_ENABLE_ZLIB:BOOL=ON \
491        -DLLVM_ENABLE_FFI:BOOL=ON \
492        -DLLVM_ENABLE_RTTI:BOOL=ON \
493        -DLLVM_ENABLE_EH=ON \
494        -DLLVM_BINUTILS_INCDIR=%{_includedir} \
495        -DLLVM_BUILD_RUNTIME:BOOL=ON \
496        \
497        -DLLVM_INCLUDE_TOOLS:BOOL=ON \
498        -DLLVM_BUILD_TOOLS:BOOL=ON \
499        \
500        -DLLVM_INCLUDE_TESTS:BOOL=ON \
501        -DLLVM_BUILD_TESTS:BOOL=ON \
502        \
503        -DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
504        -DLLVM_BUILD_EXAMPLES:BOOL=OFF \
505        \
506        -DLLVM_INCLUDE_UTILS:BOOL=ON \
507        -DLLVM_INSTALL_UTILS:BOOL=ON \
508        -DLLVM_UTILS_INSTALL_DIR:PATH=%{_bindir} \
509        -DLLVM_TOOLS_INSTALL_DIR:PATH=bin \
510        \
511        -DLLVM_INCLUDE_DOCS:BOOL=ON \
512        -DLLVM_ENABLE_SPHINX:BOOL=OFF \
513%if %{with doxygen}
514        -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
515%else
516        -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
517%endif
518        -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
519        -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
520        -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
521        -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
522        -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON \
523        \
524        -DCLANG_ENABLE_ARCMT:BOOL=ON \
525        -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
526        -DCLANG_INCLUDE_DOCS:BOOL=ON \
527        -DCLANG_INCLUDE_TESTS:BOOL=ON \
528        -DCLANG_PLUGIN_SUPPORT:BOOL=ON \
529        -DCLANG_BUILD_EXAMPLES:BOOL=OFF \
530        -DCLANG_LINK_CLANG_DYLIB=ON \
531        -DCLANG_REPOSITORY_STRING="Vine Linux %{version}-%{release}" \
532        -DLIB_SUFFIX= \
533        \
534        -DLLDB_DISABLE_CURSES:BOOL=OFF \
535        -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
536        -DLLDB_DISABLE_PYTHON:BOOL=OFF \
537        \
538        -DLLDB_LINK_LLVM_DYLIB:BOOL=ON \
539        \
540        -DLIBOMP_INSTALL_ALIASES=OFF \
541        -DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{version}/include \
542        \
543        -DPYTHON_EXECUTABLE:STRING=%{__python3} \
544        -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
545
546# workaround for all-in-one build
547#TMP_PWD=$(pwd)
548#LD_LIBRARY_PATH="$TMP_PWD/%{_lib}" make %{?_smp_mflags}
549
550%ninja_build
551
552%install
553rm -rf %{buildroot}
554
555cd build
556%ninja_install
557
558# llvm
559
560install -m755 ./bin/lli-child-target %{buildroot}%{_bindir}/lli-child-target
561
562# fix multi-lib
563mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
564ln -sf llvm-config-%{__isa_bits} %{buildroot}%{_bindir}/llvm-config
565mv -v %{buildroot}%{_includedir}/llvm/Config/llvm-config{,-%{__isa_bits}}.h
566install -m 0644 %{SOURCE10} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h
567
568# clang
569
570# remove static libraries
571rm -fv %{buildroot}%{_libdir}/libclang*.a
572
573# install clang python bindings
574mkdir -p %{buildroot}%{python3_sitelib}/clang/
575install -p -m644 ../tools/clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
576
577mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h
578install -m 0644 %{SOURCE11} %{buildroot}%{_includedir}/clang/Config/config.h
579
580# remove git integration
581rm -vf %{buildroot}%{_bindir}/git-clang-format
582# remove editor integrations (bbedit, sublime, emacs, vim)
583rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript
584rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
585rm -vf %{buildroot}%{_datadir}/clang/clang-format.el
586rm -vf %{buildroot}%{_datadir}/clang/clang-format.py*
587# remove diff reformatter
588rm -vf %{buildroot}%{_datadir}/clang/clang-format-diff.py*
589
590
591# lldb
592
593# remove static libraries
594rm -fv %{buildroot}%{_libdir}/liblldb*.a
595
596# python: fix binary libraries location
597liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
598ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
599
600# remove bundled six.py
601rm -f %{buildroot}%{python3_sitearch}/six.*
602
603
604# lld
605
606# remove static libraries
607rm -fv %{buildroot}%{_libdir}/liblld*.a
608
609# Remove rpath
610chrpath --delete %{buildroot}%{_bindir}/*lld
611chrpath --delete %{buildroot}%{_bindir}/lld-link
612chrpath --delete %{buildroot}%{_bindir}/wasm-ld
613find %{buildroot}%{_libdir} -type f -name 'liblld*.so*' | \
614  grep -v 'liblldb' | \
615  xargs chrpath --delete
616
617%if !%{with lld_libs}
618  rm -rf %{buildroot}%{_includedir}/lld
619%endif
620
621# compiler-rt
622
623# move sanitizer lists to better place
624mkdir -p %{buildroot}%{_libdir}/clang/%{version}
625for file in asan_blacklist.txt msan_blacklist.txt dfsan_blacklist.txt cfi_blacklist.txt dfsan_abilist.txt; do
626        mv -v %{buildroot}%{_prefix}/${file} %{buildroot}%{_libdir}/clang/%{version}/ || :
627done
628
629# move sanitizer libs to better place
630#mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib
631#mv -v %{buildroot}%{_prefix}/lib/linux/libclang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib
632#mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/
633#pushd %{buildroot}%{_libdir}/clang/%{version}/lib
634#for i in *.a *.syms *.so; do
635#        ln -s ../$i linux/$i
636#done
637
638#rm -rf %{buildroot}%{_libdir}/python*
639
640rm -f %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
641rm -f %{buildroot}%{_datadir}/clang/clang-rename.el
642rm -f %{buildroot}%{_datadir}/clang/clang-rename.py
643
644%if %{with test}
645%check
646ninja -C build check
647ninja -C build check-clang
648ninja -C build check-lldb
649ninja -C build check-lld
650%endif
651
652
653%clean
654rm -rf %{buildroot}
655
656
657%post -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
658%postun -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
659
660%post -n clang-libs -p /sbin/ldconfig
661%postun -n clang-libs -p /sbin/ldconfig
662
663%post -n lldb -p /sbin/ldconfig
664%postun -n lldb -p /sbin/ldconfig
665
666%post -n lld
667  /sbin/alternatives --install /usr/bin/ld ld \
668  /usr/bin/ld.lld 20
669
670%preun -n lld
671if [ $1 = 0 ]; then
672  /sbin/alternatives --remove ld /usr/bin/ld.lld
673fi
674
675%if %{with lld_libs}
676%post -n lld-libs -p /sbin/ldconfig
677%postun -n lld-libs -p /sbin/ldconfig
678%endif
679
680%posttrans devel
681# link llvm-config to the platform-specific file;
682# use ISA bits as priority so that 64-bit is preferred
683# over 32-bit if both are installed
684alternatives \
685  --install \
686  %{_bindir}/llvm-config \
687  llvm-config \
688  %{_bindir}/llvm-config-%{__isa_bits} \
689  %{__isa_bits}
690
691%postun devel
692if [ $1 -eq 0 ]; then
693  alternatives --remove llvm-config \
694    %{_bindir}/llvm-config-%{__isa_bits}
695fi
696exit 0
697
698
699%files
700%defattr(-,root,root,-)
701%doc CREDITS.TXT README.txt
702%{_bindir}/FileCheck
703%{_bindir}/bugpoint
704%{_bindir}/dsymutil
705%{_bindir}/llc
706%{_bindir}/lli
707%{_bindir}/lli-child-target
708%{_bindir}/obj2yaml
709%{_bindir}/sancov
710%{_bindir}/sanstats
711%{_bindir}/verify-uselistorder
712%{_bindir}/yaml2obj
713%{_bindir}/count
714%{_bindir}/not
715%{_bindir}/yaml-bench
716%exclude %{_bindir}/llvm-config
717%exclude %{_bindir}/llvm-config-%{__isa_bits}
718%{_bindir}/llvm*
719%{_bindir}/opt
720%exclude %{_mandir}/man1/scan-build.1.*
721%doc %{_mandir}/man1/*.1.*
722%{_datadir}/opt-viewer
723
724%files -n llvm%{ver_suffix}-libs
725%defattr(-,root,root,-)
726%license LICENSE.TXT
727#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
728#dir %{_libdir}/%{name}
729%{_libdir}/libLLVM-*.so
730%{_libdir}/LLVMgold.so
731%{_libdir}/libLTO.so*
732%{_libdir}/libRemarks.so*
733
734%files devel
735%defattr(-,root,root,-)
736#doc %{llvmdocdir %{name}-devel}/
737%{_bindir}/llvm-config
738%{_bindir}/llvm-config-%{__isa_bits}
739%{_includedir}/%{name}
740%{_includedir}/%{name}-c
741#{_libdir}/BugpointPasses.so
742%{_libdir}/libLLVM.so
743%{_libdir}/cmake/llvm
744#exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
745
746%files static
747%{_libdir}/*.a
748#{_libdir}/cmake/llvm/LLVMStaticExports.cmake
749
750%files -n clang
751%defattr(-,root,root,-)
752#doc %{llvmdocdir clang}/
753%{_bindir}/clang*
754%{_bindir}/c-index-test
755%{_bindir}/diagtool
756%{_bindir}/hmaptool
757%{_libdir}/clang
758
759%files -n clang-libs
760%defattr(-,root,root,-)
761%{_libdir}/libclang.so
762%{_libdir}/libclang.so.*
763%{_libdir}/libclang-cpp.so
764%{_libdir}/libclang-cpp.so.*
765
766%files -n clang-devel
767%defattr(-,root,root,-)
768#doc %{llvmdocdir clang-devel}/
769%{_includedir}/clang
770%{_includedir}/clang-c
771%dir %{_datadir}/clang/
772%{_libdir}/cmake/*
773
774%files -n clang-analyzer
775%defattr(-,root,root,-)
776%{_bindir}/scan-build
777%{_bindir}/scan-view
778#%{_libdir}/CheckerDependencyHandlingAnalyzerPlugin.so
779#%{_libdir}/CheckerOptionHandlingAnalyzerPlugin.so
780#%{_libdir}/SampleAnalyzerPlugin.so
781%{_libexecdir}/ccc-analyzer
782%{_libexecdir}/c++-analyzer
783%{_datadir}/scan-view
784%{_datadir}/scan-build
785%{_mandir}/man1/scan-build.1.*
786
787%files -n python3-clang
788%{python3_sitelib}/clang/
789
790%files -n lldb
791%defattr(-,root,root,-)
792#doc %{llvmdocdir lldb}/
793%{_bindir}/lldb*
794%{_libdir}/liblldb*.so.*
795
796%files -n lldb-devel
797%defattr(-,root,root,-)
798%{_includedir}/lldb
799%{_libdir}/liblldb*.so
800
801%files -n python3-lldb
802%{python3_sitearch}/lldb
803
804%files -n lld
805%defattr(-,root,root,-)
806%{_bindir}/lld*
807%{_bindir}/ld.lld
808%{_bindir}/ld64.lld
809%{_bindir}/wasm-ld
810%exclude %{_bindir}/lldb*
811
812%if %{with lld_libs}
813%files -n lld-libs
814%{_libdir}/liblld*.so.*
815%exclude %{_libdir}/liblldb*.so.*
816
817%files -n lld-devel
818%{_includedir}/lld
819%{_libdir}/liblld*.so
820%exclude %{_libdir}/liblldb*.so
821%endif
822
823%files -n libomp
824%{_libdir}/libarcher.so
825%{_libdir}/libomp.so
826%{_libdir}/libomptarget.so
827
828%files -n libomp-devel
829%{_libdir}/clang/%{version}/include/omp.h
830%{_libdir}/clang/%{version}/include/omp-tools.h
831%{_libdir}/clang/%{version}/include/ompt.h
832%{_includedir}/ompt-multiplex.h
833
834%files doc
835%defattr(-,root,root,-)
836%doc docs/*
837#doc %{llvmdocdir %{name}-doc}/
838
839%if %{with ocaml}
840%files ocaml
841%defattr(-,root,root,-)
842%{_libdir}/ocaml/*.cma
843%{_libdir}/ocaml/*.cmi
844%{_libdir}/ocaml/*.so
845%{_libdir}/ocaml/META.llvm*
846
847%files ocaml-devel
848%defattr(-,root,root,-)
849%{_libdir}/ocaml/*.a
850%{_libdir}/ocaml/*.cmx*
851%{_libdir}/ocaml/*.mli
852
853%files ocaml-doc
854%defattr(-,root,root,-)
855#doc %{llvmdocdir %{name}-ocaml-doc}/
856%endif
857
858%if 0%{?_with_doxygen}
859%files apidoc
860%defattr(-,root,root,-)
861%doc %{llvmdocdir %{name}-apidoc}/
862
863%files -n clang-apidoc
864%defattr(-,root,root,-)
865%doc %{llvmdocdir clang-apidoc}/
866%endif
867
868%if %{build_compat32}
869%files -n compat32-%{name}%{ver_suffix}-libs
870%defattr(-,root,root)
871%license LICENSE.TXT
872#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
873%exclude %{_libdir}/libLTO.so
874#exclude %{_libdir}/BugpointPasses.so
875%exclude %{_libdir}/libclang*.so
876%exclude %{_libdir}/liblld*.so
877%exclude %{_libdir}/LLVMgold.so
878%{_libdir}/*.so
879%{_libdir}/libRemarks.so.*
880%endif
881
882
883%changelog
884* Fri Oct 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-2
885- enabled to build utils.
886
887* Thu Oct 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-1
888- new upstream release.
889
890* Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.1-1
891- new upstream release.
892
893* Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-2
894- rebuilt with libffi-3.3.
895
896* Fri Mar 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.0-1
897- new upstream release.
898
899* Sun Dec 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
900- new upstream release.
901
902* Sun Sep 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-2
903- dropped all patches.
904- switched build-system to ninja.
905- switched python to python3.
906
907* Fri Sep 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-1
908- new upstream release.
909- added OpenMP.
910
911* Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.1-1
912- fixed %%files.
913
914* Wed Dec 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.0-1
915- new upstream release.
916- dropped Patch0, 4, 5, 100 and 200.
917- imported Patch3, 7, 12, 15, 100, 101, 102 and 400 from rawhide.
918- renamed a subpackage "llvm-libs".
919- added a subpackage "lld".
920
921* Tue Jan 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-2
922- added subpackages "llvm-static", "python-lldb" and "python-clang".
923
924* Mon Jan 01 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-1
925- new upstream release.
926- dropped Patch1 and 2: fixed in upstream.
927- imported Patch0, 3-5, 100 and 200 from rawhide.
928- disabled Patch1002: no longer needed?
929
930* Fri Aug  5 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.8.1-1
931- new upstream release.
932- switched to cmake.
933- disable ocaml binding as default.
934- updated Patch1000 and 1002.
935- disabled Patch1000 as default.
936- cleanup patches.
937
938* Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2
939- rebuild with gcc-5.4.0
940
941* Sat Sep  5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.2-1
942- new upstream release
943- added BR: ocaml-ctypes
944
945* Thu Jun  4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.6.1-1
946- new upstream release
947- dropt Patch 1, 201 and 1001
948- updated Patch 1000
949
950* Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1
951- updated to 3.5.1
952- added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora
953- added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage
954- obsoleted clang-doc
955- built with ocaml 4.02.1
956
957* Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
958- fix <BTS:2832>
959  - fix configure option "--with-c-include-dirs"
960  - update Patch1000: clang-3.5.0-driver-ld.gold.patch
961  - update Patch1001: clang-3.5.0-driver-lib64.patch
962  - update Patch1002: clang-3.5.0-driver-vine.patch
963
964* Tue Oct 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-1
965- update to 3.5.0
966- remove Patch11 (clang-hardfloat-hack.patch)
967
968* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
969- rebuild with libffi-3.0.13
970
971* Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
972- update to 3.3
973
974* Mon Dec 03 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-2
975- ld.gold (patch1000,1001)
976- add /%{_lib} to ld search path
977- add support *-vine-linux gcc (patch1002)
978
979* Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
980- update to 3.1
981
982* Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
983- updated to 3.0 release
984
985* Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 2.9-3
986- added patch 2-4 to support -O4 link-time optimization
987
988* Fri Sep  9 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.9-2
989- disable -fno-var-tracking-assignments on ppc
990  (seems like gcc-4.4.5 still doesn't support this)
991
992* Thu Aug 25 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9-1
993- new upstream release
994- add BR: libffi-devel
995- add R: libffi-devel to -devel
996
997* Sun May 23 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7-1
998- initial build for Vine Linux
999
1000* Sun May  2 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-1
1001- Update to final 2.7 release
1002
1003* Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.7-0.1.pre1
1004- Update to first 2.7 pre-release
1005
1006* Fri Sep 18 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.6.pre2
1007- Update to 2.6 pre-release2
1008- -devel subpackage now virtually provides -static
1009
1010* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.5.pre1
1011- Disable var tracking assignments on PPC
1012
1013* Wed Sep  9 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.4.pre1
1014- Don't adjust clang include dir; files there are noarch (bz#521893)
1015- Enable clang unit tests
1016- clang and clang-analyzer renamed; no longer depend on llvm at runtime
1017
1018* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.3.pre1
1019- Package Clang's static analyzer tools
1020
1021* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.2.pre1
1022- PIC is now enabled by default; explicitly disable on %%{ix86}
1023
1024* Mon Sep  7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
1025- First 2.6 prerelease
1026- Enable Clang front-end
1027- Enable debuginfo generation
1028
1029* Sat Sep  5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
1030- Disable assertions (needed by OpenGTL, bz#521261)
1031- Align spec file with upstream build instructions
1032- Enable unit tests
1033
1034* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
1035- Only disable PIC on %%ix86; ppc actually needs it
1036
1037* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
1038- Disable use of position-independent code on 32-bit platforms
1039  (buggy in LLVM <= 2.5)
1040
1041* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
1042- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1043
1044* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
1045- Remove build scripts; they require the build directory to work
1046
1047* Wed Mar  4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
1048- Update to 2.5
1049- Package build scripts (bug #457881)
1050
1051* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
1052- Patched build process for the OCaml binding
1053
1054* Tue Dec  2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
1055- Update to 2.4
1056- Package Ocaml binding
1057
1058* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
1059- Add dependency on groff
1060
1061* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-1
1062- LLVM 2.3
1063
1064* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2-4
1065- fix license tags
1066
1067* Wed Mar  5 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.2-3
1068- Fix compilation problems with gcc 4.3
1069
1070* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2-2
1071- Autorebuild for GCC 4.3
1072
1073* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-2
1074- Fix review comments
1075
1076* Sun Jan 20 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.1-1
1077- Initial version
Note: See TracBrowser for help on using the repository browser.