Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp239213ybk; Sat, 9 May 2020 01:18:57 -0700 (PDT) X-Google-Smtp-Source: APiQypL1YGAXoG1i73rK/PHS5QIJZ4fXlUJXSCbtUOKuVwX88zWv5CsnpeTodEKs/FN360ITIE2s X-Received: by 2002:a17:906:454a:: with SMTP id s10mr5234899ejq.141.1589012337491; Sat, 09 May 2020 01:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589012337; cv=none; d=google.com; s=arc-20160816; b=Pydc5fqGRRiDSuBgawYsqmFVo2VX34qfHvooaguat9o3Es9twqwyvM8UxZHRsHoNsm S/ZJGq9whjRQeplwZE5KZrRPYV4n0qdzdhuErLRw4AEW9iURFVA5jiX1qXJ4Oa84lt+p DCyAlLCNn9XTOcr5J3G8aNgim4AVFJnef1F2sVmUCH7fXIqJASKTu/JRQh3oPoW6OqVb P6Ny7CliflDPP9FCbhb3fppn/OEz8DA7Nslo5iC4rEeGEU9DMUmshLwGThjpzF5qjfn6 j6bXXSM3LdH/h26R7SGapYUY4msZfnxd0nS7sFJBkLw9zJBAiHWlSKfK/R9rLGu+8z+X qZbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=soO6uzCEBflhcaAUsvN03dAXAWJPI4aKCk23nQk4D8s=; b=HgSYU6MdJGswbNczK2CsiNdHd1opDpUCuqMQDrMaP8f/Rr8tRjzjiWilVFmqV2TDd/ kpFOE4hrvsGA7eBqqS3ukTeqq1xNZ6wscv9jBVaAfFMmoAVThezXGmGst7zn9IF74mwt uyyzRc0Yrx6q09TCsCM90lyPJrqyz6Ab7S5Fj15hXCT2nEqmZLBpKzCvLVVvdTRfZLYP P1Xf0ZCz27M8bdUYPodbwd2YdkRhHS2PbrCOKS1uyDGz8b0bBCC/XS35YmYYZeK76WST CZIi5MgHSTFtDeo99Rb+cwRfujUnftmncBMEKQB9kyn+lRum7zyRAcSPZg8L1Q293w/K h1xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kDhkp8oj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si2395931edq.384.2020.05.09.01.18.34; Sat, 09 May 2020 01:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kDhkp8oj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726906AbgEIIRA (ORCPT + 99 others); Sat, 9 May 2020 04:17:00 -0400 Received: from conssluserg-03.nifty.com ([210.131.2.82]:63348 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbgEIIQ7 (ORCPT ); Sat, 9 May 2020 04:16:59 -0400 Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com [209.85.222.52]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 0498Gf3e008409; Sat, 9 May 2020 17:16:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 0498Gf3e008409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1589012203; bh=soO6uzCEBflhcaAUsvN03dAXAWJPI4aKCk23nQk4D8s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kDhkp8ojwwX1lOdOItTUiRunon2J43+2QUFYuxZu2QDMOalyLzBU+/26QaNR7QLzI K1pVPQSUBlgfm1hThhkS/0XKeg0gNhJt7bcKe01StsYPjNFSYI9Pf19MPYTTzbPAhm u8d/TVIQsWGlUpWr9OAXewOV2dIVqcUiKtaAKNYRxm6TX09ZCKgcC/5cHmfAC8PWsQ VKMM1fHnPuS8exK9ZqcxOKcssGdB6MVDyfNm8HYOTsEktNnOfg/5pegO0wkOgkDGy3 nr1QGLq2czW8jyUV9uZwLuedR4/Vq6QVzadWyPkoWCjlgXA9poKaOts2pm8KK8Df8S r3eFpen4oyhlQ== X-Nifty-SrcIP: [209.85.222.52] Received: by mail-ua1-f52.google.com with SMTP id z16so1563934uae.11; Sat, 09 May 2020 01:16:41 -0700 (PDT) X-Gm-Message-State: AOAM533IzrxR6eRvV8ux4R4c42Thc9Ggr1H6hFfbzl36S6NQyVkpq5Hy P+A6uz+YDgzdwobTmJvoimZyGJPFHkS05OnTc4Y= X-Received: by 2002:a9f:3e0d:: with SMTP id o13mr27528uai.25.1589012200418; Sat, 09 May 2020 01:16:40 -0700 (PDT) MIME-Version: 1.0 References: <20200425054659.814774-1-masahiroy@kernel.org> <20200508214650.GA3482@ls3530.fritz.box> In-Reply-To: <20200508214650.GA3482@ls3530.fritz.box> From: Masahiro Yamada Date: Sat, 9 May 2020 17:16:04 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] parisc: suppress error messages for 'make clean' To: Helge Deller Cc: "James E . J . Bottomley" , linux-parisc@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Helge, On Sat, May 9, 2020 at 6:46 AM Helge Deller wrote: > > * Masahiro Yamada : > > On Sat, Apr 25, 2020 at 2:47 PM Masahiro Yamada = wrote: > > > > > > 'make ARCH=3Dparisc clean' emits a tons of error messages as follows: > > > > > > $ make ARCH=3Dparisc 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=3D' > > > 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=3D' > > > ... > > > > > > You can supporess them except '-Wframe-larger-than' by setting correc= t > > > CROSS_COMPILE=3D, but we should not require any compiler for cleaning= . > > > > > > This $(shell ...) is evaluated so many times because LIBGCC is export= ed. > > > Use the ':=3D' 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/comp= ressed/vmlinux.lds arch/parisc/boot/compressed/head.o arch/parisc/boot/comp= ressed/real2.o arch/parisc/boot/compressed/firmware.o arch/parisc/boot/comp= ressed/misc.o arch/parisc/boot/compressed/piggy.o -o arch/parisc/boot/compr= essed/vmlinux > hppa-linux-gnu-ld: arch/parisc/boot/compressed/misc.o: in function `dec_v= li': > (.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 :=3D vmlinuz NM =3D sh $(srctree)/arch/parisc/nm CHECKFLAGS +=3D -D__hppa__=3D1 -LIBGCC :=3D $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name 2>/dev/null) -export LIBGCC ifdef CONFIG_64BIT UTS_MACHINE :=3D parisc64 @@ -114,6 +112,10 @@ KBUILD_CFLAGS +=3D $(cflags-y) kernel-y :=3D mm/ kernel/ math-emu/ core-y +=3D $(addprefix arch/parisc/, $(kernel-y)) + +LIBGCC :=3D $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name 2>/dev/= null) +export LIBGCC + libs-y +=3D arch/parisc/lib/ $(LIBGCC) drivers-$(CONFIG_OPROFILE) +=3D 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 :=3D vmlinuz > > NM =3D sh $(srctree)/arch/parisc/nm > CHECKFLAGS +=3D -D__hppa__=3D1 > -LIBGCC =3D $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-nam= e) > -export LIBGCC > +LIBGCC :=3D $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-na= me) > > ifdef CONFIG_64BIT > UTS_MACHINE :=3D parisc64 > diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/comp= ressed/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 +=3D -mfast-indirect-calls > endif > > +LIBGCC :=3D $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) > + > OBJECTS +=3D $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.= o $(obj)/piggy.o > > LDFLAGS_vmlinux :=3D -X -e startup --as-needed -T --=20 Best Regards Masahiro Yamada