Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp768814ybk; Sat, 9 May 2020 18:22:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIz+utrWxgKmgJB3e3wPWBCs4bCUeoldU6mNhaCjrdkd2IFlMvnjbw+ctt8VC9aMk6eHZNR X-Received: by 2002:aa7:ce17:: with SMTP id d23mr8277890edv.89.1589073766316; Sat, 09 May 2020 18:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589073766; cv=none; d=google.com; s=arc-20160816; b=hQ8wBiD9/Nqb/Ov5vKLfcyWMCksZPDV7LXn3pzyI1pyWAMatgPeok7NXk9FDGzkAxN aWFddjaWD1AtGt+wUGRCbX5XSPv+LHoQhLJmDwLKOI35GDkuzXg5XB4et4SHpHaTVnHA 2njp544lyEYclUhBg7pxIpIBFOjZiVzhP6NAj6b/5WdKRNcKgL/BRh34FJ5DuwdODmja sToiXpZFijD4+yJBkx99kdao7xXvUYLmuTn+IeWrtTXUu5rqvVPF2XLhfBVwh4C41H24 QeA7ilVsiVoCgUOUtc2sqvMLkqh7o6bT1IEW79Vtu7j/HrOV2xLx0QkbEqOiBf5MaCCx RAyw== 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=/o5t3N4nMCBeluLyxjzOGU1bJMasGO1YdQigiiF8QSg=; b=Kx3ac25xzeG5vE/3NWMflPnW1zo1J4oblWaWMx7cuCqUccOeac7LQc7u5FI/LRGulD +jfOjmFBfnLCJvoJMn7lrRNNXmmymiHe94iopIk8iNty0D4q1/d11koybRM9PE0BExws cMv6+ZEvWhrQyxwBSt1/IuQ1SAR4iQ4FBh9n/NgDVqs+HNKP9c/72+ckT32vMdAvwbmY 9+niToDQhxlJWJBNVLv6oZIuyrTyw/04nxj0l5+iqe8vlqEAOzqTueQOqhwh+PkXG0A9 6B079XdTsh48PxQZdXLSqI4W+x7lIlpzjCK3/GDuMhLh310bp5oSY5QRMpcVmJGE42s4 Tkhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LhJxcuWS; 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 bq5si3652353ejb.356.2020.05.09.18.22.20; Sat, 09 May 2020 18:22:46 -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=LhJxcuWS; 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 S1728775AbgEJBUo (ORCPT + 99 others); Sat, 9 May 2020 21:20:44 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:20104 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbgEJBUn (ORCPT ); Sat, 9 May 2020 21:20:43 -0400 Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 04A1KTJg029404; Sun, 10 May 2020 10:20:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 04A1KTJg029404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1589073630; bh=/o5t3N4nMCBeluLyxjzOGU1bJMasGO1YdQigiiF8QSg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LhJxcuWSpqZV+0b2s9LjbKcpa3KCewpa0ZtiIm305FIWBm8qMcg/FN0YHBejZL31z 19D8uu3h81Wvg49XZOHpAsJMlFi3yJ+vu09GYJ64Q4MeOpv7lGIivrIeLM/9HNSau8 aY9bzx4LFUgvNmiVuItgQIL5ycu0l3xRVAuhHL7lhlKy0LFoP1rZDP8ORjRsN+dwoH WhBYxBOc0iSZnC6ucm6HP2KciA7nFdKgMkPyFI/IO9tHumd1+LoJ3ZfDOhubqO+Qer 3Mrjm8GXOZDRy04y1hOysxXym/wnuZdQ5dvUIRcqSEJLt5Of/8lmlxoo8Ms9yJVsFc DnluCnq2MklHw== X-Nifty-SrcIP: [209.85.217.50] Received: by mail-vs1-f50.google.com with SMTP id y185so3457835vsy.8; Sat, 09 May 2020 18:20:30 -0700 (PDT) X-Gm-Message-State: AGi0PuYhnBePm8Ic2oI0KRncUkGh78z6/2xk7RRCiwTC4was6Ya8/HwU 9chMF5CCJZQ6pfJpIcoDKktI+NvYLXzCtp8IQNk= X-Received: by 2002:a67:db0d:: with SMTP id z13mr6905350vsj.155.1589073628910; Sat, 09 May 2020 18:20:28 -0700 (PDT) MIME-Version: 1.0 References: <20200425054659.814774-1-masahiroy@kernel.org> <20200508214650.GA3482@ls3530.fritz.box> <20200509173925.GA30635@ls3530.fritz.box> In-Reply-To: <20200509173925.GA30635@ls3530.fritz.box> From: Masahiro Yamada Date: Sun, 10 May 2020 10:19:53 +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 Sun, May 10, 2020 at 2:39 AM Helge Deller wrote: > > * Masahiro Yamada : > > 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 foll= ows: > > > > > > > > > > $ make ARCH=3Dparisc clean > > > > > gcc: error: unrecognized command line option '-mno-space-regs' > > > > > gcc: error: unrecognized command line option '-mfast-indirect-c= alls'; 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-c= alls'; 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 co= rrect > > > > > CROSS_COMPILE=3D, but we should not require any compiler for clea= ning. > > > > > > > > > > This $(shell ...) is evaluated so many times because LIBGCC is ex= ported. > > > > > Use the ':=3D' operator to evaluate it just once, and sink the st= derr. > > > > > > > > > > > > > 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/c= ompressed/vmlinux > > > hppa-linux-gnu-ld: arch/parisc/boot/compressed/misc.o: in function `d= ec_vli': > > > (.text+0x104): undefined reference to `__ashldi3' > > > hppa-linux-gnu-ld: arch/parisc/boot/compressed/misc.o: in function `l= zma_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 ? > > Good idea. > The patch below does work for me. > We do not need $KBUILD_CFLAGS to get the libgcc.a filename, I not not sure about this change. Generally speaking, the path to libgcc.a is affected by compiler flags, especially, bit size flags, endian flags, etc. For example, my distro gcc is biarch for i386/x86_64. $ gcc -print-libgcc-file-name /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a $ gcc -m64 -print-libgcc-file-name /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a $ gcc -m32 -print-libgcc-file-name /usr/lib/gcc/x86_64-linux-gnu/9/32/libgcc.a One real example in Linux is arch/arc/Makefile. ARC supports both big endian and little endian. If you drop cflags-y from line 59 of arch/arc/Makefile, vmlinux fails to link due to endian mismatch. I am not familiar with parisc. Also, as it turned out, this change is not so trivial. I think the best approach is to leave this up to you since you are the parisc maintainer. I will drop this patch from my kbuild tree, then you will apply what you think is best to your tree. What do you think? > so we do not need to pipe the output to /dev/null either. > Can you try if that works, and if yes, can you apply it? > > Helge > > > diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile > index 628cd8bb7ad8..fadbbd010337 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-nam= e) > -export LIBGCC > > ifdef CONFIG_64BIT > UTS_MACHINE :=3D parisc64 > @@ -110,6 +108,8 @@ cflags-$(CONFIG_PA8X00) +=3D -march=3D2.0= -mschedule=3D8000 > head-y :=3D arch/parisc/kernel/head.o > > KBUILD_CFLAGS +=3D $(cflags-y) > +LIBGCC :=3D $(shell $(CC) -print-libgcc-file-name) > +export LIBGCC > > kernel-y :=3D mm/ kernel/ math-emu/ > --=20 Best Regards Masahiro Yamada