2020-04-24 16:23:00

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH] hexagon: suppress error message for 'make clean'

'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 <[email protected]>
---

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

diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile
index 4c5858b80f0e..c168c6980d05 100644
--- a/arch/hexagon/Makefile
+++ b/arch/hexagon/Makefile
@@ -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
--
2.25.1


2020-04-24 19:11:02

by Brian Cain

[permalink] [raw]
Subject: RE: [PATCH] hexagon: suppress error message for 'make clean'

> -----Original Message-----
> From: [email protected] <linux-hexagon-
> [email protected]> On Behalf Of Masahiro Yamada
...
> '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 <[email protected]>


Acked-by: Brian Cain <[email protected]>


> ---
>
> arch/hexagon/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index
> 4c5858b80f0e..c168c6980d05 100644
> --- a/arch/hexagon/Makefile
> +++ b/arch/hexagon/Makefile
> @@ -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
> --
> 2.25.1

2020-05-01 05:36:54

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH] hexagon: suppress error message for 'make clean'

On Sat, Apr 25, 2020 at 4:06 AM Brian Cain <[email protected]> wrote:
>
> > -----Original Message-----
> > From: [email protected] <linux-hexagon-
> > [email protected]> On Behalf Of Masahiro Yamada
> ...
> > '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 <[email protected]>
>
>
> Acked-by: Brian Cain <[email protected]>

Applied to linux-kbuild. Thanks.


>
> > ---
> >
> > arch/hexagon/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index
> > 4c5858b80f0e..c168c6980d05 100644
> > --- a/arch/hexagon/Makefile
> > +++ b/arch/hexagon/Makefile
> > @@ -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
> > --
> > 2.25.1
>
>


--
Best Regards
Masahiro Yamada