osprey-gcc-4.2.0/gcc/gcc.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "multilib.h"
#include "tm.h"
#include <signal.h>
#include "xregex.h"
#include "obstack.h"
#include "intl.h"
#include "prefix.h"
#include "gcc.h"
#include "flags.h"
#include "opts.h"
#include "configargs.h"
#include "specs.h"

Include dependency graph for gcc.c:

Go to the source code of this file.

Data Types

type  default_spec
type  user_specs
type  compiler
type  option_map
type  prefix_list
type  path_prefix
type  spec_list
type  temp_name
type  temp_file
type  add_to_obstack_info
type  file_at_path_info
type  switchstr
type  infile
type  spec_path_info
type  mdswitchstr

Defines

#define HOST_EXECUTABLE_SUFFIX   ""
#define TARGET_OBJECT_SUFFIX   ".o"
#define LIBRARY_PATH_ENV   "LIBRARY_PATH"
#define kill(p, s)   raise(s)
#define MIN_FATAL_STATUS   1
#define ASM_SPEC   ""
#define ASM_FINAL_SPEC   ""
#define CPP_SPEC   ""
#define CC1_SPEC   ""
#define CC1PLUS_SPEC   ""
#define LINK_SPEC   ""
#define LIB_SPEC   "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
#define MFWRAP_SPEC   " %{static: %{fmudflap|fmudflapth: \ --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc\ --wrap=mmap --wrap=munmap --wrap=alloca\} %{fmudflapth: --wrap=pthread_create\}} %{fmudflap|fmudflapth: --wrap=main}"
#define MFLIB_SPEC   "%{fmudflap|fmudflapth: -export-dynamic}"
#define LIBGCC_SPEC   "-lgcc"
#define STARTFILE_SPEC   "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}"
#define SWITCHES_NEED_SPACES   ""
#define ENDFILE_SPEC   ""
#define LINKER_NAME   "collect2"
#define ASM_DEBUG_SPEC   ""
#define LINK_GCC_C_SEQUENCE_SPEC   "%G %L %G"
#define LINK_SSP_SPEC   "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}"
#define LINK_PIE_SPEC   "%{pie:} "
#define LINK_COMMAND_SPEC   "\%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\ %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\ %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
#define LINK_LIBGCC_SPEC   "%D"
#define STARTFILE_PREFIX_SPEC   ""
#define SYSROOT_SPEC   "--sysroot=%R"
#define SYSROOT_SUFFIX_SPEC   ""
#define SYSROOT_HEADERS_SUFFIX_SPEC   ""
#define MULTILIB_DEFAULTS   { "" }
#define DRIVER_SELF_SPECS   ""
#define GOMP_SELF_SPECS   "%{fopenmp: -pthread}"
#define OPTION_DEFAULT_SPECS   { "", "" }
#define SWITCH_TAKES_ARG(CHAR)   DEFAULT_SWITCH_TAKES_ARG(CHAR)
#define WORD_SWITCH_TAKES_ARG(STR)   DEFAULT_WORD_SWITCH_TAKES_ARG (STR)
#define STANDARD_STARTFILE_PREFIX_1   "/lib/"
#define STANDARD_STARTFILE_PREFIX_2   "/usr/lib/"
#define MD_EXEC_PREFIX   ""
#define MD_STARTFILE_PREFIX   ""
#define MD_STARTFILE_PREFIX_1   ""
#define INIT_STATIC_SPEC(NAME, PTR)   { NAME, NULL, PTR, (struct spec_list *) 0, sizeof (NAME) - 1, 0 }
#define DELETE_IF_ORDINARY(NAME, ST, VERBOSE_FLAG)
#define SWITCH_OK   0
#define SWITCH_FALSE   -1
#define SWITCH_IGNORE   -2
#define SWITCH_LIVE   1
#define SKIP_WHITE()   do { while (*p == ' ' || *p == '\t') p++; } while (0)
#define SKIP_WHITE()   do { while (*p == ' ' || *p == '\t') p++; } while (0)

Enumerations

enum  path_prefix_priority {
  PREFIX_PRIORITY_B_OPT, PREFIX_PRIORITY_LAST, PREFIX_PRIORITY_B_OPT, PREFIX_PRIORITY_LAST,
  PREFIX_PRIORITY_B_OPT, PREFIX_PRIORITY_LAST, PREFIX_PRIORITY_B_OPT, PREFIX_PRIORITY_LAST
}

Functions/Subroutines

