annotate gcc/config/alpha/linux.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 for Alpha Linux-based GNU systems.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 Copyright (C) 1996-2018 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 Contributed by Richard Henderson.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 the Free Software Foundation; either version 3, or (at your option)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 GNU General Public License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 #define TARGET_OS_CPP_BUILTINS() \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 builtin_define ("__gnu_linux__"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 builtin_define ("_LONGLONG"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 builtin_define_std ("linux"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 builtin_define_std ("unix"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 builtin_assert ("system=linux"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 builtin_assert ("system=unix"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 builtin_assert ("system=posix"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 /* The GNU C++ standard library requires this. */ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 if (c_dialect_cxx ()) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 builtin_define ("_GNU_SOURCE"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 #undef LIB_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 #define LIB_SPEC \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 "%{pthread:-lpthread} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 %{shared:-lc} \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 %{!shared: %{profile:-lc_p}%{!profile:-lc}}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 #undef CPP_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 /* Show that we need a GP when profiling. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 #undef TARGET_PROFILING_NEEDS_GP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 #define TARGET_PROFILING_NEEDS_GP 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 /* Don't care about faults in the prologue. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 #undef TARGET_CAN_FAULT_IN_PROLOGUE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #define TARGET_CAN_FAULT_IN_PROLOGUE 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 /* OS fixes up EV5 data fault on prefetch. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 #undef TARGET_FIXUP_EV5_PREFETCH
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 #define TARGET_FIXUP_EV5_PREFETCH 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 #undef WCHAR_TYPE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 #define WCHAR_TYPE "int"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
60 #ifdef SINGLE_LIBC
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
61 #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
111
kono
parents: 67
diff changeset
62 #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
kono
parents: 67
diff changeset
63 #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
kono
parents: 67
diff changeset
64 #undef OPTION_MUSL
kono
parents: 67
diff changeset
65 #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
66 #else
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
67 #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
111
kono
parents: 67
diff changeset
68 #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
kono
parents: 67
diff changeset
69 #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
kono
parents: 67
diff changeset
70 #undef OPTION_MUSL
kono
parents: 67
diff changeset
71 #define OPTION_MUSL (linux_libc == LIBC_MUSL)
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
72 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
111
kono
parents: 67
diff changeset
74 /* Determine what functions are present at the runtime;
kono
parents: 67
diff changeset
75 this includes full c99 runtime and sincos. */
kono
parents: 67
diff changeset
76 #undef TARGET_LIBC_HAS_FUNCTION
kono
parents: 67
diff changeset
77 #define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 #define TARGET_POSIX_IO
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
81 /* Provide a STARTFILE_SPEC appropriate for ELF. Here we add the
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
82 (even more) magical crtbegin.o file which provides part of the
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
83 support for getting C++ file-scope static object constructed
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
84 before entering `main'. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
85
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
86 #undef STARTFILE_SPEC
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
87 #ifdef HAVE_LD_PIE
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
88 #define STARTFILE_SPEC \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
89 "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
90 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
91 #else
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
92 #define STARTFILE_SPEC \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
93 "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
94 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
95 #endif
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
96
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
97 /* Provide a ENDFILE_SPEC appropriate for ELF. Here we tack on the
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
98 magical crtend.o file which provides part of the support for
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
99 getting C++ file-scope static object constructed before entering
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
100 `main', followed by a normal ELF "finalizer" file, `crtn.o'. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
101
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
102 #undef ENDFILE_SPEC
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
103 #define ENDFILE_SPEC \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
104 "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
105 %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
106
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 #define LINK_GCC_C_SEQUENCE_SPEC \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
108 "%{static|static-pie:--start-group} %G %{!nolibc:%L} \
111
kono
parents: 67
diff changeset
109 %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 /* Use --as-needed -lgcc_s for eh support. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 #ifdef HAVE_LD_AS_NEEDED
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 #define USE_LD_AS_NEEDED 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 /* Define if long doubles should be mangled as 'g'. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 /* -mcpu=native handling only makes sense with compiler running on
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 an Alpha chip. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 #if defined(__alpha__) || defined(__alpha)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 extern const char *host_detect_local_cpu (int argc, const char **argv);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 # define EXTRA_SPEC_FUNCTIONS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 { "local_cpu_detect", host_detect_local_cpu },
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 # define MCPU_MTUNE_NATIVE_SPECS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 # define MCPU_MTUNE_NATIVE_SPECS ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 #define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS