- mesa-6.5.2-picify-dri-drivers.patch: Attempt to make the DRI drivers PIC.

- mesa-6.5.1-build-config.patch: Apply RPM_OPT_FLAGS to OSMesa too.
This commit is contained in:
Adam Jackson 2007-03-02 21:46:35 +00:00
parent d916aa231e
commit 636ffba231
3 changed files with 219 additions and 33 deletions

View File

@ -1,6 +1,19 @@
--- Mesa-6.5.1/configs/linux-osmesa32.build-config 2006-07-12 22:43:20.000000000 -0400
+++ Mesa-6.5.1/configs/linux-osmesa32 2006-09-22 18:20:05.000000000 -0400
@@ -17,12 +17,12 @@
--- Mesa-6.5.2/configs/linux-osmesa32.build-config 2006-07-12 22:43:20.000000000 -0400
+++ Mesa-6.5.2/configs/linux-osmesa32 2007-03-02 10:22:16.000000000 -0500
@@ -7,8 +7,10 @@
# Compiler and flags
CC = gcc
CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+OPT_FLAGS ?= -O3 -ansi -pendantic -fPIC -ffast-math
+CFLAGS = $(OPT_FLAGS) $(DEFINES) -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
+CXXFLAGS = $(OPT_FLAGS) $(DEFINES)
# Library names
@@ -17,12 +19,12 @@
# Directories
@ -15,10 +28,19 @@
+OSMESA_LIB_DEPS = -lm -lpthread -lselinux
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa32
--- Mesa-6.5.1/configs/linux-osmesa.build-config 2006-07-12 22:43:20.000000000 -0400
+++ Mesa-6.5.1/configs/linux-osmesa 2006-09-22 18:19:52.000000000 -0400
@@ -14,12 +14,12 @@
--- Mesa-6.5.2/configs/linux-osmesa.build-config 2006-07-12 22:43:20.000000000 -0400
+++ Mesa-6.5.2/configs/linux-osmesa 2007-03-02 10:22:16.000000000 -0500
@@ -9,17 +9,18 @@
# Compiler and flags
CC = gcc
CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
-
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+OPT_FLAGS ?= -O3 -ansi -pendantic -fPIC -ffast-math
+CFLAGS = $(OPT_FLAGS) $(DEFINES)
+CXXFLAGS = $(OPT_FLAGS) $(DEFINES)
# Directories
-SRC_DIRS = mesa glu
@ -33,9 +55,9 @@
+OSMESA_LIB_DEPS = -lm -lpthread -lselinux
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU
--- Mesa-6.5.1/configs/default.build-config 2006-09-11 17:35:46.000000000 -0400
+++ Mesa-6.5.1/configs/default 2006-09-22 18:11:30.000000000 -0400
@@ -59,8 +59,8 @@
--- Mesa-6.5.2/configs/default.build-config 2006-10-22 13:20:22.000000000 -0400
+++ Mesa-6.5.2/configs/default 2007-03-02 10:17:24.000000000 -0500
@@ -58,8 +58,8 @@
# Directories to build
@ -46,7 +68,7 @@
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter:
@@ -73,14 +73,14 @@
@@ -72,14 +72,14 @@
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
@ -63,8 +85,8 @@
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
--- Mesa-6.5.1/configs/linux-dri-x86.build-config 2005-09-12 11:03:11.000000000 -0400
+++ Mesa-6.5.1/configs/linux-dri-x86 2006-09-22 18:11:30.000000000 -0400
--- Mesa-6.5.2/configs/linux-dri-x86.build-config 2005-09-12 11:03:11.000000000 -0400
+++ Mesa-6.5.2/configs/linux-dri-x86 2007-03-02 10:17:24.000000000 -0500
@@ -6,7 +6,7 @@
CONFIG_NAME = linux-dri-x86
@ -74,8 +96,8 @@
# Add -m32 to CFLAGS:
ARCH_FLAGS = -m32
--- Mesa-6.5.1/configs/linux-dri.build-config 2006-08-17 10:09:02.000000000 -0400
+++ Mesa-6.5.1/configs/linux-dri 2006-09-22 18:11:30.000000000 -0400
--- Mesa-6.5.2/configs/linux-dri.build-config 2006-11-01 19:44:25.000000000 -0500
+++ Mesa-6.5.2/configs/linux-dri 2007-03-02 10:17:24.000000000 -0500
@@ -12,8 +12,9 @@
#MKDEP = /usr/X11R6/bin/makedepend
#MKDEP = gcc -M
@ -87,16 +109,16 @@
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
@@ -24,8 +25,6 @@
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
@@ -25,8 +26,6 @@
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
-X11_INCLUDES = -I/usr/X11R6/include
-
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
@@ -35,7 +34,7 @@
@@ -36,7 +35,7 @@
ASM_SOURCES =
# Library/program dependencies
@ -105,7 +127,7 @@
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
@@ -52,10 +51,10 @@
@@ -53,10 +52,10 @@
# Directories
ifeq ($(USING_EGL), 1)
@ -118,15 +140,24 @@
PROGRAM_DIRS =
endif
@@ -65,4 +64,4 @@
@@ -66,4 +65,4 @@
# gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = i810 i915tex i915 i965 mach64 mga r128 r200 r300 radeon s3v \
- savage sis tdfx trident unichrome ffb
+ savage tdfx trident unichrome ffb # sis
--- Mesa-6.5.1/configs/linux-indirect.build-config 2006-08-17 10:09:02.000000000 -0400
+++ Mesa-6.5.1/configs/linux-indirect 2006-09-22 18:11:30.000000000 -0400
@@ -43,7 +43,7 @@
--- Mesa-6.5.2/configs/linux-indirect.build-config 2006-10-13 09:37:09.000000000 -0400
+++ Mesa-6.5.2/configs/linux-indirect 2007-03-02 10:22:44.000000000 -0500
@@ -15,7 +15,7 @@
#MKDEP_OPTIONS = -MF depend
WARN_FLAGS = -Wall
-OPT_FLAGS = -O -g
+OPT_FLAGS ?= -O -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
@@ -44,7 +44,7 @@
# Directories
@ -135,8 +166,8 @@
DRIVER_DIRS =
PROGRAM_DIRS =
WINDOW_SYSTEM=dri
--- Mesa-6.5.1/configs/linux.build-config 2006-08-24 19:37:59.000000000 -0400
+++ Mesa-6.5.1/configs/linux 2006-09-22 18:11:30.000000000 -0400
--- Mesa-6.5.2/configs/linux.build-config 2006-09-28 21:23:11.000000000 -0400
+++ Mesa-6.5.2/configs/linux 2007-03-02 10:17:24.000000000 -0500
@@ -8,7 +8,9 @@
CC = gcc
CXX = g++
@ -148,8 +179,8 @@
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32
--- Mesa-6.5.1/configs/linux-dri-ppc.build-config 2005-08-19 18:03:05.000000000 -0400
+++ Mesa-6.5.1/configs/linux-dri-ppc 2006-09-22 18:11:30.000000000 -0400
--- Mesa-6.5.2/configs/linux-dri-ppc.build-config 2005-08-19 18:03:05.000000000 -0400
+++ Mesa-6.5.2/configs/linux-dri-ppc 2007-03-02 10:17:24.000000000 -0500
@@ -5,7 +5,7 @@
CONFIG_NAME = linux-dri-ppc
@ -159,9 +190,22 @@
PIC_FLAGS = -fPIC
ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM
--- Mesa-6.5.1/configs/linux-osmesa16.build-config 2006-07-12 22:43:20.000000000 -0400
+++ Mesa-6.5.1/configs/linux-osmesa16 2006-09-22 18:20:05.000000000 -0400
@@ -17,12 +17,12 @@
--- Mesa-6.5.2/configs/linux-osmesa16.build-config 2006-07-12 22:43:20.000000000 -0400
+++ Mesa-6.5.2/configs/linux-osmesa16 2007-03-02 10:22:16.000000000 -0500
@@ -7,8 +7,10 @@
# Compiler and flags
CC = gcc
CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+OPT_FLAGS ?= -O3 -ansi -pendantic -fPIC -ffast-math
+CFLAGS = $(OPT_FLAGS) $(DEFINES) -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
+CXXFLAGS = $(OPT_FLAGS) $(DEFINES)
# Library names
@@ -17,12 +19,12 @@
# Directories

