From 881466d851f3c806692bda4569a4534d89848104 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Mon, 31 Dec 2007 15:02:59 +0000 Subject: re PR driver/33772 (collect2 doesn't strip .sl version) PR driver/33772 * collect2.c (SHLIB_SUFFIX): Define if not defined. (write_c_file_stat): Use SHLIB_SUFFIX. * som.h (SHLIB_SUFFIX): Define. * doc/tm.texi (SHLIB_SUFFIX): Document. From-SVN: r131235 --- gcc/collect2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/collect2.c') diff --git a/gcc/collect2.c b/gcc/collect2.c index a673f25..bba108d 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -129,6 +129,10 @@ along with GCC; see the file COPYING3. If not see #define SCAN_LIBRARIES #endif +#ifndef SHLIB_SUFFIX +#define SHLIB_SUFFIX ".so" +#endif + #ifdef USE_COLLECT2 int do_collecting = 1; #else @@ -1868,9 +1872,9 @@ write_c_file_stat (FILE *stream, const char *name ATTRIBUTE_UNUSED) } else { - if (strncmp (q, ".so", 3) == 0) + if (strncmp (q, SHLIB_SUFFIX, strlen (SHLIB_SUFFIX)) == 0) { - q += 3; + q += strlen (SHLIB_SUFFIX); break; } else -- cgit v1.1