summaryrefslogtreecommitdiff
path: root/app-emulation/wine/files/wine-1.5.26-winegcc.patch
blob: 2045e343401b4e712df631bb9f06df27c91ed308 (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
http://bugs.gentoo.org/260726

diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 16b4165..5c77267 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -48,10 +48,13 @@ int link_ext_symbols = 0;
 int force_pointer_size = 0;
 int unwind_tables = 0;
 
+#undef FORCE_POINTER_SIZE
 #ifdef __i386__
 enum target_cpu target_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
 #elif defined(__x86_64__)
 enum target_cpu target_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
 #elif defined(__powerpc__)
 enum target_cpu target_cpu = CPU_POWERPC;
 #elif defined(__arm__)
@@ -611,6 +614,10 @@ int main(int argc, char **argv)
     signal( SIGTERM, exit_on_signal );
     signal( SIGINT, exit_on_signal );
 
+#ifdef FORCE_POINTER_SIZE
+    force_pointer_size = sizeof(size_t);
+#endif
+
     output_file = stdout;
     argv = parse_options( argc, argv, spec );
 
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 06aa200..c44d2e3 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -213,10 +213,13 @@ struct options
     strarray* files;
 };
 
+#undef FORCE_POINTER_SIZE
 #ifdef __i386__
 static const enum target_cpu build_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
 #elif defined(__x86_64__)
 static const enum target_cpu build_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
 #elif defined(__powerpc__)
 static const enum target_cpu build_cpu = CPU_POWERPC;
 #elif defined(__arm__)
@@ -1258,6 +1261,9 @@ int main(int argc, char **argv)
     opts.linker_args = strarray_alloc();
     opts.compiler_args = strarray_alloc();
     opts.winebuild_args = strarray_alloc();
+#ifdef FORCE_POINTER_SIZE
+    opts.force_pointer_size = sizeof(size_t);
+#endif
 
     /* determine the processor type */
     if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;