* incremental.cc (Sized_incremental_binary::do_file_has_changed):
[external/binutils.git] / gold / options.cc
index 50fc557..16699aa 100644 (file)
@@ -235,6 +235,17 @@ parse_double(const char* option_name, const char* arg, double* retval)
 }
 
 void
+parse_percent(const char* option_name, const char* arg, double* retval)
+{
+  char* endptr;
+  *retval = strtod(arg, &endptr) / 100.0;
+  if (*endptr != '\0')
+    gold_fatal(_("%s: invalid option value "
+                "(expected a floating point number): %s"),
+              option_name, arg);
+}
+
+void
 parse_string(const char* option_name, const char* arg, const char** retval)
 {
   if (*arg == '\0')
@@ -387,6 +398,14 @@ General_options::parse_incremental_unknown(const char*, const char*,
 }
 
 void
+General_options::parse_incremental_startup_unchanged(const char*, const char*,
+                                                    Command_line*)
+{
+  this->implicit_incremental_ = true;
+  this->incremental_startup_disposition_ = INCREMENTAL_UNCHANGED;
+}
+
+void
 General_options::parse_library(const char*, const char* arg,
                                Command_line* cmdline)
 {
@@ -899,7 +918,8 @@ General_options::General_options()
     plugins_(NULL),
     dynamic_list_(),
     incremental_mode_(INCREMENTAL_OFF),
-    incremental_disposition_(INCREMENTAL_CHECK),
+    incremental_disposition_(INCREMENTAL_STARTUP),
+    incremental_startup_disposition_(INCREMENTAL_CHECK),
     implicit_incremental_(false),
     excluded_libs_(),
     symbols_to_retain_(),
@@ -1166,6 +1186,14 @@ General_options::finalize()
   if (this->pie() && this->relocatable())
     gold_fatal(_("-pie and -r are incompatible"));
 
+  if (!this->shared())
+    {
+      if (this->filter() != NULL)
+       gold_fatal(_("-F/--filter may not used without -shared"));
+      if (this->any_auxiliary())
+       gold_fatal(_("-f/--auxiliary may not be used without -shared"));
+    }
+
   // TODO: implement support for -retain-symbols-file with -r, if needed.
   if (this->relocatable() && this->retain_symbols_file())
     gold_fatal(_("-retain-symbols-file does not yet work with -r"));