static void init_spec (void)
static void store_arg (const char *, int, int)
static char * load_specs (const char *)
static void read_specs (const char *, int)
static void set_spec (const char *, const char *)
static struct compilerlookup_compiler (const char *, size_t, const char *)
static char * build_search_list (const struct path_prefix *, const char *, bool, bool)
static void putenv_from_prefixes (const struct path_prefix *, const char *, bool)
static int access_check (const char *, int)
static char * find_a_file (const struct path_prefix *, const char *, int, bool)
static void add_prefix (struct path_prefix *, const char *, const char *, int, int, int)
static void add_sysrooted_prefix (struct path_prefix *, const char *, const char *, int, int, int)
static void translate_options (int *, const char *const **)
static char * skip_whitespace (char *)
static void delete_if_ordinary (const char *)
static void delete_temp_files (void)
static void delete_failure_queue (void)
static void clear_failure_queue (void)
static int check_live_switch (int, int)
static const char * handle_braces (const char *)
static bool input_suffix_matches (const char *, const char *)
static bool switch_matches (const char *, const char *, int)
static void mark_matching_switches (const char *, const char *, int)
static void process_marked_switches (void)
static const char * process_brace_body (const char *, const char *, const char *, int, int)
static struct spec_functionlookup_spec_function (const char *)
static const char * eval_spec_function (const char *, const char *)
static const char * handle_spec_function (const char *)
static char * save_string (const char *, int)
static void set_collect_gcc_options (void)
static int do_spec_1 (const char *, int, const char *)
static int do_spec_2 (const char *)
static void do_option_spec (const char *, const char *)
static void do_self_spec (const char *)
static const char * find_file (const char *)
static int is_directory (const char *, bool)
static const char * validate_switches (const char *)
static void validate_all_switches (void)
static void validate_switches_from_spec (const char *)
static void give_switch (int, int)
static int used_arg (const char *, int)
static int default_arg (const char *, int)
static void set_multilib_dir (void)
static void print_multilib_info (void)
static void perror_with_name (const char *)
static void fatal_ice (const char *,...)
static void alloc_args (void)
static void clear_args (void)
void record_temp_file (const char *filename, int always_delete, int fail_delete)
static voidfor_each_path (const struct path_prefix *paths, bool do_multi, size_t extra_space, void *(*callback)(char *, void *), void *callback_info)
static voidadd_to_obstack (char *path, void *data)
static voidfile_at_path (char *path, void *data)
static int execute (void)
static void display_help (void)
static void add_preprocessor_option (const char *option, int len)
static void add_assembler_option (const char *option, int len)
static void add_linker_option (const char *option, int len)
static void process_command (int argc, const char **argv)
int do_spec (const char *spec)
static voidspec_path (char *path, void *data)
void set_input (const char *filename)
static void fatal_error (int signum)
int main (int, char **)
int main (int argc, char **argv)
void pfatal_with_name (const char *name)
void fancy_abort (const char *file, int line, const char *func)
void fatal (const char *cmsgid,...)
void error (const char *gmsgid,...)
static void notice (const char *cmsgid,...)
static const char * if_exists_spec_function (int argc, const char **argv)
static const char * if_exists_else_spec_function (int argc, const char **argv)
static const char * replace_outfile_spec_function (int argc, const char **argv)
static int compare_version_strings (const char *v1, const char *v2)
static const char * version_compare_spec_function (int argc, const char **argv)
static const char * include_spec_function (int argc, const char **argv)

Variables

static const char dir_separator_str [] = { DIR_SEPARATOR, 0 }
int is_cpp_driver
static int pass_exit_codes
static int print_search_dirs
static const char * print_file_name = NULL
static const char * print_prog_name = NULL
static int print_multi_directory
static int print_multi_os_directory
static int print_multi_lib
static int print_help_list
static int verbose_flag
static int verbose_only_flag
static int target_help_flag
static int report_times
static const char * target_system_root = 0
static int target_system_root_changed
static const char * target_sysroot_suffix = 0
static const char * target_sysroot_hdrs_suffix = 0
static int save_temps_flag
static int combine_flag = 0
static int use_pipes
static const char * compiler_version
static const char *const spec_version = DEFAULT_TARGET_VERSION
static const char * spec_machine = DEFAULT_TARGET_MACHINE
static const char * cross_compile = "0"
static int error_count = 0
static int greatest_status = 1
static struct obstack obstack
static struct obstack collect_obstack
static const char * cpp_unique_options
static const char * cpp_options
static const char * cpp_debug_options = "%{d*}"
static const char * cc1_options
static const char * asm_options
static const char * invoke_as
static struct obstack multilib_obstack
static const char * multilib_select
static const char * multilib_matches
static const char * multilib_defaults
static const char * multilib_exclusions
static const char *const multilib_defaults_raw [] = MULTILIB_DEFAULTS
static const char *const driver_self_specs []
static struct default_spec option_default_specs [] = { OPTION_DEFAULT_SPECS }
static struct user_specsuser_specs_head
static struct user_specsuser_specs_tail
static struct compilercompilers
static int n_compilers
static struct compiler default_compilers []
static const int n_default_compilers = ARRAY_SIZE (default_compilers) - 1
static int n_linker_options
static char ** linker_options
static int n_assembler_options
static char ** assembler_options
static int n_preprocessor_options
static char ** preprocessor_options
static struct option_map option_map []
static struct path_prefix exec_prefixes = { 0, 0, "exec" }
static struct path_prefix startfile_prefixes = { 0, 0, "startfile" }
static struct path_prefix include_prefixes = { 0, 0, "include" }
static const char * machine_suffix = 0
static const char * just_machine_suffix = 0
static const char * gcc_exec_prefix
static const char * gcc_libexec_prefix
static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX
static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/"
static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/"
static const char * md_exec_prefix = MD_EXEC_PREFIX
static const char * md_startfile_prefix = MD_STARTFILE_PREFIX
static const char * md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1
static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX
static const char *const standard_startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1
static const char *const standard_startfile_prefix_2 = STANDARD_STARTFILE_PREFIX_2
static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX
static const char * tooldir_prefix
static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX
static const char * standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX
static const char * multilib_dir
static const char * multilib_os_dir
static struct spec_list static_specs []
static struct spec_listspecs = (struct spec_list *) 0
static struct spec_function static_spec_functions []
static int processing_spec_function
static const char ** argbuf
static int argbuf_length
static int argbuf_index
static int have_o_argbuf_index = 0
static int have_c = 0
static int have_o = 0
static struct temp_nametemp_names
static int execution_count
static int signal_count
static const char * programname
static const char * temp_filename
static int temp_filename_length
static struct temp_filealways_delete_queue
static struct temp_filefailure_delete_queue
static struct switchstrswitches
static int n_switches
static struct infileinfiles
int n_infiles
static bool combine_inputs
static int added_libraries
const char ** outfiles
static const char * input_filename
static int input_file_number
size_t input_filename_length
static int basename_length
static int suffixed_basename_length
static const char * input_basename
static const char * input_suffix
static struct stat input_stat
static int input_stat_set
static struct compilerinput_file_compiler
static int arg_going
static int delete_this_arg
static int this_is_output_file
static int this_is_library_file
static int input_from_pipe
static const char * suffix_subst
static struct mdswitchstrmdswitches
static int n_mdswitches


