1 /* Configuration file for Linux Android targets.
2 Copyright (C) 2008-2020 Free Software Foundation, Inc.
3 Contributed by Doug Kwan (dougkwan@google.com)
4 Rewritten by CodeSourcery, Inc.
6 This file is part of GCC.
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.
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.
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 #define ANDROID_TARGET_OS_CPP_BUILTINS() \
25 builtin_define ("__ANDROID__"); \
28 #define ANDROID_TARGET_D_OS_VERSIONS() \
31 builtin_version ("Android"); \
35 # define NOANDROID "mno-android"
37 # define NOANDROID "!mandroid"
40 #define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \
41 "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}"
43 #define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \
44 "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
46 #define ANDROID_LINK_SPEC \
47 "%{shared: -Bsymbolic}"
49 #define ANDROID_CC1_SPEC \
50 "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
51 "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
53 #define ANDROID_CC1PLUS_SPEC \
54 "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
55 "%{!frtti:%{!fno-rtti: -fno-rtti}}"
57 #define ANDROID_LIB_SPEC \
60 #define ANDROID_STARTFILE_SPEC \
61 "%{shared: crtbegin_so%O%s;:" \
62 " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
64 #define ANDROID_ENDFILE_SPEC \
65 "%{shared: crtend_so%O%s;: crtend_android%O%s}"