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

RevLine 
[12228]1%bcond_with test
2
[9470]3%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
4
[11969]5%define ver_suffix %(echo "%{version}" | cut -d . -f 1)
6
[11308]7%define _unpackaged_files_terminate_build 1
8
[1073]9# Build options:
[9470]10# Components skipped by default:
11%bcond_with doxygen
[11293]12%bcond_with ocaml
13%bcond_with force_gold
[11969]14%bcond_with lld_libs
15%bcond_with clang_tools_extra
[1073]16
[9470]17# Documentation install path
18%global llvmdocdir() %{_docdir}/%1-%{version}
19
[11293]20%define _unpackaged_files_terminate_build 1
21
[1073]22Summary:        The Low Level Virtual Machine
23Summary(ja):    LLVM - 低レベルバーチャルマシン
[12474]24Name:           llvm
25Version:        10.0.1
26Release:        1%{?_dist_release}
27Group:          programming
28Vendor:         Project Vine
29Distribution:   Vine Linux
[1073]30
31License:        NCSA
[12320]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
[11985]38%if %{with clang_tools_extra}
[12320]39Source5:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
[11985]40%endif
[12320]41Source6:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/openmp-%{version}.src.tar.xz
[7943]42
[4656]43# multilib fixes
[11293]44Source10:        llvm-config.h
45Source11:        clang-config.h
[4656]46
[9470]47# patches
[1073]48
[11969]49# llvm
[12228]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
[7197]56
[11969]57# clang
[12228]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
[11308]62
[12228]63# compiler-rt
64Patch200:       0001-PATCH-std-thread-copy.patch
65
[11969]66# lld
[12228]67Patch400:       0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
[11969]68
[7201]69# Vine Patch
[11293]70Patch1000: clang-3.8.1-driver-ld.gold.patch
71Patch1002: clang-3.8.1-driver-vine.patch
[7201]72
[1073]73BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
74
[5424]75BuildRequires:  binutils-devel
[11293]76BuildRequires:  cmake
[12228]77BuildRequires:  ninja
[1073]78BuildRequires:  bison
[12228]79BuildRequires:  python3
80BuildRequires:  python3-rpm-macros
[1073]81BuildRequires:  chrpath
82BuildRequires:  flex
[12228]83BuildRequires:  git
[1073]84BuildRequires:  gcc-c++ >= 3.4
85BuildRequires:  groff
[12376]86BuildRequires:  libffi-devel >= 3.3
[11293]87BuildRequires:  libstdc++-devel
88BuildRequires:  libstdc++-static
[1073]89BuildRequires:  libtool-ltdl-devel
[9594]90BuildRequires:  libxml2-devel
[11969]91%if %{with ocaml}
[9594]92BuildRequires:  ocaml-findlib
[9734]93BuildRequires:  ocaml-ctypes
[9594]94BuildRequires:  ocaml-ounit
[11969]95%endif
[1073]96# for DejaGNU test suite
[12228]97BuildRequires:  dejagnu tcl-devel
[9470]98%if %{with doxygen}
[1073]99BuildRequires:  doxygen graphviz
100%endif
[9594]101# pod2man
102BuildRequires:  perl
[9470]103# lldb
104BuildRequires:  swig
105BuildRequires:  libedit-devel
[12228]106BuildRequires:  python3-devel
[11969]107# lld
108BuildRequires: ncurses-devel
109BuildRequires: zlib-devel
[9470]110
[11969]111Requires:       llvm%{ver_suffix}-libs = %{version}-%{release}
[1073]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 のライブラリおよびヘッダファイル
[12474]128Group:          programming
[1073]129Requires:       %{name} = %{version}-%{release}
130Requires:       libstdc++-devel
[4656]131Requires:       libffi-devel
[11969]132Requires:       libedit-devel
[1073]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 のドキュメント
[12474]142Group:          documentation
[9470]143BuildArch:      noarch
[1073]144Requires:       %{name} = %{version}-%{release}
[9470]145# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
146Obsoletes:      %{name}-doc < %{version}-%{release}
[1073]147
148%description doc
149Documentation for the LLVM compiler infrastructure.
150
151
[11969]152%package -n llvm%{ver_suffix}-libs
[4656]153Summary:        LLVM shared libraries
[9470]154Summary(ja):    LLVM 共有ライブラリ
[12474]155Group:          system
[11969]156Provides:       llvm-libs = %{version}-%{release}
[11985]157Obsoletes:      llvm-libs <= 7.0.0
[4656]158
[11969]159%description -n llvm%{ver_suffix}-libs
[4656]160Shared libraries for the LLVM compiler infrastructure.
161
[11969]162%description -n llvm%{ver_suffix}-libs -l ja
[9594]163LLVM コンパイラ基盤の共有ライブラリです.
[4656]164
[11308]165%package static
166Summary:        LLVM static libraries
167Summary(ja):    LLVM 静的ライブラリ
[12474]168Group:          programming
[11308]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
[1073]178%package -n clang
179Summary:        A C language family front-end for LLVM
[9470]180Summary(ja):    LLVM の C 言語フロントエンド
[1073]181License:        NCSA
[12474]182Group:          programming
[9470]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}
[1073]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
[9470]199%Package -n clang-libs
200Summary:        Runtime library for clang
201Summary(ja):    Clang のランタイムライブラリ
[12474]202Group:          system
[1073]203
[9470]204%description -n clang-libs
205Runtime library for clang.
206
[9594]207%description -n clang-libs -l ja
208Clang のランタイムライブラリです.
[9470]209
[1073]210%package -n clang-devel
211Summary:        Header files for clang
[9470]212Summary(ja):    Clang のヘッダファイル
[12474]213Group:          programming
[1073]214Requires:       clang = %{version}-%{release}
215
216%description -n clang-devel
217This package contains header files for the Clang compiler.
218
[9594]219%description -n clang-devel -l ja
220Clang コンパイラのヘッダファイル集です.
[1073]221
222%package -n clang-analyzer
223Summary:        A source code analysis framework
[11293]224Summary(ja):    ソースコード分析フレームワーク
[1073]225License:        NCSA
[12474]226Group:          programming
[1073]227Requires:       clang = %{version}-%{release}
228# not picked up automatically since files are currently not instaled
229# in standard Python hierarchies yet
[12228]230Requires:       python3
[1073]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
[12228]238%package -n python3-clang
239Summary: Python3 bindings for clang
[12474]240Group:          programming
[11969]241Requires: %{name}%{ver_suffix}-libs%{?_isa} = %{version}-%{release}
[12228]242Requires: python3
243%description -n python3-clang
244Python3 bindings for clang
[11308]245
246
[9470]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.
[1073]255
[9470]256%package -n lldb
257Summary:        Next generation high-performance debugger
258Summary(ja):    高性能デバッガー
259License:        NCSA
[12474]260Group:          programming
[1073]261Requires:       %{name} = %{version}-%{release}
262
[9470]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.
[1073]268
[9470]269%package -n lldb-devel
270Summary:        Header files for LLDB
271Summary(ja):    LLDB のヘッダファイル
[12474]272Group:          programming
[9470]273Requires:       lldb = %{version}-%{release}
[1073]274
[9470]275%description -n lldb-devel
276This package contains header files for the LLDB debugger.
277
278
[11969]279%package -n lld
280Summary:        The LLVM Linker
281Summary(ja):    LLVMリンカー
282License:        NCSA
[12474]283Group:          programming
[11969]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
[12474]293Group:          programming
[11969]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
[12474]303Group:          programming
[11969]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
[9470]311%if %{with doxygen}
[1073]312%package apidoc
313Summary:        API documentation for LLVM
314Summary(ja):    LLVM の API ドキュメント
[12474]315Group:          documentation
[9470]316BuildArch:      noarch
[1073]317Requires:       %{name}-docs = %{version}-%{release}
318
319%description apidoc
320API documentation for the LLVM compiler infrastructure.
[9470]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.
[1073]330%endif
331
[11308]332
[12228]333%package -n python3-lldb
334Summary:        Python3 module for LLDB
335Summary(ja):    LLDB用Python3モジュール
[12474]336Group:          programming
[11308]337BuildRequires:  python-devel
338Requires:       python-six
339
[12228]340%description -n python3-lldb
341The package contains the LLDB Python3 module.
[11308]342
343
[12221]344%package -n libomp
345Summary:        OpenMP runtime for clang
346Summary(ja):    clang用OpenMPランタイム
[12474]347Group:          system
[12221]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ヘッダファイル
[12474]356Group:          programming
[12221]357Requires:       clang-devel%{?isa} = %{version}
358
359%description -n libomp-devel
360The package contains the OpenMP header files.
361
362
[11293]363%if %{with ocaml}
[1073]364%package        ocaml
365Summary:        OCaml binding for LLVM
366Summary(ja):    LLVM の OCaml バインディング
[12474]367Group:          system
[1073]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 の開発ファイル
[12474]377Group:          programming
[1073]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 のドキュメント
[12474]389Group:          documentation
[9470]390BuildArch:      noarch
[1073]391Requires:       %{name}-ocaml = %{version}-%{release}
[9470]392# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
393Obsoletes:      %{name}-ocaml-doc < %{version}-%{release}
[1073]394
395%description ocaml-doc
396HTML documentation for LLVM's OCaml binding.
397
[11293]398%endif
399
[9470]400# compat32'
[11969]401%package -n compat32-%{name}%{ver_suffix}-libs
[9470]402Summary:        LLVM shared libraries
403Summary(ja):    LLVM 共有ライブラリ
[12474]404Group:          system
[11969]405Provides:       compat32-llvm-libs = %{version}-%{release}
406Requires:       %{name}%{ver_suffix}-libs = %{version}-%{release}
[1073]407
[11969]408%description -n compat32-%{name}%{ver_suffix}-libs
[9470]409Shared libraries for the LLVM compiler infrastructure.
[1073]410
[9470]411
[1073]412%prep
[12221]413%setup -q -a1 -a2 -a3 -a4 -a6 -n llvm-%{version}.src
[11308]414
[12228]415#%patch0 -p2
416#%patch1 -p2
417#%patch2 -p2
418##patch3 -p2
[11308]419
[11969]420rm -rf tools/clang tools/lld tools/lldb projects/compiler-rt
[12320]421mv clang-%{version}.src tools/clang
[9470]422mv compiler-rt-%{version}.src projects/compiler-rt
423mv lldb-%{version}.src tools/lldb
[11969]424mv lld-%{version}.src tools/lld
[12221]425mv openmp-%{version}.src projects/openmp
[1073]426
[11969]427%if %{with clang_tools_extra}
428tar xvf %{SOURCE5}
429mv clang-tools-extra-%{version}.src tools/clang/tools/extra
430%endif
431
[11293]432pushd tools/clang
[12228]433##patch100 -p1
434#%patch101 -p2
435#%patch102 -p1
436#%patch103 -p2
[9470]437popd
438
[12228]439pushd projects/compiler-rt
440#%patch200 -p1
441popd
442
[11969]443pushd tools/lld
[12228]444#%patch400 -p1
[11308]445popd
446
[9470]447# Vine Linux
[11293]448%if %{with force_gold}
449pushd tools/clang
[9121]450%patch1000 -p1 -b .driver-ld.gold
[11293]451popd
452%endif
[11308]453#%patch1002 -p1 -b .driver-vine
[7201]454
[12228]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
[11308]457
[11293]458sed -i -e 's/"ld"/"ld.gold"/' tools/clang/include/clang/Driver/ToolChain.h
[1073]459
460%build
[11293]461mkdir build
462cd build
463
[12228]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
[11293]468
[12228]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
[11293]474%cmake .. \
[12228]475        -GNinja \
[11293]476        -DBUILD_SHARED_LIBS:BOOL=OFF \
[12228]477        -DLLVM_PARALLEL_LINK_JOBS=1 \
[11293]478        -DCMAKE_BUILD_TYPE=Release \
[12228]479        -DCMAKE_INSTALL_RPATH=";" \
[11293]480%if 0%{?__isa_bits} == 64
481        -DLLVM_LIBDIR_SUFFIX=64 \
482%else
483        -DLLVM_LIBDIR_SUFFIX= \
484%endif
[12228]485        -DLLVM_TARGETS_TO_BUILD=all \
[11293]486        -DLLVM_ENABLE_LIBCXX:BOOL=OFF \
487        -DLLVM_ENABLE_ZLIB:BOOL=ON \
488        -DLLVM_ENABLE_FFI:BOOL=ON \
489        -DLLVM_ENABLE_RTTI:BOOL=ON \
[12228]490        -DLLVM_ENABLE_EH=ON \
[11293]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 \
[9470]503%if %{with doxygen}
[11293]504        -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
[9470]505%else
[11293]506        -DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
[5555]507%endif
[11293]508        -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
[11969]509        -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
[11293]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 \
[12228]520        -DCLANG_LINK_CLANG_DYLIB=ON \
521        -DCLANG_REPOSITORY_STRING="Vine Linux %{version}-%{release}" \
[11293]522        -DLIB_SUFFIX= \
523        \
524        -DLLDB_DISABLE_CURSES:BOOL=OFF \
525        -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
526        -DLLDB_DISABLE_PYTHON:BOOL=OFF \
527        \
[11969]528        -DLLDB_LINK_LLVM_DYLIB:BOOL=ON \
529        \
[12221]530        -DLIBOMP_INSTALL_ALIASES=OFF \
531        -DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{version}/include \
532        \
[12228]533        -DPYTHON_EXECUTABLE:STRING=%{__python3} \
[11293]534        -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
[9594]535
[11293]536# workaround for all-in-one build
[11308]537#TMP_PWD=$(pwd)
538#LD_LIBRARY_PATH="$TMP_PWD/%{_lib}" make %{?_smp_mflags}
[9594]539
[12228]540%ninja_build
541
[1073]542%install
543rm -rf %{buildroot}
[5555]544
[11293]545cd build
[12228]546%ninja_install
[4656]547
[11293]548# llvm
[9121]549
[11293]550install -m755 ./bin/lli-child-target %{buildroot}%{_bindir}/lli-child-target
[4656]551
[11293]552# fix multi-lib
553mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
[11308]554ln -sf llvm-config-%{__isa_bits} %{buildroot}%{_bindir}/llvm-config
[11293]555mv -v %{buildroot}%{_includedir}/llvm/Config/llvm-config{,-%{__isa_bits}}.h
556install -m 0644 %{SOURCE10} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h
[1073]557
[11293]558# clang
[9470]559
[11308]560# remove static libraries
561rm -fv %{buildroot}%{_libdir}/libclang*.a
562
563# install clang python bindings
[12228]564mkdir -p %{buildroot}%{python3_sitelib}/clang/
565install -p -m644 ../tools/clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
[11308]566
[11293]567mv -v %{buildroot}%{_includedir}/clang/Config/config{,-%{__isa_bits}}.h
568install -m 0644 %{SOURCE11} %{buildroot}%{_includedir}/clang/Config/config.h
[9470]569
[11293]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*
[9470]579
580
[11293]581# lldb
[1073]582
[11293]583# remove static libraries
[11308]584rm -fv %{buildroot}%{_libdir}/liblldb*.a
[1073]585
[11293]586# python: fix binary libraries location
587liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
[12228]588ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
[1073]589
[11293]590# remove bundled six.py
[12228]591rm -f %{buildroot}%{python3_sitearch}/six.*
[1073]592
[9594]593
[11969]594# lld
[11308]595
[11969]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
[11293]611# compiler-rt
[9470]612
[11293]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}/ || :
[1073]617done
618
[11293]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
[1073]627
[11308]628#rm -rf %{buildroot}%{_libdir}/python*
[1073]629
[11308]630rm -f %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
631rm -f %{buildroot}%{_datadir}/clang/clang-rename.el
632rm -f %{buildroot}%{_datadir}/clang/clang-rename.py
[1073]633
[12228]634%if %{with test}
[4656]635%check
[12228]636ninja -C build check
637ninja -C build check-clang
638ninja -C build check-lldb
639ninja -C build check-lld
640%endif
[4656]641
[1073]642%clean
643rm -rf %{buildroot}
644
645
[11969]646%post -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
647%postun -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
[1073]648
[9470]649%post -n clang-libs -p /sbin/ldconfig
650%postun -n clang-libs -p /sbin/ldconfig
[1073]651
[9470]652%post -n lldb -p /sbin/ldconfig
653%postun -n lldb -p /sbin/ldconfig
[1073]654
[11969]655%post -n lld
656  /sbin/alternatives --install /usr/bin/ld ld \
657  /usr/bin/ld.lld 20
[1073]658
[11969]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
[4656]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
[1073]688%files
689%defattr(-,root,root,-)
[9470]690%doc CREDITS.TXT README.txt
[1073]691%{_bindir}/bugpoint
[11969]692%{_bindir}/dsymutil
[1073]693%{_bindir}/llc
694%{_bindir}/lli
[9121]695%{_bindir}/lli-child-target
[11293]696%{_bindir}/obj2yaml
697%{_bindir}/sancov
[11308]698%{_bindir}/sanstats
[11293]699%{_bindir}/verify-uselistorder
700%{_bindir}/yaml2obj
[11308]701%exclude %{_bindir}/llvm-config
[4656]702%exclude %{_bindir}/llvm-config-%{__isa_bits}
[1073]703%{_bindir}/llvm*
704%{_bindir}/opt
[9470]705%exclude %{_mandir}/man1/scan-build.1.*
[1073]706%doc %{_mandir}/man1/*.1.*
[11308]707%{_datadir}/opt-viewer
[1073]708
709%files devel
710%defattr(-,root,root,-)
[9470]711#doc %{llvmdocdir %{name}-devel}/
[11308]712%{_bindir}/llvm-config
[4656]713%{_bindir}/llvm-config-%{__isa_bits}
[1073]714%{_includedir}/%{name}
715%{_includedir}/%{name}-c
[12221]716#{_libdir}/BugpointPasses.so
[11293]717%{_libdir}/libLLVM.so
[11985]718%{_libdir}/libLTO.so*
[12221]719%{_libdir}/libRemarks.so
[12354]720%{_libdir}/LLVMgold.so
[11308]721%{_libdir}/cmake/llvm
[12228]722#exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
[1073]723
[11969]724%files -n llvm%{ver_suffix}-libs
[4656]725%defattr(-,root,root,-)
[9470]726%doc LICENSE.TXT
[11293]727#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
728#dir %{_libdir}/%{name}
729%{_libdir}/libLLVM-*.so
[12221]730%{_libdir}/libRemarks.so.*
731#exclude %{_libdir}/LLVMHello.so
[4656]732
[11308]733%files static
734%{_libdir}/*.a
[12228]735#{_libdir}/cmake/llvm/LLVMStaticExports.cmake
[11308]736
[1073]737%files -n clang
738%defattr(-,root,root,-)
[11293]739#doc %{llvmdocdir clang}/
[1073]740%{_bindir}/clang*
[7197]741%{_bindir}/c-index-test
[11969]742%{_bindir}/diagtool
743%{_bindir}/hmaptool
[11293]744%{_libdir}/clang
[1073]745
[9470]746%files -n clang-libs
747%defattr(-,root,root,-)
[11293]748%{_libdir}/libclang.so
749%{_libdir}/libclang.so.*
[12221]750%{_libdir}/libclang-cpp.so
751%{_libdir}/libclang-cpp.so.*
[9470]752
[1073]753%files -n clang-devel
754%defattr(-,root,root,-)
[9470]755#doc %{llvmdocdir clang-devel}/
[1073]756%{_includedir}/clang
757%{_includedir}/clang-c
[11293]758%dir %{_datadir}/clang/
[11308]759%{_libdir}/cmake/*
[1073]760
761%files -n clang-analyzer
762%defattr(-,root,root,-)
763%{_bindir}/scan-build
764%{_bindir}/scan-view
[12320]765#%{_libdir}/CheckerDependencyHandlingAnalyzerPlugin.so
766#%{_libdir}/CheckerOptionHandlingAnalyzerPlugin.so
767#%{_libdir}/SampleAnalyzerPlugin.so
[11293]768%{_libexecdir}/ccc-analyzer
769%{_libexecdir}/c++-analyzer
770%{_datadir}/scan-view
771%{_datadir}/scan-build
[9470]772%{_mandir}/man1/scan-build.1.*
[1073]773
[12228]774%files -n python3-clang
775%{python3_sitelib}/clang/
[11308]776
[9470]777%files -n lldb
[1073]778%defattr(-,root,root,-)
[11293]779#doc %{llvmdocdir lldb}/
[11308]780%{_bindir}/lldb*
[11969]781%{_libdir}/liblldb*.so.*
[1073]782
[9470]783%files -n lldb-devel
784%defattr(-,root,root,-)
785%{_includedir}/lldb
[11969]786%{_libdir}/liblldb*.so
[9470]787
[12228]788%files -n python3-lldb
789%{python3_sitearch}/lldb
[11293]790
[11969]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
[12221]810%files -n libomp
[12354]811%{_libdir}/libarcher.so
[12221]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
[1073]820%files doc
821%defattr(-,root,root,-)
[11293]822%doc docs/*
823#doc %{llvmdocdir %{name}-doc}/
[1073]824
[11293]825%if %{with ocaml}
[1073]826%files ocaml
827%defattr(-,root,root,-)
828%{_libdir}/ocaml/*.cma
829%{_libdir}/ocaml/*.cmi
[9073]830%{_libdir}/ocaml/*.so
831%{_libdir}/ocaml/META.llvm*
[1073]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,-)
[9594]841#doc %{llvmdocdir %{name}-ocaml-doc}/
[11293]842%endif
[1073]843
[4656]844%if 0%{?_with_doxygen}
[1073]845%files apidoc
846%defattr(-,root,root,-)
[9470]847%doc %{llvmdocdir %{name}-apidoc}/
[4656]848
849%files -n clang-apidoc
850%defattr(-,root,root,-)
[9470]851%doc %{llvmdocdir clang-apidoc}/
[1073]852%endif
853
[9470]854%if %{build_compat32}
[11969]855%files -n compat32-%{name}%{ver_suffix}-libs
[9470]856%defattr(-,root,root)
857%doc LICENSE.TXT
[11293]858#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
[11985]859%exclude %{_libdir}/libLTO.so
[12228]860#exclude %{_libdir}/BugpointPasses.so
861%exclude %{_libdir}/libclang*.so
[11969]862%exclude %{_libdir}/liblld*.so
[11985]863%exclude %{_libdir}/LLVMGold.so
[11293]864%exclude %{_libdir}/LLVMHello.so
865%{_libdir}/*.so
[11308]866%{_libdir}/libLTO.so.*
[9470]867%endif
[1073]868
[4656]869%changelog
[12474]870* Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.1-1
871- new upstream release.
872
[12376]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
[12320]879* Sun Dec 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
880- new upstream release.
881
[12228]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
[12221]887* Fri Sep 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.0-1
888- new upstream release.
889- added OpenMP.
890
[11985]891* Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.1-1
892- fixed %%files.
893
[11969]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
[11308]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
[11293]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
[10438]918* Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-2
919- rebuild with gcc-5.4.0
920
[9734]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
[9594]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
[9470]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
[9121]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
[9073]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
[8758]948* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3-2
949- rebuild with libffi-3.0.13
950
[7943]951* Mon Oct 28 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.3-1
952- update to 3.3
953
[7201]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
[7197]959* Fri Nov 30 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1-1
960- update to 3.1
961
[5555]962* Tue Jan 24 2012 NAKAMURA Kenta <kenta@vinelinux.org> - 3.0-1
963- updated to 3.0 release
964
[5424]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
[4738]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
[4656]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
[1073]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.