Remove extern inline
PATCH 1/1 Remove extern inline
The attached patch converts the remaining uses of "extern inline" to "static inline".
As I mentioned previously this is a gcc misfeature abused by the linux kernel. Without this change qemu does not build with newer GCC at lower optimization levels.
Paul
? target-arm/p
? target-arm/nwfpe/p
Index: target-arm/nwfpe/ARM-gcc.h
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/nwfpe/ARM-gcc.h,v retrieving revision 1.1
nwfpe/ARM-gcc.h +1 -1
@@ -68,7 +68,7 @@ a compiler does not support explicit inlto be `static'. ------------------------------------------------------------------------------- */ -#define INLINE extern __inline__ +#define INLINE static __inline__/* For use as a GCC soft-float library we need some special function names. */
Index: target-arm/nwfpe/fpa11.inl
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/nwfpe/fpa11.inl,v retrieving revision 1.1
nwfpe/fpa11.inl +4 -4
@@ -22,13 +22,13 @@ #include "fpa11.h" /* Read and write floating point status register */ -extern __inline__ unsigned int readFPSR(void) +INLINE unsigned int readFPSR(void) { FPA11 *fpa11 = GET_FPA11(); return(fpa11->fpsr); } -extern __inline__ void writeFPSR(FPSR reg) +INLINE void writeFPSR(FPSR reg) { FPA11 *fpa11 = GET_FPA11(); /* the sysid byte in the status register is readonly */
@@ -36,14 +36,14 @@ extern __inline__ void writeFPSR(FPSR re } /* Read and write floating point control register */ -extern __inline__ FPCR readFPCR(void) +INLINE FPCR readFPCR(void) { FPA11 *fpa11 = GET_FPA11(); /* clear SB, AB and DA bits before returning FPCR */ return(fpa11->fpcr & ~MASK_RFC); } -extern __inline__ void writeFPCR(FPCR reg) +INLINE void writeFPCR(FPCR reg) { FPA11 *fpa11 = GET_FPA11(); fpa11->fpcr &= ~MASK_WFC; /* clear SB, AB and DA bits */