Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / config / mips / linux64.h
bloba68e8b4da9bb8ef4f08b492e9df521ca7fbecac8
1 /* Definitions for MIPS running Linux-based GNU systems with ELF format
2 using n32/64 abi.
3 Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public 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 /* Force the default endianness and ABI flags onto the command line
23 in order to make the other specs easier to write. */
24 #undef DRIVER_SELF_SPECS
25 #define DRIVER_SELF_SPECS \
26 BASE_DRIVER_SELF_SPECS, \
27 LINUX_DRIVER_SELF_SPECS \
28 " %{!EB:%{!EL:%(endian_spec)}}" \
29 " %{!mabi=*: -mabi=n32}"
31 #undef LIB_SPEC
32 #define LIB_SPEC "\
33 %{pthread:-lpthread} \
34 %{shared:-lc} \
35 %{!shared: \
36 %{profile:-lc_p} %{!profile:-lc}}"
38 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
39 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
40 #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
41 #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
42 #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
43 #define LINUX_DYNAMIC_LINKERN32 \
44 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
45 BIONIC_DYNAMIC_LINKERN32)
47 #undef LINK_SPEC
48 #define LINK_SPEC "\
49 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
50 %{bestGnum} %{shared} %{non_shared} \
51 %{call_shared} %{no_archive} %{exact_version} \
52 %(endian_spec) \
53 %{!shared: \
54 %{!ibcs: \
55 %{!static: \
56 %{rdynamic:-export-dynamic} \
57 %{!dynamic-linker: \
58 %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \
59 %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \
60 %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}} \
61 %{static:-static}}} \
62 %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
63 %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
64 %{mabi=32:-melf32%{EB:b}%{EL:l}tsmip}"
66 #undef LOCAL_LABEL_PREFIX
67 #define LOCAL_LABEL_PREFIX (TARGET_OLDABI ? "$" : ".")
69 /* GNU/Linux doesn't use the same floating-point format that IRIX uses
70 for long double. There's no need to override this here, since
71 ieee_quad_format is the default, but let's put this here to make
72 sure nobody thinks we just forgot to set it to something else. */
73 #define MIPS_TFMODE_FORMAT mips_quad_format