From 0fe58ccd2b957a1034c2488d63659c30ca505e77 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 4 Jun 2008 09:45:05 +0000 Subject: [PATCH] * lexsup.c (option_values): Add OPTION_NO_WARN_FATAL. (ld_options): Add entry for --no-fatal-warnings. (parse_args): Handle OPTION_NO_WARN_FATAL. * ld.texinfo (Options): Document new command line switch. --- ld/ChangeLog | 7 +++++++ ld/ld.texinfo | 6 ++++-- ld/lexsup.c | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index ccfaca83411..9d188a0a932 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2008-06-04 Chris Metcalf + + * lexsup.c (option_values): Add OPTION_NO_WARN_FATAL. + (ld_options): Add entry for --no-fatal-warnings. + (parse_args): Handle OPTION_NO_WARN_FATAL. + * ld.texinfo (Options): Document new command line switch. + 2008-06-04 Alan Modra * emultempl/spuelf.em (spu_elf_relink): Correct --no-auto-overlay arg. diff --git a/ld/ld.texinfo b/ld/ld.texinfo index a2ec34a2190..7a6e2f76d58 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -1263,10 +1263,12 @@ generating dynamically linked ELF executables. The default dynamic linker is normally correct; don't use this unless you know what you are doing. - @kindex --fatal-warnings +@kindex --no-fatal-warnings @item --fatal-warnings -Treat all warnings as errors. +@itemx --no-fatal-warnings +Treat all warnings as errors. The default behaviour can be restored +with the option @option{--no-fatal-warnings}. @kindex --force-exe-suffix @item --force-exe-suffix diff --git a/ld/lexsup.c b/ld/lexsup.c index 5a30cfb13e7..60a8167d5dc 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -116,6 +116,7 @@ enum option_values OPTION_WARN_COMMON, OPTION_WARN_CONSTRUCTORS, OPTION_WARN_FATAL, + OPTION_NO_WARN_FATAL, OPTION_WARN_MULTIPLE_GP, OPTION_WARN_ONCE, OPTION_WARN_SECTION_ALIGN, @@ -377,6 +378,9 @@ static const struct ld_option ld_options[] = { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}, '\0', NULL, N_("Treat warnings as errors"), TWO_DASHES }, + { {"no-fatal-warnings", no_argument, NULL, OPTION_NO_WARN_FATAL}, + '\0', NULL, N_("Do not treat warnings as errors (default)"), + TWO_DASHES }, { {"fini", required_argument, NULL, OPTION_FINI}, '\0', N_("SYMBOL"), N_("Call SYMBOL at unload-time"), ONE_DASH }, { {"force-exe-suffix", no_argument, NULL, OPTION_FORCE_EXE_SUFFIX}, @@ -1333,6 +1337,9 @@ parse_args (unsigned argc, char **argv) case OPTION_WARN_FATAL: config.fatal_warnings = TRUE; break; + case OPTION_NO_WARN_FATAL: + config.fatal_warnings = FALSE; + break; case OPTION_WARN_MULTIPLE_GP: config.warn_multiple_gp = TRUE; break; -- 2.30.2