Define Documentation

#define ASM_DEBUG_SPEC   ""

#define ASM_FINAL_SPEC   ""

#define ASM_SPEC   ""

#define CC1_SPEC   ""

#define CC1PLUS_SPEC   ""

#define CPP_SPEC   ""

#define DELETE_IF_ORDINARY ( NAME,
ST,
VERBOSE_FLAG   ) 

Value:

do                                                      \
  {                                                     \
    if (stat (NAME, &ST) >= 0 && S_ISREG (ST.st_mode))  \
      if (unlink (NAME) < 0)                            \
  if (VERBOSE_FLAG)                               \
    perror_with_name (NAME);                      \
  } while (0)

Definition at line 2331 of file gcc.c.

#define DRIVER_SELF_SPECS   ""

Definition at line 848 of file gcc.c.

#define ENDFILE_SPEC   ""

#define GOMP_SELF_SPECS   "%{fopenmp: -pthread}"

Definition at line 854 of file gcc.c.

#define HOST_EXECUTABLE_SUFFIX   ""

Definition at line 104 of file gcc.c.

#define INIT_STATIC_SPEC ( NAME,
PTR   )     { NAME, NULL, PTR, (struct spec_list *) 0, sizeof (NAME) - 1, 0 }

Definition at line 1532 of file gcc.c.

#define kill ( p,
 )     raise(s)

Definition at line 122 of file gcc.c.

#define LIB_SPEC   "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"

#define LIBGCC_SPEC   "-lgcc"

#define LIBRARY_PATH_ENV   "LIBRARY_PATH"

Definition at line 118 of file gcc.c.

#define LINK_COMMAND_SPEC   "\%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\ %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\ %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"

#define LINK_GCC_C_SEQUENCE_SPEC   "%G %L %G"

#define LINK_LIBGCC_SPEC   "%D"

#define LINK_PIE_SPEC   "%{pie:} "

#define LINK_SPEC   ""

#define LINK_SSP_SPEC   "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}"

Referenced by fatal_ice().

#define LINKER_NAME   "collect2"

#define MD_EXEC_PREFIX   ""

Definition at line 1474 of file gcc.c.

#define MD_STARTFILE_PREFIX   ""

Definition at line 1477 of file gcc.c.

#define MD_STARTFILE_PREFIX_1   ""

Definition at line 1480 of file gcc.c.

#define MFLIB_SPEC   "%{fmudflap|fmudflapth: -export-dynamic}"

#define MFWRAP_SPEC   " %{static: %{fmudflap|fmudflapth: \ --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc\ --wrap=mmap --wrap=munmap --wrap=alloca\} %{fmudflapth: --wrap=pthread_create\}} %{fmudflap|fmudflapth: --wrap=main}"

#define MIN_FATAL_STATUS   1

Definition at line 128 of file gcc.c.

#define MULTILIB_DEFAULTS   { "" }

Definition at line 842 of file gcc.c.

#define OPTION_DEFAULT_SPECS   { "", "" }

Definition at line 862 of file gcc.c.

 
#define SKIP_WHITE (  )     do { while (*p == ' ' || *p == '\t') p++; } while (0)

 
#define SKIP_WHITE (  )     do { while (*p == ' ' || *p == '\t') p++; } while (0)

#define STANDARD_STARTFILE_PREFIX_1   "/lib/"

Definition at line 1460 of file gcc.c.

#define STANDARD_STARTFILE_PREFIX_2   "/usr/lib/"

Definition at line 1463 of file gcc.c.

#define STARTFILE_PREFIX_SPEC   ""

#define STARTFILE_SPEC   "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}"

#define SWITCH_FALSE   -1

Definition at line 3056 of file gcc.c.

#define SWITCH_IGNORE   -2

Definition at line 3057 of file gcc.c.

#define SWITCH_LIVE   1

Definition at line 3058 of file gcc.c.

#define SWITCH_OK   0

Definition at line 3055 of file gcc.c.

#define SWITCH_TAKES_ARG ( CHAR   )     DEFAULT_SWITCH_TAKES_ARG(CHAR)

Definition at line 883 of file gcc.c.

#define SWITCHES_NEED_SPACES   ""

#define SYSROOT_HEADERS_SUFFIX_SPEC   ""

#define SYSROOT_SPEC   "--sysroot=%R"

Referenced by fatal_ice().

#define SYSROOT_SUFFIX_SPEC   ""

#define TARGET_OBJECT_SUFFIX   ".o"

Definition at line 111 of file gcc.c.

