OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / tlink.c
index 969c75d..883aa0f 100644 (file)
@@ -1,8 +1,8 @@
 /* Scan linker error messages for missing template instantiations and provide
    them.
 
-   Copyright (C) 1995, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008
-   Free Software Foundation, Inc.
+   Copyright (C) 1995, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008,
+   2009, 2010 Free Software Foundation, Inc.
    Contributed by Jason Merrill (jason@cygnus.com).
 
 This file is part of GCC.
@@ -30,7 +30,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "hashtab.h"
 #include "demangle.h"
 #include "collect2.h"
-#include "libiberty.h"
+#include "filenames.h"
+
+/* TARGET_64BIT may be defined to use driver specific functionality. */
+#undef TARGET_64BIT
+#define TARGET_64BIT TARGET_64BIT_DEFAULT
 
 #define MAX_ITERATIONS 17
 
@@ -290,10 +294,9 @@ tlink_execute (const char *prog, char **argv, const char *outname,
 static char *
 frob_extension (const char *s, const char *ext)
 {
-  const char *p = strrchr (s, '/');
-  if (! p)
-    p = s;
-  p = strrchr (p, '.');
+  const char *p;
+
+  p = strrchr (lbasename (s), '.');
   if (! p)
     p = s + strlen (s);
 
@@ -729,7 +732,7 @@ scan_linker_output (const char *fname)
       if (sym && sym->tweaked)
        {
          error ("'%s' was assigned to '%s', but was not defined "
-                "during recompilation, or vice versa", 
+                "during recompilation, or vice versa",
                 sym->key, sym->file->key);
          fclose (stream);
          return 0;