mirror of
https://src.fedoraproject.org/rpms/mesa.git
synced 2024-11-28 02:54:51 +00:00
llvmcore hack
This commit is contained in:
parent
c70ee328e4
commit
55ddc6593b
4 changed files with 98 additions and 9 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
*.jx
|
||||||
mesa-20100208.tar.bz2
|
mesa-20100208.tar.bz2
|
||||||
gl-manpages-1.0.1.tar.bz2
|
gl-manpages-1.0.1.tar.bz2
|
||||||
xdriinfo-1.0.3.tar.bz2
|
xdriinfo-1.0.3.tar.bz2
|
||||||
|
|
6
llvmcore.mk
Normal file
6
llvmcore.mk
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Mom, Dad, if you're reading this, I'm very sorry.
|
||||||
|
|
||||||
|
include configs/linux-llvm.llvmcore
|
||||||
|
|
||||||
|
llvmcore:
|
||||||
|
gcc -fPIC -shared -o libllvmcore-$(shell llvm-config --version).so -Wl,--whole-archive $(shell llvm-config --ldflags) $(LLVM_LIBS) -Wl,--no-whole-archive
|
48
mesa-7.10-llvmcore.patch
Normal file
48
mesa-7.10-llvmcore.patch
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
diff -up mesa-20110107/configs/autoconf.in.llvmcore mesa-20110107/configs/autoconf.in
|
||||||
|
--- mesa-20110107/configs/autoconf.in.llvmcore 2011-01-06 19:51:14.000000000 -0500
|
||||||
|
+++ mesa-20110107/configs/autoconf.in 2011-01-18 19:34:49.000000000 -0500
|
||||||
|
@@ -29,8 +29,8 @@ INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||||
|
X11_LIBS = @X11_LIBS@
|
||||||
|
X11_CFLAGS = @X11_CFLAGS@
|
||||||
|
LLVM_CFLAGS = @LLVM_CFLAGS@
|
||||||
|
-LLVM_LDFLAGS = @LLVM_LDFLAGS@
|
||||||
|
-LLVM_LIBS = @LLVM_LIBS@
|
||||||
|
+LLVM_LDFLAGS = -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lllvmcore-$(shell llvm-config --version)
|
||||||
|
+LLVM_LIBS = -lllvmcore-$(shell llvm-config --version)
|
||||||
|
GLW_CFLAGS = @GLW_CFLAGS@
|
||||||
|
GLUT_CFLAGS = @GLUT_CFLAGS@
|
||||||
|
|
||||||
|
diff -up mesa-20110107/configs/linux-llvm.llvmcore mesa-20110107/configs/linux-llvm
|
||||||
|
--- mesa-20110107/configs/linux-llvm.llvmcore 2011-01-06 19:51:14.000000000 -0500
|
||||||
|
+++ mesa-20110107/configs/linux-llvm 2011-01-18 19:19:14.000000000 -0500
|
||||||
|
@@ -32,8 +32,8 @@ endif
|
||||||
|
ifeq ($(MESA_LLVM),1)
|
||||||
|
LLVM_CFLAGS=`llvm-config --cppflags`
|
||||||
|
LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
|
||||||
|
- LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
|
||||||
|
- LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation)
|
||||||
|
+ LLVM_LDFLAGS = -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lllvmcore-$(shell llvm-config --version)
|
||||||
|
+ LLVM_LIBS = -lllvmcore-$(shell llvm-config --version)
|
||||||
|
MKLIB_OPTIONS=-cplusplus
|
||||||
|
else
|
||||||
|
LLVM_CFLAGS=
|
||||||
|
diff -up mesa-20110107/configure.ac.llvmcore mesa-20110107/configure.ac
|
||||||
|
--- mesa-20110107/configure.ac.llvmcore 2011-01-18 19:19:14.000000000 -0500
|
||||||
|
+++ mesa-20110107/configure.ac 2011-01-18 20:40:01.000000000 -0500
|
||||||
|
@@ -1333,8 +1333,6 @@ if test "x$enable_gallium" = xyes; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([LLVM_CFLAGS])
|
||||||
|
-AC_SUBST([LLVM_LIBS])
|
||||||
|
-AC_SUBST([LLVM_LDFLAGS])
|
||||||
|
AC_SUBST([LLVM_VERSION])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
@@ -1555,7 +1553,6 @@ if test "x$enable_gallium_llvm" = xyes;
|
||||||
|
if test "x$LLVM_CONFIG" != xno; then
|
||||||
|
LLVM_VERSION=`$LLVM_CONFIG --version`
|
||||||
|
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
|
||||||
|
- LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen bitwriter` -lstdc++"
|
||||||
|
|
||||||
|
if test "x$HAS_UDIS86" != xno; then
|
||||||
|
LLVM_LIBS="$LLVM_LIBS -ludis86"
|
52
mesa.spec
52
mesa.spec
|
@ -15,7 +15,7 @@
|
||||||
Summary: Mesa graphics libraries
|
Summary: Mesa graphics libraries
|
||||||
Name: mesa
|
Name: mesa
|
||||||
Version: 7.10
|
Version: 7.10
|
||||||
Release: 0.21%{?dist}
|
Release: 0.22%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.mesa3d.org
|
URL: http://www.mesa3d.org
|
||||||
|
@ -25,12 +25,14 @@ URL: http://www.mesa3d.org
|
||||||
Source0: %{name}-%{gitdate}.tar.xz
|
Source0: %{name}-%{gitdate}.tar.xz
|
||||||
Source2: %{manpages}.tar.bz2
|
Source2: %{manpages}.tar.bz2
|
||||||
Source3: make-git-snapshot.sh
|
Source3: make-git-snapshot.sh
|
||||||
|
Source4: llvmcore.mk
|
||||||
|
|
||||||
Patch2: mesa-7.1-nukeglthread-debug.patch
|
Patch2: mesa-7.1-nukeglthread-debug.patch
|
||||||
Patch3: mesa-no-mach64.patch
|
Patch3: mesa-no-mach64.patch
|
||||||
Patch4: legacy-drivers.patch
|
Patch4: legacy-drivers.patch
|
||||||
|
|
||||||
#Patch7: mesa-7.1-link-shared.patch
|
#Patch7: mesa-7.1-link-shared.patch
|
||||||
|
Patch8: mesa-7.10-llvmcore.patch
|
||||||
|
|
||||||
Patch10: mesa-nouveau-libdrm-2_4_24.patch
|
Patch10: mesa-nouveau-libdrm-2_4_24.patch
|
||||||
|
|
||||||
|
@ -69,7 +71,7 @@ Group: System Environment/Libraries
|
||||||
Requires(post): /sbin/ldconfig
|
Requires(post): /sbin/ldconfig
|
||||||
Requires(postun): /sbin/ldconfig
|
Requires(postun): /sbin/ldconfig
|
||||||
Provides: libGL
|
Provides: libGL
|
||||||
Requires: libdrm >= 2.4.21-1
|
Requires: libdrm >= 2.4.23-1
|
||||||
%if %{with_hardware}
|
%if %{with_hardware}
|
||||||
Conflicts: xorg-x11-server-Xorg < 1.4.99.901-14
|
Conflicts: xorg-x11-server-Xorg < 1.4.99.901-14
|
||||||
%endif
|
%endif
|
||||||
|
@ -83,7 +85,7 @@ Group: System Environment/Libraries
|
||||||
Requires(post): /sbin/ldconfig
|
Requires(post): /sbin/ldconfig
|
||||||
Requires(postun): /sbin/ldconfig
|
Requires(postun): /sbin/ldconfig
|
||||||
Requires: mesa-dri-drivers%{?_isa} = %{version}-%{release}
|
Requires: mesa-dri-drivers%{?_isa} = %{version}-%{release}
|
||||||
Requires: libdrm >= 2.4.21-1
|
Requires: libdrm >= 2.4.23-1
|
||||||
|
|
||||||
%description libEGL
|
%description libEGL
|
||||||
Mesa libEGL runtime libraries
|
Mesa libEGL runtime libraries
|
||||||
|
@ -94,26 +96,44 @@ Group: System Environment/Libraries
|
||||||
Requires(post): /sbin/ldconfig
|
Requires(post): /sbin/ldconfig
|
||||||
Requires(postun): /sbin/ldconfig
|
Requires(postun): /sbin/ldconfig
|
||||||
Requires: mesa-dri-drivers%{?_isa} = %{version}-%{release}
|
Requires: mesa-dri-drivers%{?_isa} = %{version}-%{release}
|
||||||
Requires: libdrm >= 2.4.21-1
|
Requires: libdrm >= 2.4.23-1
|
||||||
|
|
||||||
%description libGLES
|
%description libGLES
|
||||||
Mesa GLES runtime libraries
|
Mesa GLES runtime libraries
|
||||||
|
|
||||||
|
%package dri-filesystem
|
||||||
|
Summary: Mesa DRI driver filesystem
|
||||||
|
Group: User Interface/X Hardware Support
|
||||||
|
%description dri-filesystem
|
||||||
|
Mesa DRI driver filesystem
|
||||||
|
|
||||||
|
%package dri-llvmcore
|
||||||
|
Summary: Mesa common LLVM support
|
||||||
|
Group: User Interface/X Hardware Support
|
||||||
|
Requires: mesa-dri-filesystem%{?_isa}
|
||||||
|
%description dri-llvmcore
|
||||||
|
Common DSO for LLVM support for gallium-based DRI drivers. This package
|
||||||
|
exists solely as a disk space hack for Mesa. Do not link against this
|
||||||
|
library if you are not Mesa. You have been warned.
|
||||||
|
|
||||||
%package dri-drivers
|
%package dri-drivers
|
||||||
Summary: Mesa-based DRI drivers
|
Summary: Mesa-based DRI drivers
|
||||||
Group: User Interface/X Hardware Support
|
Group: User Interface/X Hardware Support
|
||||||
|
Requires: mesa-dri-filesystem%{?_isa}
|
||||||
%description dri-drivers
|
%description dri-drivers
|
||||||
Mesa-based DRI drivers.
|
Mesa-based DRI drivers.
|
||||||
|
|
||||||
%package dri-drivers-dri1
|
%package dri-drivers-dri1
|
||||||
Summary: Mesa-based DRI1 drivers
|
Summary: Mesa-based DRI1 drivers
|
||||||
Group: User Interface/X Hardware Support
|
Group: User Interface/X Hardware Support
|
||||||
|
Requires: mesa-dri-filesystem%{?isa}
|
||||||
%description dri-drivers-dri1
|
%description dri-drivers-dri1
|
||||||
Mesa-based DRI1 drivers.
|
Mesa-based DRI1 drivers.
|
||||||
|
|
||||||
%package dri-drivers-experimental
|
%package dri-drivers-experimental
|
||||||
Summary: Mesa-based DRI drivers (experimental)
|
Summary: Mesa-based DRI drivers (experimental)
|
||||||
Group: User Interface/X Hardware Support
|
Group: User Interface/X Hardware Support
|
||||||
|
Requires: mesa-dri-filesystem%{?_isa}
|
||||||
%description dri-drivers-experimental
|
%description dri-drivers-experimental
|
||||||
Mesa-based DRI drivers (experimental).
|
Mesa-based DRI drivers (experimental).
|
||||||
|
|
||||||
|
@ -122,7 +142,6 @@ Mesa-based DRI drivers (experimental).
|
||||||
Summary: Mesa libGL development package
|
Summary: Mesa libGL development package
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: mesa-libGL = %{version}-%{release}
|
Requires: mesa-libGL = %{version}-%{release}
|
||||||
Requires: libX11-devel
|
|
||||||
Provides: libGL-devel
|
Provides: libGL-devel
|
||||||
Conflicts: xorg-x11-proto-devel <= 7.2-12
|
Conflicts: xorg-x11-proto-devel <= 7.2-12
|
||||||
|
|
||||||
|
@ -160,7 +179,6 @@ Mesa libGLU runtime library
|
||||||
Summary: Mesa libGLU development package
|
Summary: Mesa libGLU development package
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: mesa-libGLU = %{version}-%{release}
|
Requires: mesa-libGLU = %{version}-%{release}
|
||||||
Requires: libGL-devel
|
|
||||||
Provides: libGLU-devel
|
Provides: libGLU-devel
|
||||||
|
|
||||||
%description libGLU-devel
|
%description libGLU-devel
|
||||||
|
@ -202,6 +220,7 @@ Requires: Xorg %(xserver-sdk-abi-requires ansic) %(xserver-sdk-abi-requires vide
|
||||||
%patch3 -p1 -b .no-mach64
|
%patch3 -p1 -b .no-mach64
|
||||||
%patch4 -p1 -b .classic
|
%patch4 -p1 -b .classic
|
||||||
#patch7 -p1 -b .dricore
|
#patch7 -p1 -b .dricore
|
||||||
|
%patch8 -p1 -b .llvmcore
|
||||||
%patch10 -p1 -b .nv-libdrm
|
%patch10 -p1 -b .nv-libdrm
|
||||||
%patch30 -p1 -b .vblank-warning
|
%patch30 -p1 -b .vblank-warning
|
||||||
#patch31 -p1 -b .swrastg
|
#patch31 -p1 -b .swrastg
|
||||||
|
@ -230,6 +249,11 @@ make clean
|
||||||
# just to be sure...
|
# just to be sure...
|
||||||
[ `find . -name \*.o | wc -l` -eq 0 ] || exit 1
|
[ `find . -name \*.o | wc -l` -eq 0 ] || exit 1
|
||||||
|
|
||||||
|
# build llvmcore
|
||||||
|
TOP=`pwd` make -f %{SOURCE4} llvmcore
|
||||||
|
mkdir -p %{_lib}
|
||||||
|
mv libllvmcore*.so %{_lib}
|
||||||
|
|
||||||
# now build the rest of mesa
|
# now build the rest of mesa
|
||||||
%configure %{common_flags} \
|
%configure %{common_flags} \
|
||||||
--disable-glw \
|
--disable-glw \
|
||||||
|
@ -272,7 +296,7 @@ make install DESTDIR=$RPM_BUILD_ROOT DRI_DIRS=
|
||||||
|
|
||||||
# just the DRI drivers that are sane
|
# just the DRI drivers that are sane
|
||||||
install -d $RPM_BUILD_ROOT%{_libdir}/dri
|
install -d $RPM_BUILD_ROOT%{_libdir}/dri
|
||||||
#install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri %{_lib}/libdricore.so >& /dev/null
|
install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri %{_lib}/libllvmcore-2.8.so >& /dev/null
|
||||||
# use gallium driver iff built
|
# use gallium driver iff built
|
||||||
[ -f %{_lib}/gallium/r300_dri.so ] && cp %{_lib}/gallium/r300_dri.so %{_lib}/r300_dri.so
|
[ -f %{_lib}/gallium/r300_dri.so ] && cp %{_lib}/gallium/r300_dri.so %{_lib}/r300_dri.so
|
||||||
[ -f %{_lib}/gallium/r600_dri.so ] && cp %{_lib}/gallium/r600_dri.so %{_lib}/r600_dri.so
|
[ -f %{_lib}/gallium/r600_dri.so ] && cp %{_lib}/gallium/r600_dri.so %{_lib}/r600_dri.so
|
||||||
|
@ -345,10 +369,17 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_libdir}/libGLESv2.so.2
|
%{_libdir}/libGLESv2.so.2
|
||||||
%{_libdir}/libGLESv2.so.2.*
|
%{_libdir}/libGLESv2.so.2.*
|
||||||
|
|
||||||
%files dri-drivers
|
%files dri-filesystem
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc docs/COPYING
|
%doc docs/COPYING
|
||||||
%dir %{_libdir}/dri
|
%dir %{_libdir}/dri
|
||||||
|
|
||||||
|
%files dri-llvmcore
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_libdir}/dri/libllvmcore-2.8.so
|
||||||
|
|
||||||
|
%files dri-drivers
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%if %{with_hardware}
|
%if %{with_hardware}
|
||||||
%{_libdir}/dri/radeon_dri.so
|
%{_libdir}/dri/radeon_dri.so
|
||||||
%{_libdir}/dri/r200_dri.so
|
%{_libdir}/dri/r200_dri.so
|
||||||
|
@ -377,7 +408,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files dri-drivers-experimental
|
%files dri-drivers-experimental
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc docs/COPYING
|
|
||||||
%if %{with_hardware}
|
%if %{with_hardware}
|
||||||
#{_libdir}/dri/vmwgfx_dri.so
|
#{_libdir}/dri/vmwgfx_dri.so
|
||||||
%{_libdir}/dri/nouveau_dri.so
|
%{_libdir}/dri/nouveau_dri.so
|
||||||
|
@ -447,6 +477,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_libdir}/libOSMesa.so
|
%{_libdir}/libOSMesa.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 18 2011 Adam Jackson <ajax@redhat.com> 7.10-0.22
|
||||||
|
- Add -dri-filesystem common subpackage for directory and COPYING
|
||||||
|
- Add -dri-llvmcore subpackage and buildsystem hack
|
||||||
|
|
||||||
* Tue Jan 18 2011 Adam Jackson <ajax@redhat.com> 7.10-0.21
|
* Tue Jan 18 2011 Adam Jackson <ajax@redhat.com> 7.10-0.21
|
||||||
- Fix the s390 case a different way
|
- Fix the s390 case a different way
|
||||||
- s/i686/%%{ix86}
|
- s/i686/%%{ix86}
|
||||||
|
|
Loading…
Reference in a new issue