1 /* Configuration file for Linux Android targets.
2 Copyright (C) 2008, 2010
3 Free Software Foundation, Inc.
4 Contributed by Doug Kwan (dougkwan@google.com)
5 Rewritten by CodeSourcery, Inc.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 3, or (at your
12 option) any later version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
24 # define NOANDROID "mno-android"
26 # define NOANDROID "!mandroid"
29 #define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \
30 "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}"
32 #define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \
33 "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
35 #define ANDROID_LINK_SPEC \
36 "%{shared: -Bsymbolic}"
38 #define ANDROID_CC1_SPEC \
39 "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
40 "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
42 #define ANDROID_CC1PLUS_SPEC \
43 "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
44 "%{!frtti:%{!fno-rtti: -fno-rtti}}"
46 #define ANDROID_LIB_SPEC \
49 #define ANDROID_STARTFILE_SPEC \
51 " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
53 #define ANDROID_ENDFILE_SPEC \
54 "%{!shared: crtend_android%O%s}"