#define WORD_SWITCH_TAKES_ARG ( STR   )     DEFAULT_WORD_SWITCH_TAKES_ARG (STR)

Definition at line 887 of file gcc.c.


Enumeration Type Documentation

Enumerator:
PREFIX_PRIORITY_B_OPT 
PREFIX_PRIORITY_LAST 
PREFIX_PRIORITY_B_OPT 
PREFIX_PRIORITY_LAST 
PREFIX_PRIORITY_B_OPT 
PREFIX_PRIORITY_LAST 
PREFIX_PRIORITY_B_OPT 
PREFIX_PRIORITY_LAST 

Definition at line 2708 of file gcc.c.


Function Documentation

static int access_check ( const char *  name,
int  mode 
) [static]

Definition at line 2613 of file gcc.c.

References access, S_ISDIR, stat::st_mode, and X_OK.

static void add_assembler_option ( const char *  option,
int  len 
) [static]

Definition at line 3249 of file gcc.c.

References save_string(), XNEWVEC, and xrealloc().

static void add_linker_option ( const char *  option,
int  len 
) [static]

Definition at line 3263 of file gcc.c.

References save_string(), XNEWVEC, and xrealloc().

static void add_prefix ( struct path_prefix pprefix,
const char *  prefix,
const char *  component,
int  priority,
int  require_machine_suffix,
int  os_multilib 
) [static]

static void add_preprocessor_option ( const char *  option,
int  len 
) [static]

Definition at line 3234 of file gcc.c.

References save_string(), XNEWVEC, and xrealloc().

static void add_sysrooted_prefix ( struct path_prefix pprefix,
const char *  prefix,
const char *  component,
int  priority,
int  require_machine_suffix,
int  os_multilib 
) [static]

static void* add_to_obstack ( char *  path,
void data 
) [static]

static void alloc_args ( void   )  [static]

Definition at line 1919 of file gcc.c.

References XNEWVEC.

static char * build_search_list ( const struct path_prefix paths,
const char *  prefix,
bool  check_dir,
bool  do_multi 
) [static]

static int check_live_switch ( int  switchnum,
int  prefix_length 
) [static]

static void clear_args ( void   )  [static]

Definition at line 1928 of file gcc.c.

static void clear_failure_queue ( void   )  [static]

Definition at line 2382 of file gcc.c.

static int compare_version_strings ( const char *  v1,
const char *  v2 
) [static]

Definition at line 7749 of file gcc.c.

References abort, fatal(), NULL, r, REG_EXTENDED, REG_NOMATCH, REG_NOSUB, regcomp, regexec, and strverscmp().

Referenced by version_compare_spec_function().

static int default_arg ( const char *  p,
int  len 
) [static]

Definition at line 7174 of file gcc.c.

References i, str, and strncmp().

static void delete_failure_queue ( void   )  [static]

Definition at line 2373 of file gcc.c.

References delete_if_ordinary(), temp_file::name, and temp_file::next.

static void delete_if_ordinary ( const char *  name  )  [static]

Definition at line 2342 of file gcc.c.

References c, DELETE_IF_ORDINARY, EOF, fflush(), getchar(), i, printf(), and verbose_flag.

static void delete_temp_files ( void   )  [static]

Definition at line 2361 of file gcc.c.

References delete_if_ordinary(), temp_file::name, and temp_file::next.

static void display_help ( void   )  [static]

Definition at line 3167 of file gcc.c.

References _, fputs(), printf(), and verbose_flag.

static void do_option_spec ( const char *  name,
const char *  spec 
) [static]

Definition at line 4458 of file gcc.c.

References alloca, ARRAY_SIZE, do_self_spec(), i, memcpy, NULL, p, q, strcmp(), strcpy, strlen(), and strstr().

static void do_self_spec ( const char *  spec  )  [static]

int do_spec ( const char *  spec  ) 

Definition at line 4399 of file gcc.c.

References do_spec_2(), execute(), set_collect_gcc_options(), and strcmp().

static int do_spec_1 ( const char *  spec,
int  inswitch,
const char *  soft_matched_part 
) [static]

static int do_spec_2 ( const char *  spec  )  [static]

Definition at line 4422 of file gcc.c.

References clear_args(), do_spec_1(), find_file(), NULL, obstack_1grow, result, store_arg(), and XOBFINISH.

void error ( const char *  gmsgid,
  ... 
)

Definition at line 6899 of file gcc.c.

References _, fprintf(), va_end, va_start, and vfprintf().

static const char * eval_spec_function ( const char *  func,
const char *  args 
) [static]

Definition at line 5421 of file gcc.c.

References alloc_args(), do_spec_2(), fatal(), free(), spec_function::func, lookup_spec_function(), and NULL.

static int execute ( void   )  [static]

void fancy_abort ( const char *  file,
int  line,
const char *  func 
)

Definition at line 6855 of file gcc.c.

References fatal_ice().

void fatal ( const char *  cmsgid,
  ... 
)

Definition at line 6878 of file gcc.c.

References _, delete_temp_files(), exit(), fprintf(), va_end, va_start, and vfprintf().

static void fatal_error ( int  signum  )  [static]

Definition at line 6080 of file gcc.c.

References delete_failure_queue(), delete_temp_files(), getpid, kill, and signal().

void fatal_ice ( const char *  cmsgid,
  ... 
) [static]

static void* file_at_path ( char *  path,
void data 
) [static]

