aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.9
diff options
context:
space:
mode:
authorVincent Wiemann <webmaster@codefetch.de>2018-06-09 22:56:47 +0200
committerJohn Crispin <john@phrozen.org>2018-06-18 20:29:26 +0200
commit076d2ea6829855ee14ebd65230146eb27ee16750 (patch)
tree8aa3ff6152de5e5b3e6929e55a13c8de40cf6922 /target/linux/generic/pending-4.9
parent5297a759aee34952299d1d42f677f31781026c67 (diff)
downloadupstream-076d2ea6829855ee14ebd65230146eb27ee16750.tar.gz
upstream-076d2ea6829855ee14ebd65230146eb27ee16750.tar.bz2
upstream-076d2ea6829855ee14ebd65230146eb27ee16750.zip
mips: fix dynamic ftrace
The kernel patch *-mips_module_reloc.patch breaks dynamic ftrace as dynamic ftrace depends on -mlong-calls. See http://patchwork.linux-mips.org/patch/675/ Thus we always set -mlong-calls if the kernel is being compiled with dynamic ftrace support. Signed-off-by: Vincent Wiemann <webmaster@codefetch.de>
Diffstat (limited to 'target/linux/generic/pending-4.9')
-rw-r--r--target/linux/generic/pending-4.9/305-mips_module_reloc.patch11
1 files changed, 8 insertions, 3 deletions
diff --git a/target/linux/generic/pending-4.9/305-mips_module_reloc.patch b/target/linux/generic/pending-4.9/305-mips_module_reloc.patch
index fc8015b5f6..10d9f0bdd5 100644
--- a/target/linux/generic/pending-4.9/305-mips_module_reloc.patch
+++ b/target/linux/generic/pending-4.9/305-mips_module_reloc.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- 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 <nbd@nbd.name>
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)