~ubuntu-branches/ubuntu/precise/mupen64plus/precise

« back to all changes in this revision

Viewing changes to debian/patches/debian-archs.patch

  • Committer: Bazaar Package Importer
  • Author(s): Sven Eckelmann
  • Date: 2009-09-28 15:23:17 UTC
  • Revision ID: james.westby@ubuntu.com-20090928152317-84y17o8hlh7batmw
Tags: 1.5+dfsg1-5
* debian/patches:
  - Change to dep3 patch tagging guidelines
  - Remove number before patches as order is given by debian/patches/series
  - Add gtk-open-filter.patch, Show files with .n64 and .v64 extension in
    filtered open file dialog (Closes: #546046)
  - Add noexecstack.patch, Don't enable executable stack by default
    (Closes: #547644)
  - Add fix_readpng.patch, Fix crash when loading png due to reordering
    optimizer
  - Add jttl_fix_romclosed.patch, Stop audio processing thread before freeing
    buffers to fix segfault during stop of emulation
  - Add rice_nodebug.patch, Don't enable excessive debug functionality in
    rice_video
  - Add interpreter_x86_fldcw.patch, Correctly set floating point control word
  - Add load-fpr-location.patch, Set register bank location when loading
    savestate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Define new cpu architectures
 
2
 mupen64plus must exactly know for which architectures it is build and
 
3
 which word size and endianness it has. Most architectures supported
 
4
 by debian weren't listed here. That means that the build would
 
5
 probably fail or generate unusable binaries.
 
6
 To better support unknown architectures NO_ASM must be enabled by
 
7
 default and known good architectures can then override this value. The
 
8
 user can still force to change that behavior by NO_ASM=0 or NO_ASM=1
 
9
 on the commandline.
 
10
Bug: http://code.google.com/p/mupen64plus/issues/detail?id=260
 
11
Bug-Debian: http://bugs.debian.org/544673
 
12
Bug-Debian: http://bugs.debian.org/545463
 
13
Author: Sven Eckelmann <sven.eckelmann@gmx.de>
 
14
 
 
15
---
 
16
diff --git a/pre.mk b/pre.mk
 
17
index 5c7b73c40731e7ac66d285c9fe783c9f250c5ca1..c128cf77aa0ba6eb692ab7528235235633491f02 100644
 
18
--- a/pre.mk
 
19
+++ b/pre.mk
 
20
@@ -19,29 +19,140 @@
 
21
 # *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
 
22
 # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
23
 
 
24
-# detect system architecture: i386, x86_64, or PPC/PPC64
 
25
+# detect system architecture: i386, x86_64, PPC/PPC64, ALPHA, ARM, AVR32, HPPA,
 
26
+# IA64, M32R, M68K, MIPS, S390, SH3, SH4, SPARC
 
27
 UNAME = $(shell uname -m)
 
28
+NO_ASM ?= 1
 
29
 ifeq ("$(UNAME)","x86_64")
 
30
-  CPU = X86
 
31
+  CPU := X86
 
32
   ifeq ("$(BITS)", "32")
 
33
-    ARCH = 64BITS_32
 
34
+    ARCH := 64BITS_32
 
35
   else
 
36
-    ARCH = 64BITS
 
37
+    ARCH := 64BITS
 
38
   endif
 
39
+  NO_ASM := 0
 
40
+  CPU_ENDIANNESS := LITTLE
 
41
 endif
 
42
-ifneq ("$(filter i%86,$(UNAME))","")
 
43
-  CPU = X86
 
44
-  ARCH = 32BITS
 
45
+ifneq ("$(filter pentium i%86,$(UNAME))","")
 
46
+  CPU := X86
 
47
+  ARCH := 32BITS
 
48
+  NO_ASM := 0
 
49
+  CPU_ENDIANNESS := LITTLE
 
50
 endif
 
51
-ifeq ("$(UNAME)","ppc")
 
52
-  CPU = PPC
 
53
-  ARCH = 32BITS
 
54
-  NO_ASM = 1
 
55
+ifneq ("$(filter ppc powerpc,$(UNAME))","")
 
56
+  CPU := PPC
 
57
+  ARCH := 32BITS
 
58
+  NO_ASM := 1
 
59
+  CPU_ENDIANNESS := BIG
 
60
 endif
 
61
-ifeq ("$(UNAME)","ppc64")
 
62
-  CPU = PPC
 
63
-  ARCH = 64BITS
 
64
-  NO_ASM = 1
 
65
+ifneq ("$(filter ppc64 powerpc64,$(UNAME))","")
 
66
+  CPU := PPC
 
67
+  ARCH := 64BITS
 
68
+  NO_ASM := 1
 
69
+  CPU_ENDIANNESS := BIG
 
70
+endif
 
71
+ifneq ("$(filter alpha%,$(UNAME))","")
 
72
+  CPU := ALPHA
 
73
+  ARCH := 64BITS
 
74
+  NO_ASM := 1
 
75
+  CPU_ENDIANNESS := LITTLE
 
76
+endif
 
77
+ifneq ("$(filter arm%b,$(UNAME))","")
 
78
+  CPU := ARM
 
79
+  ARCH := 32BITS
 
80
+  NO_ASM := 1
 
81
+  CPU_ENDIANNESS := BIG
 
82
+else
 
83
+ifneq ("$(filter arm%,$(UNAME))","")
 
84
+  CPU := ARM
 
85
+  ARCH := 32BITS
 
86
+  NO_ASM := 1
 
87
+  CPU_ENDIANNESS := LITTLE
 
88
+endif
 
89
+endif
 
90
+ifneq ("$(filter hppa%b,$(UNAME))","")
 
91
+  CPU := HPPA
 
92
+  ARCH := 32BITS
 
93
+  NO_ASM := 1
 
94
+  CPU_ENDIANNESS := BIG
 
95
+endif
 
96
+ifeq ("$(UNAME)","ia64")
 
97
+  CPU := IA64
 
98
+  ARCH := 64BITS
 
99
+  NO_ASM := 1
 
100
+  CPU_ENDIANNESS := LITTLE
 
101
+endif
 
102
+ifeq ("$(UNAME)","avr32")
 
103
+  CPU := AVR32
 
104
+  ARCH := 32BITS
 
105
+  NO_ASM := 1
 
106
+  CPU_ENDIANNESS := BIG
 
107
+endif
 
108
+ifeq ("$(UNAME)","m32r")
 
109
+  CPU := M32R
 
110
+  ARCH := 32BITS
 
111
+  NO_ASM := 1
 
112
+  CPU_ENDIANNESS := BIG
 
113
+endif
 
114
+ifeq ("$(UNAME)","m68k")
 
115
+  CPU := M68K
 
116
+  ARCH := 32BITS
 
117
+  NO_ASM := 1
 
118
+  CPU_ENDIANNESS := BIG
 
119
+endif
 
120
+ifneq ("$(filter mips mipseb,$(UNAME))","")
 
121
+  CPU := MIPS
 
122
+  ARCH := 32BITS
 
123
+  NO_ASM := 1
 
124
+  CPU_ENDIANNESS := BIG
 
125
+endif
 
126
+ifeq ("$(UNAME)","mipsel")
 
127
+  CPU := MIPS
 
128
+  ARCH := 32BITS
 
129
+  NO_ASM := 1
 
130
+  CPU_ENDIANNESS := LITTLE
 
131
+endif
 
132
+ifeq ("$(UNAME)","s390")
 
133
+  CPU := S390
 
134
+  ARCH := 32BITS
 
135
+  NO_ASM := 1
 
136
+  CPU_ENDIANNESS := BIG
 
137
+endif
 
138
+ifeq ("$(UNAME)","s390x")
 
139
+  CPU := S390
 
140
+  ARCH := 64BITS
 
141
+  NO_ASM := 1
 
142
+  CPU_ENDIANNESS := BIG
 
143
+endif
 
144
+ifeq ("$(UNAME)","sh3")
 
145
+  CPU := SH3
 
146
+  ARCH := 32BITS
 
147
+  NO_ASM := 1
 
148
+  CPU_ENDIANNESS := LITTLE
 
149
+endif
 
150
+ifeq ("$(UNAME)","sh3eb")
 
151
+  CPU := SH3
 
152
+  ARCH := 32BITS
 
153
+  NO_ASM := 1
 
154
+  CPU_ENDIANNESS := BIG
 
155
+endif
 
156
+ifeq ("$(UNAME)","sh4")
 
157
+  CPU := SH4
 
158
+  ARCH := 32BITS
 
159
+  NO_ASM := 1
 
160
+  CPU_ENDIANNESS := LITTLE
 
161
+endif
 
162
+ifeq ("$(UNAME)","sh4eb")
 
163
+  CPU := SH4
 
164
+  ARCH := 32BITS
 
165
+  NO_ASM := 1
 
166
+  CPU_ENDIANNESS := BIG
 
167
+endif
 
168
+ifeq ("$(UNAME)","sparc")
 
169
+  CPU := SPARC
 
170
+  ARCH := 32BITS
 
171
+  NO_ASM := 1
 
172
+  CPU_ENDIANNESS := BIG
 
173
 endif
 
174
 
 
175
 # detect operation system. Currently just linux and OSX.
 
176
@@ -214,7 +325,10 @@ ifeq ($(CPU), X86)
 
177
   endif
 
178
 endif
 
179
 ifeq ($(CPU), PPC)
 
180
-  CFLAGS += -mcpu=powerpc -D_BIG_ENDIAN
 
181
+  CFLAGS += -mcpu=powerpc
 
182
+endif
 
183
+ifeq ($(CPU_ENDIANNESS), BIG)
 
184
+  CFLAGS += -D_BIG_ENDIAN
 
185
 endif
 
186
 
 
187
 # set CFLAGS, LIBS, and LDFLAGS for external dependencies