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>
This commit is contained in:
parent
5297a759ae
commit
076d2ea682
1 changed files with 8 additions and 3 deletions
|
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/arch/mips/Makefile
|
--- a/arch/mips/Makefile
|
||||||
+++ b/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 += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
|
||||||
cflags-y += -msoft-float
|
cflags-y += -msoft-float
|
||||||
LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
|
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_AFLAGS_MODULE += -mlong-calls
|
||||||
KBUILD_CFLAGS_MODULE += -mlong-calls
|
KBUILD_CFLAGS_MODULE += -mlong-calls
|
||||||
+else
|
+else
|
||||||
+KBUILD_AFLAGS_MODULE += -mno-long-calls
|
+ ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
+KBUILD_CFLAGS_MODULE += -mno-long-calls
|
+ 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
|
+endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_RELOCATABLE),y)
|
ifeq ($(CONFIG_RELOCATABLE),y)
|
||||||
|
|
Loading…
Reference in a new issue