[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inline related build failures on MacOS X 10.5
From: |
Bruno Haible |
Subject: |
Re: inline related build failures on MacOS X 10.5 |
Date: |
Sat, 12 Apr 2008 03:25:55 +0200 |
User-agent: |
KMail/1.5.4 |
Peter O'Gorman wrote:
> It is unlikely that there will be a version of gcc from Apple based on
> gcc-4.3 or later (because Apple is currently not introducing any GPLv3
> software).
Currently... They will have to buy into gcc 4.3 or newer in the long run.
> Note that what will become Xcode-3.1 seems to have this fixed:
> http://www.opensource.apple.com/darwinsource/iPhoneSDKBeta3/gcc-5479/gcc/c-cppbuiltin.c
> compare to:
> http://www.opensource.apple.com/darwinsource/10.5/gcc-5465/gcc/c-cppbuiltin.c
Ohhhh... yet another nonstandard GCC variant. This one sets the macro
right, but still does not support the __attribute__((gnu_inline)) modifier
nor the -fgnu89-inline option.
This requires a change in the argp module:
2008-04-11 Bruno Haible <address@hidden>
Adapt to future versions of Apple GCC.
* lib/argp-fmtstream.h (ARGP_FS_EI): Don't test __GNUC_GNU_INLINE__.
Reported by Peter O'Gorman <address@hidden>.
*** lib/argp-fmtstream.h.orig 2008-04-12 03:23:14.000000000 +0200
--- lib/argp-fmtstream.h 2008-04-12 03:17:01.000000000 +0200
***************
*** 206,219 ****
inline semantics, unless -fgnu89-inline is used. It defines a macro
__GNUC_STDC_INLINE__ to indicate this situation or a macro
__GNUC_GNU_INLINE__ to indicate the opposite situation.
GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
semantics but warns, unless -fgnu89-inline is used:
warning: C99 inline functions are not supported; using GNU89
warning: to disable this warning use -fgnu89-inline or the gnu_inline
function attribute
! It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. */
# if defined __GNUC_STDC_INLINE__
# define ARGP_FS_EI inline
! # elif defined __GNUC_GNU_INLINE__
# define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__))
# else
# define ARGP_FS_EI extern inline
--- 206,249 ----
inline semantics, unless -fgnu89-inline is used. It defines a macro
__GNUC_STDC_INLINE__ to indicate this situation or a macro
__GNUC_GNU_INLINE__ to indicate the opposite situation.
+
GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
semantics but warns, unless -fgnu89-inline is used:
warning: C99 inline functions are not supported; using GNU89
warning: to disable this warning use -fgnu89-inline or the gnu_inline
function attribute
! It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
!
! Whereas Apple GCC 4.0.1 build 5479 without -std=c99 or -std=gnu99
! implements the GNU C inline semantics and defines the macro
! __GNUC_GNU_INLINE__, but it does not warn and does not support
! __attribute__ ((__gnu_inline__)).
!
! All in all, these are the possible combinations. For every compiler,
! we need to choose ARGP_FS_EI so that the corresponding table cell
! contains an "ok".
!
! \ ARGP_FS_EI inline extern extern
! \ inline inline
! CC \ __attribute__
! ((gnu_inline))
!
! gcc 4.3.0 error ok ok
! gcc 4.3.0 -std=gnu99 -fgnu89-inline error ok ok
! gcc 4.3.0 -std=gnu99 ok error ok
!
! gcc 4.2.2 error ok ok
! gcc 4.2.2 -std=gnu99 -fgnu89-inline error ok ok
! gcc 4.2.2 -std=gnu99 error warning ok
!
! gcc 4.1.2 error ok warning
! gcc 4.1.2 -std=gnu99 error ok warning
!
! Apple gcc 4.0.1 error ok warning
! Apple gcc 4.0.1 -std=gnu99 ok error warning
! */
# if defined __GNUC_STDC_INLINE__
# define ARGP_FS_EI inline
! # elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
# define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__))
# else
# define ARGP_FS_EI extern inline
Re: inline related build failures on MacOS X 10.5, Ralf Wildenhues, 2008/04/11