* [PATCH v2] -git compile fixes for MIPS
@ 2009-06-17 19:23 Zhang Le
2009-06-17 19:31 ` Manuel Lauss
2009-06-17 19:33 ` David Daney
0 siblings, 2 replies; 4+ messages in thread
From: Zhang Le @ 2009-06-17 19:23 UTC (permalink / raw)
To: linux-mips; +Cc: manuel.lauss, Zhang Le
Quick fixes for some compile failures which have cropped up
in linus-git in the last 24 hours:
CC arch/mips/kernel/time.o
In file included from linux-2.6.git/include/linux/bug.h:4,
from linux-2.6.git/arch/mips/kernel/time.c:13:
linux-2.6.git/arch/mips/include/asm/bug.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG'
linux-2.6.git/arch/mips/include/asm/bug.h: In function '__BUG_ON':
linux-2.6.git/arch/mips/include/asm/bug.h:26: error: implicit declaration of function 'BUG'
CC arch/mips/kernel/traps.o
cc1: warnings being treated as errors
/home/zhangle/linux/arch/mips/kernel/traps.c: In function ‘set_uncached_handler’:
/home/zhangle/linux/arch/mips/kernel/traps.c:1604: error: format not a string literal and no format arguments
CC arch/mips/mm/uasm.o
In file included from linux-2.6.git/arch/mips/mm/uasm.c:21:
linux-2.6.git/arch/mips/include/asm/bugs.h: In function 'check_bugs':
linux-2.6.git/arch/mips/include/asm/bugs.h:34: error: implicit declaration of function 'smp_processor_id'
linux-2.6.git/arch/mips/mm/uasm.c: In function 'uasm_copy_handler':
linux-2.6.git/arch/mips/mm/uasm.c:514: error: implicit declaration of function 'memcpy'
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
---
arch/mips/include/asm/bug.h | 1 +
arch/mips/include/asm/bugs.h | 1 +
arch/mips/kernel/traps.c | 2 +-
arch/mips/mm/uasm.c | 1 +
4 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h
index 08ea468..974b161 100644
--- a/arch/mips/include/asm/bug.h
+++ b/arch/mips/include/asm/bug.h
@@ -6,6 +6,7 @@
#ifdef CONFIG_BUG
#include <asm/break.h>
+#include <linux/compiler.h>
static inline void __noreturn BUG(void)
{
diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h
index 9dc10df..b160a70 100644
--- a/arch/mips/include/asm/bugs.h
+++ b/arch/mips/include/asm/bugs.h
@@ -11,6 +11,7 @@
#include <linux/bug.h>
#include <linux/delay.h>
+#include <linux/smp.h>
#include <asm/cpu.h>
#include <asm/cpu-info.h>
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 08f1edf..0e9922b 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1601,7 +1601,7 @@ void __cpuinit set_uncached_handler(unsigned long offset, void *addr,
#endif
if (!addr)
- panic(panic_null_cerr);
+ panic("%s", panic_null_cerr);
memcpy((void *)(uncached_ebase + offset), addr, size);
}
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index f467199..ba538f7 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -15,6 +15,7 @@
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/init.h>
+#include <linux/string.h>
#include <asm/inst.h>
#include <asm/elf.h>
--
1.6.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] -git compile fixes for MIPS
2009-06-17 19:23 [PATCH v2] -git compile fixes for MIPS Zhang Le
@ 2009-06-17 19:31 ` Manuel Lauss
2009-06-17 19:35 ` Zhang Le
2009-06-17 19:33 ` David Daney
1 sibling, 1 reply; 4+ messages in thread
From: Manuel Lauss @ 2009-06-17 19:31 UTC (permalink / raw)
To: Zhang Le; +Cc: linux-mips, manuel.lauss
Hi Zhang,
On Wed, Jun 17, 2009 at 9:23 PM, Zhang Le<r0bertz@gentoo.org> wrote:
> CC arch/mips/kernel/traps.o
> cc1: warnings being treated as errors
> /home/zhangle/linux/arch/mips/kernel/traps.c: In function ‘set_uncached_handler’:
> /home/zhangle/linux/arch/mips/kernel/traps.c:1604: error: format not a string literal and no format arguments
This one is caused by one of the Gentoo patches to GCC
(10-format-string-security patch),
I usually remove this patch when building GCC to avoid these stupid
compile failures ;-)
> diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h
> index 08ea468..974b161 100644
> --- a/arch/mips/include/asm/bug.h
> +++ b/arch/mips/include/asm/bug.h
> @@ -6,6 +6,7 @@
> #ifdef CONFIG_BUG
>
> #include <asm/break.h>
> +#include <linux/compiler.h>
>
> static inline void __noreturn BUG(void)
> {
Seems to me to be the best course of action.
Thanks!
Manuel Lauss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] -git compile fixes for MIPS
2009-06-17 19:23 [PATCH v2] -git compile fixes for MIPS Zhang Le
2009-06-17 19:31 ` Manuel Lauss
@ 2009-06-17 19:33 ` David Daney
1 sibling, 0 replies; 4+ messages in thread
From: David Daney @ 2009-06-17 19:33 UTC (permalink / raw)
To: Zhang Le, Ralf Baechle; +Cc: linux-mips, manuel.lauss
Zhang Le wrote:
> Quick fixes for some compile failures which have cropped up
> in linus-git in the last 24 hours:
>
> CC arch/mips/kernel/time.o
> In file included from linux-2.6.git/include/linux/bug.h:4,
> from linux-2.6.git/arch/mips/kernel/time.c:13:
> linux-2.6.git/arch/mips/include/asm/bug.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG'
> linux-2.6.git/arch/mips/include/asm/bug.h: In function '__BUG_ON':
> linux-2.6.git/arch/mips/include/asm/bug.h:26: error: implicit declaration of function 'BUG'
>
> CC arch/mips/kernel/traps.o
> cc1: warnings being treated as errors
> /home/zhangle/linux/arch/mips/kernel/traps.c: In function ‘set_uncached_handler’:
> /home/zhangle/linux/arch/mips/kernel/traps.c:1604: error: format not a string literal and no format arguments
>
> CC arch/mips/mm/uasm.o
> In file included from linux-2.6.git/arch/mips/mm/uasm.c:21:
> linux-2.6.git/arch/mips/include/asm/bugs.h: In function 'check_bugs':
> linux-2.6.git/arch/mips/include/asm/bugs.h:34: error: implicit declaration of function 'smp_processor_id'
> linux-2.6.git/arch/mips/mm/uasm.c: In function 'uasm_copy_handler':
> linux-2.6.git/arch/mips/mm/uasm.c:514: error: implicit declaration of function 'memcpy'
>
> Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
> Signed-off-by: Zhang Le <r0bertz@gentoo.org>
This one looks better. However...
> ---
> arch/mips/include/asm/bug.h | 1 +
> arch/mips/include/asm/bugs.h | 1 +
> arch/mips/kernel/traps.c | 2 +-
> arch/mips/mm/uasm.c | 1 +
> 4 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h
> index 08ea468..974b161 100644
> --- a/arch/mips/include/asm/bug.h
> +++ b/arch/mips/include/asm/bug.h
> @@ -6,6 +6,7 @@
> #ifdef CONFIG_BUG
>
> #include <asm/break.h>
> +#include <linux/compiler.h>
... usually you put linux/ before asm/
You could add: Reviewed-by: David Daney <ddaney@caviumnetworks.com>
with that change.
>
> static inline void __noreturn BUG(void)
> {
> diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h
> index 9dc10df..b160a70 100644
> --- a/arch/mips/include/asm/bugs.h
> +++ b/arch/mips/include/asm/bugs.h
> @@ -11,6 +11,7 @@
>
> #include <linux/bug.h>
> #include <linux/delay.h>
> +#include <linux/smp.h>
>
> #include <asm/cpu.h>
> #include <asm/cpu-info.h>
> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 08f1edf..0e9922b 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -1601,7 +1601,7 @@ void __cpuinit set_uncached_handler(unsigned long offset, void *addr,
> #endif
>
> if (!addr)
> - panic(panic_null_cerr);
> + panic("%s", panic_null_cerr);
>
> memcpy((void *)(uncached_ebase + offset), addr, size);
> }
> diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
> index f467199..ba538f7 100644
> --- a/arch/mips/mm/uasm.c
> +++ b/arch/mips/mm/uasm.c
> @@ -15,6 +15,7 @@
> #include <linux/kernel.h>
> #include <linux/types.h>
> #include <linux/init.h>
> +#include <linux/string.h>
>
> #include <asm/inst.h>
> #include <asm/elf.h>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] -git compile fixes for MIPS
2009-06-17 19:31 ` Manuel Lauss
@ 2009-06-17 19:35 ` Zhang Le
0 siblings, 0 replies; 4+ messages in thread
From: Zhang Le @ 2009-06-17 19:35 UTC (permalink / raw)
To: Manuel Lauss; +Cc: linux-mips, manuel.lauss
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
On 21:31 Wed 17 Jun , Manuel Lauss wrote:
> On Wed, Jun 17, 2009 at 9:23 PM, Zhang Le<r0bertz@gentoo.org> wrote:
>
> > CC arch/mips/kernel/traps.o
> > cc1: warnings being treated as errors
> > /home/zhangle/linux/arch/mips/kernel/traps.c: In function ‘set_uncached_handler’:
> > /home/zhangle/linux/arch/mips/kernel/traps.c:1604: error: format not a string literal and no format arguments
>
> This one is caused by one of the Gentoo patches to GCC
> (10-format-string-security patch),
> I usually remove this patch when building GCC to avoid these stupid
> compile failures ;-)
Ah, thanks for telling me this.
Maybe I should enable "vanilla" USE flag.
:)
--
Zhang, Le
Gentoo/Loongson Developer
http://zhangle.is-a-geek.org
0260 C902 B8F8 6506 6586 2B90 BC51 C808 1E4E 2973
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-17 19:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 19:23 [PATCH v2] -git compile fixes for MIPS Zhang Le
2009-06-17 19:31 ` Manuel Lauss
2009-06-17 19:35 ` Zhang Le
2009-06-17 19:33 ` David Daney
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.