Re: [PATCH] parisc: suppress error messages for 'make clean'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Helge,

On Sat, May 9, 2020 at 6:46 AM Helge Deller <deller@xxxxxx> wrote:
>
> * Masahiro Yamada <masahiroy@xxxxxxxxxx>:
> > On Sat, Apr 25, 2020 at 2:47 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> > >
> > > '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.
> > >
> >
> > Applied to linux-kbuild.
>
> That patch breaks then building the boot loader/compressor:
> ...
>   hppa-linux-gnu-ld    -X -e startup --as-needed -T arch/parisc/boot/compressed/vmlinux.lds arch/parisc/boot/compressed/head.o arch/parisc/boot/compressed/real2.o arch/parisc/boot/compressed/firmware.o arch/parisc/boot/compressed/misc.o arch/parisc/boot/compressed/piggy.o -o arch/parisc/boot/compressed/vmlinux
> hppa-linux-gnu-ld: arch/parisc/boot/compressed/misc.o: in function `dec_vli':
> (.text+0x104): undefined reference to `__ashldi3'
> hppa-linux-gnu-ld: arch/parisc/boot/compressed/misc.o: in function `lzma_len':
> (.text+0x2b0): undefined reference to `$$mulI'
> hppa-linux-gnu-ld: (.text+0x344): undefined reference to `$$mulI'
> hppa-linux-gnu-ld: (.text+0x3f8): undefined reference to `$$mulI'
>
>
> The patch below works, but I wonder if it's possible to avoid
> to examine LIBGCC twice....?
>
> Helge


Sorry for the breakage.

How about moving LIBGCC below ?




diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index d82787da43cd..6b37aa37a365 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -21,8 +21,6 @@ KBUILD_IMAGE := vmlinuz

 NM             = sh $(srctree)/arch/parisc/nm
 CHECKFLAGS     += -D__hppa__=1
-LIBGCC         := $(shell $(CC) $(KBUILD_CFLAGS)
-print-libgcc-file-name 2>/dev/null)
-export LIBGCC

 ifdef CONFIG_64BIT
 UTS_MACHINE    := parisc64
@@ -114,6 +112,10 @@ KBUILD_CFLAGS      += $(cflags-y)
 kernel-y                       := mm/ kernel/ math-emu/

 core-y += $(addprefix arch/parisc/, $(kernel-y))
+
+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name 2>/dev/null)
+export LIBGCC
+
 libs-y += arch/parisc/lib/ $(LIBGCC)

 drivers-$(CONFIG_OPROFILE)             += arch/parisc/oprofile/













>
> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
> index 628cd8bb7ad8..aeea20abbf01 100644
> --- a/arch/parisc/Makefile
> +++ b/arch/parisc/Makefile
> @@ -21,8 +21,7 @@ KBUILD_IMAGE := vmlinuz
>
>  NM             = sh $(srctree)/arch/parisc/nm
>  CHECKFLAGS     += -D__hppa__=1
> -LIBGCC         = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
> -export LIBGCC
> +LIBGCC         := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
>
>  ifdef CONFIG_64BIT
>  UTS_MACHINE    := parisc64
> diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
> index 1e5879c6a752..b008cf1b5c1e 100644
> --- a/arch/parisc/boot/compressed/Makefile
> +++ b/arch/parisc/boot/compressed/Makefile
> @@ -22,6 +22,8 @@ ifndef CONFIG_64BIT
>  KBUILD_CFLAGS += -mfast-indirect-calls
>  endif
>
> +LIBGCC  := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
> +
>  OBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o
>
>  LDFLAGS_vmlinux := -X -e startup --as-needed -T



-- 
Best Regards
Masahiro Yamada




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux