提交 43c9127d 编写于 作者: N Nicholas Piggin 提交者: Michael Ellerman

powerpc: Add option to use thin archives

Add an option to use thin archives to build the kernel.
Thin archives are explained in commit a5967db9 ("kbuild: allow
architectures to use thin archives instead of ld -r").

This is a gradual way to introduce the option to testers.

Some change to the way we invoke ar is required so it can be used
by scripts/link-vmlinux.sh.
Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
[mpe: Make it an explicit option not dependant on COMPILE_TEST]
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 5e9d0e3d
...@@ -396,6 +396,14 @@ config MPROFILE_KERNEL ...@@ -396,6 +396,14 @@ config MPROFILE_KERNEL
depends on PPC64 && CPU_LITTLE_ENDIAN depends on PPC64 && CPU_LITTLE_ENDIAN
def_bool !DISABLE_MPROFILE_KERNEL 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 config IOMMU_HELPER
def_bool PPC64 def_bool PPC64
......
...@@ -23,7 +23,7 @@ CROSS32AR := $(CROSS32_COMPILE)ar ...@@ -23,7 +23,7 @@ CROSS32AR := $(CROSS32_COMPILE)ar
ifeq ($(HAS_BIARCH),y) ifeq ($(HAS_BIARCH),y)
ifeq ($(CROSS32_COMPILE),) ifeq ($(CROSS32_COMPILE),)
CROSS32CC := $(CC) -m32 CROSS32CC := $(CC) -m32
CROSS32AR := GNUTARGET=elf32-powerpc $(AR) KBUILD_ARFLAGS += --target=elf32-powerpc
endif endif
endif endif
...@@ -85,7 +85,7 @@ ifeq ($(HAS_BIARCH),y) ...@@ -85,7 +85,7 @@ ifeq ($(HAS_BIARCH),y)
override AS += -a$(BITS) override AS += -a$(BITS)
override LD += -m elf$(BITS)$(LDEMULATION) override LD += -m elf$(BITS)$(LDEMULATION)
override CC += -m$(BITS) override CC += -m$(BITS)
override AR := GNUTARGET=elf$(BITS)-$(GNUTARGET) $(AR) KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET)
endif endif
LDFLAGS_vmlinux-y := -Bstatic LDFLAGS_vmlinux-y := -Bstatic
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册