]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/arc/linux.h
10c291cc432d9c75cb3845fd7663792412fb547f
[thirdparty/gcc.git] / gcc / config / arc / linux.h
1 /* Target macros for arc*-*-linux targets.
2
3 Copyright (C) 2017 Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public 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 /* Enable DWARF 2 exceptions. */
22 #undef DWARF2_UNWIND_INFO
23 #define DWARF2_UNWIND_INFO 1
24
25 #define TARGET_OS_CPP_BUILTINS() \
26 do \
27 { \
28 GNU_USER_TARGET_OS_CPP_BUILTINS (); \
29 } \
30 while (0)
31
32 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
33 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
34
35 /* Note that the default is to link against dynamic libraries, if they are
36 available. Override with -static. */
37 #undef LINK_SPEC
38 #define LINK_SPEC "%{h*} \
39 %{static:-Bstatic} \
40 %{shared:-shared} \
41 %{symbolic:-Bsymbolic} \
42 %{!static: \
43 %{rdynamic:-export-dynamic} \
44 %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
45 -X \
46 %{mbig-endian:-EB} %{EB} %{EL} \
47 %{!z:-z max-page-size=0x2000 -z common-page-size=0x2000} \
48 %{mcpu=nps400:-marclinux_nps; :-marclinux}"
49
50 #undef STARTFILE_SPEC
51 #define STARTFILE_SPEC \
52 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
53
54 #undef ENDFILE_SPEC
55 #define ENDFILE_SPEC \
56 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
57
58 #undef LIB_SPEC
59 #define LIB_SPEC \
60 "%{pthread:-lpthread} \
61 %{shared:-lc} \
62 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
63
64 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
65
66 /* No SDATA default for linux. */
67 #undef TARGET_SDATA_DEFAULT
68 #define TARGET_SDATA_DEFAULT 0
69
70 /* We have medium calls. */
71 #undef TARGET_MMEDIUM_CALLS_DEFAULT
72 #define TARGET_MMEDIUM_CALLS_DEFAULT 1
73
74 /* We do not have any MULTILIB_OPTIONS specified, so there are no
75 MULTILIB_DEFAULTS. */
76 #undef MULTILIB_DEFAULTS