* target-select.cc (instantiate_target): Don't acquire the lock if
[deliverable/binutils-gdb.git] / gold / parameters.cc
index 9c57ef322e1e3ebb92718afed0e13d1b1e264efc..0164265bf04eb7f88dd42dbe059d3107d765ac2a 100644 (file)
@@ -1,6 +1,6 @@
 // parameters.cc -- general parameters for a link using gold
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -45,6 +45,9 @@ Parameters::set_options(const General_options* options)
   // For speed, we convert the options() debug var from a string to an
   // enum (from debug.h).
   this->debug_ = debug_string_to_enum(this->options().debug());
+  // If --verbose is set, it acts as "--debug=files".
+  if (options->verbose())
+    this->debug_ |= DEBUG_FILES;
 }
 
 void
@@ -89,11 +92,22 @@ Parameters::default_target() const
   const Target* target = select_target(elfcpp::GOLD_DEFAULT_MACHINE,
                                        GOLD_DEFAULT_SIZE,
                                        GOLD_DEFAULT_BIG_ENDIAN,
-                                       0, 0);
+                                      elfcpp::GOLD_DEFAULT_OSABI,
+                                      0);
   gold_assert(target != NULL);
   return *target;
 }
 
+// Return whether TARGET is compatible with the target we are using.
+
+bool
+Parameters::is_compatible_target(const Target* target) const
+{
+  if (this->target_ == NULL)
+    return true;
+  return target == this->target_;
+}
+
 Parameters::Target_size_endianness
 Parameters::size_and_endianness() const
 {
This page took 0.023432 seconds and 4 git commands to generate.