|
@@ -1,12 +1,15 @@
|
|
|
|
+%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
|
|
|
|
+
|
|
# Build options:
|
|
# Build options:
|
|
-#
|
|
+# Components skipped by default:
|
|
-# --with doxygen
|
|
+%bcond_with doxygen
|
|
-# The doxygen docs are HUGE, so they are not built by default.
|
|
+
|
|
-%define build_apidoc %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
|
+# Documentation install path
|
|
|
|
+%global llvmdocdir() %{_docdir}/%1-%{version}
|
|
|
|
|
|
Name: llvm
|
|
Name: llvm
|
|
-Version: 3.5.0
|
|
+Version: 3.5.1
|
|
-Release: 2%{?_dist_release}
|
|
+Release: 1%{?_dist_release}
|
|
Summary: The Low Level Virtual Machine
|
|
Summary: The Low Level Virtual Machine
|
|
Summary(ja): LLVM - 低レベルバーチャルマシン
|
|
Summary(ja): LLVM - 低レベルバーチャルマシン
|
|
|
|
|
|
@@ -16,16 +19,27 @@ URL: http://llvm.org/
|
|
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
|
|
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
|
|
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
|
|
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
|
|
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
|
|
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
|
|
|
|
+Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
|
|
|
|
|
|
# multilib fixes
|
|
# multilib fixes
|
|
Source10: llvm-Config-config.h
|
|
Source10: llvm-Config-config.h
|
|
Source11: llvm-Config-llvm-config.h
|
|
Source11: llvm-Config-llvm-config.h
|
|
|
|
|
|
-# Data files should be installed with timestamps preserved
|
|
+# patches
|
|
-Patch0: llvm-2.6-timestamp.patch
|
|
+Patch1: llvm-3.5.0-build-fix.patch
|
|
|
|
+Patch2: 0001-data-install-preserve-timestamps.patch
|
|
|
|
|
|
-# hack the link flags for the shared libs for speed and memory usage
|
|
+# newish glibc hides the definition of __extern_always_inline behind
|
|
-Patch21: llvm-3.2-symbolic-shlib.patch
|
|
+# a check for gcc 4.3, clang pretends to be gcc 4.2. a proper fix would
|
|
|
|
+# be to build everything herein with gcc, but i don't have the patience
|
|
|
|
+# atm, so in the interest of bootstrapping...
|
|
|
|
+Patch100: clang-fake-gcc43.patch
|
|
|
|
+# http://llvm.org/bugs/show_bug.cgi?id=22625
|
|
|
|
+Patch101: clang-pr22625.patch
|
|
|
|
+
|
|
|
|
+Patch200: lldb-python.patch
|
|
|
|
+Patch201: lldb-fix-expression-parser.patch
|
|
|
|
+Patch202: lldb-python-module-symlink.patch
|
|
|
|
|
|
# Vine Patch
|
|
# Vine Patch
|
|
Patch1000: clang-3.5.0-driver-ld.gold.patch
|
|
Patch1000: clang-3.5.0-driver-ld.gold.patch
|
|
@@ -43,11 +57,17 @@ BuildRequires: groff
|
|
BuildRequires: libffi-devel
|
|
BuildRequires: libffi-devel
|
|
BuildRequires: libtool-ltdl-devel
|
|
BuildRequires: libtool-ltdl-devel
|
|
BuildRequires: ocaml
|
|
BuildRequires: ocaml
|
|
|
|
+BuildRequires: perl
|
|
# for DejaGNU test suite
|
|
# for DejaGNU test suite
|
|
BuildRequires: dejagnu tcl python
|
|
BuildRequires: dejagnu tcl python
|
|
-%if %{build_apidoc}
|
|
+%if %{with doxygen}
|
|
BuildRequires: doxygen graphviz
|
|
BuildRequires: doxygen graphviz
|
|
%endif
|
|
%endif
|
|
|
|
+# lldb
|
|
|
|
+BuildRequires: swig
|
|
|
|
+BuildRequires: libedit-devel
|
|
|
|
+BuildRequires: python-devel
|
|
|
|
+
|
|
Requires: llvm-libs = %{version}-%{release}
|
|
Requires: llvm-libs = %{version}-%{release}
|
|
|
|
|
|
# LLVM is not supported on PPC64
|
|
# LLVM is not supported on PPC64
|
|
@@ -65,13 +85,12 @@ functionality.
|
|
%package devel
|
|
%package devel
|
|
Summary: Libraries and header files for LLVM
|
|
Summary: Libraries and header files for LLVM
|
|
Summary(ja): LLVM のライブラリおよびヘッダファイル
|
|
Summary(ja): LLVM のライブラリおよびヘッダファイル
|
|
-Group: Development/Languages
|
|
+Group: Development/Libraries
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: libstdc++-devel
|
|
Requires: libstdc++-devel
|
|
Requires: libffi-devel
|
|
Requires: libffi-devel
|
|
Provides: llvm-static = %{version}-%{release}
|
|
Provides: llvm-static = %{version}-%{release}
|
|
|
|
|
|
-
|
|
|
|
%description devel
|
|
%description devel
|
|
This package contains library and header files needed to develop new
|
|
This package contains library and header files needed to develop new
|
|
native programs that use the LLVM infrastructure.
|
|
native programs that use the LLVM infrastructure.
|
|
@@ -81,7 +100,10 @@ native programs that use the LLVM infrastructure.
|
|
Summary: Documentation for LLVM
|
|
Summary: Documentation for LLVM
|
|
Summary(ja): LLVM のドキュメント
|
|
Summary(ja): LLVM のドキュメント
|
|
Group: Documentation
|
|
Group: Documentation
|
|
|
|
+BuildArch: noarch
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
+# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
|
|
|
|
+Obsoletes: %{name}-doc < %{version}-%{release}
|
|
|
|
|
|
%description doc
|
|
%description doc
|
|
Documentation for the LLVM compiler infrastructure.
|
|
Documentation for the LLVM compiler infrastructure.
|
|
@@ -89,7 +111,7 @@ Documentation for the LLVM compiler infrastructure.
|
|
|
|
|
|
%package libs
|
|
%package libs
|
|
Summary: LLVM shared libraries
|
|
Summary: LLVM shared libraries
|
|
-Summary(ja): LLVM シェアードライブラリ
|
|
+Summary(ja): LLVM 共有ライブラリ
|
|
Group: System Environment/Libraries
|
|
Group: System Environment/Libraries
|
|
|
|
|
|
%description libs
|
|
%description libs
|
|
@@ -98,11 +120,14 @@ Shared libraries for the LLVM compiler infrastructure.
|
|
|
|
|
|
%package -n clang
|
|
%package -n clang
|
|
Summary: A C language family front-end for LLVM
|
|
Summary: A C language family front-end for LLVM
|
|
-Summary(ja): LLVM の C 言語用フロントエンド
|
|
+Summary(ja): LLVM の C 言語フロントエンド
|
|
License: NCSA
|
|
License: NCSA
|
|
Group: Development/Languages
|
|
Group: Development/Languages
|
|
-Requires: gcc
|
|
+Requires: %{name} = %{version}-%{release}
|
|
-%(rpm -q --qf 'Requires: %{name} = %{version}' libstdc++-devel)
|
|
+# clang requires gcc, clang++ requires libstdc++-devel
|
|
|
|
+Requires: libstdc++-devel
|
|
|
|
+# remove clang-doc pacakge
|
|
|
|
+Obsoletes: clang-doc < %{version}-%{release}
|
|
|
|
|
|
%description -n clang
|
|
%description -n clang
|
|
clang: noun
|
|
clang: noun
|
|
@@ -114,11 +139,19 @@ The goal of the Clang project is to create a new C, C++, Objective C
|
|
and Objective C++ front-end for the LLVM compiler. Its tools are built
|
|
and Objective C++ front-end for the LLVM compiler. Its tools are built
|
|
as libraries and designed to be loosely-coupled and extensible.
|
|
as libraries and designed to be loosely-coupled and extensible.
|
|
|
|
|
|
|
|
+%Package -n clang-libs
|
|
|
|
+Summary: Runtime library for clang
|
|
|
|
+Summary(ja): Clang のランタイムライブラリ
|
|
|
|
+Group: System Environment/Libraries
|
|
|
|
+
|
|
|
|
+%description -n clang-libs
|
|
|
|
+Runtime library for clang.
|
|
|
|
+
|
|
|
|
|
|
%package -n clang-devel
|
|
%package -n clang-devel
|
|
Summary: Header files for clang
|
|
Summary: Header files for clang
|
|
-Summary(ja): clang のヘッダファイル
|
|
+Summary(ja): Clang のヘッダファイル
|
|
-Group: Development/Languages
|
|
+Group: Development/Libraries
|
|
Requires: clang = %{version}-%{release}
|
|
Requires: clang = %{version}-%{release}
|
|
|
|
|
|
%description -n clang-devel
|
|
%description -n clang-devel
|
|
@@ -141,41 +174,69 @@ framework and a standalone tool that finds bugs in C and Objective-C
|
|
programs. The standalone tool is invoked from the command-line, and is
|
|
programs. The standalone tool is invoked from the command-line, and is
|
|
intended to run in tandem with a build of a project or code base.
|
|
intended to run in tandem with a build of a project or code base.
|
|
|
|
|
|
|
|
+#%package -n clang-doc
|
|
|
|
+#Summary: Documentation for Clang
|
|
|
|
+#Summary(ja): Clang のドキュメント
|
|
|
|
+#Group: Documentation
|
|
|
|
+#Requires: %{name} = %{version}-%{release}
|
|
|
|
+#
|
|
|
|
+#%description -n clang-doc
|
|
|
|
+#Documentation for the Clang compiler front-end.
|
|
|
|
|
|
-%package -n clang-doc
|
|
+%package -n lldb
|
|
-Summary: Documentation for Clang
|
|
+Summary: Next generation high-performance debugger
|
|
-Summary(ja): Clang のドキュメント
|
|
+Summary(ja): 高性能デバッガー
|
|
-Group: Documentation
|
|
+License: NCSA
|
|
|
|
+Group: Development/Debuggers
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
-%description -n clang-doc
|
|
+%description -n lldb
|
|
-Documentation for the Clang compiler front-end.
|
|
+LLDB is a next generation, high-performance debugger. It is built as a set
|
|
|
|
+of reusable components which highly leverage existing libraries in the
|
|
|
|
+larger LLVM Project, such as the Clang expression parser and LLVM
|
|
|
|
+disassembler.
|
|
|
|
+
|
|
|
|
+%package -n lldb-devel
|
|
|
|
+Summary: Header files for LLDB
|
|
|
|
+Summary(ja): LLDB のヘッダファイル
|
|
|
|
+Group: Development/Libraries
|
|
|
|
+Requires: lldb = %{version}-%{release}
|
|
|
|
|
|
|
|
+%description -n lldb-devel
|
|
|
|
+This package contains header files for the LLDB debugger.
|
|
|
|
|
|
-%if %{build_apidoc}
|
|
+
|
|
|
|
+%if %{with doxygen}
|
|
%package apidoc
|
|
%package apidoc
|
|
Summary: API documentation for LLVM
|
|
Summary: API documentation for LLVM
|
|
Summary(ja): LLVM の API ドキュメント
|
|
Summary(ja): LLVM の API ドキュメント
|
|
-Group: Development/Languages
|
|
+Group: Documentation
|
|
|
|
+BuildArch: noarch
|
|
Requires: %{name}-docs = %{version}-%{release}
|
|
Requires: %{name}-docs = %{version}-%{release}
|
|
|
|
|
|
-
|
|
|
|
%description apidoc
|
|
%description apidoc
|
|
API documentation for the LLVM compiler infrastructure.
|
|
API documentation for the LLVM compiler infrastructure.
|
|
-%endif
|
|
|
|
|
|
|
|
|
|
+%package -n clang-apidoc
|
|
|
|
+Summary: API documentation for Clang
|
|
|
|
+Summary(ja): Clang の API ドキュメント
|
|
|
|
+Group: Documentation
|
|
|
|
+BuildArch: noarch
|
|
|
|
+
|
|
|
|
+%description -n clang-apidoc
|
|
|
|
+API documentation for the Clang compiler.
|
|
|
|
+%endif
|
|
|
|
|
|
%package ocaml
|
|
%package ocaml
|
|
Summary: OCaml binding for LLVM
|
|
Summary: OCaml binding for LLVM
|
|
Summary(ja): LLVM の OCaml バインディング
|
|
Summary(ja): LLVM の OCaml バインディング
|
|
-Group: Development/Libraries
|
|
+Group: System Environment/Libraries
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: ocaml
|
|
Requires: ocaml
|
|
|
|
|
|
%description ocaml
|
|
%description ocaml
|
|
OCaml binding for LLVM.
|
|
OCaml binding for LLVM.
|
|
|
|
|
|
-
|
|
|
|
%package ocaml-devel
|
|
%package ocaml-devel
|
|
Summary: Development files for %{name}-ocaml
|
|
Summary: Development files for %{name}-ocaml
|
|
Summary(ja): %{name}-ocaml の開発ファイル
|
|
Summary(ja): %{name}-ocaml の開発ファイル
|
|
@@ -188,38 +249,63 @@ Requires: ocaml
|
|
The %{name}-ocaml-devel package contains libraries and signature files
|
|
The %{name}-ocaml-devel package contains libraries and signature files
|
|
for developing applications that use %{name}-ocaml.
|
|
for developing applications that use %{name}-ocaml.
|
|
|
|
|
|
-
|
|
|
|
%package ocaml-doc
|
|
%package ocaml-doc
|
|
Summary: Documentation for %{name}-ocaml
|
|
Summary: Documentation for %{name}-ocaml
|
|
Summary(ja): %{name}-ocaml のドキュメント
|
|
Summary(ja): %{name}-ocaml のドキュメント
|
|
Group: Documentation
|
|
Group: Documentation
|
|
|
|
+BuildArch: noarch
|
|
Requires: %{name}-ocaml = %{version}-%{release}
|
|
Requires: %{name}-ocaml = %{version}-%{release}
|
|
|
|
+# might seem redundant, but needed to kill off the old arch-ed -doc subpackage
|
|
|
|
+Obsoletes: %{name}-ocaml-doc < %{version}-%{release}
|
|
|
|
|
|
%description ocaml-doc
|
|
%description ocaml-doc
|
|
HTML documentation for LLVM's OCaml binding.
|
|
HTML documentation for LLVM's OCaml binding.
|
|
|
|
|
|
|
|
+# compat32'
|
|
|
|
+%package -n compat32-%{name}-libs
|
|
|
|
+Summary: LLVM shared libraries
|
|
|
|
+Summary(ja): LLVM 共有ライブラリ
|
|
|
|
+Group: System Environment/Libraries
|
|
|
|
+Requires: %{name}-libs = %{version}-%{release}
|
|
|
|
+
|
|
|
|
+%description -n compat32-%{name}-libs
|
|
|
|
+Shared libraries for the LLVM compiler infrastructure.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
%prep
|
|
-%setup -q -n llvm-%{version}.src -a1 -a2
|
|
+%setup -q -a1 -a2 -a3 -n llvm-%{version}.src
|
|
-rm -f tools/clang
|
|
+rm -rf tools/clang tools/lldb projects/compiler-rt
|
|
mv cfe-%{version}.src tools/clang
|
|
mv cfe-%{version}.src tools/clang
|
|
|
|
+mv compiler-rt-%{version}.src projects/compiler-rt
|
|
|
|
+mv lldb-%{version}.src tools/lldb
|
|
|
|
|
|
-# llvm patches
|
|
+%patch1 -p1
|
|
-%patch0 -p1 -b .timestamp
|
|
+%patch2 -p1
|
|
|
|
|
|
-# fix llvm-config --libs
|
|
+# clang
|
|
-%patch21 -p1 -b .orig
|
|
+pushd tools/clang
|
|
|
|
+%patch100 -p1
|
|
|
|
+%patch101 -p0
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+# lldb
|
|
|
|
+pushd tools/lldb
|
|
|
|
+# careful when recreating this patch...
|
|
|
|
+%patch200 -p1 -b .python
|
|
|
|
+%patch201 -p2
|
|
|
|
+%patch202 -p1
|
|
|
|
+sed -i s/@lib@/%{_lib}/g scripts/Python/modules/readline/Makefile
|
|
|
|
+popd
|
|
|
|
|
|
|
|
+# Vine Linux
|
|
%patch1000 -p1 -b .driver-ld.gold
|
|
%patch1000 -p1 -b .driver-ld.gold
|
|
%ifarch x86_64
|
|
%ifarch x86_64
|
|
%patch1001 -p1 -b .driver-lib64
|
|
%patch1001 -p1 -b .driver-lib64
|
|
%endif
|
|
%endif
|
|
%patch1002 -p1 -b .driver-vine
|
|
%patch1002 -p1 -b .driver-vine
|
|
|
|
|
|
-# fix ld search path
|
|
+# fix library paths
|
|
-sed -i 's|/lib /usr/lib $lt_ld_extra|/%{_lib} %{_libdir} $lt_ld_extra|' \
|
|
+sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' configure
|
|
- ./configure
|
|
|
|
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config.in
|
|
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config.in
|
|
sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp
|
|
sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp
|
|
|
|
|
|
@@ -227,14 +313,17 @@ sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp
|
|
export CC=/usr/bin/gcc
|
|
export CC=/usr/bin/gcc
|
|
export CXX=/usr/bin/g++
|
|
export CXX=/usr/bin/g++
|
|
|
|
|
|
-# Disabling assertions now, rec. by pure and needed for OpenGTL
|
|
+# -fno-devirtualize shouldn't be necessary, but gcc has scary template-related
|
|
-# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
|
|
+# bugs that make it so. gcc 5 ought to be fixed.
|
|
%configure \
|
|
%configure \
|
|
- --prefix=%{_prefix} \
|
|
+ --with-extra-options="-fno-devirtualize" \
|
|
|
|
+ --with-extra-ld-options=-Wl,-Bsymbolic \
|
|
--libdir=%{_libdir}/%{name} \
|
|
--libdir=%{_libdir}/%{name} \
|
|
--datadir=%{_libdir}/%{name} \
|
|
--datadir=%{_libdir}/%{name} \
|
|
-%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
|
+%if %{with doxygen}
|
|
--enable-doxygen \
|
|
--enable-doxygen \
|
|
|
|
+%else
|
|
|
|
+ --disable-doxygen \
|
|
%endif
|
|
%endif
|
|
%ifarch armv7hl armv7l
|
|
%ifarch armv7hl armv7l
|
|
--with-cpu=cortex-a8 \
|
|
--with-cpu=cortex-a8 \
|
|
@@ -254,12 +343,10 @@ export CXX=/usr/bin/g++
|
|
--with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \
|
|
--with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \
|
|
--with-binutils-include=%{_includedir} \
|
|
--with-binutils-include=%{_includedir} \
|
|
--enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx \
|
|
--enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx \
|
|
- --enable-experimental-targets=R600
|
|
+ --enable-experimental-targets=R600 \
|
|
|
|
+ --with-optimize-option=-O3
|
|
|
|
|
|
-make %{_smp_mflags} \
|
|
+make %{?_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1
|
|
- REQUIRES_RTTI=1 \
|
|
|
|
- OPTIMIZE_OPTION="%{optflags}"
|
|
|
|
-
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
@@ -288,55 +375,77 @@ EOF
|
|
|
|
|
|
# Static analyzer not installed by default:
|
|
# Static analyzer not installed by default:
|
|
# http://clang-analyzer.llvm.org/installation#OtherPlatforms
|
|
# http://clang-analyzer.llvm.org/installation#OtherPlatforms
|
|
-mkdir -p %{buildroot}%{_libdir}/clang-analyzer
|
|
+# scan-view
|
|
-# create launchers
|
|
+mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer/
|
|
|
|
+cp -pr tools/clang/tools/scan-view %{buildroot}%{_libexecdir}/clang-analyzer/
|
|
|
|
+
|
|
|
|
+# scan-build
|
|
|
|
+mkdir -p %{buildroot}%{_libexecdir}/clang-analyzer/scan-build
|
|
|
|
+for file in c++-analyzer ccc-analyzer scan-build scanview.css sorttable.js; do
|
|
|
|
+ cp -p tools/clang/tools/scan-build/$file \
|
|
|
|
+ %{buildroot}%{_libexecdir}/clang-analyzer/scan-build/
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+# scan-build manual page
|
|
|
|
+mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
+cp -p tools/clang/tools/scan-build/scan-build.1 %{buildroot}%{_mandir}/man1/
|
|
|
|
+
|
|
|
|
+# scan-build requires clang in search path
|
|
|
|
+ln -s ../../../bin/clang %{buildroot}%{_libexecdir}/clang-analyzer/scan-build/clang
|
|
|
|
+
|
|
|
|
+# launchers in /bin
|
|
for f in scan-{build,view}; do
|
|
for f in scan-{build,view}; do
|
|
- ln -s %{_libdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f
|
|
+ ln -s %{_libexecdir}/clang-analyzer/$f/$f %{buildroot}%{_bindir}/$f
|
|
done
|
|
done
|
|
|
|
|
|
-(cd tools/clang/tools && cp -pr scan-{build,view} \
|
|
+# Get rid of erroneously installed example files.
|
|
- %{buildroot}%{_libdir}/clang-analyzer/)
|
|
+rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
|
|
|
|
+
|
|
|
|
+# remove executable bit from static libraries
|
|
|
|
+find %{buildroot}%{_libdir} -name "*.a" -type f -print0 | xargs -0 chmod -x
|
|
|
|
|
|
|
|
+# Install man page for LLDB
|
|
|
|
+mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
+cp tools/lldb/docs/lldb.1 %{buildroot}%{_mandir}/man1/
|
|
|
|
|
|
-# Move documentation back to build directory
|
|
+# llvm-doc
|
|
-#
|
|
+mkdir -p %{buildroot}%{llvmdocdir %{name}-doc}
|
|
-pwd
|
|
+cp -ar examples %{buildroot}%{llvmdocdir %{name}-doc}/examples
|
|
-mv %{buildroot}/moredocs .
|
|
+find %{buildroot}%{llvmdocdir %{name}-doc} -name Makefile -o -name CMakeLists.txt -o -name LLVMBuild.txt -print0 | xargs -0 rm -f
|
|
-rm -f moredocs/*.tar.gz
|
|
|
|
-rm -f moredocs/ocamldoc/html/*.tar.gz
|
|
|
|
|
|
|
|
-# and separate the apidoc
|
|
+# llvm-apidoc
|
|
-%if %{build_apidoc}
|
|
+%if %{with doxygen}
|
|
-mv moredocs/html/doxygen apidoc
|
|
+mv %{buildroot}/moredocs/html/doxygen %{buildroot}%{llvmdocdir %{name}-apidoc}
|
|
-mv tools/clang/docs/doxygen/html clang-apidoc
|
|
|
|
%endif
|
|
%endif
|
|
|
|
|
|
-# And prepare Clang documentation
|
|
+# llvm-ocaml-doc
|
|
-#
|
|
+mv %{buildroot}/moredocs/ocamldoc/html %{buildroot}%{llvmdocdir %{name}-ocaml-doc}
|
|
-mkdir clang-docs
|
|
|
|
-for f in LICENSE.TXT NOTES.txt README.txt; do
|
|
|
|
- ln tools/clang/$f clang-docs/
|
|
|
|
-done
|
|
|
|
-rm -rf tools/clang/docs/{doxygen*,Makefile*,*.graffle,tools}
|
|
|
|
|
|
|
|
|
|
+# clang
|
|
|
|
+mkdir -p %{buildroot}%{llvmdocdir clang}
|
|
|
|
+for f in LICENSE.TXT NOTES.txt README.txt CODE_OWNERS.TXT; do
|
|
|
|
+ cp tools/clang/$f %{buildroot}%{llvmdocdir clang}/
|
|
|
|
+done
|
|
|
|
|
|
-#find %%{buildroot} -name .dir -print0 | xargs -0r rm -f
|
|
+# clang-apidoc
|
|
-file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
|
+%if %{with doxygen}
|
|
-file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
|
+cp -ar tools/clang/docs/doxygen/html %{buildroot}%{llvmdocdir clang-apidoc}
|
|
-#chrpath -d %%{buildroot}/%%{_libexecdir}/clang-cc
|
|
+%endif
|
|
|
|
|
|
-# Get rid of erroneously installed example files.
|
|
+# lldb
|
|
-rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
|
|
+mkdir -p %{buildroot}%{llvmdocdir lldb}
|
|
|
|
+cp tools/lldb/LICENSE.TXT %{buildroot}%{llvmdocdir lldb}/
|
|
|
|
|
|
-# FIXME file this bug
|
|
+# delete the rest of installed documentation (because it's bad)
|
|
-sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
|
|
+rm -rf %{buildroot}/moredocs
|
|
- %{buildroot}%{_bindir}/llvm-config-%{__isa_bits}
|
|
|
|
|
|
|
|
-chmod -x %{buildroot}%{_libdir}/%{name}/*.a
|
|
+# install CMake modules
|
|
|
|
+mkdir -p %{buildroot}%{_datadir}/llvm/cmake/
|
|
|
|
+cp -p cmake/modules/*.cmake %{buildroot}%{_datadir}/llvm/cmake/
|
|
|
|
|
|
-# remove documentation makefiles:
|
|
+# remove RPATHs
|
|
-# they require the build directory to work
|
|
+file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
|
-find examples -name 'Makefile' | xargs -0r rm -f
|
|
+file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
|
|
|
|
|
|
|
|
|
%check
|
|
%check
|
|
@@ -349,11 +458,13 @@ rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%post libs -p /sbin/ldconfig
|
|
%post libs -p /sbin/ldconfig
|
|
-%post -n clang -p /sbin/ldconfig
|
|
+%postun libs -p /sbin/ldconfig
|
|
|
|
|
|
|
|
+%post -n clang-libs -p /sbin/ldconfig
|
|
|
|
+%postun -n clang-libs -p /sbin/ldconfig
|
|
|
|
|
|
-%postun libs -p /sbin/ldconfig
|
|
+%post -n lldb -p /sbin/ldconfig
|
|
-%postun -n clang -p /sbin/ldconfig
|
|
+%postun -n lldb -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%posttrans devel
|
|
%posttrans devel
|
|
@@ -377,7 +488,7 @@ exit 0
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc CREDITS.TXT LICENSE.TXT README.txt
|
|
+%doc CREDITS.TXT README.txt
|
|
%{_bindir}/bugpoint
|
|
%{_bindir}/bugpoint
|
|
%{_bindir}/llc
|
|
%{_bindir}/llc
|
|
%{_bindir}/lli
|
|
%{_bindir}/lli
|
|
@@ -386,11 +497,15 @@ exit 0
|
|
%{_bindir}/llvm*
|
|
%{_bindir}/llvm*
|
|
%{_bindir}/macho-dump
|
|
%{_bindir}/macho-dump
|
|
%{_bindir}/opt
|
|
%{_bindir}/opt
|
|
|
|
+%dir %{_datadir}/llvm
|
|
%exclude %{_mandir}/man1/clang.1.*
|
|
%exclude %{_mandir}/man1/clang.1.*
|
|
|
|
+%exclude %{_mandir}/man1/scan-build.1.*
|
|
|
|
+%exclude %{_mandir}/man1/lldb.1.*
|
|
%doc %{_mandir}/man1/*.1.*
|
|
%doc %{_mandir}/man1/*.1.*
|
|
|
|
|
|
%files devel
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
|
|
+#doc %{llvmdocdir %{name}-devel}/
|
|
%{_bindir}/llvm-config-%{__isa_bits}
|
|
%{_bindir}/llvm-config-%{__isa_bits}
|
|
%{_includedir}/%{name}
|
|
%{_includedir}/%{name}
|
|
%{_includedir}/%{name}-c
|
|
%{_includedir}/%{name}-c
|
|
@@ -399,22 +514,28 @@ exit 0
|
|
|
|
|
|
%files libs
|
|
%files libs
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
|
|
+%doc LICENSE.TXT
|
|
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
|
|
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
|
|
%dir %{_libdir}/%{name}
|
|
%dir %{_libdir}/%{name}
|
|
%exclude %{_libdir}/%{name}/libclang.so
|
|
%exclude %{_libdir}/%{name}/libclang.so
|
|
|
|
+%exclude %{_libdir}/%{name}/liblldb.so
|
|
%{_libdir}/%{name}/*.so
|
|
%{_libdir}/%{name}/*.so
|
|
|
|
|
|
%files -n clang
|
|
%files -n clang
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc clang-docs/*
|
|
+%doc %{llvmdocdir clang}/
|
|
%{_bindir}/clang*
|
|
%{_bindir}/clang*
|
|
%{_bindir}/c-index-test
|
|
%{_bindir}/c-index-test
|
|
-%{_libdir}/%{name}/libclang.so
|
|
|
|
%{_prefix}/lib/clang
|
|
%{_prefix}/lib/clang
|
|
%doc %{_mandir}/man1/clang.1.*
|
|
%doc %{_mandir}/man1/clang.1.*
|
|
|
|
|
|
|
|
+%files -n clang-libs
|
|
|
|
+%defattr(-,root,root,-)
|
|
|
|
+%{_libdir}/%{name}/libclang.so
|
|
|
|
+
|
|
%files -n clang-devel
|
|
%files -n clang-devel
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
|
|
+#doc %{llvmdocdir clang-devel}/
|
|
%{_includedir}/clang
|
|
%{_includedir}/clang
|
|
%{_includedir}/clang-c
|
|
%{_includedir}/clang-c
|
|
|
|
|
|
@@ -422,15 +543,26 @@ exit 0
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/scan-build
|
|
%{_bindir}/scan-build
|
|
%{_bindir}/scan-view
|
|
%{_bindir}/scan-view
|
|
-%{_libdir}/clang-analyzer
|
|
+%{_libexecdir}/clang-analyzer
|
|
|
|
+%{_mandir}/man1/scan-build.1.*
|
|
|
|
|
|
-%files -n clang-doc
|
|
+%files -n lldb
|
|
|
|
+%defattr(-,root,root,-)
|
|
|
|
+%doc %{llvmdocdir lldb}/
|
|
|
|
+%{_bindir}/lldb
|
|
|
|
+%{_bindir}/lldb-*
|
|
|
|
+%{_libdir}/%{name}/liblldb.so
|
|
|
|
+# XXX double check this
|
|
|
|
+%{python_sitearch}/*
|
|
|
|
+%doc %{_mandir}/man1/lldb.1.*
|
|
|
|
+
|
|
|
|
+%files -n lldb-devel
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc tools/clang/docs/*
|
|
+%{_includedir}/lldb
|
|
|
|
|
|
%files doc
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc examples moredocs/html
|
|
+%doc %{llvmdocdir %{name}-doc}/
|
|
|
|
|
|
%files ocaml
|
|
%files ocaml
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
@@ -447,20 +579,37 @@ exit 0
|
|
|
|
|
|
%files ocaml-doc
|
|
%files ocaml-doc
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc moredocs/ocamldoc/html/*
|
|
+%doc %{llvmdocdir %{name}-ocaml-doc}/
|
|
|
|
|
|
%if 0%{?_with_doxygen}
|
|
%if 0%{?_with_doxygen}
|
|
%files apidoc
|
|
%files apidoc
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc apidoc/*
|
|
+%doc %{llvmdocdir %{name}-apidoc}/
|
|
|
|
|
|
%files -n clang-apidoc
|
|
%files -n clang-apidoc
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
-%doc clang-apidoc/*
|
|
+%doc %{llvmdocdir clang-apidoc}/
|
|
%endif
|
|
%endif
|
|
|
|
|
|
|
|
+%if %{build_compat32}
|
|
|
|
+%files -n compat32-%{name}-libs
|
|
|
|
+%defattr(-,root,root)
|
|
|
|
+%doc LICENSE.TXT
|
|
|
|
+%config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
|
|
|
|
+%dir %{_libdir}/%{name}
|
|
|
|
+%exclude %{_libdir}/%{name}/libclang.so
|
|
|
|
+%exclude %{_libdir}/%{name}/liblldb.so
|
|
|
|
+%{_libdir}/%{name}/*.so
|
|
|
|
+%endif
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Tue Mar 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.5.1-1
|
|
|
|
+- updated to 3.5.1
|
|
|
|
+- added Patch1, 2, 100, 101, 200, 201 and 202 from Fedora
|
|
|
|
+- added clang-libs, lldb, lldb-devel and compat32-llvm-libs subpackage
|
|
|
|
+- obsoleted clang-doc
|
|
|
|
+- built with ocaml 4.02.1
|
|
|
|
+
|
|
* Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
|
|
* Sat Nov 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.5.0-2
|
|
- fix <BTS:2832>
|
|
- fix <BTS:2832>
|
|
- fix configure option "--with-c-include-dirs"
|
|
- fix configure option "--with-c-include-dirs"
|