1/* Definitions of target machine for GNU compiler,
2   for Alpha NetBSD systems.
3   Copyright (C) 1998-2022 Free Software Foundation, Inc.
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 3, 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 COPYING3.  If not see
19<http://www.gnu.org/licenses/>.  */
20
21#define TARGET_OS_CPP_BUILTINS()		\
22    do {					\
23	NETBSD_OS_CPP_BUILTINS_ELF();		\
24    } while (0)
25
26
27/* NetBSD doesn't use the LANGUAGE* built-ins.  */
28#undef SUBTARGET_LANGUAGE_CPP_BUILTINS
29#define SUBTARGET_LANGUAGE_CPP_BUILTINS()	/* nothing */
30
31
32/* Show that we need a GP when profiling.  */
33#undef TARGET_PROFILING_NEEDS_GP
34#define TARGET_PROFILING_NEEDS_GP 1
35
36
37/* Provide a CPP_SPEC appropriate for NetBSD/alpha.  We use
38   this to pull in CPP specs that all NetBSD configurations need.  */
39
40#undef CPP_SPEC
41#define CPP_SPEC NETBSD_CPP_SPEC
42
43#undef EXTRA_SPECS
44#define EXTRA_SPECS NETBSD_SUBTARGET_EXTRA_SPECS
45#undef SUBTARGET_EXTRA_SPECS
46
47/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target.  */
48
49#undef LINK_SPEC
50#define LINK_SPEC \
51  "%{G*} %{relax:-relax} \
52   %{O*:-O3} %{!O*:-O1} \
53   %(netbsd_link_spec)"
54
55#define NETBSD_ENTRY_POINT "__start"
56
57/* Provide a STARTFILE_SPEC appropriate for NetBSD.  Here we add the
58   (even more) magical crtbegin.o file which provides part of the
59   support for getting C++ file-scope static object constructed
60   before entering `main'.  */
61
62#undef	STARTFILE_SPEC
63#define STARTFILE_SPEC \
64  "%{!shared: %{pg|p:gcrt0.o%s;:crt0.o%s}}\
65   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
66
67/* Provide an ENDFILE_SPEC appropriate for NetBSD/alpha ELF.  Here we
68   add crtend.o, which provides part of the support for getting
69   C++ file-scope static objects deconstructed after exiting "main".
70
71   We also need to handle the GCC option `-ffast-math'.  */
72
73#undef ENDFILE_SPEC
74#define ENDFILE_SPEC		\
75  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfm%O%s} \
76   %(netbsd_endfile_spec)"
77
78#define HAVE_ENABLE_EXECUTE_STACK
79