|
@@ -1,5 +1,7 @@
|
|
|
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
|
|
|
|
|
|
+%define ver_suffix %(echo "%{version}" | cut -d . -f 1)
|
|
|
+
|
|
|
%define _unpackaged_files_terminate_build 1
|
|
|
|
|
|
# Build options:
|
|
@@ -7,6 +9,8 @@
|
|
|
%bcond_with doxygen
|
|
|
%bcond_with ocaml
|
|
|
%bcond_with force_gold
|
|
|
+%bcond_with lld_libs
|
|
|
+%bcond_with clang_tools_extra
|
|
|
|
|
|
# Documentation install path
|
|
|
%global llvmdocdir() %{_docdir}/%1-%{version}
|
|
@@ -14,18 +18,24 @@
|
|
|
%define _unpackaged_files_terminate_build 1
|
|
|
|
|
|
Name: llvm
|
|
|
-Version: 5.0.1
|
|
|
-Release: 2%{?_dist_release}
|
|
|
+Version: 7.0.0
|
|
|
+Release: 1%{?_dist_release}
|
|
|
Summary: The Low Level Virtual Machine
|
|
|
Summary(ja): LLVM - 低レベルバーチャルマシン
|
|
|
|
|
|
Group: Development/Languages
|
|
|
License: NCSA
|
|
|
URL: http://llvm.org/
|
|
|
+
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
+
|
|
|
Source0: http://llvm.org/releases/%{version}/llvm-%{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
|
|
|
Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
|
|
|
+Source4: http://llvm.org/releases/%{version}/lld-%{version}.src.tar.xz
|
|
|
+Source5: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
|
|
|
|
|
|
# multilib fixes
|
|
|
Source10: llvm-config.h
|
|
@@ -34,15 +44,19 @@ Source11: clang-config.h
|
|
|
# patches
|
|
|
|
|
|
# recognize s390 as SystemZ when configuring build
|
|
|
-Patch0: llvm-3.7.1-cmake-s390.patch
|
|
|
+# llvm
|
|
|
Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
|
|
|
-# FIXME: Symbol versioning breaks some unittests when statically linking
|
|
|
-# libstdc++, so we disable it for now.
|
|
|
-Patch4: 0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
|
|
|
-Patch5: 0001-PowerPC-Don-t-use-xscvdpspn-on-the-P7.patch
|
|
|
+Patch7: 0001-Filter-out-cxxflags-not-supported-by-clang.patch
|
|
|
+Patch12: 0001-unittests-Don-t-install-TestPlugin.so.patch
|
|
|
+Patch15: 0001-Don-t-set-rpath-when-installing.patch
|
|
|
|
|
|
-Patch100: 0001-lit.cfg-Remove-substitutions-for-clang-llvm-tools.patch
|
|
|
-Patch200: 0001-Fix-AArch64-build-with-glibc-2.26.patch
|
|
|
+# clang
|
|
|
+Patch100: 0001-lit.cfg-Add-hack-so-lit-can-find-not-and-FileCheck.patch
|
|
|
+Patch101: 0001-GCC-compatibility-Ignore-fstack-clash-protection.patch
|
|
|
+Patch102: 0001-Driver-Prefer-vendor-supplied-gcc-toolchain.patch
|
|
|
+
|
|
|
+# lld
|
|
|
+Patch400: 0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
|
|
|
|
|
|
# Vine Patch
|
|
|
Patch1000: clang-3.8.1-driver-ld.gold.patch
|
|
@@ -62,9 +76,11 @@ BuildRequires: libstdc++-devel
|
|
|
BuildRequires: libstdc++-static
|
|
|
BuildRequires: libtool-ltdl-devel
|
|
|
BuildRequires: libxml2-devel
|
|
|
+%if %{with ocaml}
|
|
|
BuildRequires: ocaml-findlib
|
|
|
BuildRequires: ocaml-ctypes
|
|
|
BuildRequires: ocaml-ounit
|
|
|
+%endif
|
|
|
# for DejaGNU test suite
|
|
|
BuildRequires: dejagnu tcl-devel python
|
|
|
%if %{with doxygen}
|
|
@@ -76,8 +92,11 @@ BuildRequires: perl
|
|
|
BuildRequires: swig
|
|
|
BuildRequires: libedit-devel
|
|
|
BuildRequires: python-devel >= 2.7
|
|
|
+# lld
|
|
|
+BuildRequires: ncurses-devel
|
|
|
+BuildRequires: zlib-devel
|
|
|
|
|
|
-Requires: llvm-libs = %{version}-%{release}
|
|
|
+Requires: llvm%{ver_suffix}-libs = %{version}-%{release}
|
|
|
|
|
|
# LLVM is not supported on PPC64
|
|
|
# http://llvm.org/bugs/show_bug.cgi?id=3729
|
|
@@ -98,6 +117,7 @@ Group: Development/Libraries
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
Requires: libstdc++-devel
|
|
|
Requires: libffi-devel
|
|
|
+Requires: libedit-devel
|
|
|
|
|
|
%description devel
|
|
|
This package contains library and header files needed to develop new
|
|
@@ -117,15 +137,16 @@ Obsoletes: %{name}-doc < %{version}-%{release}
|
|
|
Documentation for the LLVM compiler infrastructure.
|
|
|
|
|
|
|
|
|
-%package libs
|
|
|
+%package -n llvm%{ver_suffix}-libs
|
|
|
Summary: LLVM shared libraries
|
|
|
Summary(ja): LLVM 共有ライブラリ
|
|
|
Group: System Environment/Libraries
|
|
|
+Provides: llvm-libs = %{version}-%{release}
|
|
|
|
|
|
-%description libs
|
|
|
+%description -n llvm%{ver_suffix}-libs
|
|
|
Shared libraries for the LLVM compiler infrastructure.
|
|
|
|
|
|
-%description libs -l ja
|
|
|
+%description -n llvm%{ver_suffix}-libs -l ja
|
|
|
LLVM コンパイラ基盤の共有ライブラリです.
|
|
|
|
|
|
%package static
|
|
@@ -202,7 +223,7 @@ intended to run in tandem with a build of a project or code base.
|
|
|
|
|
|
%package -n python-clang
|
|
|
Summary: Python bindings for clang
|
|
|
-Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
+Requires: %{name}%{ver_suffix}-libs%{?_isa} = %{version}-%{release}
|
|
|
Requires: python
|
|
|
%description -n python-clang
|
|
|
Python bindings for clang
|
|
@@ -240,6 +261,38 @@ Requires: lldb = %{version}-%{release}
|
|
|
This package contains header files for the LLDB debugger.
|
|
|
|
|
|
|
|
|
+%package -n lld
|
|
|
+Summary: The LLVM Linker
|
|
|
+Summary(ja): LLVMリンカー
|
|
|
+License: NCSA
|
|
|
+Group: Development/Tools
|
|
|
+
|
|
|
+%description -n lld
|
|
|
+The LLVM project linker.
|
|
|
+
|
|
|
+%if %{with lld_libs}
|
|
|
+%package -n lld-libs
|
|
|
+Summary: LLD shared libraries
|
|
|
+Summary(ja): LLD 共有ライブラリ
|
|
|
+License: NCSA
|
|
|
+Group: System Environment/Libraries
|
|
|
+
|
|
|
+%description -n lld-libs
|
|
|
+Shared libraries for LLD.
|
|
|
+
|
|
|
+
|
|
|
+%package -n lld-devel
|
|
|
+Summary: Libraries and header files for LLD
|
|
|
+Summary(ja): LLD 用ライブラリとヘッダファイル
|
|
|
+License: NCSA
|
|
|
+Group: System Environment/Libraries
|
|
|
+Requires: lld-libs = %{version}-%{release}
|
|
|
+
|
|
|
+%description -n lld-devel
|
|
|
+This package contains library and header files needed to develop new native
|
|
|
+programs that use the LLD infrastructure.
|
|
|
+%endif
|
|
|
+
|
|
|
%if %{with doxygen}
|
|
|
%package apidoc
|
|
|
Summary: API documentation for LLVM
|
|
@@ -310,35 +363,44 @@ HTML documentation for LLVM's OCaml binding.
|
|
|
%endif
|
|
|
|
|
|
# compat32'
|
|
|
-%package -n compat32-%{name}-libs
|
|
|
+%package -n compat32-%{name}%{ver_suffix}-libs
|
|
|
Summary: LLVM shared libraries
|
|
|
Summary(ja): LLVM 共有ライブラリ
|
|
|
Group: System Environment/Libraries
|
|
|
-Requires: %{name}-libs = %{version}-%{release}
|
|
|
+Provides: compat32-llvm-libs = %{version}-%{release}
|
|
|
+Requires: %{name}%{ver_suffix}-libs = %{version}-%{release}
|
|
|
|
|
|
-%description -n compat32-%{name}-libs
|
|
|
+%description -n compat32-%{name}%{ver_suffix}-libs
|
|
|
Shared libraries for the LLVM compiler infrastructure.
|
|
|
|
|
|
|
|
|
%prep
|
|
|
-%setup -q -a1 -a2 -a3 -n llvm-%{version}.src
|
|
|
+%setup -q -a1 -a2 -a3 -a4 -n llvm-%{version}.src
|
|
|
|
|
|
-%patch0 -p1
|
|
|
%patch3 -p1
|
|
|
-%patch4 -p1
|
|
|
-%patch5 -p1
|
|
|
+%patch7 -p1
|
|
|
+%patch12 -p1
|
|
|
+%patch15 -p1
|
|
|
|
|
|
-rm -rf tools/clang tools/lldb projects/compiler-rt
|
|
|
+rm -rf tools/clang tools/lld tools/lldb projects/compiler-rt
|
|
|
mv cfe-%{version}.src tools/clang
|
|
|
mv compiler-rt-%{version}.src projects/compiler-rt
|
|
|
mv lldb-%{version}.src tools/lldb
|
|
|
+mv lld-%{version}.src tools/lld
|
|
|
+
|
|
|
+%if %{with clang_tools_extra}
|
|
|
+tar xvf %{SOURCE5}
|
|
|
+mv clang-tools-extra-%{version}.src tools/clang/tools/extra
|
|
|
+%endif
|
|
|
|
|
|
pushd tools/clang
|
|
|
-%patch100 -p1
|
|
|
+%patch100 -p1 -b .lit-search-path
|
|
|
+%patch101 -p1 -b .fstack-clash-protection
|
|
|
+%patch102 -p1 -b .vendor-gcc
|
|
|
popd
|
|
|
|
|
|
-pushd projects/compiler-rt
|
|
|
-%patch200 -p1
|
|
|
+pushd tools/lld
|
|
|
+%patch400 -p1
|
|
|
popd
|
|
|
|
|
|
# Vine Linux
|
|
@@ -372,7 +434,7 @@ LDFLAGS="%{?__global_ldflags} -L$TMP_PWD/%{_lib} -lpthread -ldl"
|
|
|
%else
|
|
|
-DLLVM_LIBDIR_SUFFIX= \
|
|
|
%endif
|
|
|
- -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;BPF" \
|
|
|
+ -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;NVPTX;BPF;ARM;AArch64" \
|
|
|
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
|
|
|
-DLLVM_ENABLE_ZLIB:BOOL=ON \
|
|
|
-DLLVM_ENABLE_FFI:BOOL=ON \
|
|
@@ -395,6 +457,7 @@ LDFLAGS="%{?__global_ldflags} -L$TMP_PWD/%{_lib} -lpthread -ldl"
|
|
|
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
|
|
|
%endif
|
|
|
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
|
|
|
+ -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
|
|
|
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
|
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \
|
|
|
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
|
|
@@ -412,6 +475,8 @@ LDFLAGS="%{?__global_ldflags} -L$TMP_PWD/%{_lib} -lpthread -ldl"
|
|
|
-DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
|
|
|
-DLLDB_DISABLE_PYTHON:BOOL=OFF \
|
|
|
\
|
|
|
+ -DLLDB_LINK_LLVM_DYLIB:BOOL=ON \
|
|
|
+ \
|
|
|
-DPYTHON_EXECUTABLE:STRING=%{__python} \
|
|
|
-DPYTHON_VERSION_MAJOR:STRING=$(%{__python} -c "import sys; print sys.version_info.major") \
|
|
|
-DPYTHON_VERSION_MINOR:STRING=$(%{__python} -c "import sys; print sys.version_info.minor") \
|
|
@@ -474,11 +539,23 @@ mv -v %{buildroot}%{python_sitearch}/readline.so %{buildroot}%{python_sitearch}/
|
|
|
# remove bundled six.py
|
|
|
rm -f %{buildroot}%{python_sitearch}/six.*
|
|
|
|
|
|
-# Move this plugin to libdir.
|
|
|
-# FIXME: I have no idea why this is installed to bindir. Moving it to libdir
|
|
|
-# may break it, but I don't know how to test this.
|
|
|
-mv -v %{buildroot}{%{_bindir},%{_libdir}}/liblldb-intel-mpxtable.so
|
|
|
|
|
|
+# lld
|
|
|
+
|
|
|
+# remove static libraries
|
|
|
+rm -fv %{buildroot}%{_libdir}/liblld*.a
|
|
|
+
|
|
|
+# Remove rpath
|
|
|
+chrpath --delete %{buildroot}%{_bindir}/*lld
|
|
|
+chrpath --delete %{buildroot}%{_bindir}/lld-link
|
|
|
+chrpath --delete %{buildroot}%{_bindir}/wasm-ld
|
|
|
+find %{buildroot}%{_libdir} -type f -name 'liblld*.so*' | \
|
|
|
+ grep -v 'liblldb' | \
|
|
|
+ xargs chrpath --delete
|
|
|
+
|
|
|
+%if !%{with lld_libs}
|
|
|
+ rm -rf %{buildroot}%{_includedir}/lld
|
|
|
+%endif
|
|
|
|
|
|
# compiler-rt
|
|
|
|
|
@@ -514,8 +591,8 @@ make -C tools/clang/test TESTARGS="-v -j4" | tee clang-testlog.txt ||:
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
-%post libs -p /sbin/ldconfig
|
|
|
-%postun libs -p /sbin/ldconfig
|
|
|
+%post -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
|
|
|
+%postun -n llvm%{ver_suffix}-libs -p /sbin/ldconfig
|
|
|
|
|
|
%post -n clang-libs -p /sbin/ldconfig
|
|
|
%postun -n clang-libs -p /sbin/ldconfig
|
|
@@ -523,6 +600,19 @@ rm -rf %{buildroot}
|
|
|
%post -n lldb -p /sbin/ldconfig
|
|
|
%postun -n lldb -p /sbin/ldconfig
|
|
|
|
|
|
+%post -n lld
|
|
|
+ /sbin/alternatives --install /usr/bin/ld ld \
|
|
|
+ /usr/bin/ld.lld 20
|
|
|
+
|
|
|
+%preun -n lld
|
|
|
+if [ $1 = 0 ]; then
|
|
|
+ /sbin/alternatives --remove ld /usr/bin/ld.lld
|
|
|
+fi
|
|
|
+
|
|
|
+%if %{with lld_libs}
|
|
|
+%post -n lld-libs -p /sbin/ldconfig
|
|
|
+%postun -n lld-libs -p /sbin/ldconfig
|
|
|
+%endif
|
|
|
|
|
|
%posttrans devel
|
|
|
# link llvm-config to the platform-specific file;
|
|
@@ -547,6 +637,7 @@ exit 0
|
|
|
%defattr(-,root,root,-)
|
|
|
%doc CREDITS.TXT README.txt
|
|
|
%{_bindir}/bugpoint
|
|
|
+%{_bindir}/dsymutil
|
|
|
%{_bindir}/llc
|
|
|
%{_bindir}/lli
|
|
|
%{_bindir}/lli-child-target
|
|
@@ -574,7 +665,7 @@ exit 0
|
|
|
%{_libdir}/cmake/llvm
|
|
|
%exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
|
|
|
|
|
|
-%files libs
|
|
|
+%files -n llvm%{ver_suffix}-libs
|
|
|
%defattr(-,root,root,-)
|
|
|
%doc LICENSE.TXT
|
|
|
#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
|
|
@@ -594,6 +685,8 @@ exit 0
|
|
|
#doc %{llvmdocdir clang}/
|
|
|
%{_bindir}/clang*
|
|
|
%{_bindir}/c-index-test
|
|
|
+%{_bindir}/diagtool
|
|
|
+%{_bindir}/hmaptool
|
|
|
%{_libdir}/clang
|
|
|
|
|
|
%files -n clang-libs
|
|
@@ -626,17 +719,35 @@ exit 0
|
|
|
%defattr(-,root,root,-)
|
|
|
#doc %{llvmdocdir lldb}/
|
|
|
%{_bindir}/lldb*
|
|
|
-%{_libdir}/liblldb.so.*
|
|
|
-%{_libdir}/liblldb-intel-mpxtable.so
|
|
|
+%{_libdir}/liblldb*.so.*
|
|
|
|
|
|
%files -n lldb-devel
|
|
|
%defattr(-,root,root,-)
|
|
|
%{_includedir}/lldb
|
|
|
-%{_libdir}/liblldb.so
|
|
|
+%{_libdir}/liblldb*.so
|
|
|
|
|
|
%files -n python-lldb
|
|
|
%{python_sitearch}/lldb
|
|
|
|
|
|
+%files -n lld
|
|
|
+%defattr(-,root,root,-)
|
|
|
+%{_bindir}/lld*
|
|
|
+%{_bindir}/ld.lld
|
|
|
+%{_bindir}/ld64.lld
|
|
|
+%{_bindir}/wasm-ld
|
|
|
+%exclude %{_bindir}/lldb*
|
|
|
+
|
|
|
+%if %{with lld_libs}
|
|
|
+%files -n lld-libs
|
|
|
+%{_libdir}/liblld*.so.*
|
|
|
+%exclude %{_libdir}/liblldb*.so.*
|
|
|
+
|
|
|
+%files -n lld-devel
|
|
|
+%{_includedir}/lld
|
|
|
+%{_libdir}/liblld*.so
|
|
|
+%exclude %{_libdir}/liblldb*.so
|
|
|
+%endif
|
|
|
+
|
|
|
%files doc
|
|
|
%defattr(-,root,root,-)
|
|
|
%doc docs/*
|
|
@@ -672,19 +783,25 @@ exit 0
|
|
|
%endif
|
|
|
|
|
|
%if %{build_compat32}
|
|
|
-%files -n compat32-%{name}-libs
|
|
|
+%files -n compat32-%{name}%{ver_suffix}-libs
|
|
|
%defattr(-,root,root)
|
|
|
%doc LICENSE.TXT
|
|
|
#config(noreplace) %{_sysconfdir}/ld.so.conf.d/llvm-%{_arch}.conf
|
|
|
%exclude %{_libdir}/libclang.so
|
|
|
-%exclude %{_libdir}/liblldb.so
|
|
|
-%exclude %{_libdir}/liblldb-intel-mpxtable.so
|
|
|
+%exclude %{_libdir}/liblld*.so
|
|
|
%exclude %{_libdir}/LLVMHello.so
|
|
|
%{_libdir}/*.so
|
|
|
%{_libdir}/libLTO.so.*
|
|
|
%endif
|
|
|
|
|
|
%changelog
|
|
|
+* Wed Dec 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.0.0-1
|
|
|
+- new upstream release.
|
|
|
+- dropped Patch0, 4, 5, 100 and 200.
|
|
|
+- imported Patch3, 7, 12, 15, 100, 101, 102 and 400 from rawhide.
|
|
|
+- renamed a subpackage "llvm-libs".
|
|
|
+- added a subpackage "lld".
|
|
|
+
|
|
|
* Tue Jan 02 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.0.1-2
|
|
|
- added subpackages "llvm-static", "python-lldb" and "python-clang".
|
|
|
|