fix gcc4 compile error in ppc64 paca.h
PATCH 1/1 fix gcc4 compile error in ppc64 paca.h
Compiling 2.6.12-rc1 or 2.6.12-rc1-mm1 for ppc64 with gcc4 fails with:
In file included from include/asm/spinlock.h:20,
from include/linux/spinlock.h:43,
from include/linux/signal.h:5,
from arch/ppc64/kernel/asm-offsets.c:17:include/asm/paca.h:25: error: array type has incomplete element type make[1]: *** [arch/ppc64/kernel/asm-offsets.s] Error 1
make: *** [arch/ppc64/kernel/asm-offsets.s] Error 2
This is an array-of-incomplete-type error.
Fix: move array decl to after the struct decl.
include/asm-ppc64/paca.h renamed from include/asm-ppc64/paca.h.~1~ +2 -1
@@ -22,7 +22,6 @@#include <asm/iSeries/ItLpRegSave.h> #include <asm/mmu.h> -extern struct paca_struct paca[]; registerstruct paca_struct *local_paca asm("r13" );#define get_paca () local_paca
@@ -115,4 +114,6 @@ struct paca_struct { #endif }; +extern struct paca_struct paca[]; +#endif /* _PPC64_PACA_H */
PATCH 1/1 ppc64: fix gcc4 compile error in paca.h
Thanks, looks good.
Anton
--
From: Mikael Pettersson <[email protected]>
Compiling 2.6.12-rc1 or 2.6.12-rc1-mm1 for ppc64 with gcc4 fails with:
In file included from include/asm/spinlock.h:20,
from include/linux/spinlock.h:43,
from include/linux/signal.h:5,
from arch/ppc64/kernel/asm-offsets.c:17:include/asm/paca.h:25: error: array type has incomplete element type make[1]: *** [arch/ppc64/kernel/asm-offsets.s] Error 1
make: *** [arch/ppc64/kernel/asm-offsets.s] Error 2
This is an array-of-incomplete-type error.
Fix: move array decl to after the struct decl.
include/asm-ppc64/paca.h renamed from include/asm-ppc64/paca.h.~1~ +2 -1
@@ -22,7 +22,6 @@#include <asm/iSeries/ItLpRegSave.h> #include <asm/mmu.h> -extern struct paca_struct paca[]; registerstruct paca_struct *local_paca asm("r13" );#define get_paca () local_paca
@@ -115,4 +114,6 @@ struct paca_struct { #endif }; +extern struct paca_struct paca[]; +#endif /* _PPC64_PACA_H */