static char * find_a_file ( const struct path_prefix pprefix,
const char *  name,
int  mode,
bool  do_multi 
) [static]

static const char * find_file ( const char *  name  )  [static]

Definition at line 5993 of file gcc.c.

References find_a_file(), and R_OK.

static void* for_each_path ( const struct path_prefix paths,
bool  do_multi,
size_t  extra_space,
void *(*)(char *, void *)  callback,
void callback_info 
) [static]

static void give_switch ( int  switchnum,
int  omit_first_word 
) [static]

Definition at line 5943 of file gcc.c.

References args, do_spec_1(), dot, IS_DIR_SEPARATOR, length, NULL, p, strlen(), SWITCH_IGNORE, and switchstr::validated.

static const char * handle_braces ( const char *  p  )  [static]

static const char * handle_spec_function ( const char *  p  )  [static]

Definition at line 5493 of file gcc.c.

References args, count, do_spec_1(), eval_spec_function(), fatal(), free(), func, ISALNUM, NULL, and save_string().

static const char* if_exists_else_spec_function ( int  argc,
const char **  argv 
) [static]

Definition at line 7711 of file gcc.c.

References access, IS_ABSOLUTE_PATH, NULL, and R_OK.

static const char* if_exists_spec_function ( int  argc,
const char **  argv 
) [static]

Definition at line 7696 of file gcc.c.

References access, IS_ABSOLUTE_PATH, NULL, and R_OK.

static const char* include_spec_function ( int  argc,
const char **  argv 
) [static]

Definition at line 7868 of file gcc.c.

References abort, FALSE, find_a_file(), NULL, R_OK, and read_specs().

static void init_spec ( void   )  [static]

static bool input_suffix_matches ( const char *  atom,
const char *  end_atom 
) [inline, static]

Definition at line 5551 of file gcc.c.

References strcmp(), strncmp(), and compiler::suffix.

static int is_directory ( const char *  path1,
bool  linker 
) [static]

Definition at line 6003 of file gcc.c.

References alloca, DIR_SEPARATOR, IS_DIR_SEPARATOR, memcpy, path, S_ISDIR, stat::st_mode, strlen(), and strncmp().

static char * load_specs ( const char *  filename  )  [static]

Definition at line 1960 of file gcc.c.

References c, close, free(), notice(), O_RDONLY, open, pfatal_with_name(), read, skip, stat::st_size, verbose_flag, and XNEWVEC.

static struct compiler * lookup_compiler ( const char *  name,
size_t  length,
const char *  language 
) [static, read]

static struct spec_function * lookup_spec_function ( const char *  name  )  [static, read]

Definition at line 5407 of file gcc.c.

References spec_function::name, NULL, and strcmp().

int main ( int argc  ,
char **  argv 
)

Definition at line 6093 of file gcc.c.

References _, access, add_prefix(), add_sysrooted_prefix(), alloc_args(), alloca, ARRAY_SIZE, bug_report_url, build_search_list(), clear_failure_queue(), collect_obstack, compiler::combinable, combine_flag, infile::compiled, compiler_version, concat(), configuration_arguments, cross_compile, delete_failure_queue(), delete_temp_files(), dir_separator_str, display_help(), do_option_spec(), do_self_spec(), do_spec(), do_spec_1(), do_spec_2(), error(), error_count, expandargv(), FALSE, fatal(), fatal_error(), filename, user_specs::filename, find_a_file(), find_file(), GCC_DRIVER_HOST_INITIALIZATION, gcc_init_libintl, greatest_status, i, infile::incompiler, INIT_ENVIRONMENT, init_spec(), IS_ABSOLUTE_PATH, IS_DIR_SEPARATOR, lang_specific_extra_outfiles, lang_specific_pre_link(), LIBRARY_PATH_ENV, lookup_compiler(), memcpy, multilib_exclusions_raw, multilib_matches_raw, multilib_obstack, multilib_raw, n, infile::name, compiler::needs_preprocessing, user_specs::next, notice(), NULL, obstack_1grow, obstack_grow, obstack_grow0, obstack_init, p, pass_exit_codes, PREFIX_PRIORITY_LAST, infile::preprocessed, print_file_name, print_help_list, print_multi_directory, print_multi_lib, print_multi_os_directory, print_multilib_info(), print_prog_name, print_search_dirs, printf(), process_command(), prune_options(), putenv, putenv_from_prefixes(), q, R_OK, read_specs(), s, save_temps_flag, set_input(), set_multilib_dir(), set_spec(), signal(), SIGPIPE, compiler::spec, spec_machine, spec_version, standard_startfile_prefix_1, standard_startfile_prefix_2, strcat(), strcmp(), strcpy, strlen(), strncmp(), target_help_flag, target_sysroot_hdrs_suffix, target_sysroot_suffix, target_system_root, thread_model, THREAD_MODEL_SPEC, tmp, TRUE, unlock_std_streams(), validate_all_switches(), verbose_flag, version_string, X_OK, XCNEWVEC, xmalloc(), xmalloc_set_program_name(), XOBFINISH, and xstrdup().

int main ( int  ,
char **   
)

Definition at line 1313 of file z8kgen.c.

static void mark_matching_switches ( const char *  atom,
const char *  end_atom,
int  starred 
) [inline, static]

Definition at line 5597 of file gcc.c.

References check_live_switch(), i, len, switchstr::ordering, and strncmp().

static void notice ( const char *  cmsgid,
  ... 
) [static]

Definition at line 6912 of file gcc.c.

References _, va_end, va_start, and vfprintf().

static void perror_with_name ( const char *  name  )  [static]

Definition at line 6847 of file gcc.c.

References errno, error(), and xstrerror().

void pfatal_with_name ( const char *  name  ) 

Definition at line 6839 of file gcc.c.

References delete_temp_files(), exit(), and perror_with_name().

static void print_multilib_info ( void   )  [static]

Definition at line 7438 of file gcc.c.

References default_arg(), FALSE, fatal(), len, multilib_extra, NULL, p, p1, print_at(), putchar(), q, skip, strncmp(), and TRUE.

static const char * process_brace_body ( const char *  p,
const char *  atom,
const char *  end_atom,
int  starred,
int  matched 
) [static]

Definition at line 5785 of file gcc.c.

References check_live_switch(), do_spec_1(), fatal(), give_switch(), i, invalid(), NULL, save_string(), and strncmp().

static void process_command ( int  argc,
const char **  argv 
) [static]

Definition at line 3280 of file gcc.c.

References _, access, access_check(), ADD, add_assembler_option(), add_linker_option(), add_prefix(), add_preprocessor_option(), alloca, switchstr::args, ARRAY_SIZE, c, combine_flag, compiler_version, concat(), concat_length(), convert_filename, cross_compile, DELETE, DIR_SEPARATOR, dir_separator_str, errno, error(), error_count, execvp(), exit(), F_OK, fatal(), user_specs::filename, fputs(), free(), GET_ENVIRONMENT, i, init_spec(), IS_ABSOLUTE_PATH, is_cpp_driver, IS_DIR_SEPARATOR, is_directory(), ISDIGIT, lang_specific_driver(), infile::language, len, LIBRARY_PATH_ENV, switchstr::live_cond, make_relative_prefix(), memcpy, spec_list::name, infile::name, user_specs::next, spec_list::next, NULL, opt, switchstr::ordering, p, switchstr::part1, pass_exit_codes, PATH_SEPARATOR, perror_with_name(), PREFIX_PRIORITY_B_OPT, PREFIX_PRIORITY_LAST, prev, print_file_name, print_help_list, print_multi_directory, print_multi_lib, print_multi_os_directory, print_prog_name, print_search_dirs, printf(), progname, spec_list::ptr_spec, putenv, q, r, report_times, save_string(), save_temps_flag, set_std_prefix(), skip, sl, spec_machine, spec_version, str, strcat(), strchr, strcmp(), strcpy, strlen(), strncmp(), strncpy(), SWITCH_OK, SWITCH_TAKES_ARG, target_help_flag, target_system_root, target_system_root_changed, tmp, translate_options(), use_pipes, switchstr::validated, verbose_flag, verbose_only_flag, version_string, WORD_SWITCH_TAKES_ARG, xmalloc(), xmemdup(), XNEW, XNEWVEC, xstrdup(), and xstrerror().

static void process_marked_switches ( void   )  [inline, static]

Definition at line 5613 of file gcc.c.

References give_switch(), i, ordering, and switchstr::ordering.

static void putenv_from_prefixes ( const struct path_prefix paths,
const char *  env_var,
bool  do_multi 
) [static]

Definition at line 2603 of file gcc.c.

References build_search_list(), and putenv.

static void read_specs ( const char *  filename,
int  main_p 
) [static]

void record_temp_file ( const char *  filename,
int  always_delete,
int  fail_delete 
)

Definition at line 2293 of file gcc.c.

References temp_file::name, temp_file::next, strcmp(), xmalloc(), XNEW, and xstrdup().

static const char* replace_outfile_spec_function ( int  argc,
const char **  argv 
) [static]

Definition at line 7729 of file gcc.c.

References abort, i, NULL, strcmp(), and xstrdup().

static char * save_string ( const char *  s,
int  len 
) [static]

Definition at line 6829 of file gcc.c.

References memcpy, result, and XNEWVEC.

static void set_collect_gcc_options ( void   )  [static]

void set_input ( const char *  filename  ) 

Definition at line 6039 of file gcc.c.

References IS_DIR_SEPARATOR, p, and strlen().

static void set_multilib_dir ( void   )  [static]

static void set_spec ( const char *  name,
const char *  spec 
) [static]

static char * skip_whitespace ( char *  p  )  [static]

Definition at line 1385 of file gcc.c.

static void* spec_path ( char *  path,
void data 
) [static]

static void store_arg ( const char *  arg,
int  delete_always,
int  delete_failure 
) [static]

Definition at line 1941 of file gcc.c.

References record_temp_file(), strcmp(), and xrealloc().

static bool switch_matches ( const char *  atom,
const char *  end_atom,
int  starred 
) [inline, static]

Definition at line 5578 of file gcc.c.

References check_live_switch(), i, len, and strncmp().

static void translate_options ( int *  argcp,
const char *const **  argvp 
) [static]

static int used_arg ( const char *  p,
int  len 
) [static]

static void validate_all_switches ( void   )  [static]

static const char * validate_switches ( const char *  start  )  [static]

Definition at line 6952 of file gcc.c.

References i, ISIDNUM, len, p, SKIP_WHITE, strncmp(), validate_switches(), and switchstr::validated.

static void validate_switches_from_spec ( const char *  spec  )  [inline, static]

Definition at line 6922 of file gcc.c.

References c, p, and validate_switches().

