All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: provide THIN_ARCHIVES option for all architectures
@ 2017-05-29  8:11 Nicholas Piggin
  2017-05-29 10:33 ` Stephen Rothwell
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Nicholas Piggin @ 2017-05-29  8:11 UTC (permalink / raw)
  To: linux-arch
  Cc: Nicholas Piggin, linux-kbuild, Linus Torvalds, Stephen Rothwell

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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-06-05  7:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-29  8:11 [PATCH] kbuild: provide THIN_ARCHIVES option for all architectures Nicholas Piggin
2017-05-29 10:33 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.