mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <zhe.he@windriver.com>
To: <tglx@linutronix.de>, <kstewart@linuxfoundation.org>,
	<pombredanne@nexb.com>, <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>
Cc: <zhe.he@windriver.com>
Subject: [PATCH] scripts/gcc-goto.sh: Show stdout and stderr for potential errors
Date: Thu, 9 Aug 2018 16:34:45 +0800	[thread overview]
Message-ID: <1533803685-42422-1-git-send-email-zhe.he@windriver.com> (raw)

From: He Zhe <zhe.he@windriver.com>

The check may fail not only because ${CC} does not support the asm
feature, but also due to potential defects of ${CC} itself like what
we experienced below or even it's missing.

Assembler messages:
Fatal error: The input and output files must be distinct
(introduced by binutils-2.31 "Stop the assembler from overwriting its
output file.")

This patch enables stdout and stderr to give user direct error
information for those cases, while not polluting the output for normal
cases.

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 scripts/gcc-goto.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
index 083c526..bd7fc8eb 100755
--- a/scripts/gcc-goto.sh
+++ b/scripts/gcc-goto.sh
@@ -3,7 +3,7 @@
 # Test for gcc 'asm goto' support
 # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
 
-cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
+cat << "END" | $@ -x c - -c -o /dev/null && echo "y"
 int main(void)
 {
 #if defined(__arm__) || defined(__aarch64__)
-- 
2.7.4


             reply	other threads:[~2018-08-09  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09  8:34 zhe.he [this message]
2018-09-17  9:43 ` He Zhe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533803685-42422-1-git-send-email-zhe.he@windriver.com \
    --to=zhe.he@windriver.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pombredanne@nexb.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®