mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
build: skip unsupported compiler option
-Wimplicit-fallthrough for gcc version before 7.x Signed-off-by: Martin Koch <martin.koch@ese.de>
This commit is contained in:
parent
4000409c80
commit
cee1a26be6
2 changed files with 9 additions and 3 deletions
10
meson.build
10
meson.build
|
|
@ -49,7 +49,6 @@ cc = meson.get_compiler('c')
|
||||||
if cc.get_id() == 'gcc'
|
if cc.get_id() == 'gcc'
|
||||||
add_global_arguments('-fvisibility=hidden',
|
add_global_arguments('-fvisibility=hidden',
|
||||||
'-Wsign-compare',
|
'-Wsign-compare',
|
||||||
'-Wimplicit-fallthrough',
|
|
||||||
'-Wpointer-arith',
|
'-Wpointer-arith',
|
||||||
'-Wformat',
|
'-Wformat',
|
||||||
'-Wformat-security',
|
'-Wformat-security',
|
||||||
|
|
@ -67,7 +66,6 @@ if cc.get_id() == 'gcc'
|
||||||
language : 'c')
|
language : 'c')
|
||||||
add_global_arguments('-fvisibility=hidden',
|
add_global_arguments('-fvisibility=hidden',
|
||||||
'-Wsign-compare',
|
'-Wsign-compare',
|
||||||
'-Wimplicit-fallthrough',
|
|
||||||
'-Wpointer-arith',
|
'-Wpointer-arith',
|
||||||
'-Wformat',
|
'-Wformat',
|
||||||
'-Wformat-security',
|
'-Wformat-security',
|
||||||
|
|
@ -80,6 +78,12 @@ if cc.get_id() == 'gcc'
|
||||||
'-Wno-pedantic',
|
'-Wno-pedantic',
|
||||||
'-Wunused-result',
|
'-Wunused-result',
|
||||||
language : 'cpp')
|
language : 'cpp')
|
||||||
|
# warn on implicit fall-through if supported by compiler (gcc >= 7.x)
|
||||||
|
gcc_major_version = cc.version().split('.')[0]
|
||||||
|
if(gcc_major_version.to_int() >= 7)
|
||||||
|
add_global_arguments('-Wimplicit-fallthrough', language : 'c')
|
||||||
|
add_global_arguments('-Wimplicit-fallthrough', language : 'cpp')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
sse_args = '-msse'
|
sse_args = '-msse'
|
||||||
|
|
@ -281,7 +285,7 @@ epoll_shim_dep = (build_machine.system() == 'freebsd'
|
||||||
: dependency('', required: false))
|
: dependency('', required: false))
|
||||||
|
|
||||||
alsa_dep = (get_option('pipewire-alsa')
|
alsa_dep = (get_option('pipewire-alsa')
|
||||||
? dependency('alsa')
|
? dependency('alsa', version : '>=1.1.7')
|
||||||
: dependency('', required: false))
|
: dependency('', required: false))
|
||||||
|
|
||||||
subdir('spa')
|
subdir('spa')
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifndef __FreeBSD__
|
#ifndef __FreeBSD__
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue