#include <stdio.h>#include <stdlib.h>#include <strings.h>#include <string.h>#include <sys/wait.h>#include <sys/times.h>#include <sys/procfs.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <errno.h>#include <signal.h>#include <malloc.h>#include <sys/param.h>#include <limits.h>#include <alloca.h>#include <cmplrs/rcodes.h>#include "run.h"#include "string_utils.h"#include "errors.h"#include "file_names.h"#include "phases.h"#include "opt_actions.h"#include "file_utils.h"#include "pathscale_defs.h"#include "option_names.h"#include "lib_phase_dir.h"

Go to the source code of this file.
Defines | |
| #define | LOGFILE "/var/log/messages" |
Functions/Subroutines | |
| static void | init_time (void) |
| static void | print_time (char *phase) |
| static void | my_psema (void) |
| static void | my_vsema (void) |
| static void | my_execv (const char *name, char *const argv[]) |
| void | run_simple_program (char *name, char **argv, char *output) |
| static void | my_putenv (const char *name, const char *fmt,...) __attribute__((format(printf |
| char * | get_binutils_lib_path (void) |
| void | run_phase (phases_t phase, char *name, string_list_t *args) |
| void | handler (int sig) |
| void | catch_signals (void) |
Variables | |
| boolean | show_flag = FALSE |
| boolean | show_but_not_run = FALSE |
| boolean | execute_flag = TRUE |
| boolean | time_flag = FALSE |
| boolean | prelink_flag = TRUE |
| boolean | quiet_flag = TRUE |
| boolean | run_m4 = FALSE |
| static boolean | ran_twice = FALSE |
| static int | f90_fe_status = RC_OKAY |
| static char * | f90_fe_name = NULL |
| clock_t | time0 |
| struct tms | tm0 |
| #define LOGFILE "/var/log/messages" |
| char* get_binutils_lib_path | ( | void | ) |
Definition at line 253 of file run.c.
References asprintf(), and get_executable_dir().
Referenced by init_phase_info(), and run_phase().
| static void handler | ( | int | sig | ) |
Definition at line 951 of file run.c.
References cleanup(), do_exit(), error(), RC_SYSTEM_ERROR, and strsignal().
Referenced by alloc_handler(), c_invoke_pragma_handler(), c_register_pragma(), c_register_pragma_with_expansion(), catch_signals(), check_handlers(), check_handlers_1(), cp_parser_handler(), Current_Handler_Count(), expand_end_java_handler(), expand_expr(), generate_bytecode_insns(), generate_classfile(), main(), Mark_Scopes_And_Labels(), Set_Handler_Labels(), verify_jvm_instructions(), WN2C_initialize(), and WN2F_initialize().
| static void my_execv | ( | const char * | name, | |
| char *const | argv[] | |||
| ) | [static] |
Definition at line 103 of file run.c.
References cleanup(), do_exit(), error(), execv(), fprintf(), fputc(), i, len, NULL, RC_SYSTEM_ERROR, show_but_not_run, strcmp(), and strlen().
Referenced by run_phase(), and run_simple_program().
Definition at line 224 of file run.c.
References asprintf(), do_exit(), fprintf(), internal_error(), len, putenv, RC_SYSTEM_ERROR, show_but_not_run, va_end, va_start, and vasprintf().
Referenced by run_phase().
| static void print_time | ( | char * | phase | ) | [static] |
Definition at line 1007 of file run.c.
References double, fprintf(), stime(), sysconf, time0, times, tm0, tms::tms_cstime, tms::tms_cutime, tms::tms_stime, tms::tms_utime, and utime().
Referenced by dump_one_header(), dump_time_statistics(), and run_phase().
| void run_phase | ( | phases_t | phase, | |
| char * | name, | |||
| string_list_t * | args | |||
| ) |
Definition at line 267 of file run.c.
References a, add_string(), alloca, asprintf(), cleanup(), construct_given_name(), creat, do_exit(), drop_path(), dup2(), ENOENT, errno, error(), execute_flag, exit(), f90_fe_name, f90_fe_status, FALSE, fb_file, fileno, fork, fprintf(), get_binutils_lib_path(), get_phase_dir(), get_phase_ld_library_path(), get_phase_mask(), getenv(), global_toolroot, string_list_rec::head, i, init_time(), inline_t, internal_error(), internal_error_occurred, is_matching_phase(), keep_listing, ld_library_path, ld_libraryn32_path, len, log_error(), LOGFILE, malloc, memcpy, my_execv(), my_putenv(), string_item_rec::name, string_item_rec::next, nomsg_error(), NULL, O_RDONLY, open, p, P_any_cpp, P_any_fe, P_be, P_c_gfe, P_collect, P_cplus_gfe, P_cppf90_fe, P_f90_cpp, P_f90_fe, P_gas, P_gcpp, P_gcpp_plus, P_ld, P_ldplus, P_lister, P_prof, perror(), pi, print_string_list(), print_time(), prof_file, program_name, putenv, ran_twice, RC_GCC_ERROR, RC_INTERNAL_ERROR, RC_NEED_INLINER, RC_NORECOVER_USER_ERROR, RC_OKAY, RC_OVERFLOW_ERROR, RC_SYSTEM_ERROR, RC_USER_ERROR, root, run_phase(), show_flag, si, SIGKILL, SIGQUIT, source_file, sprintf(), stat, strcmp(), string_copy(), strlen(), strpbrk(), strspn(), time_flag, TRUE, UNDEFINED, wait(), waitpid, WCOREDUMP, WEXITSTATUS, WIFEXITED, WIFSIGNALED, WSTOPSIG, and WTERMSIG.
Referenced by run_ar(), run_compiler(), run_dsm_prelink(), run_ld(), run_phase(), run_pixie(), and run_prof().
| void run_simple_program | ( | char * | name, | |
| char ** | argv, | |||
| char * | output | |||
| ) |
Definition at line 132 of file run.c.
References cleanup(), creat, do_exit(), dup2(), error(), fileno, fork, internal_error(), LOGFILE, my_execv(), RC_OKAY, RC_SYSTEM_ERROR, SIGKILL, SIGQUIT, wait(), waitpid, WCOREDUMP, WEXITSTATUS, WIFEXITED, WIFSIGNALED, WSTOPSIG, and WTERMSIG.
Referenced by find_full_path_of_gcc_file().
| boolean execute_flag = TRUE |
Definition at line 86 of file run.c.
Referenced by add_command_line_arg(), for(), if(), run_compiler(), and run_phase().
char* f90_fe_name = NULL [static] |
int f90_fe_status = RC_OKAY [static] |
| boolean prelink_flag = TRUE |
| boolean quiet_flag = TRUE |
Definition at line 89 of file run.c.
Referenced by add_file_args(), announce_function(), cgraph_finalize_compilation_unit(), cgraph_optimize(), do_compile(), ggc_collect(), ggc_collect_1(), jcf_parse(), m88k_output_function_prologue(), output_func_start_profiler(), pop_gimplify_context(), process_options(), and rest_of_handle_final().
| boolean show_but_not_run = FALSE |
Definition at line 84 of file run.c.
Referenced by for(), run_phase(), and update_instantiation_info_file().
Definition at line 87 of file run.c.
Referenced by gen_automata_option(), initiate_automaton_gen(), run_phase(), and write_automata().
1.5.6