Commit ab54c4f8 authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Add llvm 3.5 and update mesa

parent de40e3f4
......@@ -37,7 +37,7 @@ PACKAGES = \
libXv libXvMC libXxf86vm libXdamage libXcursor libXcomposite libxkbfile libxshmfence \
xkeyboard-config libxkbcommon \
dbus cairo dbus-glib \
libpciaccess libdrm mesa libepoxy wayland \
libpciaccess libdrm llvm mesa libepoxy wayland \
pulseaudio \
graphite2 harfbuzz libdatrie libthai pango atk at-spi2-core at-spi2-atk gdk-pixbuf2 gtk3 \
libsecret \
......
Summary: Direct Rendering Manager runtime library
Name: libdrm
Version: 2.4.58
Version: 2.4.59
Release: 1%{?dist}
License: MIT
Group: System Environment/Libraries
......
%bcond_without doxygen clang crt ocaml gold lldb
%global llvmdocdir() %{_docdir}/%1
#global prerel rc3
Name: llvm
Version: 3.5.0
Release: 1%{?dist}
Summary: The Low Level Virtual Machine
Group: Development/Languages
License: NCSA
URL: http://llvm.org/
# source archives
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
# patches
Patch1: llvm-3.5.0-build-fix.patch
BuildRequires: gnome-sdk-base
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description
LLVM is a compiler infrastructure designed for compile-time,
link-time, runtime, and idle-time optimization of programs from
arbitrary programming languages. The compiler infrastructure includes
mirror sets of programming tools as well as libraries with equivalent
functionality.
%package devel
Summary: Libraries and header files for LLVM
Group: Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains library and header files needed to develop new
native programs that use the LLVM infrastructure.
%package doc
Summary: Documentation for LLVM
Group: Documentation
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description doc
Documentation for the LLVM compiler infrastructure.
%package libs
Summary: LLVM shared libraries
Group: System Environment/Libraries
%description libs
Shared libraries for the LLVM compiler infrastructure.
%package static
Summary: LLVM static libraries
Group: Development/Languages
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description static
Static libraries for the LLVM compiler infrastructure. Not recommended
for general consumption.
%prep
%setup -q -n llvm-%{version}.src
rm -rf tools/clang tools/lldb projects/compiler-rt
%patch1 -p1
# fix library paths
sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' configure
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
%build
# clang is lovely and all, but fedora builds with gcc
# -fno-devirtualize shouldn't be necessary, but gcc has scary template-related
# bugs that make it so. gcc 5 ought to be fixed.
export CC=gcc
export CXX=g++
%configure \
--with-extra-options="-fno-devirtualize" \
--with-extra-ld-options=-Wl,-Bsymbolic \
--libdir=%{_libdir}/%{name} \
--disable-polly \
--disable-libcpp \
--enable-cxx11 \
--enable-clang-arcmt \
--enable-clang-static-analyzer \
--enable-clang-rewriter \
--enable-optimized \
--disable-profiling \
--disable-assertions \
--disable-werror \
--disable-expensive-checks \
--enable-debug-runtime \
--enable-keep-symbols \
--enable-jit \
--enable-docs \
--disable-doxygen \
--enable-threads \
--enable-pthreads \
--enable-zlib \
--enable-pic \
--enable-shared \
--disable-embed-stdcxx \
--enable-timestamps \
--enable-backtraces \
--enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz,r600 \
--enable-bindings=none \
--enable-libffi \
--enable-ltdl-install \
\
--with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \
--with-optimize-option=-O3
make %{?_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1
#make REQUIRES_RTTI=1 VERBOSE=1
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=%{buildroot} PROJ_docsdir=/moredocs
# you have got to be kidding me
rm -f %{buildroot}%{_bindir}/{FileCheck,count,not}
# Create ld.so.conf.d entry
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf << EOF
%{_libdir}/%{name}
EOF
# Get rid of erroneously installed example files.
rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
# remove executable bit from static libraries
find %{buildroot}%{_libdir} -name "*.a" -type f -print0 | xargs -0 chmod -x
# Install documentation documentation
find %{buildroot}/moredocs/ -name "*.tar.gz" -print0 | xargs -0 rm -rf
mkdir -p %{buildroot}%{_docdir}
# llvm-doc
mkdir -p %{buildroot}%{llvmdocdir %{name}-doc}
cp -ar examples %{buildroot}%{llvmdocdir %{name}-doc}/examples
find %{buildroot}%{llvmdocdir %{name}-doc} -name Makefile -o -name CMakeLists.txt -o -name LLVMBuild.txt -print0 | xargs -0 rm -f
# delete the rest of installed documentation (because it's bad)
rm -rf %{buildroot}/moredocs
# install CMake modules
mkdir -p %{buildroot}%{_datadir}/llvm/cmake/
cp -p cmake/modules/*.cmake %{buildroot}%{_datadir}/llvm/cmake/
# remove RPATHs
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
file %{buildroot}/%{_libdir}/%{name}/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
%check
# the Koji build server does not seem to have enough RAM
# for the default 16 threads
# the || : is wrong, i know, but the git snaps fail to make check due to
# broken makefiles in the doc dirs.
# LLVM test suite failing on ARM, PPC64 and s390(x)
mkdir -p %{buildroot}%{llvmdocdir %{name}-devel}
make -k check LIT_ARGS="-v -j4" | tee %{buildroot}%{llvmdocdir %{name}-devel}/testlog-%{_arch}.txt || :
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
%doc CREDITS.TXT
%doc README.txt
%dir %{_datadir}/llvm
%{_bindir}/bugpoint
%{_bindir}/llc
%{_bindir}/lli
%{_bindir}/lli-child-target
%exclude %{_bindir}/llvm-config
%{_bindir}/llvm*
%{_bindir}/macho-dump
%{_bindir}/opt
%files devel
%doc %{llvmdocdir %{name}-devel}/
%{_bindir}/llvm-config
%{_includedir}/%{name}
%{_includedir}/%{name}-c
%{_datadir}/llvm/cmake
%files libs
%doc LICENSE.TXT
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}.conf
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.so
%files static
%{_libdir}/%{name}/*.a
%files doc
%doc %{llvmdocdir %{name}-doc}/
%changelog
* Thu Jan 22 2015 Alexander Larsson <alexl@redhat.com> - 3.5.0-1
- Initial version
......@@ -9,13 +9,13 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 10.3.5
Version: 10.4.2
Release: 1%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
Source0: ftp://ftp.freedesktop.org/pub/mesa/10.3.5/MesaLib-%{version}.tar.bz2
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{version}/MesaLib-%{version}.tar.bz2
Patch1: mesa-no-typeid.patch
......@@ -30,6 +30,7 @@ BuildRequires: libXi-devel
BuildRequires: libxshmfence-devel
BuildRequires: libwayland-client-devel
BuildRequires: libwayland-server-devel
BuildRequires: llvm-devel
%description
Mesa
......@@ -156,7 +157,6 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
--enable-egl \
--disable-gles1 \
--enable-gles2 \
--enable-gallium-egl \
--disable-xvmc \
--with-egl-platforms=x11,drm,wayland \
--enable-shared-glapi \
......@@ -168,10 +168,9 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
--enable-llvm-shared-libs \
--enable-dri \
--enable-sysfs \
--with-gallium-drivers=svga,swrast,nouveau \
--with-gallium-drivers=svga,swrast,nouveau,r600,r300,radeonsi \
--with-dri-drivers=%{?base_drivers}%{?platform_drivers}
#removed gallium drivers: ,r600,r300,radeonsi
make %{?_smp_mflags} MKDEP=/bin/true
%install
......@@ -232,8 +231,6 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libEGL.so.1
%{_libdir}/GL/libEGL.so.1
%{_libdir}/GL/libEGL.so.1.*
%dir %{_libdir}/GL/egl
%{_libdir}/GL/egl/egl_gallium.so
%files libGLES
%defattr(-,root,root,-)
......@@ -268,6 +265,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/GL/dri/vmwgfx_dri.so
%{_libdir}/GL/dri/kms_swrast_dri.so
%{_libdir}/GL/dri/swrast_dri.so
%{_libdir}/GL/dri/r300_dri.so
%{_libdir}/GL/dri/r600_dri.so
%{_libdir}/GL/dri/radeonsi_dri.so
%files libGL-devel
%defattr(-,root,root,-)
......@@ -316,8 +316,6 @@ rm -rf $RPM_BUILD_ROOT
%doc docs/COPYING
%{_libdir}/GL/libgbm.so.1
%{_libdir}/GL/libgbm.so.1.*
%dir %{_libdir}/GL/gbm
%{_libdir}/GL/gbm/gbm_gallium_drm.so
%files libgbm-devel
%defattr(-,root,root,-)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment