1 /* Configuration file for ARM GNU/Linux EABI targets. 2 Copyright (C) 2004-2015 Free Software Foundation, Inc. 3 Contributed by CodeSourcery, LLC 4 5 This file is part of GCC. 6 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 9 by the Free Software Foundation; either version 3, or (at your 10 option) any later version. 11 12 GCC is distributed in the hope that it will be useful, but WITHOUT 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 15 License for more details. 16 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/>. */ 20 21 /* On EABI GNU/Linux, we want both the BPABI builtins and the 22 GNU/Linux builtins. */ 23 #undef TARGET_OS_CPP_BUILTINS 24 #define TARGET_OS_CPP_BUILTINS() \ 25 do \ 26 { \ 27 TARGET_BPABI_CPP_BUILTINS(); \ 28 GNU_USER_TARGET_OS_CPP_BUILTINS(); \ 29 ANDROID_TARGET_OS_CPP_BUILTINS(); \ 30 } \ 31 while (false) 32 33 /* We default to a soft-float ABI so that binaries can run on all 34 target hardware. If you override this to use the hard-float ABI then 35 change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well. */ 36 #undef TARGET_DEFAULT_FLOAT_ABI 37 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT 38 39 /* We default to the "aapcs-linux" ABI so that enums are int-sized by 40 default. */ 41 #undef ARM_DEFAULT_ABI 42 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX 43 44 /* Default to armv5t so that thumb shared libraries work. 45 The ARM10TDMI core is the default for armv5t, so set 46 SUBTARGET_CPU_DEFAULT to achieve this. */ 47 #undef SUBTARGET_CPU_DEFAULT 48 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi 49 50 /* TARGET_BIG_ENDIAN_DEFAULT is set in 51 config.gcc for big endian configurations. */ 52 #undef TARGET_LINKER_EMULATION 53 #if TARGET_BIG_ENDIAN_DEFAULT 54 #define TARGET_LINKER_EMULATION "armelfb_linux_eabi" 55 #else 56 #define TARGET_LINKER_EMULATION "armelf_linux_eabi" 57 #endif 58 59 #undef SUBTARGET_EXTRA_LINK_SPEC 60 #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION 61 62 /* GNU/Linux on ARM currently supports three dynamic linkers: 63 - ld-linux.so.2 - for the legacy ABI 64 - ld-linux.so.3 - for the EABI-derived soft-float ABI 65 - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI. 66 All the dynamic linkers live in /lib. 67 We default to soft-float, but this can be overridden by changing both 68 GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ 69 70 #undef GLIBC_DYNAMIC_LINKER 71 #define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" 72 #define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" 73 #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT 74 75 #define GLIBC_DYNAMIC_LINKER \ 76 "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \ 77 %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ 78 %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" 79 80 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to 81 use the GNU/Linux version, not the generic BPABI version. */ 82 #undef LINK_SPEC 83 #define LINK_SPEC EABI_LINK_SPEC \ 84 LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ 85 LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) 86 87 #undef ASAN_CC1_SPEC 88 #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" 89 90 #undef CC1_SPEC 91 #define CC1_SPEC \ 92 LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC, \ 93 GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC " " \ 94 ANDROID_CC1_SPEC) 95 96 #define CC1PLUS_SPEC \ 97 LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC) 98 99 #undef LIB_SPEC 100 #define LIB_SPEC \ 101 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \ 102 GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC) 103 104 #undef STARTFILE_SPEC 105 #define STARTFILE_SPEC \ 106 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC) 107 108 #undef ENDFILE_SPEC 109 #define ENDFILE_SPEC \ 110 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) 111 112 /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we 113 do not use -lfloat. */ 114 #undef LIBGCC_SPEC 115 116 /* Clear the instruction cache from `beg' to `end'. This is 117 implemented in lib1funcs.S, so ensure an error if this definition 118 is used. */ 119 #undef CLEAR_INSN_CACHE 120 #define CLEAR_INSN_CACHE(BEG, END) not_used 121 122 #define ARM_TARGET2_DWARF_FORMAT (DW_EH_PE_pcrel | DW_EH_PE_indirect) 123