osprey/driver/main.c File Reference

#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"

Include dependency graph for main.c:

Go to the source code of this file.

Data Types

type  explicit_lang

Functions/Subroutines

void toggle_implicits (void)
void set_defaults (void)
void add_special_options (void)
static void check_old_CC_options (char *name)
static void check_makedepend_flags (void)
static void mark_used (void)
static void dump_args (char *msg)
static void print_help_msg (void)
static void print_defaults (int argc, char *argv[])
static void append_default_options (int *argc, char *(*argv[]))
static void print_search_path (void)
static void display_version (boolean dump_version_only)
static void set_executable_dir (void)
static void prescan_options (int argc, char *argv[])
static void no_args (void)
int main (int argc, char *argv[])
 finalize_maybe_linker_options (num_files==0)
 if (num_files > 0 &&unrecognized_dashdash_option_name!=NULL)
 Check_Target ()
 if (show_search_path)
 if (show_defaults)
 if (argc==1)
 if (print_help||help_pattern!=NULL)
 if (!show_version &&!execute_flag &&!show_flag &&!dump_version)
 if (source_kind==S_NONE||read_stdin)
 FOREACH_OPTION_SEEN (i)
 if ((option_was_seen(O_fpic)||option_was_seen(O_fPIC))&&mem_model==M_MEDIUM)
 if (debug)
 if (ipa==TRUE)
 if (feedback_files->head) cordflag
 if (cordflag!=TRUE)
 if (show_version||dump_version)
 if (num_files > 1)
 add_library_options ()
 if (has_errors())
 if (Use_feedback)
 if (read_stdin)
 for (p=files->head, q=file_suffixes->head;p!=NULL;p=p->next, q=q->next)
 if (num_files==0||remember_last_phase!=last_phase)
 if (dump_outfile_to_stdout==TRUE)
void do_exit (int code)
void set_explicit_lang (const char *flag, const char *lang)
static int read_compiler_defaults (FILE *f, string_list_t *default_options_list)
static void append_open64_env_flags (int *argc, char *(*argv[]), char *env_var)
static FILEread_gcc_output (char *cmdline)
const char * get_gcc_version (int *v, int nv)

Variables

static char * rcs_id = "$Source: driver/SCCS/s.main.c $ $Revision: 1.109 $"
char * help_pattern
boolean debug
boolean nostdinc = TRUE
int show_version
boolean show_copyright
boolean dump_version
boolean show_search_path
boolean show_defaults
boolean print_help = FALSE
static string_list_tfiles
static string_list_tfile_suffixes
string_list_tfeedback_files
boolean parsing_default_options = FALSE
boolean drop_option
const char compiler_version [] = INCLUDE_STAMP
static struct explicit_lang explicit_langs []


Function Documentation

add_library_options (  ) 

Definition at line 554 of file objects.c.

add_special_options ( void   ) 

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

static void append_open64_env_flags ( int *  argc,
char **[]  argv,
char *  env_var 
) [static]

Definition at line 1272 of file main.c.

References calloc(), concat_strings(), fin, getenv(), memcpy, putenv, realloc, strdup, string_copy(), tmp, and unsetenv.

Referenced by main().

static void check_makedepend_flags ( void   )  [static]

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.

static void display_version ( boolean  dump_version_only  )  [static]

void do_exit ( int  code  ) 

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().

for ( p  = files->head,
q  = file_suffixes->headp != NULL; p = p->next,
q  = q->next 
)

FOREACH_OPTION_SEEN ( i   ) 

const char* get_gcc_version ( int *  v,
int  nv 
)

Definition at line 1404 of file main.c.

References a, c, d, fp, fread, isdigit(), major(), minor(), pclose(), read_gcc_output(), sprintf(), strchr, strlen(), strtol(), and version.

Referenced by add_file_args().

if ( dump_outfile_to_stdout  = = TRUE  ) 

Definition at line 669 of file main.c.

if ( num_files  = = 0 || remember_last_phase != last_phase  ) 

if ( read_stdin   ) 

if ( Use_feedback   ) 

if ( has_errors()   ) 

Definition at line 552 of file main.c.

if ( num_files  ,
 
)

Definition at line 540 of file main.c.

References multiple_source_files, and TRUE.

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  ) 

Definition at line 479 of file main.c.

References earliest_phase(), last_phase, and P_any_ld.

if ( feedback_files->  head  ) 

if ( ipa  = = TRUE  ) 

Definition at line 466 of file main.c.

if ( debug   ) 

Definition at line 463 of file main.c.

References dump_args().

if ( (option_was_seen(O_fpic)||option_was_seen(O_fPIC))&&  mem_model = = M_MEDIUM  ) 

Definition at line 438 of file main.c.

References error().

if ( source_kind  = = S_NONE || read_stdin  ) 

if ( !show_version &&!execute_flag &&!show_flag &&!  dump_version  ) 

Definition at line 392 of file main.c.

References do_exit(), and RC_OKAY.

if ( print_help||help_pattern!  = NULL  ) 

Definition at line 388 of file main.c.

References print_help_msg().

if ( argc  = = 1  ) 

Definition at line 383 of file main.c.

References no_args().

if ( show_defaults   ) 

Definition at line 379 of file main.c.

References print_defaults().

if ( show_search_path   ) 

Definition at line 376 of file main.c.

References print_search_path().

if ( num_files  ,
0 &&unrecognized_dashdash_option_name!  = NULL 
)

Definition at line 354 of file main.c.

References parse_error().

int main ( int argc  ,
char *  argv[] 
)

static void mark_used ( void   )  [static]

static void no_args ( void   )  [static]

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]

Definition at line 962 of file main.c.

References FALSE, keep_flag, NULL, sprintf(), strcasecmp(), strcmp(), TRUE, and warning.

Referenced by main().

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().

static void print_help_msg ( void   )  [static]

static void print_search_path ( void   )  [static]

static int read_compiler_defaults ( FILE f,
string_list_t default_options_list 
) [static]

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   ) 

static void set_executable_dir ( void   )  [static]

Referenced by main().

void set_explicit_lang ( const char *  flag,
const char *  lang 
)

toggle_implicits ( void   ) 


Variable Documentation

const char compiler_version[] = INCLUDE_STAMP

Definition at line 121 of file main.c.

Referenced by main(), process_command(), and save_cpp_output().

boolean debug

Definition at line 78 of file main.c.

Definition at line 115 of file main.c.

Referenced by set_cpu(), and toggle().

Definition at line 82 of file main.c.

Referenced by if().

Referenced by set_explicit_lang().

Definition at line 112 of file main.c.

Definition at line 111 of file main.c.

string_list_t* files [static]

Definition at line 110 of file main.c.

char* help_pattern

Definition at line 77 of file main.c.

Referenced by print_help_msg().

boolean nostdinc = TRUE

Definition at line 79 of file main.c.

Referenced by add_special_options().

Definition at line 114 of file main.c.

Referenced by set_cpu(), and toggle().

static void print_help = FALSE

Definition at line 85 of file main.c.

Referenced by c_common_decode_option(), and common_handle_option().

char* rcs_id = "$Source: driver/SCCS/s.main.c $ $Revision: 1.109 $" [static]

Definition at line 48 of file main.c.

Definition at line 81 of file main.c.

Definition at line 84 of file main.c.

Definition at line 83 of file main.c.

Definition at line 80 of file main.c.

Referenced by add_file_args(), display_version(), and if().


Generated on Wed Apr 8 14:44:51 2009 for Open64 by  doxygen 1.5.6