X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fgcc.c;h=2996de40d23ce3aa337f652aab3bcdd028892760;hb=90336809fc0d2f5971957b8062a1da210e814322;hp=f9a2bb2105c94957a4f6e6ccb852ea9b129992ea;hpb=dd045aeeddc65c15840ac25e90f729e2805dfc17;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/gcc.c b/gcc/gcc.c index f9a2bb2105c..2996de40d23 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -43,6 +43,7 @@ compilation is specified by a string called a "spec". */ #include "diagnostic.h" #include "flags.h" #include "opts.h" +#include "params.h" #include "vec.h" #include "filenames.h" @@ -1438,7 +1439,8 @@ init_spec (void) } #endif -#if defined LINK_EH_SPEC || defined LINK_BUILDID_SPEC +#if defined LINK_EH_SPEC || defined LINK_BUILDID_SPEC || \ + defined LINKER_HASH_STYLE # ifdef LINK_BUILDID_SPEC /* Prepend LINK_BUILDID_SPEC to whatever link_spec we had before. */ obstack_grow (&obstack, LINK_BUILDID_SPEC, sizeof(LINK_BUILDID_SPEC) - 1); @@ -1447,6 +1449,16 @@ init_spec (void) /* Prepend LINK_EH_SPEC to whatever link_spec we had before. */ obstack_grow (&obstack, LINK_EH_SPEC, sizeof(LINK_EH_SPEC) - 1); # endif +# ifdef LINKER_HASH_STYLE + /* Prepend --hash-style=LINKER_HASH_STYLE to whatever link_spec we had + before. */ + { + static const char hash_style[] = "--hash-style="; + obstack_grow (&obstack, hash_style, sizeof(hash_style) - 1); + obstack_grow (&obstack, LINKER_HASH_STYLE, sizeof(LINKER_HASH_STYLE) - 1); + obstack_1grow (&obstack, ' '); + } +# endif obstack_grow0 (&obstack, link_spec, strlen (link_spec)); link_spec = XOBFINISH (&obstack, const char *); #endif @@ -3266,7 +3278,7 @@ driver_handle_option (struct gcc_options *opts, compare_debug_with_arg: gcc_assert (decoded->canonical_option_num_elements == 1); gcc_assert (arg != NULL); - if (arg) + if (*arg) compare_debug = 1; else compare_debug = -1; @@ -3521,9 +3533,13 @@ set_option_handlers (struct cl_option_handlers *handlers) handlers->unknown_option_callback = driver_unknown_option_callback; handlers->wrong_lang_callback = driver_wrong_lang_callback; handlers->post_handling_callback = driver_post_handling_callback; - handlers->num_handlers = 1; + handlers->num_handlers = 3; handlers->handlers[0].handler = driver_handle_option; handlers->handlers[0].mask = CL_DRIVER; + handlers->handlers[1].handler = common_handle_option; + handlers->handlers[1].mask = CL_COMMON; + handlers->handlers[2].handler = target_handle_option; + handlers->handlers[2].mask = CL_TARGET; } /* Create the vector `switches' and its contents. @@ -6145,7 +6161,11 @@ main (int argc, char **argv) if (argv != old_argv) at_file_supplied = true; - global_options = global_options_init; + /* Register the language-independent parameters. */ + global_init_params (); + finish_params (); + + init_options_struct (&global_options, &global_options_set); decode_cmdline_options_to_array (argc, CONST_CAST2 (const char **, char **, argv),