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