PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / objc-obj-c++-shared / next-abi.h
blob0ffa0fcba176fc34179c6a034c12e5b52ba0abed
1 /* Check which version of the API and ABI are appropriate for the target.
2 Copyright (C) 2010, 2011 Free Software Foundation, Inc.
4 Contributed by Iain Sandoe <iains@gcc.gnu.org>
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #ifndef _OBJC_NEXT_ABI_H_
23 #define _OBJC_NEXT_ABI_H_
24 /* Produce a define that allows us to figure out what facilities are
25 available for this gcc and OS combination.
28 /* By default we do nothing - therefore ifdef NEXT_OBJC_USE_NEW_INTERFACE
29 * is reliable for detecting versions of the target that require either
30 * API=2, or both API & ABI = 2 (m64 code).
32 * This applies for versions of OSX >= 10.5 (darwin9).
34 * A compiler capable of producing ObjC V2 ABI should define __OBJC2__
37 #undef NEXT_OBJC_ABI_VERSION
38 #undef NEXT_OBJC_USE_NEW_INTERFACE
40 #ifdef __NEXT_RUNTIME__
41 # if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 || __OBJC2__)
42 /* We have to use an updated interface for 32bit NeXT to avoid
43 * 'deprecated' warnings.
44 * For 64bit NeXT the ABI is different (and the interfaces 'deprecated'
45 * for 32bit have been removed).
47 # define NEXT_OBJC_USE_NEW_INTERFACE 1
48 # if __OBJC2__ || __LP64__
49 /* We have OBJC v2 ABI compiler,
50 (or, at least, the available NeXT runtime requires one) */
51 # define NEXT_OBJC_ABI_VERSION 2
52 # else
53 /* We leave it open to define ABI 1 if and when we implement those
54 * extensions.
56 # define NEXT_OBJC_ABI_VERSION 0
57 # endif
58 # else
59 /* Pre-OSX 10.5 all is ABI 0. */
60 # define NEXT_OBJC_ABI_VERSION 0
61 # endif /* MAC_OS_X_VERSION_MIN_REQUIRED > 10.5 or OBJC2 */
62 #endif /* __NEXT_RUNTIME__ */
64 #endif /* _OBJC_NEXT_ABI_H_ */