tstellar / rpms / llvm

Forked from rpms/llvm 2 years ago
Clone
ca904f
# Components enabled if supported by target architecture:
be655c
%ifarch %ix86 x86_64
be655c
  %bcond_without gold
434321
%else
be655c
  %bcond_with gold
434321
%endif
23feda
ca904f
Name:		llvm
Orion Poplawski 6448f2
Version:	3.9.1
146ec0
Release:	4%{?dist}
ca904f
Summary:	The Low Level Virtual Machine
97e156
ca904f
License:	NCSA
ca904f
URL:		http://llvm.org
8e7571
Source0:	http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
cb91f5
ca904f
Source100:	llvm-config.h
3f23b3
8b72be
# recognize s390 as SystemZ when configuring build
8b72be
Patch0:		llvm-3.7.1-cmake-s390.patch
8b72be
fba8c4
Patch1:		0001-This-code-block-breaks-the-docs-build-http-lab.llvm..patch
1805a9
Patch2:		0001-fix-docs-2.patch
1805a9
Patch3:		0001-fix-docs-3.patch
da6216
Patch4:		0001-docs-fix-cmake-code-block-warning.patch
f943e7
# backport from upstream to fix lldb out of tree
f943e7
Patch5:		0001-cmake-Install-CheckAtomic.cmake-needed-by-lldb.patch
Orion Poplawski 6448f2
# Upstream patch to fix doc build
Orion Poplawski 6448f2
# http://llvm.org/viewvc/llvm-project?view=revision&revision=294646
Orion Poplawski 6448f2
Patch6:		llvm-r294646.patch
974746
# This fix caused regressions
974746
Patch7:		0001-Revert-Merging-r280589.patch
146ec0
# https://reviews.llvm.org/D27609
146ec0
Patch8:		0001-Fix-R_AARCH64_MOVW_UABS_G3-relocation.patch
448866
448866
# backports cribbed from https://github.com/rust-lang/llvm/
448866
Patch47:	rust-lang-llvm-pr47.patch
448866
Patch53:	rust-lang-llvm-pr53.patch
448866
Patch54:	rust-lang-llvm-pr54.patch
0c3be0
Patch55:	rust-lang-llvm-pr55.patch
0c3be0
Patch57:	rust-lang-llvm-pr57.patch
fba8c4
ca904f
BuildRequires:	cmake
ca904f
BuildRequires:	zlib-devel
a5a420
BuildRequires:  libffi-devel
3019f5
BuildRequires:	ncurses-devel
ca904f
BuildRequires:	python3-sphinx
0b697b
%if %{with gold}
0b697b
BuildRequires:  binutils-devel
0b697b
%endif
ca904f
BuildRequires:  libstdc++-static
Bryan O'Sullivan d291b4
ca904f
Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
Bryan O'Sullivan d291b4
ca904f
%description
ca904f
LLVM is a compiler infrastructure designed for compile-time, link-time,
ca904f
runtime, and idle-time optimization of programs from arbitrary programming
ca904f
languages. The compiler infrastructure includes mirror sets of programming
ca904f
tools as well as libraries with equivalent functionality.
Bryan O'Sullivan d291b4
Bryan O'Sullivan d291b4
%package devel
ca904f
Summary:	Libraries and header files for LLVM
ca904f
Requires:	%{name}%{?_isa} = %{version}-%{release}
ca904f
Requires(posttrans): %{_sbindir}/alternatives
ca904f
Requires(posttrans): %{_sbindir}/alternatives
Bryan O'Sullivan d291b4
Bryan O'Sullivan d291b4
%description devel
ca904f
This package contains library and header files needed to develop new native
ca904f
programs that use the LLVM infrastructure.
Bryan O'Sullivan d291b4
Bryan O'Sullivan d291b4
%package doc
ca904f
Summary:	Documentation for LLVM
ca904f
BuildArch:	noarch
ca904f
Requires:	%{name} = %{version}-%{release}
Bryan O'Sullivan d291b4
Bryan O'Sullivan d291b4
%description doc
Bryan O'Sullivan d291b4
Documentation for the LLVM compiler infrastructure.
Bryan O'Sullivan d291b4
a8c599
%package libs
ca904f
Summary:	LLVM shared libraries
a8c599
a8c599
%description libs
a8c599
Shared libraries for the LLVM compiler infrastructure.
a8c599
7a8517
%package static
7a8517
Summary:	LLVM static libraries
7a8517
7a8517
%description static
7a8517
Static libraries for the LLVM compiler infrastructure.
7a8517
Bryan O'Sullivan d291b4
%prep
8e7571
%setup -q -n %{name}-%{version}.src
8b72be
%patch0 -p1 -b .s390
fba8c4
%patch1 -p1 -b .sphinx
47b8fa
%patch2 -p1 -b .docs2
1805a9
%patch3 -p1 -b .docs3
da6216
%patch4 -p1 -b .docs4
88bc7e
%patch5 -p1 -b .lldbfix
Orion Poplawski 6448f2
%patch6 -p0 -b .doc-lit
974746
%patch7 -p1 -b .amdfix
146ec0
%patch8 -p2 -b .arm64
448866
%patch47 -p1 -b .rust47
448866
%patch53 -p1 -b .rust53
448866
%patch54 -p1 -b .rust54
0c3be0
%patch55 -p1 -b .rust55
0c3be0
%patch57 -p1 -b .rust57
09ee2a
Bryan O'Sullivan d291b4
%build
ca904f
mkdir -p _build
ca904f
cd _build
ca904f
c244b9
%ifarch s390
c244b9
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
c244b9
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
c244b9
%endif
c244b9
933aa4
# force off shared libs as cmake macros turns it on.
ca904f
%cmake .. \
933aa4
	-DBUILD_SHARED_LIBS:BOOL=OFF \
