#include <ctype.h>#include <stdio.h>#include <stdlib.h>#include <strings.h>#include <stamp.h>#include <cmplrs/rcodes.h>#include <sys/types.h>#include <sys/stat.h>#include <errno.h>#include <time.h>#include <unistd.h>#include "pathscale_defs.h"#include "string_utils.h"#include "options.h"#include "option_seen.h"#include "option_names.h"#include "opt_actions.h"#include "get_options.h"#include "lang_defs.h"#include "errors.h"#include "phases.h"#include "file_utils.h"#include "file_names.h"#include "run.h"#include "objects.h"#include "version.h"

Go to the source code of this file.
| add_special_options | ( | void | ) |
Definition at line 246 of file special_options.c.
References ABI_64, ABI_I32, ABI_I64, ABI_IA32, ABI_N32, ABI_RAG32, add_new_option(), add_option_seen(), add_phase_for_option(), add_string_option(), auto_parallelize, buf, concat_strings(), CRAY_MP, default_olevel, Disable_open_mp, error(), FALSE, Gen_feedback, get_olevel_flag(), get_phase_dir(), inline_t, instrumentation_invoked, invoked_lang, is_toggled(), keep_flag, L_cc, L_CC, L_f77, L_f90, last_phase, NON_SHARED, NORMAL_MP, nostdinc, NULL, option_was_seen(), outfile, P_be, P_c_gfe, P_cplus_gfe, P_cppf90_fe, P_f90_cpp, P_f90_fe, P_include, P_ipl, prepend_option_seen(), Process_Cray_Mp(), Process_Mp(), remove_phase_for_option(), replace_option_seen(), s, S_N, S_O, set_dsm_options(), set_language_for_option(), set_option_unseen(), source_kind, sprintf(), toggle(), TRUE, turn_down_opt_level(), turn_off_ipa(), UNDEFINED, and warning.
| static void append_default_options | ( | int * | argc, | |
| char **[] | argv | |||
| ) | [static] |
Definition at line 1198 of file main.c.
References asprintf(), buf, f, fclose(), fopen, get_executable_dir(), getenv(), string_list_rec::head, index(), init_string_list(), malloc, string_item_rec::name, string_item_rec::next, NULL, path, read_compiler_defaults(), strcat(), strcpy, string_copy(), and strlen().
Referenced by main().
| static void append_open64_env_flags | ( | int * | argc, | |
| char **[] | argv, | |||
| char * | env_var | |||
| ) | [static] |
Definition at line 774 of file main.c.
References add_option_seen(), add_string_option(), change_suffix(), get_object_file(), string_list_rec::head, last_phase, multiple_source_files, string_item_rec::name, NIL, NULL, option_was_seen(), outfile, P_any_ld, s, and strlen().
| static void check_old_CC_options | ( | char * | name | ) | [static] |
Definition at line 742 of file main.c.
References parse_error(), strcmp(), warn_ignored(), warn_no_longer_supported(), warn_no_longer_supported2(), and warning.
Referenced by main().
| Check_Target | ( | ) |
Definition at line 653 of file opt_actions.c.
Definition at line 1450 of file main.c.
References build_date, build_host, build_root, build_user, cset_id, fprintf(), internal_error(), is_toggled(), option_was_seen(), puts(), show_version, and TRUE.
Referenced by if().
| void do_exit | ( | int | code | ) |
Definition at line 898 of file main.c.
References exit(), and unlink.
Referenced by append_objects_to_list(), handler(), if(), main(), my_execv(), my_putenv(), no_args(), print_help_msg(), remove_empty_loop(), run_phase(), run_simple_program(), set_explicit_lang(), and try_unroll_loop_completely().
| static void dump_args | ( | char * | msg | ) | [static] |
Definition at line 868 of file main.c.
References FOREACH_IMPLIED_OPTION, FOREACH_OPTION_SEEN, get_current_implied_name(), get_option_name(), and printf().
Referenced by if().
| finalize_maybe_linker_options | ( | num_files | = =0 |
) |
Referenced by main().
Definition at line 611 of file main.c.
References cleanup(), error(), execute_flag, file_exists(), fprintf(), fullwarn, get_lang_name(), get_source_kind_from_suffix(), get_source_lang(), invoked_lang, L_as, L_f90, multiple_source_files, string_item_rec::name, run_compiler(), show_flag, source_file, source_kind, source_lang, TRUE, UNDEFINED, and warning.
| FOREACH_OPTION_SEEN | ( | i | ) |
Definition at line 425 of file main.c.
References current_option_seen_later(), flag_is_superceded(), set_current_option_unseen(), and set_option_unseen().
| const char* get_gcc_version | ( | int * | v, | |
| int | nv | |||
| ) |
| if | ( | dump_outfile_to_stdout | = = TRUE |
) |
| if | ( | num_files | = = 0 || remember_last_phase != last_phase |
) |
Definition at line 643 of file main.c.
References cleanup(), cleanup_temp_objects(), error_status, Gen_feedback, get_source_lang(), has_errors(), last_phase, NULL, option_was_seen(), remember_last_phase, run_ar(), run_dsm_prelink(), run_ld(), run_pixie(), S_o, source_file, source_kind, and source_lang.
| if | ( | read_stdin | ) |
Definition at line 598 of file main.c.
References cleanup(), error(), error_status, L_NONE, option_was_seen(), run_compiler(), S_o, source_kind, and source_lang.
| if | ( | Use_feedback | ) |
Definition at line 574 of file main.c.
References concat_strings(), count_files, drop_path(), ENOENT, errno, FALSE, fb_cdir, fb_file, string_list_rec::head, internal_error(), string_item_rec::name, NULL, perror(), prof_file, program_name, run_prof(), save_name(), stat::st_mtime, stat, TRUE, and warning.
| if | ( | num_files | , | |
| 1 | ||||
| ) |
| if | ( | show_version|| | dump_version | ) |
Definition at line 533 of file main.c.
References display_version(), do_exit(), dump_version, execute_flag, RC_OKAY, S_NONE, and source_kind.
| if | ( | cordflag! | = TRUE |
) |
| if | ( | feedback_files-> | head | ) |
| if | ( | debug | ) |
| if | ( | (option_was_seen(O_fpic)||option_was_seen(O_fPIC))&& | mem_model = = M_MEDIUM |
) |
| if | ( | source_kind | = = S_NONE || read_stdin |
) |
Definition at line 395 of file main.c.
References add_object(), dump_version, fix_name_by_lang(), get_object_file(), get_source_kind(), invoked_lang, L_cpp, L_NONE, no_args(), option_was_seen(), read_stdin, show_version, source_file, source_kind, and source_lang.
| if | ( | !show_version &&!execute_flag &&!show_flag &&! | dump_version | ) |
| if | ( | print_help||help_pattern! | = NULL |
) |
| if | ( | show_defaults | ) |
| if | ( | show_search_path | ) |
| if | ( | num_files | , | |
| 0 &&unrecognized_dashdash_option_name! | = NULL | |||
| ) |
| int main | ( | int argc | , | |
| char * | argv[] | |||
| ) |
Definition at line 135 of file main.c.
References add_ar_objects(), add_maybe_linker_option(), add_object(), add_option_seen(), add_string(), append_default_options(), append_open64_env_flags(), cancel_saved_arg(), check_for_driver_controls(), check_old_CC_options(), dashdash_flag, drop_path(), dump_outfile_to_stdout, FALSE, file_utils_set_program_name(), finalize_maybe_linker_options(), get_derived_parent(), get_named_language(), get_object_file(), get_option(), get_option_name(), get_real_option_if_aliased(), get_source_kind(), get_suffix_string(), getenv(), i, init_count_files(), init_crash_reporting(), init_error_list(), init_objects(), init_option_seen(), init_options(), init_phase_info(), init_phase_names(), init_string_list(), init_temp_files(), invoked_lang, is_derived_option(), is_maybe_linker_option(), is_object_option(), L_cc, L_CC, L_f77, L_f90, last_phase, NULL, opt_action(), optargs, option_name, option_was_seen(), orig_program_name, p, P_any_cpp, P_f90_cpp, parse_error(), prescan_options(), print_warnings, program_name, q, remove_phase_for_option(), S_c, S_o, save_command_line(), set_current_arg_pos(), set_executable_dir(), source_kind, strcmp(), string_copy(), strncmp(), TRUE, and warning.
Definition at line 806 of file main.c.
References add_object(), add_option_implicitly_seen(), FOREACH_IMPLIED_OPTION, FOREACH_OPTION, get_current_implied_name(), invoked_lang, is_object_option(), option_matches_language(), option_was_implicitly_seen(), and option_was_seen().
Definition at line 126 of file main.c.
References do_exit(), fprintf(), program_name, and RC_USER_ERROR.
Referenced by if().
| static void prescan_options | ( | int | argc, | |
| char * | argv[] | |||
| ) | [static] |
| static void print_defaults | ( | int | argc, | |
| char * | argv[] | |||
| ) | [static] |
Definition at line 1017 of file main.c.
References ABI_64, ABI_N32, FALSE, fprintf(), internal_error(), invoked_lang, is_toggled(), L_CC, L_cc, NULL, strcmp(), target_cpu, TRUE, and UNDEFINED.
Referenced by if().
Definition at line 834 of file main.c.
References do_exit(), FOREACH_OPTION, fprintf(), get_option_help(), get_option_name(), help_pattern, invoked_lang, L_cc, msg, NULL, option_matches_language(), program_name, RC_OKAY, and strstr().
Referenced by if().
Definition at line 1342 of file main.c.
References ABI_N32, add_string(), asprintf(), buf, concat_strings(), directory_path(), fgets(), fp, fputs(), free(), get_executable_dir(), get_phase_dir(), string_list_rec::head, init_string_list(), string_item_rec::name, string_item_rec::next, NULL, P_be, pclose(), printf(), putc(), read_gcc_output(), strchr, strlen(), and strncmp().
Referenced by if().
| static int read_compiler_defaults | ( | FILE * | f, | |
| string_list_t * | default_options_list | |||
| ) | [static] |
Definition at line 1090 of file main.c.
References add_new_option(), add_string(), buf, count, end_of_line, FALSE, fgets(), in_comment, internal_error(), NULL, strlen(), and TRUE.
Referenced by append_default_options().
| static FILE* read_gcc_output | ( | char * | cmdline | ) | [static] |
Definition at line 1315 of file main.c.
References asprintf(), fp, free(), get_full_phase_name(), internal_error(), NULL, P_gcpp, and popen().
Referenced by get_gcc_version(), and print_search_path().
| set_defaults | ( | void | ) |
Definition at line 72 of file special_options.c.
References ansi, getenv(), is_toggled(), NULL, prepend_option_seen(), strcmp(), STRICT_ANSI, and toggle().
| void set_explicit_lang | ( | const char * | flag, | |
| const char * | lang | |||
| ) |
Definition at line 935 of file main.c.
References default_source_kind, do_exit(), explicit_langs, FALSE, ignore_suffix, explicit_lang::kind, explicit_lang::lang, explicit_lang::name, NULL, parse_error(), RC_USER_ERROR, S_NONE, source_kind, source_lang, strcmp(), TRUE, and x.
| toggle_implicits | ( | void | ) |
| const char compiler_version[] = INCLUDE_STAMP |
Definition at line 121 of file main.c.
Referenced by main(), process_command(), and save_cpp_output().
struct explicit_lang explicit_langs[] [static] |
Referenced by set_explicit_lang().
string_list_t* file_suffixes [static] |
string_list_t* files [static] |
| char* help_pattern |
| boolean parsing_default_options = FALSE |
| static void print_help = FALSE |
Definition at line 85 of file main.c.
Referenced by c_common_decode_option(), and common_handle_option().
| int show_version |
1.5.6