static const char* version_compare_spec_function ( int  argc,
const char **  argv 
) [static]


Variable Documentation

int added_libraries [static]

Definition at line 3103 of file gcc.c.

Definition at line 2282 of file gcc.c.

int arg_going [static]

Definition at line 4373 of file gcc.c.

const char** argbuf [static]

Definition at line 1870 of file gcc.c.

int argbuf_index [static]

Definition at line 1878 of file gcc.c.

int argbuf_length [static]

Definition at line 1874 of file gcc.c.

const char* asm_options [static]

Initial value:

"%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}"

Definition at line 820 of file gcc.c.

char** assembler_options [static]

Definition at line 1041 of file gcc.c.

int basename_length [static]

Definition at line 4357 of file gcc.c.

const char* cc1_options [static]

Initial value:

"%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
 %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
 %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\
 %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
 %{v:-version} %{pg:-p} %{p} %{f*} %{undef}\
 %{Qn:-fno-ident} %{--help:--help}\
 %{--target-help:--target-help}\
 %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
 %{fsyntax-only:-o %j} %{-param*}\
 %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\
 %{coverage:-fprofile-arcs -ftest-coverage}"

Definition at line 807 of file gcc.c.

Definition at line 287 of file gcc.c.

int combine_flag = 0 [static]

Definition at line 227 of file gcc.c.

bool combine_inputs [static]

Definition at line 3098 of file gcc.c.

const char* compiler_version [static]

Definition at line 236 of file gcc.c.

Definition at line 928 of file gcc.c.

const char* cpp_debug_options = "%{d*}" [static]

Definition at line 804 of file gcc.c.

const char* cpp_options [static]

Initial value:

"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
 %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*}\
 %{undef} %{save-temps:-fpch-preprocess}"

Definition at line 797 of file gcc.c.

const char* cpp_unique_options [static]

Initial value:

"%{C|CC:%{!E:%eGCC does not support -C or -CC without -E}}\
 %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I\
 %{MD:-MD %{!o:%b.d}%{o*:%.d%*}}\
 %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\
 %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
 %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\
 %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\
 %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
 %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
 %{E|M|MM:%W{o*}}"

Definition at line 780 of file gcc.c.

const char* cross_compile = "0" [static]

Definition at line 252 of file gcc.c.

Definition at line 936 of file gcc.c.

int delete_this_arg [static]

Definition at line 4377 of file gcc.c.

const char dir_separator_str[] = { DIR_SEPARATOR, 0 } [static]

Definition at line 114 of file gcc.c.

const char* const driver_self_specs[] [static]

Initial value:

Definition at line 857 of file gcc.c.

int error_count = 0 [static]

Definition at line 272 of file gcc.c.

struct path_prefix exec_prefixes = { 0, 0, "exec" } [static]

Definition at line 1429 of file gcc.c.

int execution_count [static]

Definition at line 1906 of file gcc.c.

Definition at line 2284 of file gcc.c.

const char* gcc_exec_prefix [static]

Definition at line 1451 of file gcc.c.

const char* gcc_libexec_prefix [static]

Definition at line 1455 of file gcc.c.

int greatest_status = 1 [static]

Definition at line 276 of file gcc.c.

int have_c = 0 [static]

Definition at line 1886 of file gcc.c.

Referenced by process_command().

int have_o = 0 [static]

Definition at line 1889 of file gcc.c.

Referenced by process_command().

int have_o_argbuf_index = 0 [static]

Definition at line 1883 of file gcc.c.

struct path_prefix include_prefixes = { 0, 0, "include" } [static]

Definition at line 1437 of file gcc.c.

struct infile* infiles [static]

Definition at line 3091 of file gcc.c.

const char* input_basename [static]

Definition at line 4359 of file gcc.c.

Definition at line 4367 of file gcc.c.

int input_file_number [static]

Definition at line 4355 of file gcc.c.

const char* input_filename [static]

Definition at line 4354 of file gcc.c.

Definition at line 4356 of file gcc.c.

int input_from_pipe [static]

Definition at line 4389 of file gcc.c.

Definition at line 4362 of file gcc.c.

int input_stat_set [static]

Definition at line 4364 of file gcc.c.

const char* input_suffix [static]

Definition at line 4360 of file gcc.c.

const char* invoke_as [static]

Initial value:




"%{!S:-o %|.s |\n as %(asm_options) %m.s %A }"

Definition at line 823 of file gcc.c.

Definition at line 131 of file gcc.c.

const char* just_machine_suffix = 0 [static]

Definition at line 1447 of file gcc.c.

char** linker_options [static]

Definition at line 1035 of file gcc.c.

const char* machine_suffix = 0 [static]

Definition at line 1442 of file gcc.c.

const char* md_exec_prefix = MD_EXEC_PREFIX [static]

Definition at line 1486 of file gcc.c.

const char* md_startfile_prefix = MD_STARTFILE_PREFIX [static]

Definition at line 1488 of file gcc.c.

const char* md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1 [static]

Definition at line 1489 of file gcc.c.

Definition at line 7028 of file gcc.c.

const char* multilib_defaults [static]

Definition at line 836 of file gcc.c.

const char* const multilib_defaults_raw[] = MULTILIB_DEFAULTS [static]

Definition at line 845 of file gcc.c.

const char* multilib_dir [static]

Definition at line 1506 of file gcc.c.

const char* multilib_exclusions [static]

Definition at line 837 of file gcc.c.

const char* multilib_matches [static]

Definition at line 835 of file gcc.c.

Definition at line 833 of file gcc.c.

const char* multilib_os_dir [static]

Definition at line 1511 of file gcc.c.

const char* multilib_select [static]

Definition at line 834 of file gcc.c.

int n_assembler_options [static]

Definition at line 1040 of file gcc.c.

int n_compilers [static]

Definition at line 932 of file gcc.c.

const int n_default_compilers = ARRAY_SIZE (default_compilers) - 1 [static]

Definition at line 1029 of file gcc.c.

int n_infiles

Definition at line 3093 of file gcc.c.

int n_linker_options [static]

Definition at line 1034 of file gcc.c.

int n_mdswitches [static]

Definition at line 7029 of file gcc.c.

int n_preprocessor_options [static]

Definition at line 1046 of file gcc.c.

int n_switches [static]

Definition at line 3071 of file gcc.c.

Definition at line 280 of file gcc.c.

struct default_spec option_default_specs[] = { OPTION_DEFAULT_SPECS } [static]

Definition at line 872 of file gcc.c.

Definition at line 1069 of file gcc.c.

const char** outfiles

Definition at line 3107 of file gcc.c.

int pass_exit_codes [static]

Definition at line 135 of file gcc.c.

char** preprocessor_options [static]

Definition at line 1047 of file gcc.c.

const char* print_file_name = NULL [static]

Definition at line 148 of file gcc.c.

int print_help_list [static]

Definition at line 172 of file gcc.c.

int print_multi_directory [static]

Definition at line 157 of file gcc.c.

int print_multi_lib [static]

Definition at line 167 of file gcc.c.

Definition at line 162 of file gcc.c.

const char* print_prog_name = NULL [static]

Definition at line 152 of file gcc.c.

int print_search_dirs [static]

Definition at line 143 of file gcc.c.

Definition at line 1613 of file gcc.c.

const char* programname [static]

Definition at line 1914 of file gcc.c.

int report_times [static]

Definition at line 192 of file gcc.c.

int save_temps_flag [static]

Definition at line 223 of file gcc.c.

int signal_count [static]

Definition at line 1910 of file gcc.c.

const char* spec_machine = DEFAULT_TARGET_MACHINE [static]

Definition at line 244 of file gcc.c.

const char* const spec_version = DEFAULT_TARGET_VERSION [static]

Definition at line 240 of file gcc.c.

struct spec_list* specs = (struct spec_list *) 0 [static]

Definition at line 1596 of file gcc.c.

const char* const standard_bindir_prefix = STANDARD_BINDIR_PREFIX [static]

Definition at line 1499 of file gcc.c.

const char* const standard_exec_prefix = STANDARD_EXEC_PREFIX [static]

Definition at line 1483 of file gcc.c.

const char* const standard_exec_prefix_1 = "/usr/libexec/gcc/" [static]

Definition at line 1484 of file gcc.c.

const char* const standard_exec_prefix_2 = "/usr/lib/gcc/" [static]

Definition at line 1485 of file gcc.c.

const char* standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX [static]

Definition at line 1501 of file gcc.c.

const char* const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX [static]

Definition at line 1490 of file gcc.c.

const char* const standard_startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1 [static]

Definition at line 1492 of file gcc.c.

const char* const standard_startfile_prefix_2 = STANDARD_STARTFILE_PREFIX_2 [static]

Definition at line 1494 of file gcc.c.

struct path_prefix startfile_prefixes = { 0, 0, "startfile" } [static]

Definition at line 1433 of file gcc.c.

Initial value:

{
  { "if-exists",    if_exists_spec_function },
  { "if-exists-else",   if_exists_else_spec_function },
  { "replace-outfile",    replace_outfile_spec_function },
  { "version-compare",    version_compare_spec_function },
  { "include",      include_spec_function },



  { 0, 0 }
}

Definition at line 1600 of file gcc.c.

Definition at line 1536 of file gcc.c.

const char* suffix_subst [static]

Definition at line 4393 of file gcc.c.

Definition at line 4358 of file gcc.c.

Definition at line 3069 of file gcc.c.

int target_help_flag [static]

Definition at line 187 of file gcc.c.

const char* target_sysroot_hdrs_suffix = 0 [static]

Definition at line 218 of file gcc.c.

const char* target_sysroot_suffix = 0 [static]

Definition at line 214 of file gcc.c.

const char* target_system_root = 0 [static]

Definition at line 205 of file gcc.c.

Definition at line 210 of file gcc.c.

const char* temp_filename [static]

Definition at line 2267 of file gcc.c.

int temp_filename_length [static]

Definition at line 2271 of file gcc.c.

int this_is_library_file [static]

Definition at line 4386 of file gcc.c.

int this_is_output_file [static]

Definition at line 4381 of file gcc.c.

const char* const tooldir_base_prefix = TOOLDIR_BASE_PREFIX [static]

Definition at line 1496 of file gcc.c.

const char* tooldir_prefix [static]

Definition at line 1497 of file gcc.c.

int use_pipes [static]

Definition at line 232 of file gcc.c.

Definition at line 880 of file gcc.c.

Definition at line 880 of file gcc.c.

int verbose_flag [static]

Definition at line 176 of file gcc.c.

int verbose_only_flag [static]

Definition at line 183 of file gcc.c.


Generated on Wed Apr 8 15:33:01 2009 for Open64 by  doxygen 1.5.6