as error output not -j64 safe

Mike Stump mikestump@comcast.net
Thu May 15 22:48:00 GMT 2014


So when dealing with error messages, it is important that they be one per line and -j safe.  This fixes intermingled output when -j64 is used on linux:

diff --git a/binutils/gas/messages.c b/binutils/gas/messages.c
index e1734f2..c3a551b 100644
--- a/binutils/gas/messages.c
+++ b/binutils/gas/messages.c
@@ -219,13 +219,10 @@ as_bad_internal (char *file, unsigned int line, char *buffer)
   if (file)
     {
       if (line != 0)
-       fprintf (stderr, "%s:%u: ", file, line);
+       fprintf (stderr, "%s:%u: %s %s\n", file, line, _("Error:"), buffer);
       else
-       fprintf (stderr, "%s: ", file);
+       fprintf (stderr, "%s: %s %s\n", file, _("Error:"), buffer);
     }
-  fprintf (stderr, _("Error: "));
-  fputs (buffer, stderr);
-  (void) putc ('\n', stderr);
 #ifndef NO_LISTING
   listing_error (buffer);
 #endif



More information about the Binutils mailing list