]>
Commit | Line | Data |
---|---|---|
51b9db92 | 1 | /* Configuration file for Linux Android targets. |
7adcbafe | 2 | Copyright (C) 2008-2022 Free Software Foundation, Inc. |
51b9db92 MK |
3 | Contributed by Doug Kwan (dougkwan@google.com) |
4 | Rewritten by CodeSourcery, Inc. | |
5 | ||
6 | This file is part of GCC. | |
7 | ||
8 | GCC is free software; you can redistribute it and/or modify it | |
9 | under the terms of the GNU General Public License as published | |
10 | by the Free Software Foundation; either version 3, or (at your | |
11 | option) any later version. | |
12 | ||
13 | GCC is distributed in the hope that it will be useful, but WITHOUT | |
14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
15 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
16 | License for more details. | |
17 | ||
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/>. */ | |
21 | ||
2c8f43e6 MK |
22 | #define ANDROID_TARGET_OS_CPP_BUILTINS() \ |
23 | do { \ | |
90922d36 | 24 | if (TARGET_ANDROID) \ |
2c8f43e6 MK |
25 | builtin_define ("__ANDROID__"); \ |
26 | } while (0) | |
27 | ||
b4c522fa IB |
28 | #define ANDROID_TARGET_D_OS_VERSIONS() \ |
29 | do { \ | |
30 | if (TARGET_ANDROID) \ | |
31 | builtin_version ("Android"); \ | |
32 | } while (0) | |
33 | ||
51b9db92 MK |
34 | #if ANDROID_DEFAULT |
35 | # define NOANDROID "mno-android" | |
36 | #else | |
37 | # define NOANDROID "!mandroid" | |
38 | #endif | |
39 | ||
40 | #define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \ | |
41 | "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}" | |
42 | ||
43 | #define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \ | |
44 | "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}" | |
45 | ||
46 | #define ANDROID_LINK_SPEC \ | |
47 | "%{shared: -Bsymbolic}" | |
48 | ||
49 | #define ANDROID_CC1_SPEC \ | |
50 | "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \ | |
51 | "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}" | |
52 | ||
53 | #define ANDROID_CC1PLUS_SPEC \ | |
54 | "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ | |
55 | "%{!frtti:%{!fno-rtti: -fno-rtti}}" | |
56 | ||
57 | #define ANDROID_LIB_SPEC \ | |
58 | "%{!static: -ldl}" | |
59 | ||
60 | #define ANDROID_STARTFILE_SPEC \ | |
a1ecc15c | 61 | "%{shared: crtbegin_so%O%s;:" \ |
51b9db92 MK |
62 | " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}" |
63 | ||
64 | #define ANDROID_ENDFILE_SPEC \ | |
a1ecc15c | 65 | "%{shared: crtend_so%O%s;: crtend_android%O%s}" |