Revert patch for PR 19119, which led to PR 19172 and 19197.
authorCary Coutant <ccoutant@gmail.com>
Thu, 5 Nov 2015 20:59:02 +0000 (12:59 -0800)
committerCary Coutant <ccoutant@gmail.com>
Thu, 5 Nov 2015 20:59:19 +0000 (12:59 -0800)
Gold does not support all the emulations that Gnu ld does, and supports
only one spelling per target. The -m option is used only in the rare case
where there are no ELF input files, and we produce an empty output file.
In those cases, users are expected to supply a -m option naming one of
the supported emulations. In the many cases where a build script provides
an unnecessary -m option naming an emulation that gold does not support,
we will simply ignore the option, as we did before the reverted patch.

gold/
PR gold/19119
PR gold/19172
PR gold/19197
Revert commit 6457197210144f50a696097c0d308d81d46d5510:

2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>

* options.h (General_options): Remove "obsolete" from -m.
* parameters.cc (set_parameters_target): Check if input target
is compatible with output emulation set by "-m emulation".

gold/ChangeLog
gold/options.h
gold/parameters.cc

index e38943822c00eb3ede21944cda212ce6e84eb4ef..7996229c8facccf1d48495599af7c7c261173e5f 100644 (file)
@@ -1,3 +1,14 @@
+2015-11-05  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/19119
+       PR gold/19172
+       PR gold/19197
+       Revert commit 6457197210144f50a696097c0d308d81d46d5510:
+       2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+               * options.h (General_options): Remove "obsolete" from -m.
+               * parameters.cc (set_parameters_target): Check if input target
+               is compatible with output emulation set by "-m emulation".
+
 2015-11-05  Cary Coutant  <ccoutant@gmail.com>
 
        PR gold/19163
index 57560140027571e435b401491d3c5c76c0e4f188..ffc44e6d752594fb9a51197f304f8fd51ef5a4e5 100644 (file)
@@ -939,7 +939,7 @@ class General_options
                N_("OFFSET"));
 
   DEFINE_string(m, options::EXACTLY_ONE_DASH, 'm', "",
-               N_("Set GNU linker emulation"), N_("EMULATION"));
+               N_("Set GNU linker emulation; obsolete"), N_("EMULATION"));
 
   DEFINE_bool(mmap_output_file, options::TWO_DASHES, '\0', true,
              N_("Map the output file for writing (default)."),
index 15df42afc9b4ba558ce143718ee43baebf35fd8b..5ed191225122a40608921c30be431c2920b1877a 100644 (file)
@@ -297,16 +297,6 @@ set_parameters_options(const General_options* options)
 void
 set_parameters_target(Target* target)
 {
-  if (parameters->options_valid() && parameters->options().user_set_m())
-    {
-      const char* emulation = parameters->options().m();
-      Target* output = select_target_by_emulation(emulation);
-      if (!output)
-       gold_error(_("unrecognised output emulation: %s"), emulation);
-      else if (output != target)
-       gold_error(_("input file is incompatible with %s output emulation"),
-                  emulation);
-    }
   static_parameters.set_target(target);
 }
 
This page took 0.036617 seconds and 4 git commands to generate.