[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Do not use inline in argp.h on FreeBSD
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH] Do not use inline in argp.h on FreeBSD |
Date: |
Fri, 25 Jul 2014 23:39:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 |
On 25.07.2014 17:28, Andrey Borzenkov wrote:
> This fixes this error:
>
> In file included from util/grub-mkimage.c:54:0:
> ./grub-core/gnulib/argp.h:627:49: error: '__sbistype' is static but
> used in inline function '_option_is_short' which is not static
> [-Werror] cc1: all warnings being treated as errors gmake[2]: ***
> [util/grub_mkimage-grub-mkimage.o] Error 1
>
Did you contatc gnulib? Can we just silence this warning?
> Treat FreeBSD similar to Apple and do not try inlines. It currently
> does it for GCC only, as this is what had been tested.
>
> Reported-By: Beeblebrox <address@hidden>
> Tested-By: Beeblebrox <address@hidden>
> Signed-off-by: Andrey Borzenkov <address@hidden>
>
> ---
> m4/extern-inline.m4 | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
> index 240150e..009b928 100644
> --- a/m4/extern-inline.m4
> +++ b/m4/extern-inline.m4
> @@ -24,7 +24,10 @@ AC_DEFUN([gl_EXTERN_INLINE],
> <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
> OS X 10.9 has a macro __header_inline indicating the bug is fixed for C
> and
> for clang but remains for g++; see
> <http://trac.macports.org/ticket/41033>.
> - Perhaps Apple will fix this some day. */
> + Perhaps Apple will fix this some day.
> +
> + Suppress use of inlines on FreeBSD with GCC similar to Apple. It fails to
> + compile arpg.h due to static inlines in ctype.h */
> #if (defined __APPLE__ \
> && (defined __header_inline \
> ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
> @@ -36,7 +39,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
> # define _GL_EXTERN_INLINE_APPLE_BUG
> #endif
> #if ((__GNUC__ \
> - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
> + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__) \
> + && !defined __FreeBSD__ \
> : (199901L <= __STDC_VERSION__ \
> && !defined __HP_cc \
> && !(defined __SUNPRO_C && __STDC__))) \
> @@ -45,7 +49,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
> # define _GL_EXTERN_INLINE extern inline
> # define _GL_EXTERN_INLINE_IN_USE
> #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
> - && !defined _GL_EXTERN_INLINE_APPLE_BUG)
> + && !defined _GL_EXTERN_INLINE_APPLE_BUG && !defined __FreeBSD__)
> # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
> /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
> # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
>
signature.asc
Description: OpenPGP digital signature