OSDN Git Service

63ff8375ec7f9dc4ca36ec0f95d4458b568cd1e1
[pf3gnuchains/gcc-fork.git] / gcc / config / alpha / netbsd.h
1 /* Definitions of target machine for GNU compiler,
2    for Alpha NetBSD systems.
3    Copyright (C) 1998, 2002, 2003, 2004, 2005 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 2, 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 COPYING.  If not, write to
19 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.  */
21
22 #undef TARGET_DEFAULT
23 #define TARGET_DEFAULT (MASK_FPREGS | MASK_GAS)
24
25 #define TARGET_OS_CPP_BUILTINS()                \
26     do {                                        \
27         NETBSD_OS_CPP_BUILTINS_ELF();           \
28     } while (0)
29
30
31 /* NetBSD doesn't use the LANGUAGE* built-ins.  */
32 #undef SUBTARGET_LANGUAGE_CPP_BUILTINS
33 #define SUBTARGET_LANGUAGE_CPP_BUILTINS()       /* nothing */
34
35
36 /* Show that we need a GP when profiling.  */
37 #undef TARGET_PROFILING_NEEDS_GP
38 #define TARGET_PROFILING_NEEDS_GP 1
39
40
41 /* Provide a CPP_SPEC appropriate for NetBSD/alpha.  We use
42    this to pull in CPP specs that all NetBSD configurations need.  */
43
44 #undef CPP_SPEC
45 #define CPP_SPEC NETBSD_CPP_SPEC
46
47 #undef EXTRA_SPECS
48 #define EXTRA_SPECS                     \
49   { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \
50   { "netbsd_entry_point", NETBSD_ENTRY_POINT }, \
51   { "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC },
52
53
54 /* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target.  */
55
56 #undef LINK_SPEC
57 #define LINK_SPEC \
58   "%{G*} %{relax:-relax} \
59    %{O*:-O3} %{!O*:-O1} \
60    %(netbsd_link_spec)"
61
62 #define NETBSD_ENTRY_POINT "__start"
63
64
65 /* Provide an ENDFILE_SPEC appropriate for NetBSD/alpha ELF.  Here we
66    add crtend.o, which provides part of the support for getting
67    C++ file-scope static objects deconstructed after exiting "main".
68
69    We also need to handle the GCC option `-ffast-math'.  */
70
71 #undef ENDFILE_SPEC
72 #define ENDFILE_SPEC            \
73   "%{ffast-math|funsafe-math-optimizations:crtfm%O%s} \
74    %(netbsd_endfile_spec)"
75
76
77 /* Attempt to enable execute permissions on the stack.  */
78
79 #define ENABLE_EXECUTE_STACK NETBSD_ENABLE_EXECUTE_STACK
80
81
82 #undef TARGET_VERSION
83 #define TARGET_VERSION fprintf (stderr, " (NetBSD/alpha ELF)");