Commit 84db136d by Jason Merrill Committed by Jason Merrill

collect2.c (main): Set COLLECT_NO_DEMANGLE for subprocesses.

        * collect2.c (main): Set COLLECT_NO_DEMANGLE for subprocesses.
        (dump_file): Only pad the demangled name with spaces if the
        mangled name was padded with spaces.

From-SVN: r43903
parent fd052ec3
2001-07-10 Jason Merrill <jason_merrill@redhat.com>
* collect2.c (main): Set COLLECT_NO_DEMANGLE for subprocesses.
(dump_file): Only pad the demangled name with spaces if the
mangled name was padded with spaces.
2001-07-10 Bernd Schmidt <bernds@redhat.com> 2001-07-10 Bernd Schmidt <bernds@redhat.com>
* bb-reorder.c (make_reorder_chain_1): Correct branch/fallthru * bb-reorder.c (make_reorder_chain_1): Correct branch/fallthru
......
...@@ -163,6 +163,10 @@ int do_collecting = 1; ...@@ -163,6 +163,10 @@ int do_collecting = 1;
#else #else
int do_collecting = 0; int do_collecting = 0;
#endif #endif
/* Nonzero if we should suppress the automatic demangling of identifiers
in linker error messages. Set from COLLECT_NO_DEMANGLE. */
int no_demangle;
/* Linked lists of constructor and destructor names. */ /* Linked lists of constructor and destructor names. */
...@@ -522,7 +526,6 @@ dump_file (name) ...@@ -522,7 +526,6 @@ dump_file (name)
const char *name; const char *name;
{ {
FILE *stream = fopen (name, "r"); FILE *stream = fopen (name, "r");
int no_demangle = !! getenv ("COLLECT_NO_DEMANGLE");
if (stream == 0) if (stream == 0)
return; return;
...@@ -556,7 +559,7 @@ dump_file (name) ...@@ -556,7 +559,7 @@ dump_file (name)
fputs (result, stderr); fputs (result, stderr);
diff = strlen (word) - strlen (result); diff = strlen (word) - strlen (result);
while (diff > 0) while (diff > 0 && c == ' ')
--diff, putc (' ', stderr); --diff, putc (' ', stderr);
while (diff < 0 && c == ' ') while (diff < 0 && c == ' ')
++diff, c = getc (stream); ++diff, c = getc (stream);
...@@ -858,6 +861,11 @@ main (argc, argv) ...@@ -858,6 +861,11 @@ main (argc, argv)
int first_file; int first_file;
int num_c_args = argc+9; int num_c_args = argc+9;
no_demangle = !! getenv ("COLLECT_NO_DEMANGLE");
/* Suppress demangling by the real linker, which may be broken. */
putenv (xstrdup ("COLLECT_NO_DEMANGLE="));
#if defined (COLLECT2_HOST_INITIALIZATION) #if defined (COLLECT2_HOST_INITIALIZATION)
/* Perform system dependent initialization, if neccessary. */ /* Perform system dependent initialization, if neccessary. */
COLLECT2_HOST_INITIALIZATION; COLLECT2_HOST_INITIALIZATION;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment