PR c++/66561 - __builtin_LINE at al. should yield constant expressions
[official-gcc.git] / gcc / config / linux-android.h
blob301a41ccdd80ce32085d0f0452f83a1f7dae8c67
1 /* Configuration file for Linux Android targets.
2 Copyright (C) 2008-2016 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() \
23 do { \
24 if (TARGET_ANDROID) \
25 builtin_define ("__ANDROID__"); \
26 } while (0)
28 #if ANDROID_DEFAULT
29 # define NOANDROID "mno-android"
30 #else
31 # define NOANDROID "!mandroid"
32 #endif
34 #define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \
35 "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}"
37 #define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \
38 "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
40 #define ANDROID_LINK_SPEC \
41 "%{shared: -Bsymbolic}"
43 #define ANDROID_CC1_SPEC \
44 "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
45 "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
47 #define ANDROID_CC1PLUS_SPEC \
48 "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
49 "%{!frtti:%{!fno-rtti: -fno-rtti}}"
51 #define ANDROID_LIB_SPEC \
52 "%{!static: -ldl}"
54 #define ANDROID_STARTFILE_SPEC \
55 "%{shared: crtbegin_so%O%s;:" \
56 " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
58 #define ANDROID_ENDFILE_SPEC \
59 "%{shared: crtend_so%O%s;: crtend_android%O%s}"