]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/mips/linux64.h
re PR target/24837 (move dynamic linker names out of LINK_SPEC and into new DYNAMIC_L...
[thirdparty/gcc.git] / gcc / config / mips / linux64.h
CommitLineData
3bd6d4c4
AO
1/* Definitions for MIPS running Linux-based GNU systems with ELF format
2 using n32/64 abi.
7bd85ce0 3 Copyright 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
3bd6d4c4
AO
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING. If not, write to
39d14dda
KC
19the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20Boston, MA 02110-1301, USA. */
3bd6d4c4 21
2184a120
RS
22/* Force the default endianness and ABI flags onto the command line
23 in order to make the other specs easier to write. */
3bd6d4c4 24#define DRIVER_SELF_SPECS \
c0a579df 25"%{!EB:%{!EL:%(endian_spec)}}", \
2184a120 26"%{!mabi=*: -mabi=n32}"
c0a579df 27
3bd6d4c4
AO
28#undef SUBTARGET_ASM_SPEC
29#define SUBTARGET_ASM_SPEC "\
30%{!fno-PIC:%{!fno-pic:-KPIC}} \
2184a120 31%{fno-PIC:-non_shared} %{fno-pic:-non_shared}"
3bd6d4c4
AO
32
33#undef LIB_SPEC
34#define LIB_SPEC "\
fb9fc9f9 35%{shared: -lc} \
fb9fc9f9
AO
36%{!shared: %{pthread:-lpthread} \
37 %{profile:-lc_p} %{!profile: -lc}}"
3bd6d4c4 38
7bd85ce0
JM
39#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
40#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
41#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
42#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
43#define LINUX_DYNAMIC_LINKERN32 \
44 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
45
3bd6d4c4
AO
46#undef LINK_SPEC
47#define LINK_SPEC "\
48%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
49%{bestGnum} %{shared} %{non_shared} \
50%{call_shared} %{no_archive} %{exact_version} \
51 %(endian_spec) \
52 %{!shared: \
53 %{!ibcs: \
54 %{!static: \
55 %{rdynamic:-export-dynamic} \
56 %{!dynamic-linker: \
7bd85ce0
JM
57 %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \
58 %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \
59 %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}} \
3bd6d4c4 60 %{static:-static}}} \
c0a579df
AO
61%{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
62%{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
63%{mabi=32:-melf32%{EB:b}%{EL:l}tsmip}"
3bd6d4c4 64
3bd6d4c4 65#undef LOCAL_LABEL_PREFIX
7f9be256 66#define LOCAL_LABEL_PREFIX (TARGET_OLDABI ? "$" : ".")
3bd6d4c4
AO
67
68/* The size in bytes of a DWARF field indicating an offset or length
69 relative to a debug info section, specified to be 4 bytes in the DWARF-2
70 specification. The SGI/MIPS ABI defines it to be the same as PTR_SIZE. */
71#define DWARF_OFFSET_SIZE PTR_SIZE
72
3bd6d4c4
AO
73/* GNU/Linux doesn't use the same floating-point format that IRIX uses
74 for long double. There's no need to override this here, since
75 ieee_quad_format is the default, but let's put this here to make
76 sure nobody thinks we just forgot to set it to something else. */
fe0002ee 77#define MIPS_TFMODE_FORMAT mips_quad_format