linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parisc: suppress error messages for 'make clean'
@ 2020-04-25  5:46 Masahiro Yamada
  2020-05-01  5:35 ` Masahiro Yamada
  0 siblings, 1 reply; 9+ messages in thread
From: Masahiro Yamada @ 2020-04-25  5:46 UTC (permalink / raw)
  To: James E . J . Bottomley, Helge Deller, linux-parisc
  Cc: linux-kernel, Masahiro Yamada

'make ARCH=parisc clean' emits a tons of error messages as follows:

  $ make ARCH=parisc clean
  gcc: error: unrecognized command line option '-mno-space-regs'
  gcc: error: unrecognized command line option '-mfast-indirect-calls'; did you mean '-mforce-indirect-call'?
  gcc: error: unrecognized command line option '-mdisable-fpregs'
  gcc: error: missing argument to '-Wframe-larger-than='
  gcc: error: unrecognized command line option '-mno-space-regs'
  gcc: error: unrecognized command line option '-mfast-indirect-calls'; did you mean '-mforce-indirect-call'?
  gcc: error: unrecognized command line option '-mdisable-fpregs'
  gcc: error: missing argument to '-Wframe-larger-than='
    ...

You can supporess them except '-Wframe-larger-than' by setting correct
CROSS_COMPILE=, but we should not require any compiler for cleaning.

This $(shell ...) is evaluated so many times because LIBGCC is exported.
Use the ':=' operator to evaluate it just once, and sink the stderr.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/parisc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 628cd8bb7ad8..d82787da43cd 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -21,7 +21,7 @@ KBUILD_IMAGE := vmlinuz
 
 NM		= sh $(srctree)/arch/parisc/nm
 CHECKFLAGS	+= -D__hppa__=1
-LIBGCC		= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
+LIBGCC		:= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name 2>/dev/null)
 export LIBGCC
 
 ifdef CONFIG_64BIT
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-13 22:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25  5:46 [PATCH] parisc: suppress error messages for 'make clean' Masahiro Yamada
2020-05-01  5:35 ` Masahiro Yamada
2020-05-08 21:46   ` Helge Deller
2020-05-09  8:16     ` Masahiro Yamada
2020-05-09 17:39       ` Helge Deller
2020-05-10  1:19         ` Masahiro Yamada
2020-05-10 20:28           ` Helge Deller
2020-06-13 19:36             ` Rolf Eike Beer
2020-06-13 22:48               ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).