qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Build failure on OS X


From: J. Mayer
Subject: Re: [Qemu-devel] Build failure on OS X
Date: Sun, 30 Sep 2007 15:27:34 +0200

On Sun, 2007-09-30 at 15:08 +0200, Andreas Färber wrote:
> Am 30.09.2007 um 14:17 schrieb J. Mayer:
> 
> > On Sun, 2007-09-30 at 14:05 +0200, Andreas Färber wrote:
> >> Hi,
> >>
> >> Am 30.09.2007 um 13:45 schrieb J. Mayer:
> >>
> >>>> Anyone any idea what might've caused this build failure? I'm fairly
> >>>> certain I haven't messed with or updated the system headers.
> >>>
> >>> have you just updated your CVS co ?
> >>
> >> Yes.
> >>
> >>> Please try to comment the "always_inline" definition in vl.h /
> >>> exec-all.h.
> >>> If this is what's breaking your build, I'll revert this definition.
> >>
> >> It is, thanks for the pointer! (The source file itself didn't appear
> >> to have been updated.)
> >>
> >>>> With line 284 of math.h reading:
> >>>>          static __inline__ int __inline_isfinitef        (float      )
> >>>> __MATH_H_ALWAYS_INLINE__;
> >>>
> >>> The fact the error mentions "__attribute__" and ALWAYS_INLINE  
> >>> make me
> >>> think the always_inline defintion is the suspect here....
> >>
> >> I believe Apple's GCC in general has a problem with the __attribute__
> >> notation. The ppc*-softmmu fail to build for some time due to its use
> >> for aliasing in hw/ppc.c. Maybe we could add a configure check for
> >> this feature to have a conditional define? That would allow a more
> >> elegant fix than the one I use locally and had previously suggested.
> >
> > Sorry for introducing this problem...
> > Would this new definition solve the compilation failure ?
> >
> > #ifndef always_inline
> > #if (__GNUC__ < 3) || defined(__APPLE__)
> > #define always_inline inline
> > #else
> > #define always_inline __attribute__ (( always_inline )) inline
> > #endif
> > #endif
> 
> It does.

OK, then I will commit this fixup, even if it may generate slower code
for interrupt processing (which is already something slow...).

> I've updated my patch accordingly with __APPLE__, what do you think?  
> I have no idea what alias does exactly, should we just use a #define  
> on the Mac?

the alias attribute is used to define a new function name that actually
refer to another existant function, this to avoid code duplication. We
can easily avoid using it using an inline function for the actual
implementation and calling it from different places. Please take a look
at this patch.

Regards.

-- 
J. Mayer <address@hidden>
Never organized

Attachment: ppc_alias.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]