use llvm's libllvm.so hack instead of our own
This commit is contained in:
parent
4f2860a0b4
commit
c0d2da0658
@ -1,51 +1,12 @@
|
|||||||
diff --git a/configs/autoconf.in b/configs/autoconf.in
|
diff -up mesa-20110412/configure.ac.jx mesa-20110412/configure.ac
|
||||||
index 4e931a3..fec8e42 100644
|
--- mesa-20110412/configure.ac.jx 2011-05-09 15:04:19.000000000 -0400
|
||||||
--- a/configs/autoconf.in
|
+++ mesa-20110412/configure.ac 2011-05-09 15:05:11.000000000 -0400
|
||||||
+++ b/configs/autoconf.in
|
@@ -1679,7 +1679,7 @@ if test "x$enable_gallium_llvm" = xyes;
|
||||||
@@ -31,8 +31,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@
|
|
||||||
GLX_TLS = @GLX_TLS@
|
|
||||||
diff --git a/configs/linux-llvm b/configs/linux-llvm
|
|
||||||
index 359bee2..0de094d 100644
|
|
||||||
--- a/configs/linux-llvm
|
|
||||||
+++ b/configs/linux-llvm
|
|
||||||
@@ -32,8 +32,8 @@ endif
|
|
||||||
ifeq ($(MESA_LLVM),1)
|
|
||||||
LLVM_CFLAGS=`llvm-config --cppflags`
|
|
||||||
LLVM_CXXFLAGS=`llvm-config --cxxflags` -Wno-long-long
|
|
||||||
- LLVM_LDFLAGS = $(shell llvm-config --ldflags)
|
|
||||||
- LLVM_LIBS = $(shell llvm-config --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)
|
|
||||||
MKLIB_OPTIONS=-cplusplus
|
|
||||||
else
|
|
||||||
LLVM_CFLAGS=
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index b510151..e872f2e 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1404,8 +1404,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
|
|
||||||
@@ -1649,7 +1647,6 @@ if test "x$enable_gallium_llvm" = xyes; then
|
|
||||||
if test "x$LLVM_CONFIG" != xno; then
|
if test "x$LLVM_CONFIG" != xno; then
|
||||||
LLVM_VERSION=`$LLVM_CONFIG --version`
|
LLVM_VERSION=`$LLVM_CONFIG --version`
|
||||||
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
|
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
|
||||||
- LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++"
|
- LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++"
|
||||||
|
+ LLVM_LIBS="-lLLVM-`llvm-config --version` -lstdc++"
|
||||||
|
|
||||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
|
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
|
||||||
|
42
mesa.spec
42
mesa.spec
@ -6,9 +6,6 @@
|
|||||||
%define with_hardware 1
|
%define with_hardware 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# broken atm, sorry. fix before any f15 merge.
|
|
||||||
%define with_llvmcore 1
|
|
||||||
|
|
||||||
%define _default_patch_fuzz 2
|
%define _default_patch_fuzz 2
|
||||||
|
|
||||||
%define manpages gl-manpages-1.0.1
|
%define manpages gl-manpages-1.0.1
|
||||||
@ -18,7 +15,7 @@
|
|||||||
Summary: Mesa graphics libraries
|
Summary: Mesa graphics libraries
|
||||||
Name: mesa
|
Name: mesa
|
||||||
Version: 7.11
|
Version: 7.11
|
||||||
Release: 0.7.%{gitdate}.0%{?dist}
|
Release: 0.8.%{gitdate}.0%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.mesa3d.org
|
URL: http://www.mesa3d.org
|
||||||
@ -29,7 +26,6 @@ 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
|
|
||||||
|
|
||||||
Patch1: mesa-nouveau-fix-build.patch
|
Patch1: mesa-nouveau-fix-build.patch
|
||||||
Patch2: mesa-7.1-nukeglthread-debug.patch
|
Patch2: mesa-7.1-nukeglthread-debug.patch
|
||||||
@ -111,22 +107,12 @@ Group: User Interface/X Hardware Support
|
|||||||
%description dri-filesystem
|
%description dri-filesystem
|
||||||
Mesa DRI driver filesystem
|
Mesa DRI driver filesystem
|
||||||
|
|
||||||
%if %{with_llvmcore}
|
|
||||||
%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.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%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}
|
Requires: mesa-dri-filesystem%{?_isa}
|
||||||
Obsoletes: mesa-dri-drivers-experimental < 0:7.10-0.24
|
Obsoletes: mesa-dri-drivers-experimental < 0:7.10-0.24
|
||||||
|
Obsoletes: mesa-dri-llvmcore <= 7.11-0.8
|
||||||
%description dri-drivers
|
%description dri-drivers
|
||||||
Mesa-based DRI drivers.
|
Mesa-based DRI drivers.
|
||||||
|
|
||||||
@ -220,13 +206,10 @@ 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
|
||||||
%patch30 -p1 -b .vblank-warning
|
%patch30 -p1 -b .vblank-warning
|
||||||
#patch31 -p1 -b .swrastg
|
#patch31 -p1 -b .swrastg
|
||||||
|
|
||||||
%if %{with_llvmcore}
|
|
||||||
%patch8 -p1 -b .llvmcore
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
autoreconf --install
|
autoreconf --install
|
||||||
@ -251,13 +234,6 @@ 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
|
|
||||||
%if %{with_llvmcore}
|
|
||||||
TOP=`pwd` make -f %{SOURCE4} llvmcore
|
|
||||||
mkdir -p %{_lib}
|
|
||||||
mv libllvmcore*.so %{_lib}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# now build the rest of mesa
|
# now build the rest of mesa
|
||||||
%configure %{common_flags} \
|
%configure %{common_flags} \
|
||||||
--disable-glw \
|
--disable-glw \
|
||||||
@ -301,9 +277,6 @@ 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
|
||||||
%if %{with_llvmcore}
|
|
||||||
install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri %{_lib}/libllvmcore-2*.so >& /dev/null
|
|
||||||
%endif
|
|
||||||
# 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
|
||||||
@ -381,12 +354,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc docs/COPYING
|
%doc docs/COPYING
|
||||||
%dir %{_libdir}/dri
|
%dir %{_libdir}/dri
|
||||||
|
|
||||||
%if %{with_llvmcore}
|
|
||||||
%files dri-llvmcore
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/dri/libllvmcore-2.*.so
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files dri-drivers
|
%files dri-drivers
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%if %{with_hardware}
|
%if %{with_hardware}
|
||||||
@ -488,6 +455,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/libOSMesa.so
|
%{_libdir}/libOSMesa.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 09 2011 Adam Jackson <ajax@redhat.com> 7.11-0.8.20110412.0
|
||||||
|
- Use llvm-libs' shared lib instead of rolling our own.
|
||||||
|
|
||||||
* Mon Apr 18 2011 Adam Jackson <ajax@redhat.com> 7.11-0.7.20110412.0
|
* Mon Apr 18 2011 Adam Jackson <ajax@redhat.com> 7.11-0.7.20110412.0
|
||||||
- Fix intel driver exclusion to be better arched (#697555)
|
- Fix intel driver exclusion to be better arched (#697555)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user