#include "hashtab.h"
#include "demangle.h"
#include "collect2.h"
+#include "filenames.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);