_gold_dummy_zoption
authorMatthias Klose <doko@debian.org>
Thu, 26 Jul 2018 10:23:07 +0000 (11:23 +0100)
committerMatthias Klose <doko@debian.org>
Thu, 26 Jul 2018 10:23:07 +0000 (11:23 +0100)
# DP: let gold accept a dummy -z buildd-<random-string> option.

Gbp-Pq: Name 161_gold_dummy_zoption.diff

gold/options.cc
gold/options.h

index d9e204b66ff05e4874d5da11c310584aa0f62967..d18f790d078ac558e303f79bf7e6b29c56e4f377 100644 (file)
@@ -965,6 +965,8 @@ parse_short_option(int argc, const char** argv, int pos_in_argv_i,
     {
       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);
index 98d6be8009248f3f4bbf9c365f96644bbc119c77..7b756d3c5ae1693724c8062d714ccfd742947179 100644 (file)
@@ -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 "