Package: binutils / 2.31.1-16

161_gold_dummy_zoption.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# DP: let gold accept a dummy -z buildd-<random-string> option.

Index: b/gold/options.h
===================================================================
--- a/gold/options.h
+++ b/gold/options.h
@@ -1386,6 +1386,9 @@ class General_options
 		    options::TWO_DASHES, '\0',
 		    N_("Report unresolved symbols as errors"),
 		    NULL, true);
+  DEFINE_bool(buildd, options::DASH_Z, '\0', false,
+	      N_("Dummy z option"),
+	      NULL);
 
   DEFINE_bool(wchar_size_warning, options::TWO_DASHES, '\0', true, NULL,
 	      N_("(ARM only) Do not warn about objects with incompatible "
Index: b/gold/options.cc
===================================================================
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -965,6 +965,8 @@ parse_short_option(int argc, const char*
     {
       int dummy_i = 0;
       const char* dash_z_arg = *arg;
+      if (strncmp(dash_z_arg, "buildd", strlen("buildd")) == 0)
+	  *arg = "buildd";
       retval = parse_long_option(1, arg, true, arg, &dummy_i);
       if (retval == NULL)
 	usage(_("unknown -z option"), dash_z_arg);