Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2016 19:11:38 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r306136 - stable/10/contrib/binutils/ld
Message-ID:  <201609211911.u8LJBcKM001018@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Wed Sep 21 19:11:37 2016
New Revision: 306136
URL: https://svnweb.freebsd.org/changeset/base/306136

Log:
  MFC r275240 (bapt): Implement --no-fatal-warnings
  
  Implement --no-fatal-warning for compatibility with newer ld
  what ever order the options are passed to ld(1) the --no-fatal-warning always
  disable --fatal-warning

Modified:
  stable/10/contrib/binutils/ld/lexsup.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/binutils/ld/lexsup.c
==============================================================================
--- stable/10/contrib/binutils/ld/lexsup.c	Wed Sep 21 18:52:49 2016	(r306135)
+++ stable/10/contrib/binutils/ld/lexsup.c	Wed Sep 21 19:11:37 2016	(r306136)
@@ -84,6 +84,7 @@ enum option_values
   OPTION_NO_KEEP_MEMORY,
   OPTION_NO_WARN_MISMATCH,
   OPTION_NO_WARN_SEARCH_MISMATCH,
+  OPTION_NO_WARN_FATAL,
   OPTION_NOINHIBIT_EXEC,
   OPTION_NON_SHARED,
   OPTION_NO_WHOLE_ARCHIVE,
@@ -375,6 +376,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_("Don't treat warnings as errors"),
+    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},
@@ -568,6 +572,7 @@ parse_args (unsigned argc, char **argv)
   struct option *really_longopts;
   int last_optind;
   enum report_method how_to_report_unresolved_symbols = RM_GENERATE_ERROR;
+  int no_fatal_warnings = FALSE;
 
   shortopts = xmalloc (OPTION_COUNT * 3 + 2);
   longopts = xmalloc (sizeof (*longopts) * (OPTION_COUNT + 1));
@@ -1317,6 +1322,9 @@ parse_args (unsigned argc, char **argv)
 	case OPTION_WARN_FATAL:
 	  config.fatal_warnings = TRUE;
 	  break;
+	case OPTION_NO_WARN_FATAL:
+	  no_fatal_warnings = TRUE;
+	  break;
 	case OPTION_WARN_MULTIPLE_GP:
 	  config.warn_multiple_gp = TRUE;
 	  break;
@@ -1438,6 +1446,8 @@ parse_args (unsigned argc, char **argv)
           break;
 	}
     }
+  if (no_fatal_warnings)
+    config.fatal_warnings = FALSE;
 
   if (ingroup)
     lang_leave_group ();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609211911.u8LJBcKM001018>