diff options
Diffstat (limited to 'contrib/gcc/cp/g++spec.c')
-rw-r--r-- | contrib/gcc/cp/g++spec.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/contrib/gcc/cp/g++spec.c b/contrib/gcc/cp/g++spec.c index c0e5c73..af30f1c 100644 --- a/contrib/gcc/cp/g++spec.c +++ b/contrib/gcc/cp/g++spec.c @@ -51,10 +51,10 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) { int i, j; - /* If non-zero, the user gave us the `-p' or `-pg' flag. */ + /* If nonzero, the user gave us the `-p' or `-pg' flag. */ int saw_profile_flag = 0; - /* If non-zero, the user gave us the `-v' flag. */ + /* If nonzero, the user gave us the `-v' flag. */ int saw_verbose_flag = 0; /* This will be 0 if we encounter a situation where we should not @@ -73,7 +73,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) /* The new argument list will be contained in this. */ const char **arglist; - /* Non-zero if we saw a `-xfoo' language specification on the + /* Nonzero if we saw a `-xfoo' language specification on the command line. Used to avoid adding our own -xc++ if the user already gave a language for the file. */ int saw_speclang = 0; @@ -178,6 +178,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) else if (strcmp (argv[i], "-static-libgcc") == 0 || strcmp (argv[i], "-static") == 0) shared_libgcc = 0; + else if (DEFAULT_WORD_SWITCH_TAKES_ARG (&argv[i][1])) + i++; else /* Pass other options through. */ continue; @@ -272,6 +274,13 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) { arglist[j++] = saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX; added_libraries++; +#ifdef USE_LIBUNWIND_EXCEPTIONS +# ifndef LIBUNWIND +# define LIBUNWIND "-lunwind" +# endif + arglist[j++] = LIBUNWIND; + added_libraries++; +#endif } if (saw_math) arglist[j++] = saw_math; @@ -292,11 +301,17 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) *in_added_libraries = added_libraries; } -/* Called before linking. Returns 0 on success and -1 on failure. */ -int lang_specific_pre_link () /* Not used for C++. */ +/* Called before linking. Returns 0 on success and -1 on failure. */ +int lang_specific_pre_link () /* Not used for C++. */ { return 0; } -/* Number of extra output files that lang_specific_pre_link may generate. */ -int lang_specific_extra_outfiles = 0; /* Not used for C++. */ +/* Number of extra output files that lang_specific_pre_link may generate. */ +int lang_specific_extra_outfiles = 0; /* Not used for C++. */ + +/* Table of language-specific spec functions. */ +const struct spec_function lang_specific_spec_functions[] = +{ + { 0, 0 } +}; |