[pulseaudio-discuss] [PATCH v2 15/25] build-sys: Move to compiling with C11 support
Arun Raghavan
arun at accosted.net
Tue Dec 15 21:33:35 PST 2015
On Wed, 2015-12-16 at 07:19 +0200, Tanu Kaskinen wrote:
> On Wed, 2015-12-16 at 09:10 +0530, arun at accosted.net wrote:
> > From: Arun Raghavan <git at arunraghavan.net>
> >
> > This is needed for building with anonymous unions. A bunch of calls
> > to
> > fail() that used to mysteriously work need fixing -- fail() is a
> > macro
> > that takes a printf-style message as an argument. Not passing this
> > somehow worked with the previous compiler flags, but breaks with
> > -std=c11.
> > ---
> > configure.ac | 3 ++-
> > src/tests/connect-stress.c | 6 +++---
> > src/tests/cpu-mix-test.c | 2 +-
> > src/tests/cpu-remap-test.c | 4 ++--
> > src/tests/cpu-sconv-test.c | 4 ++--
> > src/tests/cpu-volume-test.c | 2 +-
> > src/tests/cpulimit-test.c | 4 ++--
> > src/tests/extended-test.c | 4 ++--
> > src/tests/get-binary-name-test.c | 2 +-
> > src/tests/interpol-test.c | 2 +-
> > src/tests/mult-s16-test.c | 2 +-
> > src/tests/sync-playback.c | 4 ++--
> > 12 files changed, 20 insertions(+), 19 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 26c3e29..6fc77c5 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -80,7 +80,6 @@ AC_PROG_LN_S
> > # CC
> >
> > AC_PROG_CC
> > -AC_PROG_CC_C99
> > AM_PROG_CC_C_O
> > # Only required if you want the WebRTC canceller -- no runtime dep
> > on
> > # libstdc++ otherwise
> > @@ -176,6 +175,8 @@ esac
> >
> > #### Compiler flags ####
> >
> > +AX_APPEND_COMPILE_FLAGS([-std=c11], [], [-pedantic -Werror])
>
> We discussed this a while back in irc, and my recollection is that we
> agreed that some macro with "CHECK" in its name seemed the best fit.
> AX_APPEND_COMPILE_FLAGS is not good, because it silently drops the
> flag
> if -std=c11 isn't supported.
Ah yes, I'll fix this one up to use AX_CHECK_COMPILE_FLAG instead.
-- Arun
More information about the pulseaudio-discuss
mailing list