Messages in this thread Patch in this message | | | From | Masahiro Yamada <> | Subject | [PATCH] parisc: suppress error messages for 'make clean' | Date | Sat, 25 Apr 2020 14:46:59 +0900 |
| |
'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
| |