2014-07-30 Robert Dewar <dewar@adacore.com>
[official-gcc.git] / gcc / common / common-target.def
blob61f78a256cb11419b94b13095a78d315f3c7cdd4
1 /* Target hook definitions for common hooks.
2 Copyright (C) 2011-2014 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 3, or (at your option) any
7 later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
18 /* See target-hooks-macros.h for details of macros that should be
19 provided by the including file, and how to use them here. */
20 #include "target-hooks-macros.h"
22 #undef HOOK_TYPE
23 #define HOOK_TYPE "Common Target Hook"
25 HOOK_VECTOR (TARGETM_COMMON_INITIALIZER, gcc_targetm_common)
27 #undef HOOK_PREFIX
28 #define HOOK_PREFIX "TARGET_"
30 /* Handle target switch DECODED for options structures OPTS and
31 OPTS_SET, at location LOC. Return true if the switch was valid. */
32 DEFHOOK
33 (handle_option,
34 "",
35 bool, (struct gcc_options *opts, struct gcc_options *opts_set,
36 const struct cl_decoded_option *decoded,
37 location_t loc),
38 default_target_handle_option)
40 DEFHOOK
41 (option_init_struct,
42 "Set target-dependent initial values of fields in @var{opts}.",
43 void, (struct gcc_options *opts),
44 hook_void_gcc_optionsp)
46 /* Set default optimizations for the target. */
47 DEFHOOKPOD
48 (option_optimization_table,
49 "",
50 const struct default_options *, empty_optimization_table)
52 DEFHOOK
53 (option_default_params,
54 "Set target-dependent default values for @option{--param} settings, using\
55 calls to @code{set_default_param_value}.",
56 void, (void),
57 hook_void_void)
59 /* The initial value of target_flags. */
60 DEFHOOKPOD
61 (default_target_flags,
62 "",
63 int, 0)
65 /* Determine the type of unwind info to emit for exceptions. */
66 DEFHOOK
67 (except_unwind_info,
68 "",
69 enum unwind_info_type, (struct gcc_options *opts),
70 default_except_unwind_info)
72 DEFHOOK
73 (supports_split_stack,
74 "Whether this target supports splitting the stack when the options\
75 described in @var{opts} have been passed. This is called\
76 after options have been parsed, so the target may reject splitting\
77 the stack in some configurations. The default version of this hook\
78 returns false. If @var{report} is true, this function may issue a warning\
79 or error; if @var{report} is false, it must simply return a value",
80 bool, (bool report, struct gcc_options *opts),
81 hook_bool_bool_gcc_optionsp_false)
83 /* Leave the boolean fields at the end. */
85 /* True if unwinding tables should be generated by default. */
86 DEFHOOKPOD
87 (unwind_tables_default,
88 "",
89 bool, false)
91 /* True if arbitrary sections are supported. */
92 DEFHOOKPOD
93 (have_named_sections,
94 "",
95 bool, true)
97 DEFHOOKPOD
98 (always_strip_dotdot,
99 "True if @file{..} components should always be removed from directory names\
100 computed relative to GCC's internal directories, false (default) if such\
101 components should be preserved and directory names containing them passed\
102 to other tools such as the linker.",
103 bool, false)
105 HOOK_VECTOR_END (C90_EMPTY_HACK)
107 #undef HOOK_PREFIX