From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kbuild: move -pipe to global KBUILD_CFLAGS
Date: Sat, 22 Feb 2020 09:01:13 +0000 [thread overview]
Message-ID: <20200222090113.GM25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAK7LNARNEu2gVBVDpRtbha_n=RWWfcQu57LtO=CbLBXLU9Ds-g@mail.gmail.com>
On Sat, Feb 22, 2020 at 11:07:14AM +0900, Masahiro Yamada wrote:
> On Sat, Feb 22, 2020 at 9:40 AM Alex Xu (Hello71) <alex_y_xu@yahoo.ca> wrote:
> >
> > -pipe reduces unnecessary disk wear for systems where /tmp is not a
> > tmpfs, slightly increases compilation speed, and avoids leaving behind
> > files when gcc crashes.
> >
> > According to the gcc manual, "this fails to work on some systems where
> > the assembler is unable to read from a pipe; but the GNU assembler has
> > no trouble". We already require GNU ld on all platforms, so this is not
> > an additional dependency. LLVM as also supports pipes.
> >
> > -pipe has always been used for most architectures, this change
> > standardizes it globally. Most notably, arm, arm64, riscv, and x86 are
> > affected.
> >
> > Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
>
> <snip>
>
> > diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> > index 20e9ab6cc521..b6a2f553771c 100644
> > --- a/arch/arc/Makefile
> > +++ b/arch/arc/Makefile
> > @@ -9,7 +9,7 @@ ifeq ($(CROSS_COMPILE),)
> > CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-)
> > endif
> >
> > -cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
> > +cflags-y += -fno-common -fno-builtin -mmedium-calls -D__linux__
> > cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
> > cflags-$(CONFIG_ISA_ARCV2) += -mcpu=hs38
> >
> > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> > index db857d07114f..7711467e0797 100644
> > --- a/arch/arm/Makefile
> > +++ b/arch/arm/Makefile
> > @@ -21,7 +21,6 @@ KBUILD_LDS_MODULE += $(srctree)/arch/arm/kernel/module.lds
> > endif
> >
> > GZFLAGS :=-9
> > -#KBUILD_CFLAGS +=-pipe
>
>
> This was commented out by a very old commit,
> which is available in the historical git tree.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=ce20ed858a20f6f04de475cae79e40d3697f4776
>
> But, I could not parse the reason from the commit message.
> Russell, do you remember why?
-pipe may reduce the disk load but increases the CPU load, so it's an
option that's up to the build environment. One may wish to pass a
lower parralellism when using -pipe to make to mitigate that, but both
options are up to the build environment to decide upon.
If we unconditionally add -pipe, then we take away choice.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2020-02-22 9:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200222003820.220854-1-alex_y_xu.ref@yahoo.ca>
2020-02-22 0:38 ` [PATCH] kbuild: move -pipe to global KBUILD_CFLAGS Alex Xu (Hello71)
2020-02-22 2:07 ` Masahiro Yamada
2020-02-22 9:01 ` Russell King - ARM Linux admin [this message]
2020-02-22 2:16 ` Nathan Chancellor
2020-02-22 4:01 ` Alex Xu (Hello71)
2020-02-22 8:01 ` Nathan Chancellor
2020-02-22 14:24 ` Alex Xu (Hello71)
2020-02-22 18:12 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200222090113.GM25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alex_y_xu@yahoo.ca \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).