Skip to content

Commit cf71130

Browse files
committed
parisc: disable -mlong-calls compiler option for kernel modules
CONFIG_MLONGCALLS was introduced in commit ec758f9 to overcome linker issues when linking huge linux kernels, e.g. with many modules linked in. But in the kernel module loader there is no support yet for the new relocation types, which is why modules built with -mlong-calls can't be loaded. Furthermore, for modules long calls are not really necessary, since we already use stub sections which resolve long distance calls. So, let's just disable this compiler option when compiling kernel modules. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 0f28b62 commit cf71130

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎arch/parisc/Makefile‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ ifndef CONFIG_FUNCTION_TRACER
6565
endif
6666

6767
# Use long jumps instead of long branches (needed if your linker fails to
68-
# link a too big vmlinux executable)
69-
cflags-$(CONFIG_MLONGCALLS) += -mlong-calls
68+
# link a too big vmlinux executable). Not enabled for building modules.
69+
ifdef CONFIG_MLONGCALLS
70+
KBUILD_CFLAGS_KERNEL += -mlong-calls
71+
endif
7072

7173
# select which processor to optimise for
7274
cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100

0 commit comments

Comments
 (0)