ca904f
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
ca904f
	-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic -static-libstdc++" \
c244b9
%ifarch s390
c244b9
	-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
c244b9
	-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
c244b9
%endif
a95cfc
%if 0%{?__isa_bits} == 64
ca904f
	-DLLVM_LIBDIR_SUFFIX=64 \
be655c
%else
ca904f
	-DLLVM_LIBDIR_SUFFIX= \
98be43
%endif
ca904f
	\
894065
	-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF" \
ca904f
	-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
ca904f
	-DLLVM_ENABLE_ZLIB:BOOL=ON \
ca904f
	-DLLVM_ENABLE_FFI:BOOL=ON \
ca904f
	-DLLVM_ENABLE_RTTI:BOOL=ON \
be655c
%if %{with gold}
ca904f
	-DLLVM_BINUTILS_INCDIR=%{_includedir} \
ca904f
%endif
ca904f
	\
ca904f
	-DLLVM_BUILD_RUNTIME:BOOL=ON \
ca904f
	\
ca904f
	-DLLVM_INCLUDE_TOOLS:BOOL=ON \
ca904f
	-DLLVM_BUILD_TOOLS:BOOL=ON \
ca904f
	\
ca904f
	-DLLVM_INCLUDE_TESTS:BOOL=ON \
ca904f
	-DLLVM_BUILD_TESTS:BOOL=ON \
ca904f
	\
ca904f
	-DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
ca904f
	-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
ca904f
	\
ca904f
	-DLLVM_INCLUDE_UTILS:BOOL=ON \
ca904f
	-DLLVM_INSTALL_UTILS:BOOL=OFF \
ca904f
	\
ca904f
	-DLLVM_INCLUDE_DOCS:BOOL=ON \
ca904f
	-DLLVM_BUILD_DOCS:BOOL=ON \
ca904f
	-DLLVM_ENABLE_SPHINX:BOOL=ON \
ca904f
	-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
ca904f
	\
933aa4
	-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
10a197
	-DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
f8d533
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
ca904f
	-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \
ca904f
	-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
ca904f
	\
a5fe5a
	-DSPHINX_WARNINGS_AS_ERRORS=OFF \
ca904f
	-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3
