hexagon: suppress error message for 'make clean'
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 24 Apr 2020 16:15:02 +0000 (01:15 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 12 May 2020 04:28:32 +0000 (13:28 +0900)
'make ARCH=hexagon clean' emits an error message as follows:

  $ make ARCH=hexagon clean
  gcc: error: unrecognized command line option '-G0'

You can suppress it by setting the correct CROSS_COMPILE=,
but we should not require any compiler for cleaning.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Brian Cain <bcain@codeaurora.org>
arch/hexagon/Makefile

index 4c5858b80f0eebe108d6d75bfbcfa55d8a65a381..c168c6980d0507af134e2842e94619de45356a50 100644 (file)
@@ -30,7 +30,7 @@ TIR_NAME := r19
 KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
 KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
 
-LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name 2>/dev/null)
 libs-y += $(LIBGCC)
 
 head-y := arch/hexagon/kernel/head.o