Index: Makefile
===================================================================
RCS file: /cvs/ports/games/openarena/Makefile,v
retrieving revision 1.21
diff -u -p -u -p -r1.21 Makefile
--- Makefile 2 Dec 2017 21:39:49 -0000 1.21
+++ Makefile 6 Oct 2018 04:27:37 -0000
@@ -2,8 +2,6 @@
ONLY_FOR_ARCHS = amd64 i386 macppc
-BROKEN-i386 = code/qcommon/vm_x86.c:(.text+0x18): undefined reference to `callMask'
-
COMMENT-main = OpenArena client
COMMENT-server = OpenArena server
COMMENT-data = OpenArena data for client/server
@@ -20,7 +18,7 @@ PKGNAME-main = openarena-${V}
PKGNAME-server = openarena-server-${V}
PKGNAME-data = openarena-data-${V}
-REVISION-main = 1
+REVISION-main = 2
REVISION-server = 0
PKG_ARCH-data = *
Index: patches/patch-code_qcommon_vm_x86_c
===================================================================
RCS file: /cvs/ports/games/openarena/patches/patch-code_qcommon_vm_x86_c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-code_qcommon_vm_x86_c
--- patches/patch-code_qcommon_vm_x86_c 18 Mar 2012 16:48:16 -0000 1.1
+++ patches/patch-code_qcommon_vm_x86_c 6 Oct 2018 04:27:37 -0000
@@ -11,8 +11,11 @@ BUGS
means that such descriptors must be opened with O_RDWR, which requires
both read and write permissions on the underlying object.
---- code/qcommon/vm_x86.c.orig Sat Dec 24 14:29:32 2011
-+++ code/qcommon/vm_x86.c Sun Mar 11 15:22:08 2012
+ * Fix undefined reference to `callMask' for clang
+
+Index: code/qcommon/vm_x86.c
+--- code/qcommon/vm_x86.c.orig
++++ code/qcommon/vm_x86.c
@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
/* need this on NX enabled systems (i386 with PAE kernel or
@@ -22,7 +25,22 @@ BUGS
#define VM_X86_MMAP
#endif
-@@ -1094,7 +1094,7 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) {
+@@ -90,9 +90,12 @@ static int ftolPtr = (int)qftol0F7F;
+ void AsmCall(void);
+ static void (*const asmCallPtr)(void) = AsmCall;
+
++#ifdef __clang__
++ int callMask = 0;
++#else
++ static int callMask = 0;
++#endif
+
+-static int callMask = 0;
+-
+ static int instruction, pass;
+ static int lastConst = 0;
+ static int oc0, oc1, pop0, pop1;
+@@ -1094,7 +1097,7 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) {
// copy to an exact size buffer on the hunk
vm->codeLength = compiledOfs;
#ifdef VM_X86_MMAP
Hi ports!
Here is a fix that unbreaks OpenArena on i386, shamelessly stolen from
FreeBSD [1].
Port change:
Added build fix and bumped REVISION.
Testing:
I can only use software rendering (3/4 fps), because inteldrm makes my
i386 box panic, so my testing is very limited, but i was able to play a
solo game with no crash.
Feedbacks and comments are welcome!
Charlène.
[1]
https://svnweb.freebsd.org/ports/head/games/openarena/files/patch-code_qcommon_vm__x86.c?revision=414032&view=markup
No comments:
Post a Comment