From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2740 invoked by alias); 15 May 2014 22:48:41 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 2726 invoked by uid 89); 15 May 2014 22:48:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: qmta07.emeryville.ca.mail.comcast.net Received: from qmta07.emeryville.ca.mail.comcast.net (HELO qmta07.emeryville.ca.mail.comcast.net) (76.96.30.64) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 May 2014 22:48:39 +0000 Received: from omta05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by qmta07.emeryville.ca.mail.comcast.net with comcast id 2LQt1o0020vp7WLA7Nodf8; Thu, 15 May 2014 22:48:37 +0000 Received: from [IPv6:2601:9:5f80:ba4::1] ([IPv6:2601:9:5f80:ba4::1]) by omta05.emeryville.ca.mail.comcast.net with comcast id 2Noc1o00U2nwLhK8RNodxw; Thu, 15 May 2014 22:48:37 +0000 From: Mike Stump Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: as error output not -j64 safe Message-Id: <819223B1-7BDF-46C0-80CE-EF49878BA3C8@comcast.net> Date: Thu, 15 May 2014 22:48:00 -0000 To: binutils@sourceware.org Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) X-SW-Source: 2014-05/txt/msg00134.txt.bz2 So when dealing with error messages, it is important that they be one per l= ine 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 !=3D 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