321-powerpc_crtsavres_prereq.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 107c0964cb8db7ca28ac5199426414fdab3c274d Mon Sep 17 00:00:00 2001
  2. From: "Alexandros C. Couloumbis" <alex@ozo.com>
  3. Date: Fri, 7 Jul 2017 17:14:51 +0200
  4. Subject: hack: arch: powerpc: drop register save/restore library from modules
  5. Upstream GCC uses a libgcc function for saving/restoring registers. This
  6. makes the code bigger, and upstream kernels need to carry that function
  7. for every single kernel module. Our GCC is patched to avoid those
  8. references, so we can drop the extra bloat for modules.
  9. lede-commit: e8e1084654f50904e6bf77b70b2de3f137d7b3ec
  10. Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
  11. ---
  12. arch/powerpc/Makefile | 1 -
  13. 1 file changed, 1 deletion(-)
  14. --- a/arch/powerpc/Makefile
  15. +++ b/arch/powerpc/Makefile
  16. @@ -59,19 +59,6 @@ machine-$(CONFIG_PPC64) += 64
  17. machine-$(CONFIG_CPU_LITTLE_ENDIAN) += le
  18. UTS_MACHINE := $(subst $(space),,$(machine-y))
  19. -# XXX This needs to be before we override LD below
  20. -ifdef CONFIG_PPC32
  21. -KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
  22. -else
  23. -ifeq ($(call ld-ifversion, -ge, 225000000, y),y)
  24. -# Have the linker provide sfpr if possible.
  25. -# There is a corresponding test in arch/powerpc/lib/Makefile
  26. -KBUILD_LDFLAGS_MODULE += --save-restore-funcs
  27. -else
  28. -KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
  29. -endif
  30. -endif
  31. -
  32. ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
  33. override LD += -EL
  34. LDEMULATION := lppc