aboutsummaryrefslogtreecommitdiffstats
path: root/testing/android-tools/qemu-musl-native64.patch
blob: 1733281cd120d6be6f14d7e9ebe6b9a33862447f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
diff --git a/Makefile.android b/Makefile.android
index 600be7c..4ca77b8 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -236,7 +236,7 @@ start-emulator-library = \
     $(eval LOCAL_NO_DEFAULT_COMPILER_FLAGS := true) \
     $(eval LOCAL_MODULE := $1) \
     $(eval LOCAL_MODULE_CLASS := STATIC_LIBRARIES) \
-    $(eval LOCAL_MODULE_BITS := 32)
+    $(eval LOCAL_MODULE_BITS := 64)
 
 start-emulator64-library = \
     $(call start-emulator-library, $1) \
@@ -286,11 +286,9 @@ LOCAL_LDLIBS := \
 
 # Ensure only one of -m32 or -m64 is being used and place it first.
 LOCAL_CFLAGS := \
-    -m$$(LOCAL_MODULE_BITS) \
     $$(filter-out -m32 -m64, $$(LOCAL_CFLAGS))
 
 LOCAL_LDFLAGS := \
-    -m$$(LOCAL_MODULE_BITS) \
     $$(filter-out -m32 -m64, $$(LOCAL_LDFLAGS))
 
 endef
@@ -399,7 +397,7 @@ endif
 
 $(call end-emulator-program)
 
-include $(LOCAL_PATH)/Makefile.tests
+#include $(LOCAL_PATH)/Makefile.tests
 
 ##############################################################################
 ##############################################################################
diff --git a/Makefile.target b/Makefile.target
index e68de28..cb14321 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -164,7 +164,8 @@ common_LOCAL_SRC_FILES += \
 ##############################################################################
 # CPU-specific emulation.
 #
-common_LOCAL_CFLAGS += -fno-PIC -fomit-frame-pointer -Wno-sign-compare
+#common_LOCAL_CFLAGS += -fno-PIC -fomit-frame-pointer -Wno-sign-compare
+common_LOCAL_CFLAGS += -fomit-frame-pointer -Wno-sign-compare
 
 ifeq ($(HOST_ARCH),ppc)
     common_LOCAL_CFLAGS += -D__powerpc__
diff --git a/android-configure.sh b/android-configure.sh
index 42fe51d..a248c97 100755
--- a/android-configure.sh
+++ b/android-configure.sh
@@ -143,7 +143,7 @@ fi
 
 # By default, generate 32-bit binaries, the Makefile have targets that
 # generate 64-bit ones by using -m64 on the command-line.
-force_32bit_binaries
+#force_32bit_binaries
 
 case $OS in
     linux-*)
diff --git a/android/config/linux-x86_64/SDL_config.h b/android/config/linux-x86_64/SDL_config.h
index 529beb0..ba3dbed 100644
--- a/android/config/linux-x86_64/SDL_config.h
+++ b/android/config/linux-x86_64/SDL_config.h
@@ -105,7 +105,7 @@
 
 /* Enable various threading systems */
 #define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
+#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
 
 /* Enable various timer systems */
 #define SDL_TIMER_UNIX 1
diff --git a/android/emulation/CpuAccelerator.cpp b/android/emulation/CpuAccelerator.cpp
index be0175e..d79ba99 100644
--- a/android/emulation/CpuAccelerator.cpp
+++ b/android/emulation/CpuAccelerator.cpp
@@ -74,6 +74,15 @@ GlobalState gGlobals = { false, false, CPU_ACCELERATOR_NONE, { '\0' } };
 /////////////////////////////////////////////////////////////////////////
 
 #if HAVE_KVM
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(exp) ({         \
+    typeof (exp) _rc;                      \
+    do {                                   \
+        _rc = (exp);                       \
+    } while (_rc == ((typeof (exp)) -1) && errno == EINTR); \
+    _rc; })
+#endif
+
 
 #include <linux/kvm.h>
 
diff --git a/distrib/sdl-1.2.15/src/video/x11/SDL_x11sym.h b/distrib/sdl-1.2.15/src/video/x11/SDL_x11sym.h
index f9c7df3..56ce2c8 100644
--- a/distrib/sdl-1.2.15/src/video/x11/SDL_x11sym.h
+++ b/distrib/sdl-1.2.15/src/video/x11/SDL_x11sym.h
@@ -175,7 +175,7 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return)
  */
 #ifdef LONG64
 SDL_X11_MODULE(IO_32BIT)
-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+//SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
 SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
 #endif
 
diff --git a/target-i386/kvm-gs-restore.c b/target-i386/kvm-gs-restore.c
index 2ca6ab6..04db82e 100644
--- a/target-i386/kvm-gs-restore.c
+++ b/target-i386/kvm-gs-restore.c
@@ -35,7 +35,7 @@ static void check_and_restore_gs(void)
 struct sigact_status
 {
     unsigned int sigaction:1;
-    __sighandler_t old_handler;
+    sighandler_t old_handler;
     void (*old_sigaction) (int, siginfo_t *, void *);
 };
 static struct sigact_status o_sigact[SIGUNUSED];