Correct detection of code being compiled as PIC. Allows the cpuid inline

assembly code to compile thus allowing dynamic SIMD instruction detection
and the use of MMX Extended and 3DNow (as well as SSE/SSE2 if and when
such code is added).

ok jakemsr@
This commit is contained in:
brad 2008-09-25 20:43:09 +00:00
parent 1d43ed7e1c
commit 94c9145d4d
3 changed files with 27 additions and 15 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.41 2008/09/16 02:37:04 brad Exp $
# $OpenBSD: Makefile,v 1.42 2008/09/25 20:43:09 brad Exp $
SHARED_ONLY= Yes
@ -9,7 +9,7 @@ COMMENT-jack= jackd audio output module for xine-lib
V= 1.1.15
DISTNAME= xine-lib-${V}
PKGNAME-main= ${DISTNAME}p3
PKGNAME-main= ${DISTNAME}p4
PKGNAME-esd= xine-lib-esd-${V}
PKGNAME-arts= xine-lib-arts-${V}
PKGNAME-jack= xine-lib-jack-${V}

View File

@ -1,16 +1,14 @@
$OpenBSD: patch-src_xine-utils_cpu_accel_c,v 1.2 2007/06/13 10:58:29 jakemsr Exp $
--- src/xine-utils/cpu_accel.c.orig Thu Mar 29 15:45:12 2007
+++ src/xine-utils/cpu_accel.c Sun May 20 22:40:14 2007
@@ -56,6 +56,12 @@ static uint32_t arch_accel (void)
/* No need to test for this on AMD64, we know what the
platform has. */
caps = MM_ACCEL_X86_MMX | MM_ACCEL_X86_SSE | MM_ACCEL_X86_MMXEXT | MM_ACCEL_X86_SSE2;
$OpenBSD: patch-src_xine-utils_cpu_accel_c,v 1.3 2008/09/25 20:43:09 brad Exp $
--- src/xine-utils/cpu_accel.c.orig Tue Sep 23 19:09:01 2008
+++ src/xine-utils/cpu_accel.c Tue Sep 23 19:12:58 2008
@@ -40,6 +40,10 @@
#include "xineutils.h"
+#if defined(PIC) && ! defined(__PIC__)
+#define __PIC__
+#endif
+
+#if defined(__OpenBSD__)
+#ifdef __i386__
+ caps = MM_ACCEL_X86_MMX;
+#endif
#else
#if defined(ARCH_X86) || defined(ARCH_X86_64)
#ifndef _MSC_VER
static jmp_buf sigill_return;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_xine-utils_mangle_h,v 1.1 2008/09/25 20:43:09 brad Exp $
--- src/xine-utils/mangle.h.orig Tue Sep 23 19:07:38 2008
+++ src/xine-utils/mangle.h Tue Sep 23 19:12:32 2008
@@ -29,6 +29,10 @@
#ifndef _XINE_MANGLE_H
#define _XINE_MANGLE_H
+#if defined(PIC) && ! defined(__PIC__)
+#define __PIC__
+#endif
+
// Use rip-relative addressing if compiling PIC code on x86-64.
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__DJGPP__) || \
defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))