mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Link pipewire-jack to libatomic if required
This is necessary on some 32-bit architectures that implement atomic operations on 64-bit quantities as library calls, including Debian's armel and mipsel ports. Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
parent
8332ee0c25
commit
b8c58c74d8
2 changed files with 29 additions and 1 deletions
28
meson.build
28
meson.build
|
|
@ -155,6 +155,34 @@ elif cc.has_argument('-mfpu=neon')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
libatomic = cc.find_library('atomic', required : false)
|
||||||
|
|
||||||
|
test_8_byte_atomic = '''
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int64_t eight;
|
||||||
|
__atomic_store_n(&eight, 123, __ATOMIC_SEQ_CST);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
# We currently assume that libatomic is unnecessary for 4-byte atomic
|
||||||
|
# operations on any reasonable architecture.
|
||||||
|
if cc.links(
|
||||||
|
test_8_byte_atomic,
|
||||||
|
name : '8-byte __atomic_store_n without libatomic')
|
||||||
|
atomic_dep = dependency('', required: false)
|
||||||
|
elif cc.links(
|
||||||
|
test_8_byte_atomic,
|
||||||
|
dependencies : libatomic,
|
||||||
|
name : '8-byte __atomic_store_n with libatomic')
|
||||||
|
atomic_dep = libatomic
|
||||||
|
elif get_option('pipewire-jack')
|
||||||
|
# Currently only required for the JACK backend
|
||||||
|
error('8-byte atomic operations are required for pipewire-jack')
|
||||||
|
endif
|
||||||
|
|
||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
cdata.set('PIPEWIRE_VERSION_MAJOR', pipewire_version_major)
|
cdata.set('PIPEWIRE_VERSION_MAJOR', pipewire_version_major)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ pipewire_jack = shared_library('jack',
|
||||||
version : libversion,
|
version : libversion,
|
||||||
c_args : pipewire_jack_c_args,
|
c_args : pipewire_jack_c_args,
|
||||||
include_directories : [configinc],
|
include_directories : [configinc],
|
||||||
dependencies : [pipewire_dep, jack_dep, mathlib],
|
dependencies : [pipewire_dep, atomic_dep, jack_dep, mathlib],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : libjack_path,
|
install_dir : libjack_path,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue