From a4ba41863b40fb11779a132e63d671d05649acda Mon Sep 17 00:00:00 2001 From: Mantas Pucka Date: Tue, 5 Mar 2019 16:22:02 +0200 Subject: mips: fix dynamic ftrace This was fixed for v4.9 in 076d2ea68, now port to all kernels Signed-off-by: Mantas Pucka --- target/linux/generic/pending-4.14/305-mips_module_reloc.patch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'target/linux/generic/pending-4.14') diff --git a/target/linux/generic/pending-4.14/305-mips_module_reloc.patch b/target/linux/generic/pending-4.14/305-mips_module_reloc.patch index 253b50f62c..609a96db49 100644 --- a/target/linux/generic/pending-4.14/305-mips_module_reloc.patch +++ b/target/linux/generic/pending-4.14/305-mips_module_reloc.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/arch/mips/Makefile +++ b/arch/mips/Makefile -@@ -93,8 +93,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin +@@ -93,8 +93,18 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin cflags-y += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely cflags-y += -msoft-float LDFLAGS_vmlinux += -G 0 -static -n -nostdlib @@ -19,8 +19,13 @@ Signed-off-by: Felix Fietkau KBUILD_AFLAGS_MODULE += -mlong-calls KBUILD_CFLAGS_MODULE += -mlong-calls +else -+KBUILD_AFLAGS_MODULE += -mno-long-calls -+KBUILD_CFLAGS_MODULE += -mno-long-calls ++ ifdef CONFIG_DYNAMIC_FTRACE ++ KBUILD_AFLAGS_MODULE += -mlong-calls ++ KBUILD_CFLAGS_MODULE += -mlong-calls ++ else ++ KBUILD_AFLAGS_MODULE += -mno-long-calls ++ KBUILD_CFLAGS_MODULE += -mno-long-calls ++ endif +endif ifeq ($(CONFIG_RELOCATABLE),y) -- cgit v1.2.3