View File

@ -0,0 +1,136 @@
--- Mesa-6.5.2/src/mesa/x86/mmx_blend.S.picify 2006-04-17 14:58:24.000000000 -0400
+++ Mesa-6.5.2/src/mesa/x86/mmx_blend.S 2007-03-02 15:50:07.000000000 -0500
@@ -303,7 +303,7 @@
#define LLTAG(x) LLBL2(x,_min)
#define INIT \
- MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/
+ MOVQ ( CONTENT(const_80@GOTOFF(%ebx)), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/
#define MAIN( rgba, dest ) \
GMB_LOAD( rgba, dest, MM1, MM2 ) ;\
@@ -327,7 +327,7 @@
#define LLTAG(x) LLBL2(x,_max)
#define INIT \
- MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/
+ MOVQ ( CONTENT(const_80@GOTOFF(%ebx)), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/
#define MAIN( rgba, dest ) \
GMB_LOAD( rgba, dest, MM1, MM2 ) ;\
@@ -352,7 +352,7 @@
#define INIT \
PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */ ;\
- MOVQ ( CONTENT(const_0080), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */
+ MOVQ ( CONTENT(const_0080@GOTOFF(%ebx)), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */
#define MAIN( rgba, dest ) \
GMB_LOAD( rgba, dest, MM1, MM2 ) ;\
--- Mesa-6.5.2/src/mesa/x86/mmx_blendtmp.h.picify 2005-01-04 09:33:47.000000000 -0500
+++ Mesa-6.5.2/src/mesa/x86/mmx_blendtmp.h 2007-03-02 16:03:46.000000000 -0500
@@ -26,12 +26,12 @@
CMP_L ( CONST(0), ECX)
JE ( LLTAG(GMB_return) )
+ INIT
+
MOV_L ( REGOFF(16, EBP), EBX ) /* mask */
MOV_L ( REGOFF(20, EBP), EDI ) /* rgba */
MOV_L ( REGOFF(24, EBP), ESI ) /* dest */
- INIT
-
TEST_L ( CONST(4), EDI ) /* align rgba on an 8-byte boundary */
JZ ( LLTAG(GMB_align_end) )
--- Mesa-6.5.2/src/mesa/x86/read_rgba_span_x86.S.picify 2006-04-17 14:58:24.000000000 -0400
+++ Mesa-6.5.2/src/mesa/x86/read_rgba_span_x86.S 2007-03-02 15:50:07.000000000 -0500
@@ -84,8 +84,8 @@
#ifdef USE_INNER_EMMS
emms
#endif
- movq mask, %mm1
- movq mask+16, %mm2
+ movq mask@GOTOFF(%ebx), %mm1
+ movq mask+16@GOTOFF(%ebx), %mm2
movl 8(%esp), %ebx /* source pointer */
movl 16(%esp), %edx /* number of pixels to copy */
@@ -182,8 +182,8 @@
#ifdef USE_INNER_EMMS
emms
#endif
- movq mask, %mm1
- movq mask+16, %mm2
+ movq mask@GOTOFF(%ebx), %mm1
+ movq mask+16@GOTOFF(%ebx), %mm2
movl 16(%esp), %ebx /* source pointer */
movl 24(%esp), %edx /* number of pixels to copy */
@@ -341,8 +341,8 @@
pushl %esi
pushl %ebx
- movdqa mask, %xmm1
- movdqa mask+16, %xmm2
+ movdqa mask@GOTOFF(%ebx), %xmm1
+ movdqa mask+16@GOTOFF(%ebx), %xmm2
movl 12(%esp), %ebx /* source pointer */
movl 20(%esp), %edx /* number of pixels to copy */
@@ -530,9 +530,9 @@
movl 8(%esp), %edx /* destination pointer */
movl 12(%esp), %ecx /* number of pixels to copy */
- movq mask_565, %mm5
- movq prescale, %mm6
- movq scale, %mm7
+ movq mask_565@GOTOFF(%ebx), %mm5
+ movq prescale@GOTOFF(%ebx), %mm6
+ movq scale@GOTOFF(%ebx), %mm7
sarl $2, %ecx
jle .L01 /* Bail early if the count is negative. */
@@ -581,8 +581,8 @@
/* Always set the alpha value to 0xff.
*/
- por alpha, %mm0
- por alpha, %mm2
+ por alpha@GOTOFF(%ebx), %mm0
+ por alpha@GOTOFF(%ebx), %mm2
/* Pack the 16-bit values to 8-bit values and store the converted
@@ -609,8 +609,8 @@
pmulhuw %mm7, %mm0
pmulhuw %mm7, %mm2
- por alpha, %mm0
- por alpha, %mm2
+ por alpha@GOTOFF(%ebx), %mm0
+ por alpha@GOTOFF(%ebx), %mm2
packuswb %mm2, %mm0
@@ -647,8 +647,8 @@
pmulhuw %mm7, %mm0
pmulhuw %mm7, %mm2
- por alpha, %mm0
- por alpha, %mm2
+ por alpha@GOTOFF(%ebx), %mm0
+ por alpha@GOTOFF(%ebx), %mm2
packuswb %mm2, %mm0
@@ -675,7 +675,7 @@
#endif
pmulhuw %mm7, %mm0
- por alpha, %mm0
+ por alpha@GOTOFF(%ebx), %mm0
packuswb %mm0, %mm0

View File

@ -31,7 +31,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 6.5.2
Release: 6%{?dist}
Release: 7%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
@ -47,6 +47,7 @@ Patch5: mesa-6.5.2-xserver-1.1-source-compat.patch
Patch18: mesa-6.5.1-selinux-awareness.patch
Patch19: mesa-6.5.2-r300-parallel-build.patch
Patch20: mesa-6.5.2-libgl-visibility.patch
Patch21: mesa-6.5.2-picify-dri-drivers.patch
BuildRequires: pkgconfig
%if %{with_dri}
@ -161,6 +162,7 @@ The glx-utils package provides the glxinfo and glxgears utilities.
%patch18 -p1 -b .selinux-awareness
%patch19 -p1 -b .r300-make-j
%patch20 -p1 -b .libgl-visibility
%patch21 -p1 -b .picify
# WARNING: The following files are copyright "Mark J. Kilgard" under the GLUT
# license and are not open source/free software, so we remove them.
@ -171,7 +173,7 @@ rm -f include/GL/uglglutshapes.h
# The i965 DRI driver breaks if compiled with -O2. It appears to be
# an aliasing problem, so we add -fno-strict-aliasing to the flags.
export OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fvisibility=hidden"
export OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fvisibility=hidden -fPIC"
export DRI_DRIVER_DIR="%{_libdir}/dri"
export LIB_DIR=%{_lib}
@ -330,6 +332,10 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/glxinfo
%changelog
* Fri Mar 02 2007 Adam Jackson <ajax@redhat.com> 6.5.2-7
- mesa-6.5.2-picify-dri-drivers.patch: Attempt to make the DRI drivers PIC.
- mesa-6.5.1-build-config.patch: Apply RPM_OPT_FLAGS to OSMesa too.
* Mon Feb 26 2007 Adam Jackson <ajax@redhat.com> 6.5.2-6
- mesa-6.5.2-libgl-visibility.patch: Fix non-exported GLX symbols (#229808)
- Require a sufficiently new libdrm at runtime too