110d565efSmrg /* Configuration file for Linux Android targets. 2*ec02198aSmrg Copyright (C) 2008-2020 Free Software Foundation, Inc. 310d565efSmrg Contributed by Doug Kwan (dougkwan@google.com) 410d565efSmrg Rewritten by CodeSourcery, Inc. 510d565efSmrg 610d565efSmrg This file is part of GCC. 710d565efSmrg 810d565efSmrg GCC is free software; you can redistribute it and/or modify it 910d565efSmrg under the terms of the GNU General Public License as published 1010d565efSmrg by the Free Software Foundation; either version 3, or (at your 1110d565efSmrg option) any later version. 1210d565efSmrg 1310d565efSmrg GCC is distributed in the hope that it will be useful, but WITHOUT 1410d565efSmrg ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 1510d565efSmrg or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 1610d565efSmrg License for more details. 1710d565efSmrg 1810d565efSmrg You should have received a copy of the GNU General Public License 1910d565efSmrg along with GCC; see the file COPYING3. If not see 2010d565efSmrg <http://www.gnu.org/licenses/>. */ 2110d565efSmrg 2210d565efSmrg #define ANDROID_TARGET_OS_CPP_BUILTINS() \ 2310d565efSmrg do { \ 2410d565efSmrg if (TARGET_ANDROID) \ 2510d565efSmrg builtin_define ("__ANDROID__"); \ 2610d565efSmrg } while (0) 2710d565efSmrg 280fc04c29Smrg #define ANDROID_TARGET_D_OS_VERSIONS() \ 290fc04c29Smrg do { \ 300fc04c29Smrg if (TARGET_ANDROID) \ 310fc04c29Smrg builtin_version ("Android"); \ 320fc04c29Smrg } while (0) 330fc04c29Smrg 3410d565efSmrg #if ANDROID_DEFAULT 3510d565efSmrg # define NOANDROID "mno-android" 3610d565efSmrg #else 3710d565efSmrg # define NOANDROID "!mandroid" 3810d565efSmrg #endif 3910d565efSmrg 4010d565efSmrg #define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \ 4110d565efSmrg "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}" 4210d565efSmrg 4310d565efSmrg #define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \ 4410d565efSmrg "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}" 4510d565efSmrg 4610d565efSmrg #define ANDROID_LINK_SPEC \ 4710d565efSmrg "%{shared: -Bsymbolic}" 4810d565efSmrg 4910d565efSmrg #define ANDROID_CC1_SPEC \ 5010d565efSmrg "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \ 5110d565efSmrg "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}" 5210d565efSmrg 5310d565efSmrg #define ANDROID_CC1PLUS_SPEC \ 5410d565efSmrg "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ 5510d565efSmrg "%{!frtti:%{!fno-rtti: -fno-rtti}}" 5610d565efSmrg 5710d565efSmrg #define ANDROID_LIB_SPEC \ 5810d565efSmrg "%{!static: -ldl}" 5910d565efSmrg 6010d565efSmrg #define ANDROID_STARTFILE_SPEC \ 6110d565efSmrg "%{shared: crtbegin_so%O%s;:" \ 6210d565efSmrg " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}" 6310d565efSmrg 6410d565efSmrg #define ANDROID_ENDFILE_SPEC \ 6510d565efSmrg "%{shared: crtend_so%O%s;: crtend_android%O%s}" 66