Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/64: Do not link crtsaveres.o in boot

crtsaveres.S is empty with 64-bit builds already, so just don't
build and link it to match the vmlinux build.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Use CONFIG_PPC64_BOOT_WRAPPER not CONFIG_PPC32 to fix BE build]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Nicholas Piggin and committed by
Michael Ellerman
7c868b66 baa25b57

+8 -5
+4 -1
arch/powerpc/boot/Makefile
··· 95 95 $(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o opal.o): \ 96 96 $(addprefix $(obj)/,$(libfdtheader)) 97 97 98 - src-wlib-y := string.S crt0.S crtsavres.S stdio.c decompress.c main.c \ 98 + src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \ 99 99 $(libfdt) libfdt-wrapper.c \ 100 100 ns16550.c serial.c simple_alloc.c div64.S util.S \ 101 101 elf_util.c $(zlib-y) devtree.c stdlib.c \ 102 102 oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \ 103 103 uartlite.c mpc52xx-psc.c opal.c 104 104 src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S 105 + ifndef CONFIG_PPC64_BOOT_WRAPPER 106 + src-wlib-y += crtsavres.S 107 + endif 105 108 src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c 106 109 src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c 107 110 src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c
+4 -4
arch/powerpc/boot/crtsavres.S
··· 37 37 * the executable file might be covered by the GNU General Public License. 38 38 */ 39 39 40 + #ifdef __powerpc64__ 41 + #error "On PPC64, FPR save/restore functions are provided by the linker." 42 + #endif 43 + 40 44 .file "crtsavres.S" 41 45 .section ".text" 42 - 43 - /* On PowerPC64 Linux, these functions are provided by the linker. */ 44 - #ifndef __powerpc64__ 45 46 46 47 #define _GLOBAL(name) \ 47 48 .type name,@function; \ ··· 231 230 mtlr 0 232 231 mr 1,11 233 232 blr 234 - #endif