]> Pileus Git - ~andy/linux/commitdiff
MIPS: 64-bit: Fix build if !CONFIG_MODULES
authorJoshua Kinard <kumba@gentoo.org>
Thu, 27 Dec 2012 18:46:46 +0000 (18:46 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 2 Jan 2013 23:03:08 +0000 (00:03 +0100)
Fix build failure if building a monolithic kernel due to
arch/mips/kernel/Kconfig selecting MODULES_USE_ELF_REL[A] without checking
to see if MODULES is set or not.  This leads to 'struct module' not
existing, which triggers a compile failure in arch/mips/kernel/module-rela.c
when the compiler attempts to dereference me->name:

  CC      arch/mips/kernel/module-rela.o
arch/mips/kernel/module-rela.c: In function ‘apply_r_mips_26_rela’:
arch/mips/kernel/module-rela.c:38:74: error: dereferencing pointer to incomplete type
arch/mips/kernel/module-rela.c:46:12: error: dereferencing pointer to incomplete type
arch/mips/kernel/module-rela.c: In function ‘apply_relocate_add’:
arch/mips/kernel/module-rela.c:133:13: error: dereferencing pointer to incomplete type
make[2]: *** [arch/mips/kernel/module-rela.o] Error 1

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4749/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig

index b7dc39c6c849189bcc57929cef61f0abd9c4befe..2ac626ab9d4380014a6f25a24825d79f9ee92205 100644 (file)
@@ -39,8 +39,8 @@ config MIPS
        select GENERIC_CLOCKEVENTS
        select GENERIC_CMOS_UPDATE
        select HAVE_MOD_ARCH_SPECIFIC
-       select MODULES_USE_ELF_REL
-       select MODULES_USE_ELF_RELA if 64BIT
+       select MODULES_USE_ELF_REL if MODULES
+       select MODULES_USE_ELF_RELA if MODULES && 64BIT
 
 menu "Machine selection"