linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
Cc: linux-kbuild@vger.kernel.org, michal.lkml@markovi.net,
	masahiroy@kernel.org, linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH] kbuild: move -pipe to global KBUILD_CFLAGS
Date: Fri, 21 Feb 2020 19:16:19 -0700	[thread overview]
Message-ID: <20200222021619.GA51223@ubuntu-m2-xlarge-x86> (raw)
In-Reply-To: <20200222003820.220854-1-alex_y_xu@yahoo.ca>

Hi Alex,

On Fri, Feb 21, 2020 at 07:38:20PM -0500, Alex Xu (Hello71) 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>

Do you have any numbers to show this is actually beneficial from a
compilation time perspective? I ask because I saw an improvement in
compilation time when removing -pipe from x86's KBUILD_CFLAGS in
commit 437e88ab8f9e ("x86/build: Remove -pipe from KBUILD_CFLAGS").

For what it's worth, clang ignores -pipe so this does not actually
matter for its integrated assembler.

That type of change could have been a fluke but I guarantee people
will care more about any change in compilation time than any of the
other things that you mention so it might be wise to check on major
architectures to make sure that it doesn't hurt.

Cheers,
Nathan

  parent reply	other threads:[~2020-02-22  2:16 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
2020-02-22  2:16   ` Nathan Chancellor [this message]
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=20200222021619.GA51223@ubuntu-m2-xlarge-x86 \
    --to=natechancellor@gmail.com \
    --cc=alex_y_xu@yahoo.ca \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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).