rpms/mesa/devel mesa-6.5-drop-static-inline.patch, NONE, 1.1 mesa.spec, 1.48, 1.49

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sun Apr 2 05:28:02 UTC 2006


Author: krh

Update of /cvs/dist/rpms/mesa/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9072

Modified Files:
	mesa.spec 
Added Files:
	mesa-6.5-drop-static-inline.patch 
Log Message:
Remove inline keyword from a few functions that have their address taken; resolves linker error on x86-64.

mesa-6.5-drop-static-inline.patch:
 savagetex.c  |    2 +-
 savagetris.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- NEW FILE mesa-6.5-drop-static-inline.patch ---
Some functions in the savage driver are marked static and inline,
which is usually okay, and typically just means that if they're always
only inlined no code will be generated for such a function.  In a few
places, however, the address of such a function is taken, which should
be ok, it should just force code to be generated for that function.
But no... on x86-64 it generates a linker error:

/usr/bin/ld: savagetex.o: relocation R_X86_64_PC32 against `savageUploadSubtile_2x8' can not be used when making a shared object; recompile with -fPIC

The files *are* compiled with -fPIC.  Not sure what's going on, but
removing the inline keyword from those functions fixes the link.

krh at redhat.com, Sun Apr  2 00:26:35 EST 2006

--- ./src/mesa/drivers/dri/savage/savagetex.c.drop-static-inline	2005-10-10 15:15:48.000000000 -0400
+++ ./src/mesa/drivers/dri/savage/savagetex.c	2006-04-02 00:18:29.000000000 -0500
@@ -101,7 +101,7 @@
  * \param w   width in bytes
  */
 #define SUBTILE_FUNC(w,h)					\
-static __inline GLubyte *savageUploadSubtile_##w##x##h		\
+static GLubyte *savageUploadSubtile_##w##x##h		\
 (GLubyte *dest, GLubyte *src, GLuint srcStride)			\
 {								\
     GLuint y;							\
--- ./src/mesa/drivers/dri/savage/savagetris.c.drop-static-inline	2005-10-10 15:15:48.000000000 -0400
+++ ./src/mesa/drivers/dri/savage/savagetris.c	2006-04-02 00:19:03.000000000 -0500
@@ -215,7 +215,7 @@
    tmp.f[vertex_size-1] *= rhw;				\
 } while (0)
 
-static void __inline__ savage_ptex_tri (savageContextPtr imesa,
+static void savage_ptex_tri (savageContextPtr imesa,
 					savageVertexPtr v0,
 					savageVertexPtr v1,
 					savageVertexPtr v2) {
@@ -229,7 +229,7 @@
    PTEX_VERTEX (j, tmp, vertsize, 0, v2); EMIT_VERT (j, vb, vertsize, 0, &tmp);
 }
 
-static __inline__ void savage_ptex_line (savageContextPtr imesa,
+static void savage_ptex_line (savageContextPtr imesa,
 					 savageVertexPtr v0,
 					 savageVertexPtr v1 ) {
    GLuint vertsize = imesa->HwVertexSize;
@@ -275,7 +275,7 @@
    EMIT_VERT (j, vb, vertsize, 2, &tmp1);
 } 
 
-static __inline__ void savage_ptex_point (savageContextPtr imesa,
+static void savage_ptex_point (savageContextPtr imesa,
 					  savageVertexPtr v0) {
    GLuint vertsize = imesa->HwVertexSize;
    u_int32_t *vb = savageAllocVtxBuf (imesa, 6*vertsize);


Index: mesa.spec
===================================================================
RCS file: /cvs/dist/rpms/mesa/devel/mesa.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- mesa.spec	2 Apr 2006 02:40:00 -0000	1.48
+++ mesa.spec	2 Apr 2006 05:27:56 -0000	1.49
@@ -72,6 +72,7 @@
 Patch2: mesa-6.4-multilib-fix.patch
 Patch3: mesa-modular-dri-dir.patch
 Patch4: mesa-6.4.1-libGLw-enable-motif-support.patch
+Patch5: mesa-6.5-drop-static-inline.patch
 
 # General patches from upstream go here:
 
@@ -237,6 +238,7 @@
 %if %{with_motif}
 %patch4 -p0 -b .libGLw-enable-motif-support
 %endif
+%patch5 -p0 -b .drop-static-inline
 
 # According to Adam, this patch makes metacity's compositing
 # manager noticeably faster, but also may be a little too big of




More information about the fedora-cvs-commits mailing list