diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-10 15:39:29 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-10 15:39:29 +0000 |
commit | 402eb8ac5a3255dc923f7737c654911d4a7196b2 (patch) | |
tree | 51f0f35aa7e2fa02035c07cd892b72dbdf06dc10 | |
parent | b21ae3fffb30ed83f0993f31539751f935d85e75 (diff) | |
download | gcc-402eb8ac5a3255dc923f7737c654911d4a7196b2.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43903 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/collect2.c | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02a6f61c185..e408ec4e914 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> * bb-reorder.c (make_reorder_chain_1): Correct branch/fallthru diff --git a/gcc/collect2.c b/gcc/collect2.c index 83ed200da4f..1239b983756 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -163,6 +163,10 @@ int do_collecting = 1; #else int do_collecting = 0; #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. */ @@ -522,7 +526,6 @@ dump_file (name) const char *name; { FILE *stream = fopen (name, "r"); - int no_demangle = !! getenv ("COLLECT_NO_DEMANGLE"); if (stream == 0) return; @@ -556,7 +559,7 @@ dump_file (name) fputs (result, stderr); diff = strlen (word) - strlen (result); - while (diff > 0) + while (diff > 0 && c == ' ') --diff, putc (' ', stderr); while (diff < 0 && c == ' ') ++diff, c = getc (stream); @@ -858,6 +861,11 @@ main (argc, argv) int first_file; 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) /* Perform system dependent initialization, if neccessary. */ COLLECT2_HOST_INITIALIZATION; |