~ubuntu-branches/ubuntu/trusty/vice/trusty

« back to all changes in this revision

Viewing changes to src/arch/platform_compiler.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2013-07-28 20:38:23 UTC
  • mfrom: (1.1.10) (9.2.7 sid)
  • Revision ID: package-import@ubuntu.com-20130728203823-1h8s6bcv22oundul
Tags: 2.4.dfsg-1
* New upstream release (closes: #693065, #693641).
* Drop vice-ffmpeg.patch , applied upstream.
* Disable architecture specific compilation (closes: #686400, #714136).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * platform_compiler.h - compiler discovery macros.
3
 
 *
4
 
 * Written by
5
 
 *  Marco van den Heuvel <blackystardust68@yahoo.com>
6
 
 *
7
 
 * This file is part of VICE, the Versatile Commodore Emulator.
8
 
 * See README for copyright notice.
9
 
 *
10
 
 *  This program is free software; you can redistribute it and/or modify
11
 
 *  it under the terms of the GNU General Public License as published by
12
 
 *  the Free Software Foundation; either version 2 of the License, or
13
 
 *  (at your option) any later version.
14
 
 *
15
 
 *  This program is distributed in the hope that it will be useful,
16
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 *  GNU General Public License for more details.
19
 
 *
20
 
 *  You should have received a copy of the GNU General Public License
21
 
 *  along with this program; if not, write to the Free Software
22
 
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23
 
 *  02111-1307  USA.
24
 
 *
25
 
 */
26
 
 
27
 
/* Compilers supported:
28
 
 *
29
 
 * compiler       | support
30
 
 * ------------------------------------------------------
31
 
 * clang          | yes
32
 
 * comeau c++     | yes
33
 
 * compaq/dec     | yes, but wrong version format for now
34
 
 * dignus systems | yes
35
 
 * EKOPath        | yes
36
 
 * gcc            | yes
37
 
 * green hill     | yes
38
 
 * hp uc          | yes
39
 
 * intel cc       | yes
40
 
 * llvm           | yes
41
 
 * metrowerks     | yes
42
 
 * MIPSpro        | yes
43
 
 * RealView C     | yes
44
 
 * SAS/C          | yes
45
 
 * Sun Studio     | yes
46
 
 * Tiny C         | yes
47
 
 * xLC            | yes
48
 
 */
49
 
 
50
 
#ifndef VICE_PLATFORM_COMPILER_H
51
 
#define VICE_PLATFORM_COMPILER_H
52
 
 
53
 
#undef XQUOTE
54
 
#undef QUOTE
55
 
#define QUOTE(x) XQUOTE(x)
56
 
#define XQUOTE(x) #x
57
 
 
58
 
/* clang discovery */
59
 
#if !defined(PLATFORM_COMPILER) && defined(__clang__)
60
 
#define PLATFORM_COMPILER "clang " QUOTE(__clang_major__) "." QUOTE(__clang_minor__) "." QUOTE(__clang_patchlevel__)
61
 
#endif
62
 
 
63
 
/* GCC discovery */
64
 
#if !defined(PLATFORM_COMPILER) && defined(__GNUC__)
65
 
#  if (__GNUC__>2)
66
 
#    define PLATFORM_COMPILER "GCC-" QUOTE(__GNUC__) "." QUOTE(__GNUC_MINOR__) "." QUOTE(__GNUC_PATCHLEVEL__)
67
 
#  else
68
 
#    define PLATFORM_COMPILER "GCC-" QUOTE(__GNUC__) "." QUOTE(__GNUC_MINOR__)
69
 
#  endif
70
 
#endif
71
 
 
72
 
/* llvm discovery */
73
 
#if !defined(PLATFORM_COMPILER) && defined(__APPLE__) && defined(llvm)
74
 
#define PLATFORM_COMPILER  "llvm"
75
 
#endif
76
 
 
77
 
/* xLC discovery */
78
 
#if !defined(PLATFORM_COMPILER) && defined( _AIX) && defined(__TOS_AIX__)
79
 
#define PLATFORM_COMPILER "xLC"
80
 
#endif
81
 
 
82
 
/* HP UPC discovery */
83
 
#if !defined(PLATFORM_COMPILER) && defined(_hpux)
84
 
#define PLATFORM_COMPILER "HP UPC"
85
 
#endif
86
 
 
87
 
/* Comeau compiler discovery */
88
 
#if !defined(PLATFORM_COMPILER) && defined(__COMO__)
89
 
#define PLATFORM_COMPILER "Comeau c++ " QUOTE(__COMO_VERSION__)
90
 
#define PLATFORM_COMPILER_NAME "Comeau c++"
91
 
#define PLATFORM_COMPILER_VERSION __COMO_VERSION__
92
 
#define PLATFORM_COMPILER_MAJOR_MASK 100
93
 
#define PLATFORM_COMPILER_MINOR_MASK 1
94
 
#endif
95
 
 
96
 
/* Intel compiler discovery */
97
 
#if !defined(PLATFORM_COMPILER) && defined(__INTEL_COMPILER)
98
 
#define PLATFORM_COMPILER "Intel Compiler " QUOTE(__INTEL_COMPILER)
99
 
#define PLATFORM_COMPILER_NAME "Intel Compiler"
100
 
#define PLATFORM_COMPILER_VERSION __INTEL_COMPILER
101
 
#define PLATFORM_COMPILER_MAJOR_MASK 100
102
 
#define PLATFORM_COMPILER_MINOR_MASK 10
103
 
#define PLATFORM_COMPILER_PATCHLEVEL_MASK 1
104
 
#endif
105
 
 
106
 
/* compaq/dec compiler discovery */
107
 
#if !defined(PLATFORM_COMPILER) && defined(__DECC)
108
 
#define PLATFORM_COMPILER "Compaq/DEC compiler " QUOTE(__DECC_VER)
109
 
#endif
110
 
 
111
 
/* Dignus Systems compiler discovery */
112
 
#if !defined(PLATFORM_COMPILER) && defined(__SYSC__)
113
 
#define PLATFORM_COMPILER "Dignus Systems compiler " QUOTE(__SYSC_VER__)
114
 
#define PLATFORM_COMPILER_NAME "Dignus Systems compiler"
115
 
#define PLATFORM_COMPILER_VERSION __SYSC_VER__
116
 
#define PLATFORM_COMPILER_MAJOR_MASK 10000
117
 
#define PLATFORM_COMPILER_MINOR_MASK 100
118
 
#define PLATFORM_COMPILER_PATCHLEVEL_MASK 1
119
 
#endif
120
 
 
121
 
/* EKOPath compiler discovery */
122
 
#if !defined(PLATFORM_COMPILER) && defined(__PATHCC__)
123
 
#define PLATFORM_COMPILER "EKOPath compiler " QUOTE(__PATHCC__) "." QUOTE(__PATHCC_MINOR__) "." QUOTE(__PATHCC_PATCHLEVEL__)
124
 
#endif
125
 
 
126
 
/* Green Hill C/C++ compiler discovery */
127
 
#if !defined(PLATFORM_COMPILER) && defined(__ghs__)
128
 
#define PLATFORM_COMPILER "Green Hill C/C++ " QUOTE(__GHS_VERSION_NUMBER__)
129
 
#define PLATFORM_COMPILER_NAME "Green Hill C/C++"
130
 
#define PLATFORM_COMPILER_VERSION __GHS_VERSION_NUMBER__
131
 
#define PLATFORM_COMPILER_MAJOR_MASK 100
132
 
#define PLATFORM_COMPILER_MINOR_MASK 10
133
 
#define PLATFORM_COMPILER_PATCHLEVEL_MASK 1
134
 
#endif
135
 
 
136
 
/* MetroWerks compiler discovery */
137
 
#if !defined(PLATFORM_COMPILER) && defined(__MWERKS__)
138
 
#if (__MWERKS__>1)
139
 
#define PLATFORM_COMPILER "MetroWerks " QUOTE(__MWERKS__)
140
 
#define PLATFORM_COMPILER_NAME "MetroWerks"
141
 
#define PLATFORM_COMPILER_VERSION __MWERKS__
142
 
#define PLATFORM_COMPILER_MAJOR_MASK 0x1000
143
 
#define PLATFORM_COMPILER_MINOR_MASK 0x100
144
 
#else
145
 
#define PLATFORM_COMPILER "MetroWerks"
146
 
#endif
147
 
#endif
148
 
 
149
 
/* MIPSpro compiler discovery */
150
 
#if !defined(PLATFORM_COMPILER) && (defined(__sgi) || defined(sgi))
151
 
#if defined(_COMPILER_VERSION) || defined(_SGI_COMPILER_VERSION)
152
 
#ifdef _COMPILER_VERSION
153
 
#define PLATFORM_COMPILER "MIPSpro " QUOTE(_COMPILER_VERSION)
154
 
#define PLATFORM_COMPILER_VERSION _COMPILER_VERSION
155
 
#else
156
 
#define PLATFORM_COMPILER "MIPSpro" QUOTE(_SGI_COMPILER_VERSION)
157
 
#define PLATFORM_COMPILER_VERSION _SGI_COMPILER_VERSION
158
 
#endif
159
 
#define PLATFORM_COMPILER_NAME "MIPSpro"
160
 
#define PLATFORM_COMPILER_MAJOR_MASK 100
161
 
#define PLATFORM_COMPILER_MINOR_MASK 10
162
 
#define PLATFORM_COMPILER_PATCHLEVEL_MASK 1
163
 
#else
164
 
#define PLATFORM_COMPILER "MIPSpro"
165
 
#endif
166
 
#endif
167
 
 
168
 
/* RealView C compiler discovery */
169
 
#if !defined(PLATFORM_COMPILER) && defined(__CC_ARM)
170
 
#define PLATFORM_COMPILER "RealView C " QUOTE(__ARMCC_VERSION)
171
 
#define PLATFORM_COMPILER_NAME "RealView C"
172
 
#define PLATFORM_COMPILER_VERSION __ARMCC_VERSION
173
 
#define PLATFORM_COMPILER_MAJOR_MASK 100000
174
 
#define PLATFORM_COMPILER_MINOR_MASK 10000
175
 
#define PLATFORM_COMPILER_PATCHLEVEL_MASK 1000
176
 
#endif
177
 
 
178
 
/* SAS/C compiler discovery */
179
 
#if !defined(PLATFORM_COMPILER) && defined(__SASC)
180
 
#ifdef __VERSION__
181
 
#define PLATFORM_COMPILER "SAS/C " QUOTE(__VERSION__) "." QUOTE(__REVISION__)
182
 
#else
183
 
#define PLATFORM_COMPILER "SASC " QUOTE(__SASC__)
184
 
#define PLATFORM_COMPILER_NAME "SAS/C"
185
 
#define PLATFORM_COMPILER_VERSION ___SASC__
186
 
#define PLATFORM_COMPILER_MAJOR_MASK 100
187
 
#define PLATFORM_COMPILER_MINOR_MASK 1
188
 
#endif
189
 
#endif
190
 
 
191
 
/* Sun Studio compiler discovery */
192
 
#if !defined(PLATFORM_COMPILER) && defined(__SUNPRO_C)
193
 
#define PLATFORM_COMPILER "Sun Studio Compiler " QUOTE(__SUNPRO_C)
194
 
#define PLATFORM_COMPILER_NAME "Sun Studio Compiler"
195
 
#define PLATFORM_COMPILER_VERSION __SUNPRO_C
196
 
#define PLATFORM_COMPILER_MAJOR_MASK 0x100
197
 
#define PLATFORM_COMPILER_MINOR_MASK 0x10
198
 
#define PLATFORM_COMPILER_PATCHLEVEL_MASK 1
199
 
#endif
200
 
 
201
 
/* Tiny C compiler discovery */
202
 
#if !defined(PLATFORM_COMPILER) && defined(__TINYC__)
203
 
#define PLATFORM_COMPILER "Tiny C"
204
 
#endif
205
 
 
206
 
#endif