mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
build-sys: Move to compiling with C11 support
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.
This commit is contained in:
parent
8949ed96c6
commit
aa02e1654b
14 changed files with 98 additions and 20 deletions
|
|
@ -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
|
||||
|
|
@ -177,6 +176,11 @@ esac
|
|||
|
||||
#### Compiler flags ####
|
||||
|
||||
AX_CHECK_COMPILE_FLAG([-std=c11],
|
||||
[],
|
||||
[AC_MSG_ERROR([*** Compiler does not support -std=c11])],
|
||||
[-pedantic -Werror])
|
||||
|
||||
AX_APPEND_COMPILE_FLAGS(
|
||||
[-Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto],
|
||||
[], [-pedantic -Werror])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue