? mesa-clang.diff ? graphics/libGLU/old ? graphics/libGLU/work Index: graphics/libGL/bsd.mesalib.mk =================================================================== RCS file: /home/pcvs/ports/graphics/libGL/bsd.mesalib.mk,v retrieving revision 1.16 diff -a -u -r1.16 bsd.mesalib.mk --- graphics/libGL/bsd.mesalib.mk 7 Feb 2010 11:51:05 -0000 1.16 +++ graphics/libGL/bsd.mesalib.mk 25 Jan 2011 23:14:15 -0000 @@ -51,7 +51,7 @@ #MAKE_ARGS= SHELL=${SH} #CFLAGS+= -DUSE_XSHM -DHZ=100 -#FILESDIR= ${.CURDIR}/../../graphics/libGL/files +FILESDIR= ${.CURDIR}/../../graphics/libGL/files WRKSRC= ${WRKDIR}/Mesa-${MESABASEVERSION} .if !defined(ARCH) @@ -99,6 +99,11 @@ CONFIGURE_ARGS+= --enable-xcb .endif +# Slave ports don't patch automaticly, this works though... +.if ${COMPONENT:Mgl} == "" +EXTRA_PATCHES+= ${FILESDIR}/patch-asm +.endif + post-patch: @${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \ ${WRKSRC}/configure Index: graphics/libGL/files/patch-asm =================================================================== RCS file: graphics/libGL/files/patch-asm diff -N graphics/libGL/files/patch-asm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ graphics/libGL/files/patch-asm 25 Jan 2011 23:14:15 -0000 @@ -0,0 +1,104 @@ +diff --git a/src/mapi/glapi/glapi_x86-64.S b/src/mapi/glapi/glapi_x86-64.S +index 469fac3..1f4463d 100644 +--- src/mesa/x86-64/glapi_x86-64.S ++++ src/mesa/x86-64/glapi_x86-64.S +@@ -73,7 +73,7 @@ _x86_64_get_dispatch: + + .p2align 4,,15 + _x86_64_get_dispatch: +- movq _gl_DispatchTSD(%rip), %rdi ++ movq _gl_DispatchTSD@GOTPCREL(%rip), %rdi + jmp pthread_getspecific@PLT + + #elif defined(THREADS) +diff --git a/src/mesa/x86-64/xform4.S b/src/mesa/x86-64/xform4.S +index e52a611..6141e43 100644 +--- src/mesa/x86-64/xform4.S ++++ src/mesa/x86-64/xform4.S +@@ -55,7 +55,7 @@ _mesa_x86_64_transform_points4_general: + * rdx = source + */ + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -138,7 +138,7 @@ _mesa_x86_64_transform_points4_3d: + movaps 16(%rax), %xmm10 + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -199,7 +199,7 @@ p4_3d_done: + _mesa_x86_64_transform_points4_identity: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -228,7 +228,7 @@ p4_identity_done: + _mesa_3dnow_transform_points4_3d_no_rot: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -293,7 +293,7 @@ p4_3d_no_rot_done: + _mesa_3dnow_transform_points4_perspective: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -360,7 +360,7 @@ p4_perspective_done: + _mesa_3dnow_transform_points4_2d_no_rot: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +@@ -416,7 +416,7 @@ p4_2d_no_rot_done: + _mesa_3dnow_transform_points4_2d: + + movl V4F_COUNT(%rdx), %ecx /* count */ +- movzx V4F_STRIDE(%rdx), %eax /* stride */ ++ movzbl V4F_STRIDE(%rdx), %eax /* stride */ + + movl %ecx, V4F_COUNT(%rdi) /* set dest count */ + movl $4, V4F_SIZE(%rdi) /* set dest size */ +diff --git a/src/mesa/x86/read_rgba_span_x86.S b/src/mesa/x86/read_rgba_span_x86.S +index 3886a51..8177299 100644 +--- src/mesa/x86/read_rgba_span_x86.S ++++ src/mesa/x86/read_rgba_span_x86.S +@@ -648,7 +648,7 @@ _generic_read_RGBA_span_RGB565_MMX: + testl $0x01, %ecx + je .L01 + +- movzxw (%eax), %ecx ++ movzwl (%eax), %ecx + movd %ecx, %mm4 + + pshufw $0x00, %mm4, %mm0 +--- src/mesa/x86/glapi_x86.S.orig 2009-12-22 03:31:19.000000000 +0100 ++++ src/mesa/x86/glapi_x86.S 2011-01-25 20:24:18.000000000 +0100 +@@ -47,7 +47,7 @@ + #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX)) + + #if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) +-#define GLOBL_FN(x) GLOBL x ; .type x, function ++#define GLOBL_FN(x) GLOBL x ; .type x, @function + #else + #define GLOBL_FN(x) GLOBL x + #endif