Re: Linux-2.5.54-sparc64 compile errors

From: James Morris (jmorris@intercode.com.au)
Date: Fri Jan 03 2003 - 09:08:59 EST


On Thu, 2 Jan 2003, BODA Karoly jr. wrote:

> o And an error which with I can't do anything... :(
>
> sparc64-linux-gcc -Wp,-MD,arch/sparc64/kernel/.head.o.d -D__ASSEMBLY__
> -D__KERNEL__ -Iinclude -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
> -nostdinc -iwithprefix include -ansi -c -o arch/sparc64/kernel/head.o
> arch/sparc64/kernel/head.S
> In file included from include/linux/cache.h:4,
> from include/asm/smp.h:11,
> from arch/sparc64/kernel/entry.S:15,
> from arch/sparc64/kernel/head.S:734:
> include/linux/kernel.h:31: warning: `ALIGN' redefined
> include/linux/linkage.h:24: warning: this is the location of the previous definition
>

This is a namespace collision introduced with ALIGN() being moved to
kernel.h. A patch below resolves this for sparc64 by not including some
non-asm headers when compiling assembler, although the namespace issue
itself may still need to be fixed (e.g. change ALIGN() to ALIGN_TO()
in kernel.h ?).

It looks like sparc32 has a similar problem.

- James

-- 
James Morris
<jmorris@intercode.com.au>

diff -urN -X dontdiff linux-2.5.54.orig/include/asm-sparc64/smp.h linux-2.5.54.w1/include/asm-sparc64/smp.h --- linux-2.5.54.orig/include/asm-sparc64/smp.h Wed Oct 9 22:39:39 2002 +++ linux-2.5.54.w1/include/asm-sparc64/smp.h Sat Jan 4 00:43:28 2003 @@ -7,13 +7,14 @@ #define _SPARC64_SMP_H #include <linux/config.h> -#include <linux/threads.h> -#include <linux/cache.h> #include <asm/asi.h> #include <asm/starfire.h> #include <asm/spitfire.h> #ifndef __ASSEMBLY__ +#include <linux/threads.h> +#include <linux/cache.h> + /* PROM provided per-processor information we need * to start them all up. */

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:21 EST