From: Nicholas Piggin <npiggin@gmail.com>
To: linux-arch@vger.kernel.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
linux-kbuild@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH] kbuild: provide THIN_ARCHIVES option for all architectures
Date: Mon, 29 May 2017 18:11:03 +1000 [thread overview]
Message-ID: <20170529081103.29999-1-npiggin@gmail.com> (raw)
Supporting two different intermediate-artifact packaging schemes
was only ever intended as a temporary transition.
This has so far caused no problems for powerpc, after a small fix
for how the arch invoked ar. So now allow any arch to select the
option, continue defaulting to N.
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
The next step will be to have archs always select THIN_ARCHIVES
when they are known to work. Then remove the option entirely.
x86 has always just worked for me, so that should be easy.
arch/Kconfig | 19 ++++++++++++++++---
arch/powerpc/Kconfig | 8 --------
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 6c00e5b00f8b..28e64cb65dd5 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -511,10 +511,23 @@ config CC_STACKPROTECTOR_STRONG
endchoice
config THIN_ARCHIVES
- bool
+ bool "Build the kernel using thin archives"
+ default n
help
- Select this if the architecture wants to use thin archives
- instead of ld -r to create the built-in.o files.
+ Enable this if you want to use thin archives (binutils `ar` thin
+ archive format) rather than `ld -r`, to create the built-in.o and
+ other intermediate packaging steps in the kernel build.
+
+ This option reduces disk space for builds, especially important for
+ debug builds and IO-constrained environments. It gives the linker
+ more flexibility in assembling sections. And it is more amenable to
+ link-time-optimization that may be implemented in future.
+
+ The intention is for all architectures to move to thin archives
+ soon, and the ld -r support code removed.
+
+ If unsure, say N.
+ Kernel hackers, say Y and test/fix your arch!
config LD_DEAD_CODE_DATA_ELIMINATION
bool
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 6eb70c96ec5e..9274d9faf122 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -483,14 +483,6 @@ config MPROFILE_KERNEL
depends on PPC64 && CPU_LITTLE_ENDIAN
def_bool !DISABLE_MPROFILE_KERNEL
-config USE_THIN_ARCHIVES
- bool "Build the kernel using thin archives"
- default n
- select THIN_ARCHIVES
- help
- Build the kernel using thin archives.
- If you're unsure say N.
-
config IOMMU_HELPER
def_bool PPC64
--
2.11.0
next reply other threads:[~2017-05-29 8:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 8:11 Nicholas Piggin [this message]
2017-05-29 10:33 ` [PATCH] kbuild: provide THIN_ARCHIVES option for all architectures Stephen Rothwell
2017-05-29 14:34 ` Nicholas Piggin
2017-05-29 17:03 ` Linus Torvalds
2017-05-29 17:14 ` Linus Torvalds
2017-05-29 23:13 ` Nicholas Piggin
2017-05-30 3:22 ` Linus Torvalds
2017-05-30 3:55 ` Nicholas Piggin
2017-05-30 3:54 ` Linus Torvalds
2017-05-29 18:52 ` Sam Ravnborg
2017-05-29 23:49 ` Nicholas Piggin
2017-05-31 21:13 ` Arnd Bergmann
2017-06-04 23:17 ` Masahiro Yamada
2017-06-05 7:00 ` Nicholas Piggin
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=20170529081103.29999-1-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
/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