]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/alpha/linux.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / alpha / linux.h
CommitLineData
96297568 1/* Definitions of target machine for GNU compiler,
2 for Alpha Linux-based GNU systems.
f1717362 3 Copyright (C) 1996-2016 Free Software Foundation, Inc.
96297568 4 Contributed by Richard Henderson.
b8cfc4f5 5
187b36cf 6This file is part of GCC.
b8cfc4f5 7
187b36cf 8GCC is free software; you can redistribute it and/or modify
b8cfc4f5 9it under the terms of the GNU General Public License as published by
038d1e19 10the Free Software Foundation; either version 3, or (at your option)
b8cfc4f5 11any later version.
12
187b36cf 13GCC is distributed in the hope that it will be useful,
b8cfc4f5 14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
038d1e19 19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
b8cfc4f5 21
36a259fd 22#define TARGET_OS_CPP_BUILTINS() \
23 do { \
24 builtin_define ("__gnu_linux__"); \
25 builtin_define ("_LONGLONG"); \
26 builtin_define_std ("linux"); \
27 builtin_define_std ("unix"); \
28 builtin_assert ("system=linux"); \
bcc76966 29 builtin_assert ("system=unix"); \
30 builtin_assert ("system=posix"); \
08eedad6 31 /* The GNU C++ standard library requires this. */ \
71c97472 32 if (c_dialect_cxx ()) \
08eedad6 33 builtin_define ("_GNU_SOURCE"); \
36a259fd 34 } while (0)
b8cfc4f5 35
36#undef LIB_SPEC
d83b3ef0 37#define LIB_SPEC \
ec5fe4f6 38 "%{pthread:-lpthread} \
39 %{shared:-lc} \
40 %{!shared: %{profile:-lc_p}%{!profile:-lc}}"
b8cfc4f5 41
a2a5e014 42#undef CPP_SPEC
fc7dfeb9 43#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
44
b8cfc4f5 45/* Show that we need a GP when profiling. */
30dceb30 46#undef TARGET_PROFILING_NEEDS_GP
b9a5aa8e 47#define TARGET_PROFILING_NEEDS_GP 1
48
49/* Don't care about faults in the prologue. */
50#undef TARGET_CAN_FAULT_IN_PROLOGUE
51#define TARGET_CAN_FAULT_IN_PROLOGUE 1
9a3f437f 52
8952c876 53/* OS fixes up EV5 data fault on prefetch. */
54#undef TARGET_FIXUP_EV5_PREFETCH
55#define TARGET_FIXUP_EV5_PREFETCH 1
56
9a3f437f 57#undef WCHAR_TYPE
58#define WCHAR_TYPE "int"
b38908c1 59
d9993a19 60#ifdef SINGLE_LIBC
61#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
981702f2 62#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
63#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
f2d678af 64#undef OPTION_MUSL
65#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
d9993a19 66#else
c923aba8 67#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
981702f2 68#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
69#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
f2d678af 70#undef OPTION_MUSL
71#define OPTION_MUSL (linux_libc == LIBC_MUSL)
d9993a19 72#endif
c923aba8 73
30f690e0 74/* Determine what functions are present at the runtime;
75 this includes full c99 runtime and sincos. */
76#undef TARGET_LIBC_HAS_FUNCTION
0cc3ad67 77#define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
164951a6 78
6073aca2 79#define TARGET_POSIX_IO
08684909 80
f9d6db02 81#define LINK_GCC_C_SEQUENCE_SPEC \
82 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
83
be4e8b82 84/* Use --as-needed -lgcc_s for eh support. */
85#ifdef HAVE_LD_AS_NEEDED
86#define USE_LD_AS_NEEDED 1
87#endif
88
4257b08a 89/* Define if long doubles should be mangled as 'g'. */
90#define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
68ecbaec 91
92/* -mcpu=native handling only makes sense with compiler running on
93 an Alpha chip. */
94#if defined(__alpha__) || defined(__alpha)
95extern const char *host_detect_local_cpu (int argc, const char **argv);
96# define EXTRA_SPEC_FUNCTIONS \
97 { "local_cpu_detect", host_detect_local_cpu },
98
99# define MCPU_MTUNE_NATIVE_SPECS \
100 " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}" \
101 " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
102#else
103# define MCPU_MTUNE_NATIVE_SPECS ""
104#endif
105
106#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS