* options.c (General_options::finalize): Add check for -static and
authorCary Coutant <ccoutant@google.com>
Tue, 7 Oct 2008 23:40:21 +0000 (23:40 +0000)
committerCary Coutant <ccoutant@google.com>
Tue, 7 Oct 2008 23:40:21 +0000 (23:40 +0000)
-shared.
* gold.cc (queue_middle_tasks): Assert that list of dynamic objects
is not empty.

gold/ChangeLog
gold/gold.cc
gold/options.cc

index 02a007caa3172dab66ef2fe8c8f15a9a5204deca..e13fa981b5a0b0b9fe9ef45c9b9687e44e83412a 100644 (file)
@@ -1,3 +1,10 @@
+2008-10-07  Cary Coutant  <ccoutant@google.com>
+
+       * options.c (General_options::finalize): Add check for -static and
+       -shared.
+       * gold.cc (queue_middle_tasks): Assert that list of dynamic objects
+       is not empty.
+
 2008-10-02  Cary Coutant  <ccoutant@google.com>
 
        * plugin.cc (make_sized_plugin_object): Fix conditional
index 6a536b8c7690fe71bcbe1ce318beb00417aa046f..ac321be33fa0299983b1abc0ca9fc806b7b5c8c6 100644 (file)
@@ -203,6 +203,7 @@ queue_middle_tasks(const General_options& options,
   if (!doing_static_link && options.is_static())
     {
       // We print out just the first .so we see; there may be others.
+      gold_assert(input_objects->dynobj_begin() != input_objects->dynobj_end());
       gold_error(_("cannot mix -static with dynamic object %s"),
                 (*input_objects->dynobj_begin())->name().c_str());
     }
index 08b67fdf46b7e0a751ce5e3a241554bf5d5dfafe..069c138fcd235878ab869aa80dba14bb0bb76d1a 100644 (file)
@@ -792,6 +792,9 @@ General_options::finalize()
   this->add_sysroot();
 
   // Now that we've normalized the options, check for contradictory ones.
+  if (this->shared() && this->is_static())
+    gold_fatal(_("-shared and -static are incompatible"));
+
   if (this->shared() && this->relocatable())
     gold_fatal(_("-shared and -r are incompatible"));
 
This page took 0.030108 seconds and 4 git commands to generate.