pkgsrc-Users archive

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

Re: devel/gmp on Darwin is not a happy builder

On Thu, Nov 20, 2008 at 05:46:24PM +0100, Adam Ciarci?ski wrote:
> I guess the problem only occurs for gcc-4.2. :)
> I have changed patch-ac, so cvs update and try again.

Actually, it isn't just gcc-4.2.   The problem also occurs with
the default cc if you've got a newer xcode installed (e.g. xcode 3.1.1's
gcc 4.0.1 build 5488).

The difference is due to the following #if and Apple fixing the
handling of __GNUC_STDC_INLINE__ in 4.0.1 between build 5465 (xcode 3.0)
and build 5488:

 #if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2)
 #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__))

In xcode 3.0 (build 5465), setting "-std=c99" should define 
__GNUC_STDC_INLINE__, but it does not.

In xcode 3.1.1 (build 5488), setting "-std=c99" does define 
__GNUC_STDC_INLINE__ properly.   So if you compile with this
the above #if will add the __gnu_inline__ attribute irrespective
of __GNUC__ and __GNUC_MINOR__.

It would be nice if __GNUC_STDC_INLINE__ was always properly set,
even if you are using xcode 3.0.   I was thinking something like:

#if defined(__APPLE_CC__) && __STDC_VERSION__ >= 199901L && \
        __APPLE_CC__ > 5400 && __APPLE_CC__ < 5488 && \

#define __GNUC_STDC_INLINE__


might do the trick.


Home | Main Index | Thread Index | Old Index