diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-07 20:29:13 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-07 20:29:13 +0000 |
commit | 9c948bc2112d7a8c9ea95f0857fe4113b82a8845 (patch) | |
tree | e6dfd33f5e444278cf6eff5e3e80fc6d94ba1a92 /gcc/collect2.c | |
parent | afeee12248ce5140c94b318cf4638a3dca7026b1 (diff) | |
download | gcc-9c948bc2112d7a8c9ea95f0857fe4113b82a8845.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84227 138bc75d-0d04-0410-961f-82ee72b054a4
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 b9c7cae8a5e..79f7885e6e7 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; |