summaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-03-25 21:39:01 +0000
committerIan Lance Taylor <ian@airs.com>2008-03-25 21:39:01 +0000
commit52993cf4170e450edc55a62f9e1016216a846afd (patch)
tree16c1875c3a8f16d5b81a5ce517775fac5c09ce3a /gold/options.cc
parentdf2fd1b07435975706843ca04869987df1a4b730 (diff)
downloadbinutils-redhat-52993cf4170e450edc55a62f9e1016216a846afd.tar.gz
* options.cc (options::help): Print list of supported targets.
* target-select.h: Include <vector>. (class Target_selector): Make machine_, size_, and is_big_endian_ fields const. Add bfd_name_ and instantiated_target_ fields. (Target_selector::Target_selector): Add bfd_name parameter. (Target_selector::recognize): Make non-virtual, call do_recognize. (Target_selector::recognize_by_name): Make non-virtual, call do_recognize_by_name. (Target_selector::supported_names): New function. (Target_selector::bfd_name): New function. (Target_selector::do_instantiate_target): New pure virtual function. (Target_selector::do_recognize): New virtual function. (Target_selector::do_recognize_by_name): New virtual function. (Target_selector::instantiate_target): New private function. (supported_target_names): Declare. * target-select.cc (Target_selector::Target_selector): Update for new parameter and fields. (select_target_by_name): Check that the name matches before calling recognize_by_name. (supported_target_names): New function. * i386.cc (class Target_selector_i386): Update Target_selector constructor call. Remove recognize and recognize_by_name. Add do_instantiate_target. * x86_64.cc (class Target_selector_x86_64): Likewise. * testsuite/testfile.cc (class Target_selector_test): Update for changes to Target_selector.
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/options.cc b/gold/options.cc
index 46d84cf553..5d565324b8 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -142,6 +142,17 @@ help()
std::vector<const One_option*>::const_iterator it;
for (it = registered_options.begin(); it != registered_options.end(); ++it)
(*it)->print();
+
+ // config.guess and libtool.m4 look in ld --help output for the
+ // string "supported targets".
+ printf(_("%s: supported targets:"), gold::program_name);
+ std::vector<const char*> supported_names;
+ gold::supported_target_names(&supported_names);
+ for (std::vector<const char*>::const_iterator p = supported_names.begin();
+ p != supported_names.end();
+ ++p)
+ printf(" %s", *p);
+ printf("\n");
}
// For bool, arg will be NULL (boolean options take no argument);