ca904f
ca904f
make %{?_smp_mflags}
Bryan O'Sullivan d291b4
Bryan O'Sullivan d291b4
%install
ca904f
cd _build
ca904f
make install DESTDIR=%{buildroot}
9dd4cd
ca904f
# fix multi-lib
ca904f
mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
ca904f
mv -v %{buildroot}%{_includedir}/llvm/Config/llvm-config{,-%{__isa_bits}}.h
ca904f
install -m 0644 %{SOURCE100} %{buildroot}%{_includedir}/llvm/Config/llvm-config.h
Bryan O'Sullivan 03bad0
a5a420
%check
ca904f
cd _build
ca904f
make check-all || :
a5a420
999f90
%post libs -p /sbin/ldconfig
999f90
%postun libs -p /sbin/ldconfig
194b08
ca904f
%post devel
ca904f
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config llvm-config %{_bindir}/llvm-config-%{__isa_bits} %{__isa_bits}
a5a420
a5a420
%postun devel
ca904f
[ $1 -eq 0 ] && %{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config-%{__isa_bits}
a5a420
Bryan O'Sullivan d291b4
%files
ca904f
%{_bindir}/*
ca904f
%{_mandir}/man1/*.1.*
a5a420
%exclude %{_bindir}/llvm-config-%{__isa_bits}
ca904f
%exclude %{_mandir}/man1/llvm-config.1.*
ca904f
ca904f
%files libs
2a3c79
%{_libdir}/BugpointPasses.so
2a3c79
%{_libdir}/LLVMHello.so
2a3c79
%if %{with gold}
2a3c79
%{_libdir}/LLVMgold.so
2a3c79
%endif
894065
%{_libdir}/libLLVM-3.9*.so
2a3c79
%{_libdir}/libLTO.so
Bryan O'Sullivan d291b4
Bryan O'Sullivan d291b4
%files devel
a5a420
%{_bindir}/llvm-config-%{__isa_bits}
ca904f
%{_mandir}/man1/llvm-config.1.*
ca904f
%{_includedir}/llvm
ca904f
%{_includedir}/llvm-c
2a3c79
%{_libdir}/libLLVM.so
894065
%{_libdir}/cmake/llvm
c6833e
c6833e
%files doc
ca904f
%doc %{_pkgdocdir}/html
Bryan O'Sullivan d291b4
7a8517
%files static
7a8517
%{_libdir}/*.a
7a8517
Bryan O'Sullivan d291b4
%changelog
146ec0
* Sun Mar 12 2017 Peter Robinson <pbrobinson@fedoraproject.org> 3.9.1-4
146ec0
- Fix missing mask on relocation for aarch64 (rhbz 1429050)
146ec0
974746
* Wed Mar 01 2017 Dave Airlie <airlied@redhat.com> - 3.9.1-3
974746
- revert upstream radeonsi breaking change.
974746
a5fe5a
* Thu Feb 23 2017 Josh Stone <jistone@redhat.com> - 3.9.1-2
a5fe5a
- disable sphinx warnings-as-errors
a5fe5a
Orion Poplawski 6448f2
* Fri Feb 10 2017 Orion Poplawski <orion@cora.nwra.com> - 3.9.1-1
Orion Poplawski 6448f2
- llvm 3.9.1
Orion Poplawski 6448f2
ce8c38
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.0-8
ce8c38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ce8c38
0c3be0
* Tue Nov 29 2016 Josh Stone <jistone@redhat.com> - 3.9.0-7
0c3be0
- Apply backports from rust-lang/llvm#55, #57
0c3be0
ba4dd4
* Tue Nov 01 2016 Dave Airlie 
ba4dd4
- rebuild for new arches
ba4dd4
88bc7e
* Wed Oct 26 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-5
88bc7e
- apply the patch from -4
88bc7e
f943e7
* Wed Oct 26 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-4
f943e7
- add fix for lldb out-of-tree build
f943e7
448866
* Mon Oct 17 2016 Josh Stone <jistone@redhat.com> - 3.9.0-3
448866
- Apply backports from rust-lang/llvm#47, #48, #53, #54
448866
307be8
* Sat Oct 15 2016 Josh Stone <jistone@redhat.com> - 3.9.0-2
307be8
- Apply an InstCombine backport via rust-lang/llvm#51
307be8
894065
* Wed Sep 07 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-1
894065
- llvm 3.9.0
894065
- upstream moved where cmake files are packaged.
894065
- upstream dropped CppBackend
894065
2a3c79
* Wed Jul 13 2016 Adam Jackson <ajax@redhat.com> - 3.8.1-1
2a3c79
- llvm 3.8.1
2a3c79
- Add mips target
2a3c79
- Fix some shared library mispackaging
2a3c79
3019f5
* Tue Jun 07 2016 Jan Vcelak <jvcelak@fedoraproject.org> - 3.8.0-2
3019f5
- fix color support detection on terminal
3019f5
8e7571
* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 3.8.0-1
8e7571
- llvm 3.8.0 release
8e7571
c244b9
* Wed Mar 09 2016 Dan Horรกk <dan[at][danny.cz> 3.8.0-0.3
c244b9
- install back memory consumption workaround for s390
c244b9
861af0
* Thu Mar 03 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.2
861af0
- llvm 3.8.0 rc3 release
861af0
f8d533
* Fri Feb 19 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.1
f8d533
- llvm 3.8.0 rc2 release
f8d533
8b72be
* Tue Feb 16 2016 Dan Horรกk <dan[at][danny.cz> 3.7.1-7
8b72be
- recognize s390 as SystemZ when configuring build
8b72be
10a197
* Sat Feb 13 2016 Dave Airlie <airlied@redhat.com> 3.7.1-6
10a197
- export C++ API for mesa.
10a197
7a8517
* Sat Feb 13 2016 Dave Airlie <airlied@redhat.com> 3.7.1-5
7a8517
- reintroduce llvm-static, clang needs it currently.
7a8517
933aa4
* Fri Feb 12 2016 Dave Airlie <airlied@redhat.com> 3.7.1-4
933aa4
- jump back to single llvm library, the split libs aren't working very well.
933aa4
d0a77d
* Fri Feb 05 2016 Dave Airlie <airlied@redhat.com> 3.7.1-3
d0a77d
- add missing obsoletes (#1303497)
d0a77d
4fb79d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
4fb79d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4fb79d
ca904f
* Thu Jan 07 2016 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.1-1
ca904f
- new upstream release
ca904f
- enable gold linker
788950
ca904f
* Wed Nov 04 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
ca904f
- fix Requires for subpackages on the main package
Bryan O'Sullivan d291b4
ca904f
* Tue Oct 06 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
ca904f
- initial version using cmake build system