Re: [PATCH spice-common] meson: Disable -std=c99

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

 



> 
> In the shortlog, s/disable/remove/
> 

I'll update

> On Mon, Jul 09, 2018 at 09:04:07AM +0100, Frediano Ziglio wrote:
> > This flag disable some compiler feature which is used by some
> > system header potentially introducing some limitations.
> > Autotools does not set this flag.
> 
> Autotools checks whether this flag is needed or not though, and mandates
> the use of at least c99
> configure.ac has a call to AC_PROG_CC_C99 which translates to:
> 
> configure:13330: checking for gcc option to accept ISO C99
> configure:13492: result: none needed
> 

The difference is that autotools looks for additional flag to support
it while Meson add the flag to cap to C99.
So if your compiler by default uses C89 and needs an additional flag
autotools will add the additional flags, Meson adds -std=c99 to avoid
for instance compiler use C11 features where in this case autotools
won't add any flag.

Maybe change

"Autotools does not set this flag."

to

"Autotools won't add any flag to limit compiler features to C99, instead
currently add for flag needed to support C99."

> (just something that I would expand on in the commit log).
> 
> Christophe
> 
> > For instance some Posix limitations changes (like _POSIX_OPEN_MAX).
> > As compiler feature for instance _Static_assert is not used.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > ---
> >  meson.build | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/meson.build b/meson.build
> > index 2b91e82..466bb06 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -10,8 +10,7 @@ if not meson.is_subproject()
> >  endif
> >  
> >  # some global vars
> > -spice_common_global_cflags = ['-std=c99',
> > -                              '-DHAVE_CONFIG_H',
> > +spice_common_global_cflags = ['-DHAVE_CONFIG_H',
> >                                '-DG_LOG_DOMAIN="Spice"',
> >                                '-Wall',
> >                                '-Wextra',

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]