All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: Fix 3.7 mips build if !CONFIG_MODULES
@ 2012-12-27  9:39 Joshua Kinard
  2012-12-27  9:45 ` Geert Uytterhoeven
  2012-12-27 19:46 ` [PATCH v2]: " Joshua Kinard
  0 siblings, 2 replies; 4+ messages in thread
From: Joshua Kinard @ 2012-12-27  9:39 UTC (permalink / raw)
  To: Linux MIPS List; +Cc: Ralf Baechle

The attached patch fixes a 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 on lines 36, 48, and 133.

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
---

 Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff -Naurp a/arch/mips/Kconfig b/arch/mips/Kconfig
--- a/arch/mips/Kconfig	2012-12-22 22:52:28.264461836 -0500
+++ b/arch/mips/Kconfig	2012-12-26 23:00:46.202996691 -0500
@@ -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 && MODULES
+	select MODULES_USE_ELF_RELA if MODULES && 64BIT

 menu "Machine selection"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]: Fix 3.7 mips build if !CONFIG_MODULES
  2012-12-27  9:39 [PATCH]: Fix 3.7 mips build if !CONFIG_MODULES Joshua Kinard
@ 2012-12-27  9:45 ` Geert Uytterhoeven
  2012-12-27 19:44   ` Joshua Kinard
  2012-12-27 19:46 ` [PATCH v2]: " Joshua Kinard
  1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2012-12-27  9:45 UTC (permalink / raw)
  To: Joshua Kinard; +Cc: Linux MIPS List, Ralf Baechle

On Thu, Dec 27, 2012 at 10:39 AM, Joshua Kinard <kumba@gentoo.org> wrote:
> The attached patch fixes a 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 on lines 36, 48, and 133.
>
> Signed-off-by: Joshua Kinard <kumba@gentoo.org>
> ---
>
>  Kconfig |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
>
> diff -Naurp a/arch/mips/Kconfig b/arch/mips/Kconfig
> --- a/arch/mips/Kconfig 2012-12-22 22:52:28.264461836 -0500
> +++ b/arch/mips/Kconfig 2012-12-26 23:00:46.202996691 -0500
> @@ -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 && MODULES

Shouldn't that be

    select MODULES_USE_ELF_REL if MODULES

?

> +       select MODULES_USE_ELF_RELA if MODULES && 64BIT

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]: Fix 3.7 mips build if !CONFIG_MODULES
  2012-12-27  9:45 ` Geert Uytterhoeven
@ 2012-12-27 19:44   ` Joshua Kinard
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Kinard @ 2012-12-27 19:44 UTC (permalink / raw)
  To: Linux MIPS List; +Cc: Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

On 12/27/2012 4:45 AM, Geert Uytterhoeven wrote:
> On Thu, Dec 27, 2012 at 10:39 AM, Joshua Kinard <kumba@gentoo.org> wrote:
>> The attached patch fixes a 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 on lines 36, 48, and 133.
>>
>> Signed-off-by: Joshua Kinard <kumba@gentoo.org>
>> ---
>>
>>  Kconfig |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>>
>> diff -Naurp a/arch/mips/Kconfig b/arch/mips/Kconfig
>> --- a/arch/mips/Kconfig 2012-12-22 22:52:28.264461836 -0500
>> +++ b/arch/mips/Kconfig 2012-12-26 23:00:46.202996691 -0500
>> @@ -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 && MODULES
> 
> Shouldn't that be
> 
>     select MODULES_USE_ELF_REL if MODULES
> 
> ?
> 
>> +       select MODULES_USE_ELF_RELA if MODULES && 64BIT

Whoops, yep!  Thanks for the catch, I'll resend a fixed patch.

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2]: Fix 3.7 mips build if !CONFIG_MODULES
  2012-12-27  9:39 [PATCH]: Fix 3.7 mips build if !CONFIG_MODULES Joshua Kinard
  2012-12-27  9:45 ` Geert Uytterhoeven
@ 2012-12-27 19:46 ` Joshua Kinard
  1 sibling, 0 replies; 4+ messages in thread
From: Joshua Kinard @ 2012-12-27 19:46 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

The attached patch fixes a 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 on lines 36, 48, and 133.

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
---

 Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff -Naurp a/arch/mips/Kconfig b/arch/mips/Kconfig
--- a/arch/mips/Kconfig	2012-12-22 22:52:28.264461836 -0500
+++ b/arch/mips/Kconfig	2012-12-26 23:00:46.202996691 -0500
@@ -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"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-27 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-27  9:39 [PATCH]: Fix 3.7 mips build if !CONFIG_MODULES Joshua Kinard
2012-12-27  9:45 ` Geert Uytterhoeven
2012-12-27 19:44   ` Joshua Kinard
2012-12-27 19:46 ` [PATCH v2]: " Joshua Kinard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.