* plugin.cc (make_sized_plugin_object): Fix conditional
authorCary Coutant <ccoutant@google.com>
Thu, 2 Oct 2008 18:35:51 +0000 (18:35 +0000)
committerCary Coutant <ccoutant@google.com>
Thu, 2 Oct 2008 18:35:51 +0000 (18:35 +0000)
compilation to work when not all targets are enabled.

gold/ChangeLog
gold/plugin.cc

index dd60e69178d6b46cc2ced0b6b7a2fdbfa84b39f4..02a007caa3172dab66ef2fe8c8f15a9a5204deca 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-02  Cary Coutant  <ccoutant@google.com>
+
+       * plugin.cc (make_sized_plugin_object): Fix conditional
+       compilation to work when not all targets are enabled.
+
 2008-09-29  Cary Coutant  <ccoutant@google.com>
 
        * archive.cc (Archive::get_file_and_offset): Use filename instead
index 19f7619979b511a8cc56484089e2e1773df2ffdf..a5f7a06f27e526d1255b4a59a100b953f79f7312 100644 (file)
@@ -935,28 +935,44 @@ make_sized_plugin_object(Input_file* input_file, off_t offset)
 
   if (target->get_size() == 32)
     {
-#ifdef HAVE_TARGET_32_BIG
       if (target->is_big_endian())
+#ifdef HAVE_TARGET_32_BIG
         obj = new Sized_pluginobj<32, true>(input_file->filename(),
                                             input_file, offset);
+#else
+        gold_error(_("%s: not configured to support "
+                    "32-bit big-endian object"),
+                  input_file->filename().c_str());
 #endif
-#ifdef HAVE_TARGET_32_LITTLE
       else
+#ifdef HAVE_TARGET_32_LITTLE
         obj = new Sized_pluginobj<32, false>(input_file->filename(),
                                              input_file, offset);
+#else
+        gold_error(_("%s: not configured to support "
+                    "32-bit little-endian object"),
+                  input_file->filename().c_str());
 #endif
     }
   else if (target->get_size() == 64)
     {
-#ifdef HAVE_TARGET_64_BIG
       if (target->is_big_endian())
+#ifdef HAVE_TARGET_64_BIG
         obj = new Sized_pluginobj<64, true>(input_file->filename(),
                                             input_file, offset);
+#else
+        gold_error(_("%s: not configured to support "
+                    "64-bit big-endian object"),
+                  input_file->filename().c_str());
 #endif
-#ifdef HAVE_TARGET_64_LITTLE
       else
+#ifdef HAVE_TARGET_64_LITTLE
         obj = new Sized_pluginobj<64, false>(input_file->filename(),
                                              input_file, offset);
+#else
+        gold_error(_("%s: not configured to support "
+                    "64-bit little-endian object"),
+                  input_file->filename().c_str());
 #endif
     }