|
|
650a21 |
# Components enabled if supported by target architecture:
|
|
|
650a21 |
%ifarch %ix86 x86_64
|
|
|
650a21 |
%bcond_without gold
|
|
|
650a21 |
%else
|
|
|
650a21 |
%bcond_with gold
|
|
|
650a21 |
%endif
|
|
|
650a21 |
|
|
|
650a21 |
%if 0%{?rhel} == 6
|
|
|
650a21 |
%define rhel6 1
|
|
|
650a21 |
%endif
|
|
|
650a21 |
|
|
|
650a21 |
# llvm works on the 64-bit versions of these, but not the 32 versions.
|
|
|
650a21 |
# consequently we build swrast on them instead of llvmpipe.
|
|
|
650a21 |
ExcludeArch: ppc s390 %{?rhel6:s390x}
|
|
|
650a21 |
|
|
|
650a21 |
%ifarch s390x
|
|
|
650a21 |
%global host_target SystemZ
|
|
|
650a21 |
%endif
|
|
|
650a21 |
%ifarch ppc64 ppc64le
|
|
|
650a21 |
%global host_target PowerPC
|
|
|
650a21 |
%endif
|
|
|
650a21 |
%ifarch %ix86 x86_64
|
|
|
650a21 |
%global host_target X86
|
|
|
650a21 |
%endif
|
|
|
650a21 |
%ifarch aarch64
|
|
|
650a21 |
%global host_target AArch64
|
|
|
650a21 |
%endif
|
|
|
650a21 |
%ifarch %{arm}
|
|
|
650a21 |
%global host_target ARM
|
|
|
650a21 |
%endif
|
|
|
650a21 |
|
|
|
650a21 |
%ifnarch s390x
|
|
|
650a21 |
%global amdgpu ;AMDGPU
|
|
|
650a21 |
%endif
|
|
|
650a21 |
|
|
|
650a21 |
Name: mesa-private-llvm
|
|
|
650a21 |
Version: 3.9.1
|
|
|
650a21 |
Release: 3%{?dist}
|
|
|
650a21 |
Summary: llvm engine for Mesa
|
|
|
650a21 |
|
|
|
650a21 |
Group: System Environment/Libraries
|
|
|
650a21 |
License: NCSA
|
|
|
650a21 |
URL: http://llvm.org
|
|
|
650a21 |
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
|
|
|
650a21 |
Source1: cmake-3.4.3.tar.gz
|
|
|
650a21 |
Source100: llvm-config.h
|
|
|
650a21 |
|
|
|
650a21 |
Patch1: fix-cmake-include.patch
|
|
|
650a21 |
Patch2: 0001-Revert-Merging-r280589.patch
|
|
|
650a21 |
Patch3: 0001-Revert-InstCombine-transform-bitcasted-bitwise-logic.patch
|
|
|
650a21 |
|
|
|
650a21 |
BuildRequires: cmake
|
|
|
650a21 |
BuildRequires: zlib-devel
|
|
|
650a21 |
%if %{with gold}
|
|
|
650a21 |
BuildRequires: binutils-devel
|
|
|
650a21 |
%endif
|
|
|
650a21 |
BuildRequires: libstdc++-static
|
|
|
650a21 |
BuildRequires: python
|
|
|
650a21 |
|
|
|
650a21 |
%description
|
|
|
650a21 |
This package contains the LLVM-based runtime support for Mesa. It is not a
|
|
|
650a21 |
fully-featured build of LLVM, and use by any package other than Mesa is not
|
|
|
650a21 |
supported.
|
|
|
650a21 |
|
|
|
650a21 |
%package devel
|
|
|
650a21 |
Summary: Libraries and header files for LLVM
|
|
|
650a21 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
650a21 |
|
|
|
650a21 |
%description devel
|
|
|
650a21 |
This package contains library and header files needed to build the LLVM
|
|
|
650a21 |
support in Mesa.
|
|
|
650a21 |
|
|
|
650a21 |
%prep
|
|
|
650a21 |
%setup -q -n llvm-%{version}.src
|
|
|
650a21 |
|
|
|
650a21 |
tar xf %{SOURCE1}
|
|
|
650a21 |
|
|
|
650a21 |
%patch1 -p1 -b .fixinc
|
|
|
650a21 |
%patch2 -p1 -b .radeonsi-fix
|
|
|
650a21 |
%patch3 -p1 -b .bigendian-fix
|
|
|
650a21 |
|
|
|
650a21 |
%build
|
|
|
650a21 |
|
|
|
650a21 |
BUILD_DIR=`pwd`/cmake_build
|
|
|
650a21 |
cd cmake-3.4.3
|
|
|
650a21 |
cmake . -DCMAKE_INSTALL_PREFIX=$BUILD_DIR
|
|
|
650a21 |
make
|
|
|
650a21 |
make install
|
|
|
650a21 |
cd -
|
|
|
650a21 |
|
|
|
650a21 |
|
|
|
650a21 |
sed -i 's|ActiveIncludeDir = ActivePrefix + "/include|&/mesa-private|g' tools/llvm-config/llvm-config.cpp
|
|
|
650a21 |
|
|
|
650a21 |
mkdir -p _build
|
|
|
650a21 |
cd _build
|
|
|
650a21 |
|
|
|
650a21 |
export PATH=$BUILD_DIR/bin:$PATH
|
|
|
650a21 |
%global __cmake $BUILD_DIR/bin/cmake
|
|
|
650a21 |
# force off shared libs as cmake macros turns it on.
|
|
|
650a21 |
%cmake .. \
|
|
|
650a21 |
-DINCLUDE_INSTALL_DIR=%{_includedir}/mesa-private \
|
|
|
650a21 |
-DLLVM_VERSION_SUFFIX="-mesa" \
|
|
|
650a21 |
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
|
|
650a21 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
650a21 |
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic -static-libstdc++" \
|
|
|
650a21 |
%if 0%{?__isa_bits} == 64
|
|
|
650a21 |
-DLLVM_LIBDIR_SUFFIX=64 \
|
|
|
650a21 |
%else
|
|
|
650a21 |
-DLLVM_LIBDIR_SUFFIX= \
|
|
|
650a21 |
%endif
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_TARGETS_TO_BUILD="%{host_target}%{?amdgpu}" \
|
|
|
650a21 |
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
|
|
|
650a21 |
-DLLVM_ENABLE_ZLIB:BOOL=ON \
|
|
|
650a21 |
-DLLVM_ENABLE_FFI:BOOL=OFF \
|
|
|
650a21 |
-DLLVM_ENABLE_RTTI:BOOL=OFF \
|
|
|
650a21 |
%if %{with gold}
|
|
|
650a21 |
-DLLVM_BINUTILS_INCDIR=%{_includedir} \
|
|
|
650a21 |
%endif
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_BUILD_RUNTIME:BOOL=ON \
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_INCLUDE_TOOLS:BOOL=ON \
|
|
|
650a21 |
-DLLVM_BUILD_TOOLS:BOOL=ON \
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_INCLUDE_TESTS:BOOL=ON \
|
|
|
650a21 |
-DLLVM_BUILD_TESTS:BOOL=ON \
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \
|
|
|
650a21 |
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_INCLUDE_UTILS:BOOL=ON \
|
|
|
650a21 |
-DLLVM_INSTALL_UTILS:BOOL=OFF \
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_INCLUDE_DOCS:BOOL=OFF \
|
|
|
650a21 |
-DLLVM_BUILD_DOCS:BOOL=OFF \
|
|
|
650a21 |
-DLLVM_ENABLE_SPHINX:BOOL=OFF \
|
|
|
650a21 |
-DLLVM_ENABLE_DOXYGEN:BOOL=OFF \
|
|
|
650a21 |
\
|
|
|
650a21 |
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
|
|
|
650a21 |
-DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
|
|
|
650a21 |
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
|
650a21 |
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \
|
|
|
650a21 |
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF
|
|
|
650a21 |
|
|
|
650a21 |
make %{?_smp_mflags} VERBOSE=1
|
|
|
650a21 |
|
|
|
650a21 |
%install
|
|
|
650a21 |
cd _build
|
|
|
650a21 |
make install DESTDIR=%{buildroot}
|
|
|
650a21 |
|
|
|
650a21 |
# fix multi-lib
|
|
|
650a21 |
mv -v %{buildroot}%{_bindir}/llvm-config %{buildroot}%{_bindir}/%{name}-config-%{__isa_bits}
|
|
|
650a21 |
mv -v %{buildroot}%{_includedir}/mesa-private/llvm/Config/llvm-config{,-%{__isa_bits}}.h
|
|
|
650a21 |
install -m 0644 %{SOURCE100} %{buildroot}%{_includedir}/mesa-private/llvm/Config/llvm-config.h
|
|
|
650a21 |
|
|
|
650a21 |
rm -f %{buildroot}%{_libdir}/*.a
|
|
|
650a21 |
|
|
|
650a21 |
rm -f %{buildroot}%{_libdir}/libLLVM.so
|
|
|
650a21 |
|
|
|
650a21 |
# remove documentation makefiles:
|
|
|
650a21 |
# they require the build directory to work
|
|
|
650a21 |
find examples -name 'Makefile' | xargs -0r rm -f
|
|
|
650a21 |
|
|
|
650a21 |
# RHEL: strip out most binaries, most libs, and man pages
|
|
|
650a21 |
ls %{buildroot}%{_bindir}/* | grep -v bin/mesa-private | xargs rm -f
|
|
|
650a21 |
ls %{buildroot}%{_libdir}/* | grep -v libLLVM | xargs rm -f
|
|
|
650a21 |
rm -rf %{buildroot}%{_mandir}/man1
|
|
|
650a21 |
|
|
|
650a21 |
# RHEL: Strip out some headers Mesa doesn't need
|
|
|
650a21 |
rm -rf %{buildroot}%{_includedir}/mesa-private/llvm/{Assembly}
|
|
|
650a21 |
rm -rf %{buildroot}%{_includedir}/mesa-private/llvm/Option
|
|
|
650a21 |
rm -rf %{buildroot}%{_includedir}/mesa-private/llvm/TableGen
|
|
|
650a21 |
rm -rf %{buildroot}%{_includedir}/llvm-c/lto.h
|
|
|
650a21 |
|
|
|
650a21 |
# RHEL: Strip out cmake build foo
|
|
|
650a21 |
rm -rf %{buildroot}%{_datadir}/llvm/cmake
|
|
|
650a21 |
rm -rf %{buildroot}%{_libdir}/cmake/llvm
|
|
|
650a21 |
|
|
|
650a21 |
%check
|
|
|
650a21 |
cd _build
|
|
|
650a21 |
# 3.8.1 note: skx failures are XFAIL. the skylake backport does not wire
|
|
|
650a21 |
# up AVX512 for skylake, but the tests are from code that expects that.
|
|
|
650a21 |
# safe to ignore.
|
|
|
650a21 |
make check-all || :
|
|
|
650a21 |
|
|
|
650a21 |
%post -p /sbin/ldconfig
|
|
|
650a21 |
%postun -p /sbin/ldconfig
|
|
|
650a21 |
|
|
|
650a21 |
%files
|
|
|
650a21 |
%doc LICENSE.TXT
|
|
|
650a21 |
%{_libdir}/libLLVM-3.9*-mesa.so
|
|
|
650a21 |
|
|
|
650a21 |
%files devel
|
|
|
650a21 |
%{_bindir}/%{name}-config-%{__isa_bits}
|
|
|
650a21 |
%{_includedir}/mesa-private/llvm
|
|
|
650a21 |
%{_includedir}/mesa-private/llvm-c
|
|
|
650a21 |
|
|
|
650a21 |
%changelog
|
|
|
650a21 |
* Wed May 03 2017 Lyude Paul <lyude@redhat.com> - 3.9.1-3
|
|
|
650a21 |
- Add temporary revert for #1445423
|
|
|
650a21 |
|
|
|
650a21 |
* Fri Mar 24 2017 Tom Stellard <tstellar@redhat.com> - 3.9.1-2
|
|
|
650a21 |
- Add fix for radeonsi regression
|
|
|
650a21 |
|
|
|
650a21 |
* Tue Jan 10 2017 Jeff Law <law@redhat.com> - 3.9.1-1
|
|
|
650a21 |
- Update to 3.9.1
|
|
|
650a21 |
|
|
|
650a21 |
* Wed Jul 13 2016 Adam Jackson <ajax@redhat.com> - 3.8.1-1
|
|
|
650a21 |
- Update to 3.8.1
|
|
|
650a21 |
- Sync some x86 getHostCPUName updates from trunk
|
|
|
650a21 |
|
|
|
650a21 |
* Tue Jun 14 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-2
|
|
|
650a21 |
- drop private cmake build
|
|
|
650a21 |
|
|
|
650a21 |
* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 3.8.0-1
|
|
|
650a21 |
- llvm 3.8.0 final release
|
|
|
650a21 |
|
|
|
650a21 |
* Thu Mar 03 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.2
|
|
|
650a21 |
- llvm 3.8.0 rc3 release
|
|
|
650a21 |
|
|
|
650a21 |
* Fri Feb 19 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.1
|
|
|
650a21 |
- llvm 3.8.0 rc2 release
|
|
|
650a21 |
|
|
|
650a21 |
* Tue Feb 16 2016 Dan HorĂ¡k <dan[at][danny.cz> 3.7.1-7
|
|
|
650a21 |
- recognize s390 as SystemZ when configuring build
|
|
|
650a21 |
|
|
|
650a21 |
* Sat Feb 13 2016 Dave Airlie <airlied@redhat.com> 3.7.1-6
|
|
|
650a21 |
- export C++ API for mesa.
|
|
|
650a21 |
|
|
|
650a21 |
* Sat Feb 13 2016 Dave Airlie <airlied@redhat.com> 3.7.1-5
|
|
|
650a21 |
- reintroduce llvm-static, clang needs it currently.
|
|
|
650a21 |
|
|
|
650a21 |
* Fri Feb 12 2016 Dave Airlie <airlied@redhat.com> 3.7.1-4
|
|
|
650a21 |
- jump back to single llvm library, the split libs aren't working very well.
|
|
|
650a21 |
|
|
|
650a21 |
* Fri Feb 05 2016 Dave Airlie <airlied@redhat.com> 3.7.1-3
|
|
|
650a21 |
- add missing obsoletes (#1303497)
|
|
|
650a21 |
|
|
|
650a21 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
|
|
|
650a21 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
650a21 |
|
|
|
650a21 |
* Thu Jan 07 2016 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.1-1
|
|
|
650a21 |
- new upstream release
|
|
|
650a21 |
- enable gold linker
|
|
|
650a21 |
|
|
|
650a21 |
* Wed Nov 04 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
|
|
|
650a21 |
- fix Requires for subpackages on the main package
|
|
|
650a21 |
|
|
|
650a21 |
* Tue Oct 06 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
|
|
|
650a21 |
- initial version using cmake build system
|