[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200425054659.814774-1-masahiroy@kernel.org>
Date: Sat, 25 Apr 2020 14:46:59 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: "James E . J . Bottomley" <James.Bottomley@...senPartnership.com>,
Helge Deller <deller@....de>, linux-parisc@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Masahiro Yamada <masahiroy@...nel.org>
Subject: [PATCH] parisc: suppress error messages for 'make clean'
'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@...nel.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
Powered by blists - more mailing lists