1 /* Machine description for AArch64 architecture.
2 Copyright (C) 2009-2014 Free Software Foundation, Inc.
3 Contributed by ARM Ltd.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef GCC_AARCH64_LINUX_H
22 #define GCC_AARCH64_LINUX_H
24 #ifndef RUNTIME_ROOT_PREFIX
25 #define RUNTIME_ROOT_PREFIX ""
27 #define GLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
29 #define CPP_SPEC "%{pthread:-D_REENTRANT}"
32 #define LINUX_TARGET_LINK_SPEC "%{h*} \
35 %{symbolic:-Bsymbolic} \
36 %{rdynamic:-export-dynamic} \
37 -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
39 %{mbig-endian:-EB} %{mlittle-endian:-EL} \
40 -maarch64linux%{mbig-endian:b}"
42 /* Android specific */
43 #ifndef LINUX_OR_ANDROID_CC
44 #define ANDROID_TARGET_OS_CPP_BUILTINS()
47 #define TARGET_OS_CPP_BUILTINS() \
50 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
51 ANDROID_TARGET_OS_CPP_BUILTINS(); \
55 /* Android specific macros. Should probably be
56 moved into android specific header file aarch64-linux-android.h
57 and include it in tm.h (see gcc/config.gcc). */
59 #ifdef LINUX_OR_ANDROID_CC
63 LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
64 LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
68 LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
69 GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
71 #define CC1PLUS_SPEC \
72 LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
76 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
77 GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
80 #define STARTFILE_SPEC \
81 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
84 #define ENDFILE_SPEC \
85 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
89 #endif /* GCC_AARCH64_LINUX_H */