diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2004-07-07 20:29:13 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2004-07-07 13:29:13 -0700 |
commit | d594623ade98699f505a959c91f8f58fc9828255 (patch) | |
tree | e6dfd33f5e444278cf6eff5e3e80fc6d94ba1a92 /gcc/collect2.c | |
parent | f0517163a9b573e1e5858490d95787a48c8a4a10 (diff) | |
download | gcc-d594623ade98699f505a959c91f8f58fc9828255.zip gcc-d594623ade98699f505a959c91f8f58fc9828255.tar.gz gcc-d594623ade98699f505a959c91f8f58fc9828255.tar.bz2 |
collect2.c (dump_file): Don't call cplus_demangle if HAVE_LD_DEMANGLE is defined.
2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
* collect2.c (dump_file): Don't call cplus_demangle if
HAVE_LD_DEMANGLE is defined.
(main): Pass "--demangle" to ld if no_demangle is not 0 and
HAVE_LD_DEMANGLE is defined. Don't set current_demangling_style
if HAVE_LD_DEMANGLE is defined.
* configure.ac (--with-demangler-in-ld): Added
(HAVE_LD_DEMANGLE): Define if ld supports --demangle when
--with-demangler-in-ld is used.
* config.in: Regenerated.
* configure: Likewise.
From-SVN: r84227
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index b9c7cae..79f7885 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -491,10 +491,14 @@ dump_file (const char *name) if (!strncmp (p, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX))) p += strlen (USER_LABEL_PREFIX); +#ifdef HAVE_LD_DEMANGLE + result = 0; +#else if (no_demangle) result = 0; else result = cplus_demangle (p, DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE); +#endif if (result) { @@ -841,8 +845,8 @@ main (int argc, char **argv) /* Do not invoke xcalloc before this point, since locale needs to be set first, in case a diagnostic is issued. */ - ld1 = (const char **)(ld1_argv = xcalloc(sizeof (char *), argc+3)); - ld2 = (const char **)(ld2_argv = xcalloc(sizeof (char *), argc+10)); + ld1 = (const char **)(ld1_argv = xcalloc(sizeof (char *), argc+4)); + ld2 = (const char **)(ld2_argv = xcalloc(sizeof (char *), argc+11)); object = (const char **)(object_lst = xcalloc(sizeof (char *), argc)); #ifdef DEBUG @@ -873,7 +877,9 @@ main (int argc, char **argv) obstack_begin (&temporary_obstack, 0); temporary_firstobj = obstack_alloc (&temporary_obstack, 0); +#ifndef HAVE_LD_DEMANGLE current_demangling_style = auto_demangling; +#endif p = getenv ("COLLECT_GCC_OPTIONS"); while (p && *p) { @@ -1063,6 +1069,10 @@ main (int argc, char **argv) /* After the first file, put in the c++ rt0. */ first_file = 1; +#ifdef HAVE_LD_DEMANGLE + if (!no_demangle) + *ld1++ = *ld2++ = "--demangle"; +#endif while ((arg = *++argv) != (char *) 0) { *ld1++ = *ld2++ = arg; |