PR gold/12934
* target-select.cc (Target_selector::Target_selector): Add emulation parameter. Change all callers. (select_target_by_bfd_name): Rename from select_target_by_name. Change all callers. (select_target_by_emulation): New function. (supported_emulation_names): New function. * target-select.h (class Target_selector): Add emulation_ field. Update declarations. (Target_selector::recognize_by_bfd_name): Rename from recognize_by_name. Change all callers. (Target_selector::supported_bfd_names): Rename from supported_names. Change all callers. (Target_selector::recognize_by_emulation): New function. (Target_selector::supported_emulations): New function. (Target_selector::emulation): New function. (Target_selector::do_recognize_by_bfd_name): Rename from do_recognize_by_name. Change all callers. (Target_selector::do_supported_bfd_names): Rename from do_supported_names. Change all callers. (Target_selector::do_recognize_by_emulation): New function. (Target_selector::do_supported_emulations): New function. (select_target_by_bfd_name): Change name in declaration. (select_target_by_emulation): Declare. (supported_emulation_names): Declare. * parameters.cc (parameters_force_valid_target): Try to find target based on emulation from -m option. * options.h (class General_options): Change doc string for -m. * options.cc (help): Print emulations. (General_options::parse_V): Likewise. * freebsd.h (Target_selector_freebsd::Target_selector_freebsd): Add emulation parameter. Change all callers.
This commit is contained in:
parent
200b2bb9e8
commit
03ef7571fc
14 changed files with 192 additions and 40 deletions
|
@ -38,8 +38,9 @@ class Target_selector_freebsd : public Target_selector
|
|||
public:
|
||||
Target_selector_freebsd(int machine, int size, bool is_big_endian,
|
||||
const char* bfd_name,
|
||||
const char* freebsd_bfd_name)
|
||||
: Target_selector(machine, size, is_big_endian, NULL),
|
||||
const char* freebsd_bfd_name,
|
||||
const char* emulation)
|
||||
: Target_selector(machine, size, is_big_endian, NULL, emulation),
|
||||
bfd_name_(bfd_name), freebsd_bfd_name_(freebsd_bfd_name)
|
||||
{ }
|
||||
|
||||
|
@ -57,7 +58,7 @@ class Target_selector_freebsd : public Target_selector
|
|||
|
||||
// Recognize two names.
|
||||
virtual Target*
|
||||
do_recognize_by_name(const char* name)
|
||||
do_recognize_by_bfd_name(const char* name)
|
||||
{
|
||||
if (strcmp(name, this->bfd_name_) == 0)
|
||||
return this->instantiate_target();
|
||||
|
@ -73,7 +74,7 @@ class Target_selector_freebsd : public Target_selector
|
|||
|
||||
// Print both names in --help output.
|
||||
virtual void
|
||||
do_supported_names(std::vector<const char*>* names)
|
||||
do_supported_bfd_names(std::vector<const char*>* names)
|
||||
{
|
||||
names->push_back(this->bfd_name_);
|
||||
names->push_back(this->freebsd_bfd_name_);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue