kernel: bump 4.19 to 4.19.20
[openwrt/staging/dedeckeh.git] / target / linux / generic / hack-4.19 / 321-powerpc_crtsavres_prereq.patch
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
6 Upstream GCC uses a libgcc function for saving/restoring registers. This
7 makes the code bigger, and upstream kernels need to carry that function
8 for every single kernel module. Our GCC is patched to avoid those
9 references, so we can drop the extra bloat for modules.
10
11 lede-commit: e8e1084654f50904e6bf77b70b2de3f137d7b3ec
12 Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
13 ---
14 arch/powerpc/Makefile | 1 -
15 1 file changed, 1 deletion(-)
16
17 --- a/arch/powerpc/Makefile
18 +++ b/arch/powerpc/Makefile
19 @@ -60,20 +60,6 @@ machine-$(CONFIG_PPC64) += 64
20 machine-$(CONFIG_CPU_LITTLE_ENDIAN) += le
21 UTS_MACHINE := $(subst $(space),,$(machine-y))
22
23 -# XXX This needs to be before we override LD below
24 -ifdef CONFIG_PPC32
25 -KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
26 -else
27 -KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/powerpc/kernel/module.lds
28 -ifeq ($(call ld-ifversion, -ge, 225000000, y),y)
29 -# Have the linker provide sfpr if possible.
30 -# There is a corresponding test in arch/powerpc/lib/Makefile
31 -KBUILD_LDFLAGS_MODULE += --save-restore-funcs
32 -else
33 -KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
34 -endif
35 -endif
36 -
37 ifdef CONFIG_CPU_LITTLE_ENDIAN
38 KBUILD_CFLAGS += -mlittle-endian
39 KBUILD_LDFLAGS += -EL