pulseaudio: remove BR2_ARCH_HAS_ATOMICS dependency
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 2 Feb 2016 15:31:23 +0000 (16:31 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 6 Feb 2016 10:16:00 +0000 (11:16 +0100)
pulseaudio is able to either use the atomic __sync builtins from the
compiler, or to rely on libatomic_ops for atomic operations. However,
since it anyway selects json-c which requires the __sync built-ins, it
means using libatomic_ops is useless: even if you use libatomic_ops
for pulseaudio, you'd still get a link error in pulseaudio due to the
missing __sync built-in for the json-c library.

Also, since pulseaudio now inherits the BR2_TOOLCHAIN_HAS_SYNC_4 from
json-c, which matches the __sync built-in from pulseaudio, this
commit:

 - Drops the BR2_ARCH_HAS_ATOMICS dependency
 - Forces pulseaudio to not detect libatomic_ops
 - Propagates the removal of BR2_ARCH_HAS_ATOMICS dependency to
   pulseaudio's reverse dependencies.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
package/efl/Config.in
package/espeak/Config.in
package/gstreamer/gst-plugins-good/Config.in
package/gstreamer1/gst1-plugins-good/Config.in
package/mpd/Config.in
package/pulseaudio/Config.in
package/pulseaudio/pulseaudio.mk

index 21cbf5fe10e9fa4b9610650419890d6fd3ad0069..418f41e379bfc75e078fa752ca8fc6abb6ef7b6a 100644 (file)
@@ -81,7 +81,6 @@ config BR2_PACKAGE_EFL_LIBSNDFILE
 
 config BR2_PACKAGE_EFL_PULSEAUDIO
        bool "Enable pulseaudio support (recommended)"
-       depends on BR2_ARCH_HAS_ATOMICS # pulseaudio
        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c
        select BR2_PACKAGE_PULSEAUDIO
        default y
index eebaf6fb64168b65c8805a8b9d3319a85c94d3c7..aed627af92fc403278fbcca49edf3dce28594fbd 100644 (file)
@@ -32,7 +32,6 @@ config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA
 
 config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_PULSEAUDIO
        bool "pulseaudio"
-       depends on BR2_ARCH_HAS_ATOMICS # pulseaudio
        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c
        select BR2_PACKAGE_PULSEAUDIO
 
index f1694350624c7e40c6234b89d43b3284ab96804b..36ab6cb4f9a9b90fc952994482842e777d908ae3 100644 (file)
@@ -204,7 +204,6 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS4
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE
        depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
        depends on BR2_USE_MMU # pulseaudio
-       depends on BR2_ARCH_HAS_ATOMICS # pulseaudio
        depends on !BR2_STATIC_LIBS # pulseaudio
        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c
        select BR2_PACKAGE_PULSEAUDIO
@@ -212,7 +211,6 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE
 
 comment "pulseaudio support needs a toolchain w/ threads, dynamic library"
        depends on BR2_USE_MMU
-       depends on BR2_ARCH_HAS_ATOMICS
        depends on BR2_TOOLCHAIN_HAS_SYNC_4
        depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
 
index 6855c4ba58b89f08c16ad125b518eebaa4e0382f..2606b86fd3ee0ba402c0eaeff458cad2b81d3fe1 100644 (file)
@@ -311,7 +311,6 @@ comment "gdkpixbuf needs a toolchain w/ wchar, threads"
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE
        depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
        depends on BR2_USE_MMU # pulseaudio
-       depends on BR2_ARCH_HAS_ATOMICS # pulseaudio
        depends on !BR2_STATIC_LIBS # pulseaudio
        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c
        select BR2_PACKAGE_PULSEAUDIO
@@ -321,7 +320,6 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE
 
 comment "pulseaudio support needs a toolchain w/ threads, dynamic library"
        depends on BR2_USE_MMU
-       depends on BR2_ARCH_HAS_ATOMICS
        depends on BR2_TOOLCHAIN_HAS_SYNC_4
        depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
 
index 17f8e961194c56a8f8e5f2370249401c534ede93..1da8243b00a8e5e94c78d78795e2210b604e2f56 100644 (file)
@@ -250,7 +250,6 @@ config BR2_PACKAGE_MPD_OSS
 
 config BR2_PACKAGE_MPD_PULSEAUDIO
        bool "pulseaudio"
-       depends on BR2_ARCH_HAS_ATOMICS # pulseaudio
        depends on !BR2_STATIC_LIBS # pulseaudio
        depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c
        select BR2_PACKAGE_PULSEAUDIO
index 4583d229554809d01980382a4bcc8dfeceed7708..20aa374fce8c962eec9dd2976cebb32f6909bae7 100644 (file)
@@ -9,7 +9,6 @@ config BR2_PACKAGE_PULSEAUDIO
        select BR2_PACKAGE_LIBSNDFILE
        select BR2_PACKAGE_SPEEX
        depends on BR2_USE_MMU # fork()
-       depends on BR2_ARCH_HAS_ATOMICS
        help
          PulseAudio is a sound system for POSIX OSes, meaning that it
          is a proxy for your sound applications. It allows you to do
@@ -34,6 +33,5 @@ endif
 
 comment "pulseaudio needs a toolchain w/ wchar, threads, dynamic library"
        depends on BR2_USE_MMU
-       depends on BR2_ARCH_HAS_ATOMICS
        depends on BR2_TOOLCHAIN_HAS_SYNC_4
        depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
index 845009043ab9e93e0b1d9e9f13a64732f169ade7..86bbb2fe1e942455afa590aa6d7b2d6e5db5e941 100644 (file)
@@ -15,9 +15,14 @@ PULSEAUDIO_CONF_OPTS = \
        --disable-legacy-database-entry-format \
        --disable-manpages
 
+# Make sure we don't detect libatomic_ops. Indeed, since pulseaudio
+# requires json-c, which needs 4 bytes __sync builtins, there should
+# be no need for pulseaudio to rely on libatomic_ops.
+PULSE_AUDIO_CONF_ENV += \
+       ac_cv_header_atomic_ops_h=no
+
 PULSEAUDIO_DEPENDENCIES = \
        host-pkgconf libtool json-c libsndfile speex host-intltool \
-       $(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \
        $(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
        $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \
        $(if $(BR2_PACKAGE_LIBGLIB2),libglib2) \