/* 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, 2011 Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com).
This file is part of GCC.
#include "hashtab.h"
#include "demangle.h"
#include "collect2.h"
-#include "libiberty.h"
+#include "filenames.h"
+#include "diagnostic-core.h"
/* TARGET_64BIT may be defined to use driver specific functionality. */
#undef TARGET_64BIT
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);
the new file name already exists. Therefore, we explicitly
remove the old file first. */
if (remove (f->key) == -1)
- fatal_perror ("removing .rpo file");
+ fatal_error ("removing .rpo file: %m");
if (rename (outname, f->key) == -1)
- fatal_perror ("renaming .rpo file");
+ fatal_error ("renaming .rpo file: %m");
if (!f->args)
{