]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/64: Do not link crtsavres.o in vmlinux
authorNicholas Piggin <npiggin@gmail.com>
Thu, 11 May 2017 15:56:49 +0000 (01:56 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 30 May 2017 04:59:51 +0000 (14:59 +1000)
The 64-bit linker creates save/restore functions on demand with final
links, so vmlinux does not require crtsavres.o.

Make crtsavres.o extra-y on 64-bit (it is still required by modules).

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/lib/Makefile

index ed7dfce331e0227c3bfd3e33e36a87cf7f8737bd..0ca405a27ac139f7ad30cee2bc430981e6645f02 100644 (file)
@@ -9,8 +9,12 @@ ccflags-$(CONFIG_PPC64)        := $(NO_MINIMAL_TOC)
 CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE)
 CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE)
 
-obj-y += string.o alloc.o crtsavres.o code-patching.o \
-        feature-fixups.o
+obj-y += string.o alloc.o code-patching.o feature-fixups.o
+
+# 64-bit linker creates .sfpr on demand for final link (vmlinux),
+# so it is only needed for modules.
+obj-$(CONFIG_PPC32) += crtsavres.o
+extra-$(CONFIG_PPC64) += crtsavres.o
 
 obj-$(CONFIG_PPC32)    += div64.o copy_32.o