Skip to contentSkip to conversation

arc: Support option of atomic extension

PATCH New Anton Kolesov 4 participants 42 messages Jul 28, 2014 – Aug 16, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 arc: Support option of atomic extension

GCC has several builtin functions that implement atomic operations. In GCC for ARC those functions rely on LLOCK/SCOND instructions which are optional in ARC CPU's. If software uses those functions and as a result those instructions, it will be abort with Illegal instruction exception. To avoid confusion user should first specify that their CPU supports atomic extension, which will allow selection of packages that use builtin atomic functions.

---
 arch/Config.in.arc  | 4 ++++
 package/Makefile.in | 4 ++++
 2 files changed, 8 insertions(+)
arch/Config.in.arc +4 -0
index 60b59f0..9edcbd4 100644
@@ -1,3 +1,7 @@
+# Choise of atomic instructions presence
+config BR2_ARC_ATOMIC_EXT
+	bool "Atomic extension (LLOCK/SCOND instructions)"
+
 config BR2_ARCH
 	default "arc"	if BR2_arcle
 	default "arceb"	if BR2_arceb
package/Makefile.in +4 -0
index fc55850..3d25d2a 100644
@@ -102,6 +102,10 @@ ifeq ($(BR2_xtensa),y)
 TARGET_ABI += -mlongcalls -mtext-section-literals
 endif
 
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
+TARGET_ABI += -matomic
+endif
+
 STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
 STAGING_DIR    = $(HOST_DIR)/$(STAGING_SUBDIR)
 
Signature · 1 line
1.8.4.1
#1 lore raw

PATCH 2/9 cairo: arc: Disable if ARC atomics are disabled

Cairo requires GCC built-in atomic functions which are optional in ARC toolchain.

This fixes:
http://autobuild.buildroot.net/results/fadfaa9916724d310d0dda555a1db31bee1601d0/

---
 package/cairo/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/cairo/Config.in +4 -0
index 0c87a29..7c1cbac 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	help
 	  Cairo is a 2D graphics library with support for multiple
 	  output devices. Currently supported output targets include
@@ -13,6 +14,9 @@ config BR2_PACKAGE_CAIRO
 
 	  http://cairographics.org/
 
+comment "cairo needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
+
 if BR2_PACKAGE_CAIRO
 
 config BR2_PACKAGE_CAIRO_PS
Signature · 1 line
1.8.4.1
#2 lore raw

PATCH 3/9 jack2: arc: Disable if ARC atomics are disabled

In reply to Anton Kolesov

Jack2 requires GCC built-in atomic functions which are optional in ARC toolchain.

This fixes:
http://autobuild.buildroot.net/results/c218be876d3abf7a8e212b6d526595bfd835e1c5/

---
 package/jack2/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/jack2/Config.in +4 -2
index a443f58..2a04a85 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_JACK2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc # missing compiler intrinsics
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	select BR2_PACKAGE_LIBSAMPLERATE
 	select BR2_PACKAGE_LIBSNDFILE
 	select BR2_PACKAGE_ALSA_LIB
@@ -23,6 +23,8 @@ config BR2_PACKAGE_JACK2
 
 comment "jack2 needs a toolchain w/ largefile, threads, C++"
 	depends on BR2_USE_MMU
-	depends on !BR2_arc
 	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_INSTALL_LIBSTDCPP
+
+comment "jack2 needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
Signature · 1 line
1.8.4.1
#3 lore raw

PATCH 4/9 pulseaudio: arc: Disable if ARC atomics are disabled

In reply to Anton Kolesov

Pulseaudio requires GCC built-in atomic functions which are optional in ARC toolchain.

This fixes:
http://autobuild.buildroot.net/results/d463f3bf730a600a07ed6cd33695bf45e9fd3540/

---
 package/pulseaudio/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/pulseaudio/Config.in +4 -0
index ac6222c..02401f5 100644
@@ -8,6 +8,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_SPEEX
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_MMU # fork()
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
@@ -33,3 +34,6 @@ endif
 comment "pulseaudio needs a toolchain w/ wchar, largefile, threads"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "pulseaudio needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
Signature · 1 line
1.8.4.1
#4 lore raw

PATCH 5/9 libftdi: arc: Disable if ARC atomics are disabled

In reply to Anton Kolesov

Libftdi requires GCC built-in atomic functions which are optional in ARC toolchain.

This fixes:
http://autobuild.buildroot.net/results/6cb25ed954840109c9d0e582e922b0ba9d07e174/

---
 package/libftdi/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/libftdi/Config.in +4 -0
index dc81514..8bc79e1 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBFTDI
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
 	select BR2_PACKAGE_LIBUSB
 	select BR2_PACKAGE_LIBUSB_COMPAT
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	help
 	  Userspace access to FTDI USB interface chips
 
@@ -20,3 +21,6 @@ endif # BR2_PACKAGE_LIBFTDI
 
 comment "libftdi needs a toolchain w/ threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "libftdi needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
Signature · 1 line
1.8.4.1
#5 lore raw

PATCH 6/9 msgpack: arc: Disable if ARC atomics are disabled

In reply to Anton Kolesov

Msgpack requires GCC built-in atomic functions which are optional in ARC toolchain.

This fixes:
http://autobuild.buildroot.net/results/44849a386cefb8899f4560296bfbbd8ea19ee910/

---
 package/msgpack/Config.in        | 6 ++++--
 package/python-msgpack/Config.in | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
package/msgpack/Config.in +4 -2
index b380c58..66e525f 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MSGPACK
 	bool "msgpack"
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc # atomic builtins
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	help
 	  MessagePack is an efficient binary serialization format.
 
@@ -12,4 +12,6 @@ config BR2_PACKAGE_MSGPACK
 
 comment "msgpack needs a toolchain w/ C++"
 	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+
+comment "msgpack needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
package/python-msgpack/Config.in +4 -2
index c4b68a3..365b60c 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_MSGPACK
 	depends on BR2_INSTALL_LIBSTDCPP # msgpack
-	depends on !BR2_arc # msgpack - atomic builtins
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	help
 	  MessagePack (http://msgpack.org/) is a fast, compact binary
 	  serialization format, suitable for similar data to JSON.
@@ -15,4 +15,6 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 comment "python-msgpack needs a toolchain w/ C++"
 	depends on BR2_PACKAGE_PYTHON
 	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+
+comment "python-msgpack needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
Signature · 1 line
1.8.4.1
#6 lore raw

PATCH 7/9 icu: arc: Disable if ARC atomics are disabled

In reply to Anton Kolesov

ICU requires GCC built-in atomic functions which are optional in ARC toolchain.

---
 package/beecrypt/Config.in    | 6 ++++--
 package/cppcms/Config.in      | 6 ++++--
 package/icu/Config.in         | 6 ++++--
 package/php/Config.ext        | 6 ++++--
 package/qt5/qt5base/Config.in | 5 ++++-
 5 files changed, 20 insertions(+), 9 deletions(-)
package/beecrypt/Config.in +4 -2
index 462c8a6..2c17685 100644
@@ -15,15 +15,17 @@ config BR2_PACKAGE_BEECRYPT_CPP
 	bool "C++ support"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # icu
-	depends on !BR2_arc # icu
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	depends on !BR2_BINFMT_FLAT # icu
 	select BR2_PACKAGE_ICU
 	help
 	  Enable C++ support. This pulls in the (large) icu package.
 
 comment "C++ support needs a toolchain w/ wchar"
-	depends on !BR2_arc
 	depends on !BR2_BINFMT_FLAT
 	depends on BR2_INSTALL_LIBSTDCPP && !BR2_USE_WCHAR
 
+comment "C++ support needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
+
 endif # BR2_PACKAGE_BEECRYPT
package/cppcms/Config.in +4 -2
index 614abeb..467025a 100644
@@ -24,7 +24,7 @@ if BR2_PACKAGE_CPPCMS
 
 config BR2_PACKAGE_CPPCMS_ICU
 	bool "enable icu support"
-	depends on !BR2_arc # icu -> atomic builtins
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	depends on !BR2_BINFMT_FLAT # icu
 	depends on BR2_USE_WCHAR # icu
 	select BR2_PACKAGE_ICU
@@ -33,10 +33,12 @@ config BR2_PACKAGE_CPPCMS_ICU
 	  in another hand ICU is heavier than iconv.
 
 comment "icu support needs a toolchain w/ wchar"
-	depends on !BR2_arc
 	depends on !BR2_BINFMT_FLAT
 	depends on !BR2_USE_WCHAR
 
+comment "icu support needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
+
 endif
 
 comment "cppcms needs a toolchain w/ C++, NPTL, dynamic library"
package/icu/Config.in +4 -2
index 9a27894..33a2724 100644
@@ -7,14 +7,16 @@ config BR2_PACKAGE_ICU
 	# file, and it cannot easily be changed to generate FLAT
 	# format.
 	depends on !BR2_BINFMT_FLAT
-	depends on !BR2_arc # atomic builtins
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	help
 	  International Components for Unicode.
 
 	  http://site.icu-project.org/
 
 comment "icu needs a toolchain w/ C++, wchar, threads"
-	depends on !BR2_arc
 	depends on !BR2_BINFMT_FLAT
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_HAS_THREADS
+
+comment "icu needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
package/php/Config.ext +4 -2
index ff9a6ad..90cb6af 100644
@@ -166,17 +166,19 @@ config BR2_PACKAGE_PHP_EXT_INTL
 	select BR2_PACKAGE_ICU
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR
-	depends on !BR2_arc # icu -> atomic builtins
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	depends on !BR2_BINFMT_FLAT # icu
 	depends on BR2_TOOLCHAIN_HAS_THREADS # icu
 	help
 	  Internationalization support
 
 comment "intl support needs a toolchain w/ C++, wchar, threads"
-	depends on !BR2_arc
 	depends on !BR2_BINFMT_FLAT
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
 
+comment "intl supports needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
+
 comment "Image processing"
 
 config BR2_PACKAGE_PHP_EXT_EXIF
package/qt5/qt5base/Config.in +4 -1
index b95a74a..5789eb9 100644
@@ -241,12 +241,15 @@ config BR2_PACKAGE_QT5BASE_DBUS
 config BR2_PACKAGE_QT5BASE_ICU
 	bool "Enable ICU support"
 	select BR2_PACKAGE_ICU
-	depends on !BR2_arc # icu -> atomic builtins
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	depends on !BR2_BINFMT_FLAT # icu
 	help
 	  This option enables ICU support in Qt5. This is for example
 	  needed for Qt5Webkit.
 
+comment "icu needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
+
 config BR2_PACKAGE_QT5BASE_TSLIB
 	bool "Enable Tslib support"
 	depends on !BR2_PREFER_STATIC_LIB # dlopen
Signature · 1 line
1.8.4.1
#7 lore raw

PATCH 8/9 libtorrent: arc: Disable if ARC atomics are disabled

In reply to Anton Kolesov

Libtorrent requires GCC built-in atomic functions which are optional in ARC toolchain.

This fixes:
http://autobuild.buildroot.net/results/51414e22c8ea47c38df20d864526a370c5a895d7/

---
 package/libtorrent/Config.in | 7 ++++---
 package/rtorrent/Config.in   | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
package/libtorrent/Config.in +4 -3
index a21bf95..a8f31d2 100644
@@ -2,8 +2,7 @@ config BR2_PACKAGE_LIBTORRENT
 	bool "libtorrent"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	# ARC GCC doesn't support atomic instructions required by this lib
-	depends on !BR2_arc
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	select BR2_PACKAGE_LIBSIGC
 	help
 	  BitTorrent library written in C++ for *nix
@@ -12,4 +11,6 @@ config BR2_PACKAGE_LIBTORRENT
 
 comment "libtorrent needs a toolchain w/ C++, threads"
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-	depends on !BR2_arc
+
+comment "libtorrent needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
package/rtorrent/Config.in +4 -3
index fa81cde..a7a3411 100644
@@ -4,8 +4,7 @@ config BR2_PACKAGE_RTORRENT
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	# ARC GCC doesn't support atomic instructions required by libtorrent
-	depends on !BR2_arc
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	select BR2_PACKAGE_LIBCURL
 	select BR2_PACKAGE_LIBSIGC
 	select BR2_PACKAGE_LIBTORRENT
@@ -19,4 +18,6 @@ config BR2_PACKAGE_RTORRENT
 comment "rtorrent needs a toolchain w/ C++, threads, wchar"
 	depends on BR2_USE_MMU
 	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS)
-	depends on !BR2_arc
+
+comment "rtorrent needs an ARC CPU w/ atomic extension"
+	depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
Signature · 1 line
1.8.4.1
#8 lore raw

PATCH 9/9 thrift: arc: Disable if ARC atomics are disabled

In reply to Anton Kolesov

Thrift requires GCC built-in atomic functions which are optional in ARC toolchain.

---
 package/thrift/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/thrift/Config.in +4 -2
index ac99801..6ea5751 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_THRIFT
 	depends on BR2_USE_WCHAR
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on !BR2_arc # atomic builtins
+	depends on !BR2_arc || BR2_ARC_ATOMIC_EXT
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_LIBEVENT
 	select BR2_PACKAGE_OPENSSL
@@ -22,4 +22,6 @@ config BR2_PACKAGE_THRIFT
 comment "thrift needs a toolchain w/ C++, largefile, wchar, threads"
 	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+
+comment "thrift needs an ARC CPU w/ atomic extension"
+        depends on BR2_arc && !BR2_ARC_ATOMIC_EXT
Signature · 1 line
1.8.4.1
#9 lore raw

PATCH 1/9 arc: Support option of atomic extension

In reply to Anton Kolesov

Dear Anton Kolesov,

Quoted 31 lines · Anton Kolesov

GCC has several builtin functions that implement atomic operations. In GCC for ARC those functions rely on LLOCK/SCOND instructions which are optional in ARC CPU's. If software uses those functions and as a result those instructions, it will be abort with Illegal instruction exception. To avoid confusion user should first specify that their CPU supports atomic extension, which will allow selection of packages that use builtin atomic functions.

---
 arch/Config.in.arc  | 4 ++++
 package/Makefile.in | 4 ++++
 2 files changed, 8 insertions(+)
arch/Config.in.arc +4 -0
index 60b59f0..9edcbd4 100644
@@ -1,3 +1,7 @@
+# Choise of atomic instructions presence
+config BR2_ARC_ATOMIC_EXT
+	bool "Atomic extension (LLOCK/SCOND instructions)"
+
 config BR2_ARCH
 	default "arc"	if BR2_arcle
 	default "arceb"	if BR2_arceb
package/Makefile.in +0 -0
index fc55850..3d25d2a 100644

package/Makefile.in ifeq ($(BR2_xtensa),y) · line 110

Quoted 9 lines
package/Makefile.in +4 -0
@@ -102,6 +102,10 @@ ifeq ($(BR2_xtensa),y)
 TARGET_ABI += -mlongcalls -mtext-section-literals
 endif
 
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
+TARGET_ABI += -matomic
+endif
+
 STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
 STAGING_DIR    = $(HOST_DIR)/$(STAGING_SUBDIR)

I think this is looking generally good, but after discussing with Yann, I think we'd prefer to have a slightly more generic solution. First, a hidden kconfig boolean that tells whether the compiler has the atomic intrinsics:

config BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
bool

and then architectures would "select" this hidden boolean whenever they have the atomic intrinsics, and packages would use this hidden boolean to create the dependencies.

What do you think about this? It's not a big change compared to what you have done, it only pushes things to be a little bit more generic.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

PATCH v2 1/9 toolchain: Add config option for atomic intrinsics

GCC has several builtin functions that implement atomic operations. Those functions are architecture specific and may not be implemented by the specific toolchain. In case of GCC for ARC those functions rely on LLOCK/SCOND instructions which are optional in ARC CPU's. If ARC CPU doesn't support those instructions but software tries to use them, then application will be aborted with Illegal instruction exception. To avoid confusion user should first specify that their CPU supports atomic extension, which will allow selection of packages that use builtin atomic functions.

---
 arch/Config.in.arc            | 5 +++++
 package/Makefile.in           | 4 ++++
 toolchain/toolchain-common.in | 4 ++++
 3 files changed, 13 insertions(+)
arch/Config.in.arc +5 -0
index 60b59f0..836cfef 100644
@@ -1,3 +1,8 @@
+# Choise of atomic instructions presence
+config BR2_ARC_ATOMIC_EXT
+	bool "Atomic extension (LLOCK/SCOND instructions)"
+	select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_ARCH
 	default "arc"	if BR2_arcle
 	default "arceb"	if BR2_arceb
package/Makefile.in +4 -0
index 02f6e3d..106a04c 100644
@@ -102,6 +102,10 @@ ifeq ($(BR2_xtensa),y)
 TARGET_ABI += -mlongcalls -mtext-section-literals
 endif
 
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
+TARGET_ABI += -matomic
+endif
+
 STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
 STAGING_DIR    = $(HOST_DIR)/$(STAGING_SUBDIR)
 
toolchain/toolchain-common.in +4 -0
index 13de9e5..f9cb7cf 100644
@@ -44,6 +44,10 @@ config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 config BR2_TOOLCHAIN_HAS_SSP
 	bool
 
+config BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+	bool
+	default y if !BR2_arc
+
 config BR2_ENABLE_LOCALE_PURGE
 	bool "Purge unwanted locales"
 	help
Signature · 1 line
1.8.4.1
#11 lore raw

PATCH v2 2/9 cairo: Add dependency on atomic intrinsics

Cairo requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/fadfaa9916724d310d0dda555a1db31bee1601d0/

---
 package/cairo/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/cairo/Config.in +4 -0
index 0c87a29..2aeaa2a 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_PIXMAN
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
@@ -13,6 +14,9 @@ config BR2_PACKAGE_CAIRO
 
 	  http://cairographics.org/
 
+comment "cairo needs a toolchain with atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 if BR2_PACKAGE_CAIRO
 
 config BR2_PACKAGE_CAIRO_PS
Signature · 1 line
1.8.4.1
#12 lore raw

PATCH v2 3/9 jack2: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Jack requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/c218be876d3abf7a8e212b6d526595bfd835e1c5/

---
 package/jack2/Config.in | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
package/jack2/Config.in +3 -4
index a443f58..82143c7 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_JACK2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc # missing compiler intrinsics
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_LIBSAMPLERATE
 	select BR2_PACKAGE_LIBSNDFILE
 	select BR2_PACKAGE_ALSA_LIB
@@ -21,8 +21,7 @@ config BR2_PACKAGE_JACK2
 
 	  http://jackaudio.org/
 
-comment "jack2 needs a toolchain w/ largefile, threads, C++"
+comment "jack2 needs a toolchain w/ largefile, threads, C++, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !BR2_arc
 	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_INSTALL_LIBSTDCPP
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#13 lore raw

PATCH v2 4/9 pulseaudio: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Pulseaudio requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/d463f3bf730a600a07ed6cd33695bf45e9fd3540/

---
 package/pulseaudio/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/pulseaudio/Config.in +4 -2
index ac6222c..de99fc8 100644
@@ -8,6 +8,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_SPEEX
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
@@ -30,6 +31,7 @@ config BR2_PACKAGE_PULSEAUDIO_DAEMON
 
 endif
 
-comment "pulseaudio needs a toolchain w/ wchar, largefile, threads"
+comment "pulseaudio needs a toolchain w/ wchar, largefile, threads, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#14 lore raw

PATCH v2 5/9 libftdi: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Libftdi requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/6cb25ed954840109c9d0e582e922b0ba9d07e174/

---
 package/libftdi/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/libftdi/Config.in +3 -2
index dc81514..ce65158 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBFTDI
 	bool "libftdi"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_LIBUSB
 	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
@@ -18,5 +19,5 @@ config BR2_PACKAGE_LIBTFDI_CPP
 
 endif # BR2_PACKAGE_LIBFTDI
 
-comment "libftdi needs a toolchain w/ threads"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+comment "libftdi needs a toolchain w/ threads, atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#15 lore raw

PATCH v2 6/9 msgpack: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Msgpack requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/44849a386cefb8899f4560296bfbbd8ea19ee910/

---
 package/msgpack/Config.in        | 7 +++----
 package/python-msgpack/Config.in | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
package/msgpack/Config.in +3 -4
index b380c58..7d6277f 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MSGPACK
 	bool "msgpack"
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc # atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  MessagePack is an efficient binary serialization format.
 
@@ -10,6 +10,5 @@ config BR2_PACKAGE_MSGPACK
 
 	  http://msgpack.org/
 
-comment "msgpack needs a toolchain w/ C++"
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+comment "msgpack needs a toolchain w/ C++, atomic intrinsics"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/python-msgpack/Config.in +3 -4
index c4b68a3..3b825a1 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_MSGPACK
 	depends on BR2_INSTALL_LIBSTDCPP # msgpack
-	depends on !BR2_arc # msgpack - atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # msgpack
 	help
 	  MessagePack (http://msgpack.org/) is a fast, compact binary
 	  serialization format, suitable for similar data to JSON.
@@ -12,7 +12,6 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 
 	  https://pypi.python.org/pypi/msgpack-python/
 
-comment "python-msgpack needs a toolchain w/ C++"
+comment "python-msgpack needs a toolchain w/ C++, atomic intrinsics"
 	depends on BR2_PACKAGE_PYTHON
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#16 lore raw

PATCH v2 7/9 icu: Add dependency on atomic intrinsics

In reply to Anton Kolesov

ICU requires GCC built-in atomic functions which are architecture specific and may not be implemented.

---
 package/beecrypt/Config.in    | 12 ++++++------
 package/cppcms/Config.in      |  7 +++----
 package/icu/Config.in         |  7 +++----
 package/php/Config.ext        |  8 ++++----
 package/qt5/qt5base/Config.in |  5 ++++-
 5 files changed, 20 insertions(+), 19 deletions(-)
package/beecrypt/Config.in +6 -6
index 462c8a6..e0f9181 100644
@@ -1,5 +1,5 @@
-comment "beecrypt needs a toolchain w/ threads"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+comment "beecrypt needs a toolchain w/ threads, atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 config BR2_PACKAGE_BEECRYPT
 	bool "beecrypt"
@@ -15,15 +15,15 @@ config BR2_PACKAGE_BEECRYPT_CPP
 	bool "C++ support"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # icu
-	depends on !BR2_arc # icu
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # icu
 	depends on !BR2_BINFMT_FLAT # icu
 	select BR2_PACKAGE_ICU
 	help
 	  Enable C++ support. This pulls in the (large) icu package.
 
-comment "C++ support needs a toolchain w/ wchar"
-	depends on !BR2_arc
+comment "C++ support needs a toolchain w/ wchar, atomic intrinsics"
 	depends on !BR2_BINFMT_FLAT
-	depends on BR2_INSTALL_LIBSTDCPP && !BR2_USE_WCHAR
+	depends on BR2_INSTALL_LIBSTDCPP && (!BR2_USE_WCHAR || \
+		!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS)
 
 endif # BR2_PACKAGE_BEECRYPT
package/cppcms/Config.in +3 -4
index 614abeb..297c514 100644
@@ -24,17 +24,16 @@ if BR2_PACKAGE_CPPCMS
 
 config BR2_PACKAGE_CPPCMS_ICU
 	bool "enable icu support"
-	depends on !BR2_arc # icu -> atomic builtins
 	depends on !BR2_BINFMT_FLAT # icu
 	depends on BR2_USE_WCHAR # icu
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # icu
 	select BR2_PACKAGE_ICU
 	help
 	  Using ICU allows advanced localization features into CppCMS,
 	  in another hand ICU is heavier than iconv.
 
-comment "icu support needs a toolchain w/ wchar"
-	depends on !BR2_arc
-	depends on !BR2_BINFMT_FLAT
+comment "icu support needs a toolchain w/ wchar, atomic intrinsics"
+	depends on !BR2_BINFMT_FLAT || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	depends on !BR2_USE_WCHAR
 
 endif
package/icu/Config.in +3 -4
index d14f8d8..d4521ac 100644
@@ -7,7 +7,7 @@ config BR2_PACKAGE_ICU
 	# file, and it cannot easily be changed to generate FLAT
 	# format.
 	depends on !BR2_BINFMT_FLAT
-	depends on !BR2_arc # atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  International Components for Unicode.
 
@@ -25,8 +25,7 @@ config BR2_PACKAGE_ICU_CUSTOM_DATA_PATH
 
 endif
 
-comment "icu needs a toolchain w/ C++, wchar, threads"
-	depends on !BR2_arc
+comment "icu needs a toolchain w/ C++, wchar, threads, atomic intrinsics"
 	depends on !BR2_BINFMT_FLAT
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/php/Config.ext +4 -4
index ff9a6ad..078be8d 100644
@@ -166,16 +166,16 @@ config BR2_PACKAGE_PHP_EXT_INTL
 	select BR2_PACKAGE_ICU
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR
-	depends on !BR2_arc # icu -> atomic builtins
 	depends on !BR2_BINFMT_FLAT # icu
 	depends on BR2_TOOLCHAIN_HAS_THREADS # icu
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # icu
 	help
 	  Internationalization support
 
-comment "intl support needs a toolchain w/ C++, wchar, threads"
-	depends on !BR2_arc
+comment "intl support needs a toolchain w/ C++, wchar, threads, atomic intrinsics"
 	depends on !BR2_BINFMT_FLAT
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 comment "Image processing"
 
package/qt5/qt5base/Config.in +4 -1
index b95a74a..67f211c 100644
@@ -241,12 +241,15 @@ config BR2_PACKAGE_QT5BASE_DBUS
 config BR2_PACKAGE_QT5BASE_ICU
 	bool "Enable ICU support"
 	select BR2_PACKAGE_ICU
-	depends on !BR2_arc # icu -> atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # icu
 	depends on !BR2_BINFMT_FLAT # icu
 	help
 	  This option enables ICU support in Qt5. This is for example
 	  needed for Qt5Webkit.
 
+comment "icu needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_QT5BASE_TSLIB
 	bool "Enable Tslib support"
 	depends on !BR2_PREFER_STATIC_LIB # dlopen
Signature · 1 line
1.8.4.1
#17 lore raw

PATCH v2 8/9 libtorrent: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Libtorrent requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/51414e22c8ea47c38df20d864526a370c5a895d7/

---
 package/libtorrent/Config.in | 9 ++++-----
 package/rtorrent/Config.in   | 9 ++++-----
 2 files changed, 8 insertions(+), 10 deletions(-)
package/libtorrent/Config.in +4 -5
index a21bf95..a706d98 100644
@@ -2,14 +2,13 @@ config BR2_PACKAGE_LIBTORRENT
 	bool "libtorrent"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	# ARC GCC doesn't support atomic instructions required by this lib
-	depends on !BR2_arc
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_LIBSIGC
 	help
 	  BitTorrent library written in C++ for *nix
 
 	  http://libtorrent.rakshasa.no/
 
-comment "libtorrent needs a toolchain w/ C++, threads"
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-	depends on !BR2_arc
+comment "libtorrent needs a toolchain w/ C++, threads, atomic intrinsics"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/rtorrent/Config.in +4 -5
index fa81cde..1efc5f1 100644
@@ -4,8 +4,7 @@ config BR2_PACKAGE_RTORRENT
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	# ARC GCC doesn't support atomic instructions required by libtorrent
-	depends on !BR2_arc
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # libtorrent
 	select BR2_PACKAGE_LIBCURL
 	select BR2_PACKAGE_LIBSIGC
 	select BR2_PACKAGE_LIBTORRENT
@@ -16,7 +15,7 @@ config BR2_PACKAGE_RTORRENT
 
 	  http://libtorrent.rakshasa.no/
 
-comment "rtorrent needs a toolchain w/ C++, threads, wchar"
+comment "rtorrent needs a toolchain w/ C++, threads, wchar, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS)
-	depends on !BR2_arc
+	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS \
+		&& BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS)
Signature · 1 line
1.8.4.1
#18 lore raw

PATCH v2 9/9 thrift: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Thrift requires GCC built-in atomic functions which are architecture specific and may not be implemented.

---
 package/thrift/Config.in | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
package/thrift/Config.in +5 -4
index ac99801..071c85c 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_THRIFT
 	depends on BR2_USE_WCHAR
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on !BR2_arc # atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_LIBEVENT
 	select BR2_PACKAGE_OPENSSL
@@ -19,7 +19,8 @@ config BR2_PACKAGE_THRIFT
 
 	  http://thrift.apache.org/
 
-comment "thrift needs a toolchain w/ C++, largefile, wchar, threads"
+comment "thrift needs a toolchain w/ C++, largefile, wchar, threads, atomic intrinsics"
 	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
Signature · 1 line
1.8.4.1
#19 lore raw

PATCH v2 1/9 toolchain: Add config option for atomic intrinsics

In reply to Anton Kolesov

Anton, All,

On 2014-07-31 17:24 +0400, Anton Kolesov spake thusly:

Quoted 8 lines

GCC has several builtin functions that implement atomic operations. Those functions are architecture specific and may not be implemented by the specific toolchain. In case of GCC for ARC those functions rely on LLOCK/SCOND instructions which are optional in ARC CPU's. If ARC CPU doesn't support those instructions but software tries to use them, then application will be aborted with Illegal instruction exception. To avoid confusion user should first specify that their CPU supports atomic extension, which will allow selection of packages that use builtin atomic functions.

I think what Thomas and I discussed, was to have a patch series that does the following changes:

1- introduce BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS;
2- have all current architectures, that have atomics, select that new

      symbol (note: i386 does not, i486 and above have, for example);

3- convert packages (one patch par package) to depend on it; 4- introduce BR2_ARC_ATOMIC_EXT that selects it, too.

This is more logical: you first add a new option, and then you gradually start using it, until finally you airrive to what you eventually wanted.

Regards,
Yann E. MORIN.

Quoted 57 lines
---
 arch/Config.in.arc            | 5 +++++
 package/Makefile.in           | 4 ++++
 toolchain/toolchain-common.in | 4 ++++
 3 files changed, 13 insertions(+)
arch/Config.in.arc +5 -0
index 60b59f0..836cfef 100644
@@ -1,3 +1,8 @@
+# Choise of atomic instructions presence
+config BR2_ARC_ATOMIC_EXT
+	bool "Atomic extension (LLOCK/SCOND instructions)"
+	select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_ARCH
 	default "arc"	if BR2_arcle
 	default "arceb"	if BR2_arceb
package/Makefile.in +4 -0
index 02f6e3d..106a04c 100644
@@ -102,6 +102,10 @@ ifeq ($(BR2_xtensa),y)
 TARGET_ABI += -mlongcalls -mtext-section-literals
 endif
 
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
+TARGET_ABI += -matomic
+endif
+
 STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
 STAGING_DIR    = $(HOST_DIR)/$(STAGING_SUBDIR)
 
toolchain/toolchain-common.in +4 -0
index 13de9e5..f9cb7cf 100644
@@ -44,6 +44,10 @@ config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 config BR2_TOOLCHAIN_HAS_SSP
 	bool
 
+config BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+	bool
+	default y if !BR2_arc
+
 config BR2_ENABLE_LOCALE_PURGE
 	bool "Purge unwanted locales"
 	help
Signature · 6 lines
1.8.4.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#20 lore raw

PATCH v2 1/9 toolchain: Add config option for atomic intrinsics

Dear Yann E. MORIN,

Quoted 13 lines · Yann E. MORIN

On 2014-07-31 17:24 +0400, Anton Kolesov spake thusly:

Quoted 8 lines

GCC has several builtin functions that implement atomic operations. Those functions are architecture specific and may not be implemented by the specific toolchain. In case of GCC for ARC those functions rely on LLOCK/SCOND instructions which are optional in ARC CPU's. If ARC CPU doesn't support those instructions but software tries to use them, then application will be aborted with Illegal instruction exception. To avoid confusion user should first specify that their CPU supports atomic extension, which will allow selection of packages that use builtin atomic functions.

I think what Thomas and I discussed, was to have a patch series that does the following changes:

Quoted 8 lines
   1- introduce BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS;
   2- have all current architectures, that have atomics, select that new
      symbol (note: i386 does not, i486 and above have, for example);
   3- convert packages (one patch par package) to depend on it;
   4- introduce BR2_ARC_ATOMIC_EXT that selects it, too.

This is more logical: you first add a new option, and then you gradually start using it, until finally you airrive to what you eventually wanted.

Well, that's pretty much what Anton did actually: his patch 1 covers your items (1), (2) and (4), and his other patches cover your item (3). And there's actually no problem in having (4) being done before (3).

So far the only difference between what you expose and what he has done is the fact that his patch series have BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS selected even for i386. But the current Buildroot already assumes that i386 has atomic intrinsics.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#21 lore raw

PATCH v2 1/9 toolchain: Add config option for atomic intrinsics

In reply to Anton Kolesov

Dear Anton Kolesov,

Quoted 10 lines · Anton Kolesov

GCC has several builtin functions that implement atomic operations. Those functions are architecture specific and may not be implemented by the specific toolchain. In case of GCC for ARC those functions rely on LLOCK/SCOND instructions which are optional in ARC CPU's. If ARC CPU doesn't support those instructions but software tries to use them, then application will be aborted with Illegal instruction exception. To avoid confusion user should first specify that their CPU supports atomic extension, which will allow selection of packages that use builtin atomic functions.

I have applied the following patches from your series:

3ebdc64dcc687a95dd4fed7eda8ff811d2db0eaf thrift: Add dependency on atomic intrinsics b6f9dd2a389c1f4da858c928bf48f8baec461082 libtorrent: Add dependency on atomic intrinsics b7a791a103d21835d0e3fb8accfb58346330560f icu: Add dependency on atomic intrinsics b35d1582346625a7076de0a44958d5c5133103d2 jack2: Add dependency on atomic intrinsics cbffd50561f7ce595296bddaf108031e501b2063 toolchain: Add config option for atomic intrinsics

I did not apply the other patches, because they were missing the propagation of the atomic intrinsics dependency to the reverse depencies of the package needing atomic intrinsics. For example, in PATCH 2/9, you add the dependency on atomic intrinsics to Cairo, but nowhere you propagate that to the reverse dependencies of Cairo. Could you send an updated version of those patches, taking into account this need?

Also, could you send a patch against the Buildroot manual that documents the atomic intrinsics dependency, like we document dependencies like wchar, largefile, ipv6 and so on.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#22 lore raw

PATCH v3 1/4 cairo: Add dependency on atomic intrinsics

Cairo requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/fadfaa9916724d310d0dda555a1db31bee1601d0/

---
 package/cairo/Config.in                        | 4 ++++
 package/efl/libevas-generic-loaders/Config.in  | 6 ++++--
 package/gstreamer/gst-plugins-good/Config.in   | 4 ++++
 package/gstreamer1/gst1-plugins-good/Config.in | 4 ++++
 package/libgtk2/Config.in                      | 5 +++--
 package/librsvg/Config.in                      | 6 ++++--
 package/libsvg-cairo/Config.in                 | 4 ++++
 package/pango/Config.in                        | 5 +++--
 package/webkit/Config.in                       | 6 ++++--
 package/weston/Config.in                       | 4 ++++
 10 files changed, 38 insertions(+), 10 deletions(-)
package/cairo/Config.in +4 -0
index 0c87a29..2aeaa2a 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_PIXMAN
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
@@ -13,6 +14,9 @@ config BR2_PACKAGE_CAIRO
 
 	  http://cairographics.org/
 
+comment "cairo needs a toolchain with atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 if BR2_PACKAGE_CAIRO
 
 config BR2_PACKAGE_CAIRO_PS
package/efl/libevas-generic-loaders/Config.in +4 -2
index 23b9f77..c7145d5 100644
@@ -17,10 +17,12 @@ config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG
 	depends on BR2_USE_WCHAR # librsvg -> glib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> glib2
 	depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  This option enables the Evas generic SVG loader
 
-comment "SVG loader needs a toolchain w/ wchar, threads, C++"
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
+comment "SVG loader needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 endif
package/gstreamer/gst-plugins-good/Config.in +4 -0
index 3ec93cf..8bc79a2 100644
@@ -178,9 +178,13 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX
 
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_PNG
 
+comment "cairo needs a toolchain with atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC
 	bool "flac (libFLAC)"
 	depends on BR2_USE_WCHAR # flac
package/gstreamer1/gst1-plugins-good/Config.in +4 -0
index 7159c5a..60ee17d 100644
@@ -274,11 +274,15 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2
 
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_PNG
 	help
 	  Cairo-based elements
 
+comment "cairo needs a toolchain with atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC
 	bool "flac (libFLAC)"
 	depends on BR2_USE_WCHAR # flac
package/libgtk2/Config.in +3 -2
index 5239c25..ce70256 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_LIBGTK2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  The GTK+ version 2 graphical user interface library
 
@@ -32,8 +33,8 @@ config BR2_PACKAGE_LIBGTK2_DEMO
 
 endif
 
-comment "libgtk2 needs a toolchain w/ wchar, threads, C++"
+comment "libgtk2 needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_XORG7
 	depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/librsvg/Config.in +4 -2
index 5dd4c58..e1dbf4f 100644
@@ -10,12 +10,14 @@ config BR2_PACKAGE_LIBRSVG
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  The rsvg library is an efficient renderer for Scalable
 	  Vector Graphics (SVG) pictures.
 
 	  http://librsvg.sourceforge.net/
 
-comment "librsvg needs a toolchain w/ wchar, threads, C++"
+comment "librsvg needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/libsvg-cairo/Config.in +4 -0
index 9577c69..48f09f6 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSVG_CAIRO
 	bool "libsvg-cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_SVG
 	select BR2_PACKAGE_LIBSVG
@@ -9,3 +10,6 @@ config BR2_PACKAGE_LIBSVG_CAIRO
 	  rendering library.
 
 	  http://cairographics.org
+
+comment "cairo needs a toolchain with atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/pango/Config.in +3 -2
index 70f4fd3..6dee251 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_PANGO
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # freetype support
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_CAIRO
@@ -21,7 +22,7 @@ config BR2_PACKAGE_PANGO
 
 	  http://www.pango.org/
 
-comment "pango needs a toolchain w/ wchar, threads, C++"
+comment "pango needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_INSTALL_LIBSTDCPP
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/webkit/Config.in +4 -2
index c86eb94..99fe18a 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_WEBKIT
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT # icu
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO_PNG
 	select BR2_PACKAGE_ENCHANT
 	select BR2_PACKAGE_HARFBUZZ
@@ -41,7 +42,8 @@ config BR2_PACKAGE_WEBKIT
 
 	  http://webkit.org/
 
-comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads"
+comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads, atomic intrinsics"
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_PACKAGE_LIBGTK2 || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/weston/Config.in +4 -0
index aaef405..4b3ca74 100644
@@ -15,6 +15,7 @@ config BR2_PACKAGE_WESTON
 	depends on !BR2_avr32 # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
 	# Make sure at least one compositor is selected.
@@ -27,6 +28,9 @@ config BR2_PACKAGE_WESTON
 
 	  http://wayland.freedesktop.org/
 
+comment "weston needs a toolchain with atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 if BR2_PACKAGE_WESTON
 
 # Helper to make sure at least one compositor is selected.
Signature · 1 line
1.8.4.1
#23 lore raw

PATCH v3 2/4 pulseaudio: Add dependency on atomic intrinsics

Pulseaudio requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/d463f3bf730a600a07ed6cd33695bf45e9fd3540/

---
 package/gstreamer/gst-plugins-good/Config.in   | 5 +++++
 package/gstreamer1/gst1-plugins-good/Config.in | 5 +++++
 package/mpd/Config.in                          | 5 +++--
 package/pulseaudio/Config.in                   | 6 ++++--
 4 files changed, 17 insertions(+), 4 deletions(-)
package/gstreamer/gst-plugins-good/Config.in +5 -0
index 8bc79a2..7b577c7 100644
@@ -212,9 +212,14 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
 	depends on BR2_USE_MMU # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	bool "pulseaudio"
 
+comment "pulseaudio support needs a toolchain w/ largefile, threads, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC
 	bool "souphttpsrc (http client)"
 	depends on BR2_USE_WCHAR # libsoup -> glib2
package/gstreamer1/gst1-plugins-good/Config.in +5 -0
index 60ee17d..46bf553 100644
@@ -308,11 +308,16 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
 	depends on BR2_USE_MMU # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	bool "pulseaudio"
 	help
 	  PulseAudio plugin library
 
+comment "pulseaudio support needs a toolchain w/ largefile, threads, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC
 	bool "souphttpsrc (http client)"
 	depends on BR2_USE_WCHAR # libsoup -> glib2
package/mpd/Config.in +3 -2
index f5f5b34..8382a5d 100644
@@ -45,12 +45,13 @@ config BR2_PACKAGE_MPD_AUDIOFILE
 config BR2_PACKAGE_MPD_PULSEAUDIO
 	bool "pulseaudio"
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	help
 	  Enable pulseaudio output support.
 
-comment "pulseaudio support needs a toolchain w/ largefile"
-	depends on !BR2_LARGEFILE
+comment "pulseaudio support needs a toolchain w/ largefile, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 config BR2_PACKAGE_MPD_BZIP2
 	bool "bzip2"
package/pulseaudio/Config.in +4 -2
index ac6222c..de99fc8 100644
@@ -8,6 +8,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_SPEEX
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
@@ -30,6 +31,7 @@ config BR2_PACKAGE_PULSEAUDIO_DAEMON
 
 endif
 
-comment "pulseaudio needs a toolchain w/ wchar, largefile, threads"
+comment "pulseaudio needs a toolchain w/ wchar, largefile, threads, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#24 lore raw

PATCH v3 3/4 libftdi: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Libftdi requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/6cb25ed954840109c9d0e582e922b0ba9d07e174/

---
 package/libftdi/Config.in | 5 +++--
 package/openocd/Config.in | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)
package/libftdi/Config.in +3 -2
index dc81514..ce65158 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBFTDI
 	bool "libftdi"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_LIBUSB
 	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
@@ -18,5 +19,5 @@ config BR2_PACKAGE_LIBTFDI_CPP
 
 endif # BR2_PACKAGE_LIBFTDI
 
-comment "libftdi needs a toolchain w/ threads"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+comment "libftdi needs a toolchain w/ threads, atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/openocd/Config.in +4 -0
index 7f96ef8..e692d2d 100644
@@ -14,11 +14,15 @@ comment "Adapters"
 
 config BR2_PACKAGE_OPENOCD_FT2XXX
 	bool "FT2xxx/FT4xxx Based JTAG Programmer"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # libftdi
 	select BR2_PACKAGE_LIBFTDI
 	help
 	  Enable building support for FT2232 based devices
 	  using the libftdi driver, opensource alternate of FTD2XX
 
+comment "FT2232 support needs a toolchain w/ atomic intrinsics"
+        depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_OPENOCD_JLINK
 	bool "Segger J-Link JTAG Programmer"
 	help
Signature · 1 line
1.8.4.1
#25 lore raw

PATCH v3 4/4 msgpack: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Msgpack requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/44849a386cefb8899f4560296bfbbd8ea19ee910/

---
 package/msgpack/Config.in        | 7 +++----
 package/python-msgpack/Config.in | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
package/msgpack/Config.in +3 -4
index b380c58..7d6277f 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MSGPACK
 	bool "msgpack"
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc # atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  MessagePack is an efficient binary serialization format.
 
@@ -10,6 +10,5 @@ config BR2_PACKAGE_MSGPACK
 
 	  http://msgpack.org/
 
-comment "msgpack needs a toolchain w/ C++"
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+comment "msgpack needs a toolchain w/ C++, atomic intrinsics"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/python-msgpack/Config.in +3 -4
index c4b68a3..3b825a1 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_MSGPACK
 	depends on BR2_INSTALL_LIBSTDCPP # msgpack
-	depends on !BR2_arc # msgpack - atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # msgpack
 	help
 	  MessagePack (http://msgpack.org/) is a fast, compact binary
 	  serialization format, suitable for similar data to JSON.
@@ -12,7 +12,6 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 
 	  https://pypi.python.org/pypi/msgpack-python/
 
-comment "python-msgpack needs a toolchain w/ C++"
+comment "python-msgpack needs a toolchain w/ C++, atomic intrinsics"
 	depends on BR2_PACKAGE_PYTHON
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#26 lore raw

PATCH v3 1/4 cairo: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Hi Anton,

Quoted 32 lines · Anton Kolesov

Cairo requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/fadfaa9916724d310d0dda555a1db31bee1601d0/

---
 package/cairo/Config.in                        | 4 ++++
 package/efl/libevas-generic-loaders/Config.in  | 6 ++++--
 package/gstreamer/gst-plugins-good/Config.in   | 4 ++++
 package/gstreamer1/gst1-plugins-good/Config.in | 4 ++++
 package/libgtk2/Config.in                      | 5 +++--
 package/librsvg/Config.in                      | 6 ++++--
 package/libsvg-cairo/Config.in                 | 4 ++++
 package/pango/Config.in                        | 5 +++--
 package/webkit/Config.in                       | 6 ++++--
 package/weston/Config.in                       | 4 ++++
 10 files changed, 38 insertions(+), 10 deletions(-)
package/cairo/Config.in +1 -0
index 0c87a29..2aeaa2a 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_CAIRO
        bool "cairo"
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
        select BR2_PACKAGE_PIXMAN
        select BR2_PACKAGE_FONTCONFIG
        select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7

package/cairo/Config.in config BR2_PACKAGE_CAIRO · line 18

Quoted 5 lines
package/cairo/Config.in +2 -0
@@ -13,6 +14,9 @@ config BR2_PACKAGE_CAIRO
 
          http://cairographics.org/
 
+comment "cairo needs a toolchain with atomic intrinsics"
+       depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS

This should be 'w/' instead of 'with'

Quoted 28 lines
package/cairo/Config.in +1 -0
+
 if BR2_PACKAGE_CAIRO
 
 config BR2_PACKAGE_CAIRO_PS
package/efl/libevas-generic-loaders/Config.in +4 -2
index 23b9f77..c7145d5 100644
@@ -17,10 +17,12 @@ config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG
        depends on BR2_USE_WCHAR # librsvg -> glib2
        depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> glib2
        depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
        help
          This option enables the Evas generic SVG loader
 
-comment "SVG loader needs a toolchain w/ wchar, threads, C++"
-       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
+comment "SVG loader needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
+       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
+               || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 endif
package/gstreamer/gst-plugins-good/Config.in +0 -0
index 3ec93cf..8bc79a2 100644

package/gstreamer/gst-plugins-good/Config.in config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX · line 186

Quoted 9 lines
package/gstreamer/gst-plugins-good/Config.in +3 -0
@@ -178,9 +178,13 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX
 
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO
        bool "cairo"
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
        select BR2_PACKAGE_CAIRO
        select BR2_PACKAGE_CAIRO_PNG
 
+comment "cairo needs a toolchain with atomic intrinsics"
+       depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS

Same here

Quoted 11 lines
package/gstreamer/gst-plugins-good/Config.in +1 -0
+
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC
        bool "flac (libFLAC)"
        depends on BR2_USE_WCHAR # flac
package/gstreamer1/gst1-plugins-good/Config.in +0 -0
index 7159c5a..60ee17d 100644
@@ -274,11 +274,15 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2
 
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO

package/gstreamer1/gst1-plugins-good/Config.in config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2 · line 285

Quoted 10 lines
package/gstreamer1/gst1-plugins-good/Config.in +4 -0
        bool "cairo"
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
        select BR2_PACKAGE_CAIRO
        select BR2_PACKAGE_CAIRO_PNG
        help
          Cairo-based elements
 
+comment "cairo needs a toolchain with atomic intrinsics"
+       depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+

and here

Quoted 59 lines
package/gstreamer1/gst1-plugins-good/Config.in +0 -0
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC
        bool "flac (libFLAC)"
        depends on BR2_USE_WCHAR # flac
package/libgtk2/Config.in +3 -2
index 5239c25..ce70256 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_LIBGTK2
        depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
        depends on BR2_USE_MMU # glib2
        depends on BR2_INSTALL_LIBSTDCPP # pango
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
        help
          The GTK+ version 2 graphical user interface library
 
@@ -32,8 +33,8 @@ config BR2_PACKAGE_LIBGTK2_DEMO
 
 endif
 
-comment "libgtk2 needs a toolchain w/ wchar, threads, C++"
+comment "libgtk2 needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
        depends on BR2_USE_MMU
        depends on BR2_PACKAGE_XORG7
        depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
-               !BR2_TOOLCHAIN_HAS_THREADS
+               !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/librsvg/Config.in +4 -2
index 5dd4c58..e1dbf4f 100644
@@ -10,12 +10,14 @@ config BR2_PACKAGE_LIBRSVG
        depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
        depends on BR2_USE_MMU # glib2
        depends on BR2_INSTALL_LIBSTDCPP # pango
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
        help
          The rsvg library is an efficient renderer for Scalable
          Vector Graphics (SVG) pictures.
 
          http://librsvg.sourceforge.net/
 
-comment "librsvg needs a toolchain w/ wchar, threads, C++"
+comment "librsvg needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
        depends on BR2_USE_MMU
-       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
+       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
+               || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/libsvg-cairo/Config.in +1 -0
index 9577c69..48f09f6 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSVG_CAIRO
        bool "libsvg-cairo"
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
        select BR2_PACKAGE_CAIRO
        select BR2_PACKAGE_CAIRO_SVG
        select BR2_PACKAGE_LIBSVG

package/libsvg-cairo/Config.in config BR2_PACKAGE_LIBSVG_CAIRO · line 15

Quoted 6 lines
package/libsvg-cairo/Config.in +3 -0
@@ -9,3 +10,6 @@ config BR2_PACKAGE_LIBSVG_CAIRO
          rendering library.
 
          http://cairographics.org
+
+comment "cairo needs a toolchain with atomic intrinsics"
+       depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS

and here

Quoted 58 lines
package/pango/Config.in +3 -2
index 70f4fd3..6dee251 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_PANGO
        depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
        depends on BR2_USE_MMU # glib2
        depends on BR2_INSTALL_LIBSTDCPP # freetype support
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
        select BR2_PACKAGE_LIBGLIB2
        select BR2_PACKAGE_EXPAT
        select BR2_PACKAGE_CAIRO
@@ -21,7 +22,7 @@ config BR2_PACKAGE_PANGO
 
          http://www.pango.org/
 
-comment "pango needs a toolchain w/ wchar, threads, C++"
+comment "pango needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
        depends on BR2_USE_MMU
        depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-               !BR2_INSTALL_LIBSTDCPP
+               !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/webkit/Config.in +4 -2
index c86eb94..99fe18a 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_WEBKIT
        depends on BR2_PACKAGE_LIBGTK2
        depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
        depends on !BR2_BINFMT_FLAT # icu
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
        select BR2_PACKAGE_CAIRO_PNG
        select BR2_PACKAGE_ENCHANT
        select BR2_PACKAGE_HARFBUZZ
@@ -41,7 +42,8 @@ config BR2_PACKAGE_WEBKIT
 
          http://webkit.org/
 
-comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads"
+comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads, atomic intrinsics"
        depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
        depends on !BR2_PACKAGE_LIBGTK2 || !BR2_INSTALL_LIBSTDCPP || \
-               !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+               !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+               !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/weston/Config.in +1 -0
index aaef405..4b3ca74 100644
@@ -15,6 +15,7 @@ config BR2_PACKAGE_WESTON
        depends on !BR2_avr32 # wayland
        depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
        depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
        # Runtime dependency
        select BR2_PACKAGE_XKEYBOARD_CONFIG
        # Make sure at least one compositor is selected.

package/weston/Config.in config BR2_PACKAGE_WESTON · line 33

Quoted 6 lines
package/weston/Config.in +3 -0
@@ -27,6 +28,9 @@ config BR2_PACKAGE_WESTON
 
          http://wayland.freedesktop.org/
 
+comment "weston needs a toolchain with atomic intrinsics"
+       depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+

and here

Best regards,
Thomas

#27 lore raw

PATCH 1/1 manual: Add atomic intrinsics to the dependencies section

In reply to Thomas Petazzoni

Add atomic intrinsics to the examples of dependencies comments.

---
 docs/manual/adding-packages-directory.txt | 4 ++++
 1 file changed, 4 insertions(+)
docs/manual/adding-packages-directory.txt +4 -0
index 93e6a3e..4b4d056 100644
@@ -265,6 +265,10 @@ use in the comment.
 ** Dependency symbol: +!BR2_PREFER_STATIC_LIB+
 ** Comment string: +dynamic library+
 
+* Atomic intrinsics
+** Dependency symbol: +!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS+
+** Comment string: +atomic intrinsics+
+
 ==== Dependencies on a Linux kernel built by buildroot
 
 Some packages need a Linux kernel to be built by buildroot. These are
Signature · 1 line
1.8.4.1
#28 lore raw

PATCH 1/1 manual: Add atomic intrinsics to the dependencies section

Anton, All,

On 2014-08-04 16:17 +0400, Anton Kolesov spake thusly:

Quoted 3 lines

Add atomic intrinsics to the examples of dependencies comments.

Regards,
Yann E. MORIN.

Quoted 26 lines
---
 docs/manual/adding-packages-directory.txt | 4 ++++
 1 file changed, 4 insertions(+)
docs/manual/adding-packages-directory.txt +4 -0
index 93e6a3e..4b4d056 100644
@@ -265,6 +265,10 @@ use in the comment.
 ** Dependency symbol: +!BR2_PREFER_STATIC_LIB+
 ** Comment string: +dynamic library+
 
+* Atomic intrinsics
+** Dependency symbol: +!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS+
+** Comment string: +atomic intrinsics+
+
 ==== Dependencies on a Linux kernel built by buildroot
 
 Some packages need a Linux kernel to be built by buildroot. These are
Signature · 6 lines
1.8.4.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#29 lore raw

PATCH 1/1 manual: Add atomic intrinsics to the dependencies section

In reply to Anton Kolesov

Dear Anton Kolesov,

docs/manual/adding-packages-directory.txt use in the comment. · line 270

Quoted 11 lines · Anton Kolesov
docs/manual/adding-packages-directory.txt +3 -0
index 93e6a3e..4b4d056 100644
@@ -265,6 +265,10 @@ use in the comment.
 ** Dependency symbol: +!BR2_PREFER_STATIC_LIB+
 ** Comment string: +dynamic library+
 
+* Atomic intrinsics
+** Dependency symbol: +!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS+
+** Comment string: +atomic intrinsics+

Actually, the more I think about this, and the more I believe it should be a property of the architecture rather than a property of the toolchain. So it should probably rather be BR2_ARCH_HAS_ATOMIC_INTRINSICS. And then, since it's a property of the architecture, i.e not something the user can enable/disable, there is no point in adding Config.in comment for that. So we would handle that like we handle BR2_USE_MMU, not like we handle BR2_LARGEFILE.

Thoughts?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#30 lore raw

PATCH 1/1 manual: Add atomic intrinsics to the dependencies section

Thomas, Anton, All,

On 2014-08-16 00:17 +0200, Thomas Petazzoni spake thusly:

Quoted 21 lines · Anton Kolesov

docs/manual/adding-packages-directory.txt use in the comment. · line 270

Quoted 11 lines
docs/manual/adding-packages-directory.txt +3 -0
index 93e6a3e..4b4d056 100644
@@ -265,6 +265,10 @@ use in the comment.
 ** Dependency symbol: +!BR2_PREFER_STATIC_LIB+
 ** Comment string: +dynamic library+
 
+* Atomic intrinsics
+** Dependency symbol: +!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS+
+** Comment string: +atomic intrinsics+

Actually, the more I think about this, and the more I believe it should be a property of the architecture rather than a property of the toolchain. So it should probably rather be BR2_ARCH_HAS_ATOMIC_INTRINSICS. And then, since it's a property of the architecture, i.e not something the user can enable/disable, there is no point in adding Config.in comment for that. So we would handle that like we handle BR2_USE_MMU, not like we handle BR2_LARGEFILE.

Quoted 1 line

Thoughts?

Ah, I remember now, that we talked about that. My bad, I had forgotten during the review.

However, we can't really change the implementation now, we're frozen for the release.

What about adding this to the manual for now, since it does reflect the current status of the code, and switch to an architecture option in -next, or after the release is cut?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#31 lore raw

PATCH 1/1 manual: Add atomic intrinsics to the dependencies section

Dear Yann E. MORIN,

Quoted 9 lines · Yann E. MORIN

Ah, I remember now, that we talked about that. My bad, I had forgotten during the review.

However, we can't really change the implementation now, we're frozen for the release.

What about adding this to the manual for now, since it does reflect the current status of the code, and switch to an architecture option in -next, or after the release is cut?

I disagree: it's still time to change this, before it gets set in stone by doing a release.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#32 lore raw

PATCH 1/1 manual: Add atomic intrinsics to the dependencies section

Thomas, All,

On 2014-08-16 09:40 +0200, Thomas Petazzoni spake thusly:

Quoted 8 lines · Yann E. MORIN
Quoted 7 lines

Ah, I remember now, that we talked about that. My bad, I had forgotten during the review.

However, we can't really change the implementation now, we're frozen for the release.

Quoted 6 lines
Quoted 3 lines

What about adding this to the manual for now, since it does reflect the current status of the code, and switch to an architecture option in -next, or after the release is cut?

I disagree: it's still time to change this, before it gets set in stone by doing a release.

OK, I'll see to send a patch series for that tonight.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

A message that is not in the archive (sent off-list or not yet received): In-Reply-To: <CAAXf6LURyGxEfQR+3g6xriwqUeE1E91Oav2X=r_C3YD66JzpEA@mail.gmail.com

#34 lore raw

PATCH v4 1/4 cairo: Add dependency on atomic intrinsics

Cairo requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/fadfaa9916724d310d0dda555a1db31bee1601d0/

---
 package/cairo/Config.in                        | 4 ++++
 package/efl/libevas-generic-loaders/Config.in  | 6 ++++--
 package/gstreamer/gst-plugins-good/Config.in   | 4 ++++
 package/gstreamer1/gst1-plugins-good/Config.in | 4 ++++
 package/libgtk2/Config.in                      | 5 +++--
 package/librsvg/Config.in                      | 6 ++++--
 package/libsvg-cairo/Config.in                 | 4 ++++
 package/pango/Config.in                        | 5 +++--
 package/webkit/Config.in                       | 6 ++++--
 package/weston/Config.in                       | 4 ++++
 10 files changed, 38 insertions(+), 10 deletions(-)
package/cairo/Config.in +4 -0
index 0c87a29..103aa0d 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_PIXMAN
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
@@ -13,6 +14,9 @@ config BR2_PACKAGE_CAIRO
 
 	  http://cairographics.org/
 
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 if BR2_PACKAGE_CAIRO
 
 config BR2_PACKAGE_CAIRO_PS
package/efl/libevas-generic-loaders/Config.in +4 -2
index 23b9f77..c7145d5 100644
@@ -17,10 +17,12 @@ config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG
 	depends on BR2_USE_WCHAR # librsvg -> glib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> glib2
 	depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  This option enables the Evas generic SVG loader
 
-comment "SVG loader needs a toolchain w/ wchar, threads, C++"
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
+comment "SVG loader needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 endif
package/gstreamer/gst-plugins-good/Config.in +4 -0
index 3ec93cf..2e81a6a 100644
@@ -178,9 +178,13 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX
 
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_PNG
 
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC
 	bool "flac (libFLAC)"
 	depends on BR2_USE_WCHAR # flac
package/gstreamer1/gst1-plugins-good/Config.in +4 -0
index 7159c5a..aa45ba7 100644
@@ -274,11 +274,15 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2
 
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_PNG
 	help
 	  Cairo-based elements
 
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC
 	bool "flac (libFLAC)"
 	depends on BR2_USE_WCHAR # flac
package/libgtk2/Config.in +3 -2
index 5239c25..ce70256 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_LIBGTK2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  The GTK+ version 2 graphical user interface library
 
@@ -32,8 +33,8 @@ config BR2_PACKAGE_LIBGTK2_DEMO
 
 endif
 
-comment "libgtk2 needs a toolchain w/ wchar, threads, C++"
+comment "libgtk2 needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_XORG7
 	depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/librsvg/Config.in +4 -2
index 5dd4c58..e1dbf4f 100644
@@ -10,12 +10,14 @@ config BR2_PACKAGE_LIBRSVG
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  The rsvg library is an efficient renderer for Scalable
 	  Vector Graphics (SVG) pictures.
 
 	  http://librsvg.sourceforge.net/
 
-comment "librsvg needs a toolchain w/ wchar, threads, C++"
+comment "librsvg needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/libsvg-cairo/Config.in +4 -0
index 9577c69..a1a8401 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSVG_CAIRO
 	bool "libsvg-cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_SVG
 	select BR2_PACKAGE_LIBSVG
@@ -9,3 +10,6 @@ config BR2_PACKAGE_LIBSVG_CAIRO
 	  rendering library.
 
 	  http://cairographics.org
+
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/pango/Config.in +3 -2
index 70f4fd3..6dee251 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_PANGO
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # freetype support
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_CAIRO
@@ -21,7 +22,7 @@ config BR2_PACKAGE_PANGO
 
 	  http://www.pango.org/
 
-comment "pango needs a toolchain w/ wchar, threads, C++"
+comment "pango needs a toolchain w/ wchar, threads, C++, atomic intrinsics"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_INSTALL_LIBSTDCPP
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/webkit/Config.in +4 -2
index b7f903c..f42a96f 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_WEBKIT
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT # icu
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO_PNG
 	select BR2_PACKAGE_ENCHANT
 	select BR2_PACKAGE_HARFBUZZ
@@ -41,8 +42,9 @@ config BR2_PACKAGE_WEBKIT
 
 	  http://webkit.org/
 
-comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads"
+comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads, atomic intrinsics"
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_PACKAGE_LIBGTK2 || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	depends on BR2_USE_MMU
package/weston/Config.in +4 -0
index aaef405..f927c5f 100644
@@ -15,6 +15,7 @@ config BR2_PACKAGE_WESTON
 	depends on !BR2_avr32 # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
 	# Make sure at least one compositor is selected.
@@ -27,6 +28,9 @@ config BR2_PACKAGE_WESTON
 
 	  http://wayland.freedesktop.org/
 
+comment "weston needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 if BR2_PACKAGE_WESTON
 
 # Helper to make sure at least one compositor is selected.
Signature · 1 line
1.8.4.1
#35 lore raw

PATCH v4 1/4 cairo: Add dependency on atomic intrinsics

Hi,

Any news on this and my submission to the manual (https://patchwork.ozlabs.org/patch/376259/)?

Anton

Quoted 257 lines

-----Original Message-----
From: Anton Kolesov [mailto:Anton.Kolesov at synopsys.com]
Sent: 08 August 2014 19:09
To: buildroot at uclibc.org
Cc: Anton Kolesov; Alexey Brodkin
Subject: [PATCH v4 1/4] cairo: Add dependency on atomic intrinsics

Cairo requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/fadfaa9916724d310d0dda555a1db31b
ee1601d0/

---
 package/cairo/Config.in                        | 4 ++++
 package/efl/libevas-generic-loaders/Config.in  | 6 ++++--
 package/gstreamer/gst-plugins-good/Config.in   | 4 ++++
 package/gstreamer1/gst1-plugins-good/Config.in | 4 ++++
 package/libgtk2/Config.in                      | 5 +++--
 package/librsvg/Config.in                      | 6 ++++--
 package/libsvg-cairo/Config.in                 | 4 ++++
 package/pango/Config.in                        | 5 +++--
 package/webkit/Config.in                       | 6 ++++--
 package/weston/Config.in                       | 4 ++++
 10 files changed, 38 insertions(+), 10 deletions(-)
package/cairo/Config.in +4 -0
index 0c87a29..103aa0d 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_CAIRO
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_PIXMAN
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
@@ -13,6 +14,9 @@ config BR2_PACKAGE_CAIRO
 
 	  http://cairographics.org/
 
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 if BR2_PACKAGE_CAIRO
 
 config BR2_PACKAGE_CAIRO_PS
package/efl/libevas-generic-loaders/Config.in +0 -0
index 23b9f77..c7145d5 100644
@@ -17,10 +17,12 @@ config

BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG

package/efl/libevas-generic-loaders/Config.in +1 -2
 	depends on BR2_USE_WCHAR # librsvg -> glib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> glib2
 	depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  This option enables the Evas generic SVG loader
 
-comment "SVG loader needs a toolchain w/ wchar, threads, C++"
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

|| !BR2_INSTALL_LIBSTDCPP
+comment "SVG loader needs a toolchain w/ wchar, threads, C++, atomic intrinsics"

package/efl/libevas-generic-loaders/Config.in +1 -0
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

|| !BR2_INSTALL_LIBSTDCPP \

package/efl/libevas-generic-loaders/Config.in +1 -0
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 endif
package/gstreamer/gst-plugins-good/Config.in +0 -0
index 3ec93cf..2e81a6a 100644
@@ -178,9 +178,13 @@ config

BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX

config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO

package/gstreamer/gst-plugins-good/Config.in +4 -0
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_PNG
 
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC
 	bool "flac (libFLAC)"
 	depends on BR2_USE_WCHAR # flac
package/gstreamer1/gst1-plugins-good/Config.in +0 -0
index 7159c5a..aa45ba7 100644
@@ -274,11 +274,15 @@ config

BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2

config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO

package/gstreamer1/gst1-plugins-good/Config.in +4 -0
 	bool "cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_PNG
 	help
 	  Cairo-based elements
 
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC
 	bool "flac (libFLAC)"
 	depends on BR2_USE_WCHAR # flac
package/libgtk2/Config.in +2 -1
index 5239c25..ce70256 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_LIBGTK2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  The GTK+ version 2 graphical user interface library
 
@@ -32,8 +33,8 @@ config BR2_PACKAGE_LIBGTK2_DEMO
 
 endif
 
-comment "libgtk2 needs a toolchain w/ wchar, threads, C++"
+comment "libgtk2 needs a toolchain w/ wchar, threads, C++, atomic

intrinsics"

package/libgtk2/Config.in +1 -1
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_XORG7
 	depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS ||

!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS

package/librsvg/Config.in +2 -1
index 5dd4c58..e1dbf4f 100644
@@ -10,12 +10,14 @@ config BR2_PACKAGE_LIBRSVG
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # pango
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	help
 	  The rsvg library is an efficient renderer for Scalable
 	  Vector Graphics (SVG) pictures.
 
 	  http://librsvg.sourceforge.net/
 
-comment "librsvg needs a toolchain w/ wchar, threads, C++"
+comment "librsvg needs a toolchain w/ wchar, threads, C++, atomic

intrinsics"

package/librsvg/Config.in +0 -1
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

|| !BR2_INSTALL_LIBSTDCPP

package/librsvg/Config.in +1 -0
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

|| !BR2_INSTALL_LIBSTDCPP \

package/librsvg/Config.in +1 -0
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/libsvg-cairo/Config.in +4 -0
index 9577c69..a1a8401 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBSVG_CAIRO
 	bool "libsvg-cairo"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO
 	select BR2_PACKAGE_CAIRO_SVG
 	select BR2_PACKAGE_LIBSVG
@@ -9,3 +10,6 @@ config BR2_PACKAGE_LIBSVG_CAIRO
 	  rendering library.
 
 	  http://cairographics.org
+
+comment "cairo needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/pango/Config.in +2 -1
index 70f4fd3..6dee251 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_PANGO
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_USE_MMU # glib2
 	depends on BR2_INSTALL_LIBSTDCPP # freetype support
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_CAIRO
@@ -21,7 +22,7 @@ config BR2_PACKAGE_PANGO
 
 	  http://www.pango.org/
 
-comment "pango needs a toolchain w/ wchar, threads, C++"
+comment "pango needs a toolchain w/ wchar, threads, C++, atomic

intrinsics"

package/pango/Config.in +0 -0
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

|| \

package/pango/Config.in +1 -1
-		!BR2_INSTALL_LIBSTDCPP
+		!BR2_INSTALL_LIBSTDCPP ||

!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS

package/webkit/Config.in +2 -1
index b7f903c..f42a96f 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_WEBKIT
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT # icu
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO_PNG
 	select BR2_PACKAGE_ENCHANT
 	select BR2_PACKAGE_HARFBUZZ
@@ -41,8 +42,9 @@ config BR2_PACKAGE_WEBKIT
 
 	  http://webkit.org/
 
-comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads"
+comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads,

atomic intrinsics"

package/webkit/Config.in +0 -0
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_PACKAGE_LIBGTK2 || !BR2_INSTALL_LIBSTDCPP

|| \

package/webkit/Config.in +2 -1
-		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	depends on BR2_USE_MMU
package/weston/Config.in +4 -1
index aaef405..f927c5f 100644
@@ -15,6 +15,7 @@ config BR2_PACKAGE_WESTON
 	depends on !BR2_avr32 # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
 	# Make sure at least one compositor is selected.
@@ -27,6 +28,9 @@ config BR2_PACKAGE_WESTON
 
 	  http://wayland.freedesktop.org/
 
+comment "weston needs a toolchain w/ atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 if BR2_PACKAGE_WESTON
 
 # Helper to make sure at least one compositor is selected.
--

1.8.4.1

#36 lore raw

PATCH v4 2/4 pulseaudio: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Pulseaudio requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/d463f3bf730a600a07ed6cd33695bf45e9fd3540/

---
 package/gstreamer/gst-plugins-good/Config.in   | 5 +++++
 package/gstreamer1/gst1-plugins-good/Config.in | 5 +++++
 package/mpd/Config.in                          | 5 +++--
 package/pulseaudio/Config.in                   | 6 ++++--
 4 files changed, 17 insertions(+), 4 deletions(-)
package/gstreamer/gst-plugins-good/Config.in +5 -0
index 2e81a6a..7ab9519 100644
@@ -212,9 +212,14 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
 	depends on BR2_USE_MMU # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	bool "pulseaudio"
 
+comment "pulseaudio support needs a toolchain w/ largefile, threads, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC
 	bool "souphttpsrc (http client)"
 	depends on BR2_USE_WCHAR # libsoup -> glib2
package/gstreamer1/gst1-plugins-good/Config.in +5 -0
index aa45ba7..71b0a37 100644
@@ -308,11 +308,16 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
 	depends on BR2_USE_MMU # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	bool "pulseaudio"
 	help
 	  PulseAudio plugin library
 
+comment "pulseaudio support needs a toolchain w/ largefile, threads, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC
 	bool "souphttpsrc (http client)"
 	depends on BR2_USE_WCHAR # libsoup -> glib2
package/mpd/Config.in +3 -2
index f5f5b34..8382a5d 100644
@@ -45,12 +45,13 @@ config BR2_PACKAGE_MPD_AUDIOFILE
 config BR2_PACKAGE_MPD_PULSEAUDIO
 	bool "pulseaudio"
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	help
 	  Enable pulseaudio output support.
 
-comment "pulseaudio support needs a toolchain w/ largefile"
-	depends on !BR2_LARGEFILE
+comment "pulseaudio support needs a toolchain w/ largefile, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 config BR2_PACKAGE_MPD_BZIP2
 	bool "bzip2"
package/pulseaudio/Config.in +4 -2
index ac6222c..de99fc8 100644
@@ -8,6 +8,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_SPEEX
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
@@ -30,6 +31,7 @@ config BR2_PACKAGE_PULSEAUDIO_DAEMON
 
 endif
 
-comment "pulseaudio needs a toolchain w/ wchar, largefile, threads"
+comment "pulseaudio needs a toolchain w/ wchar, largefile, threads, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#37 lore raw

PATCH v4 2/4 pulseaudio: Add dependency on atomic intrinsics

Anton, All,

On 2014-08-08 19:09 +0400, Anton Kolesov spake thusly:

Quoted 7 lines

Pulseaudio requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/d463f3bf730a600a07ed6cd33695bf45e9fd3540/

You forgot espeak's pulseaudio backen option:

config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_PULSEAUDIO
select BR2_PACKAGE_PULSEAUDIO

which should also depend on intrinsics.

Regards,
Yann E. MORIN.

Quoted 96 lines
---
 package/gstreamer/gst-plugins-good/Config.in   | 5 +++++
 package/gstreamer1/gst1-plugins-good/Config.in | 5 +++++
 package/mpd/Config.in                          | 5 +++--
 package/pulseaudio/Config.in                   | 6 ++++--
 4 files changed, 17 insertions(+), 4 deletions(-)
package/gstreamer/gst-plugins-good/Config.in +5 -0
index 2e81a6a..7ab9519 100644
@@ -212,9 +212,14 @@ config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
 	depends on BR2_USE_MMU # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	bool "pulseaudio"
 
+comment "pulseaudio support needs a toolchain w/ largefile, threads, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC
 	bool "souphttpsrc (http client)"
 	depends on BR2_USE_WCHAR # libsoup -> glib2
package/gstreamer1/gst1-plugins-good/Config.in +5 -0
index aa45ba7..71b0a37 100644
@@ -308,11 +308,16 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
 	depends on BR2_USE_MMU # pulseaudio
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	bool "pulseaudio"
 	help
 	  PulseAudio plugin library
 
+comment "pulseaudio support needs a toolchain w/ largefile, threads, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC
 	bool "souphttpsrc (http client)"
 	depends on BR2_USE_WCHAR # libsoup -> glib2
package/mpd/Config.in +3 -2
index f5f5b34..8382a5d 100644
@@ -45,12 +45,13 @@ config BR2_PACKAGE_MPD_AUDIOFILE
 config BR2_PACKAGE_MPD_PULSEAUDIO
 	bool "pulseaudio"
 	depends on BR2_LARGEFILE # pulseaudio -> libsndfile
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # pulseaudio
 	select BR2_PACKAGE_PULSEAUDIO
 	help
 	  Enable pulseaudio output support.
 
-comment "pulseaudio support needs a toolchain w/ largefile"
-	depends on !BR2_LARGEFILE
+comment "pulseaudio support needs a toolchain w/ largefile, atomic intrinsics"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 
 config BR2_PACKAGE_MPD_BZIP2
 	bool "bzip2"
package/pulseaudio/Config.in +4 -2
index ac6222c..de99fc8 100644
@@ -8,6 +8,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_SPEEX
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
@@ -30,6 +31,7 @@ config BR2_PACKAGE_PULSEAUDIO_DAEMON
 
 endif
 
-comment "pulseaudio needs a toolchain w/ wchar, largefile, threads"
+comment "pulseaudio needs a toolchain w/ wchar, largefile, threads, atomic intrinsics"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 6 lines
1.8.4.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#38 lore raw

PATCH v4 3/4 libftdi: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Libftdi requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/6cb25ed954840109c9d0e582e922b0ba9d07e174/

---
 package/libftdi/Config.in | 5 +++--
 package/openocd/Config.in | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)
package/libftdi/Config.in +3 -2
index dc81514..ce65158 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBFTDI
 	bool "libftdi"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	select BR2_PACKAGE_LIBUSB
 	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
@@ -18,5 +19,5 @@ config BR2_PACKAGE_LIBTFDI_CPP
 
 endif # BR2_PACKAGE_LIBFTDI
 
-comment "libftdi needs a toolchain w/ threads"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+comment "libftdi needs a toolchain w/ threads, atomic intrinsics"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/openocd/Config.in +4 -0
index 7f96ef8..e692d2d 100644
@@ -14,11 +14,15 @@ comment "Adapters"
 
 config BR2_PACKAGE_OPENOCD_FT2XXX
 	bool "FT2xxx/FT4xxx Based JTAG Programmer"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # libftdi
 	select BR2_PACKAGE_LIBFTDI
 	help
 	  Enable building support for FT2232 based devices
 	  using the libftdi driver, opensource alternate of FTD2XX
 
+comment "FT2232 support needs a toolchain w/ atomic intrinsics"
+        depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_OPENOCD_JLINK
 	bool "Segger J-Link JTAG Programmer"
 	help
Signature · 1 line
1.8.4.1
#39 lore raw

PATCH v4 3/4 libftdi: Add dependency on atomic intrinsics

Anton, All,

On 2014-08-08 19:09 +0400, Anton Kolesov spake thusly:

Quoted 7 lines

Libftdi requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/6cb25ed954840109c9d0e582e922b0ba9d07e174/

However, I do have a small eye-candy comment to make, see below...

[--SNIP--]

Quoted 5 lines
package/openocd/Config.in +0 -0
index 7f96ef8..e692d2d 100644

package/openocd/Config.in comment "Adapters" · line 23

Quoted 10 lines
package/openocd/Config.in +2 -0
@@ -14,11 +14,15 @@ comment "Adapters"
 
 config BR2_PACKAGE_OPENOCD_FT2XXX
 	bool "FT2xxx/FT4xxx Based JTAG Programmer"
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # libftdi
 	select BR2_PACKAGE_LIBFTDI
 	help
 	  Enable building support for FT2232 based devices
 	  using the libftdi driver, opensource alternate of FTD2XX
 
+comment "FT2232 support needs a toolchain w/ atomic intrinsics"

I'd prefer we keep the same title for comment and options, such as:

comment "FT2xxx/FT4xxx support needs a toolchain w/ atomic intrinsics"

This can be fixed by whoever commits that, I guess no need to resend.

Regards,
Yann E. MORIN.

Quoted 12 lines
package/openocd/Config.in +2 -0
+        depends on !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 config BR2_PACKAGE_OPENOCD_JLINK
 	bool "Segger J-Link JTAG Programmer"
 	help
Signature · 6 lines
1.8.4.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#40 lore raw

PATCH v4 4/4 msgpack: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Msgpack requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/44849a386cefb8899f4560296bfbbd8ea19ee910/

---
 package/msgpack/Config.in        | 7 +++----
 package/python-msgpack/Config.in | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
package/msgpack/Config.in +3 -4
index b380c58..7d6277f 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MSGPACK
 	bool "msgpack"
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc # atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  MessagePack is an efficient binary serialization format.
 
@@ -10,6 +10,5 @@ config BR2_PACKAGE_MSGPACK
 
 	  http://msgpack.org/
 
-comment "msgpack needs a toolchain w/ C++"
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+comment "msgpack needs a toolchain w/ C++, atomic intrinsics"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/python-msgpack/Config.in +3 -4
index c4b68a3..3b825a1 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_MSGPACK
 	depends on BR2_INSTALL_LIBSTDCPP # msgpack
-	depends on !BR2_arc # msgpack - atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # msgpack
 	help
 	  MessagePack (http://msgpack.org/) is a fast, compact binary
 	  serialization format, suitable for similar data to JSON.
@@ -12,7 +12,6 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 
 	  https://pypi.python.org/pypi/msgpack-python/
 
-comment "python-msgpack needs a toolchain w/ C++"
+comment "python-msgpack needs a toolchain w/ C++, atomic intrinsics"
 	depends on BR2_PACKAGE_PYTHON
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 1 line
1.8.4.1
#41 lore raw

PATCH v4 4/4 msgpack: Add dependency on atomic intrinsics

Anton, All,

On 2014-08-08 19:09 +0400, Anton Kolesov spake thusly:

Quoted 2 lines

Msgpack requires GCC built-in atomic functions which are architecture specific and may not be implemented.

Well, this patch does a bit more than that: it replaces the dependency on !ARC with the new generic dependency.

What about enhancing the commit log as thus, for example:

Msgpack requires GCC built-in atomic functions which are architecture specific and may not be implemented.

Replace the current dependency on !ARC (which was the sole architecture so far to not have intrinsics), to the generic _HAS_ATOMIC_INTRINSICS dependency.

Otherwise:

Regards,
Yann E. MORIN.

Quoted 61 lines

This fixes:
http://autobuild.buildroot.net/results/44849a386cefb8899f4560296bfbbd8ea19ee910/

---
 package/msgpack/Config.in        | 7 +++----
 package/python-msgpack/Config.in | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
package/msgpack/Config.in +3 -4
index b380c58..7d6277f 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MSGPACK
 	bool "msgpack"
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc # atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
 	help
 	  MessagePack is an efficient binary serialization format.
 
@@ -10,6 +10,5 @@ config BR2_PACKAGE_MSGPACK
 
 	  http://msgpack.org/
 
-comment "msgpack needs a toolchain w/ C++"
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+comment "msgpack needs a toolchain w/ C++, atomic intrinsics"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
package/python-msgpack/Config.in +3 -4
index c4b68a3..3b825a1 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 	depends on BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_MSGPACK
 	depends on BR2_INSTALL_LIBSTDCPP # msgpack
-	depends on !BR2_arc # msgpack - atomic builtins
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # msgpack
 	help
 	  MessagePack (http://msgpack.org/) is a fast, compact binary
 	  serialization format, suitable for similar data to JSON.
@@ -12,7 +12,6 @@ config BR2_PACKAGE_PYTHON_MSGPACK
 
 	  https://pypi.python.org/pypi/msgpack-python/
 
-comment "python-msgpack needs a toolchain w/ C++"
+comment "python-msgpack needs a toolchain w/ C++, atomic intrinsics"
 	depends on BR2_PACKAGE_PYTHON
-	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_arc
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
Signature · 6 lines
1.8.4.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#42 lore raw

PATCH v4 1/4 cairo: Add dependency on atomic intrinsics

In reply to Anton Kolesov

Anton, All,

On 2014-08-08 19:09 +0400, Anton Kolesov spake thusly:

Quoted 7 lines

Cairo requires GCC built-in atomic functions which are architecture specific and may not be implemented.

This fixes:
http://autobuild.buildroot.net/results/fadfaa9916724d310d0dda555a1db31bee1601d0/

However, a small comment, unrelated to your change...

[--SNIP--]

package/webkit/Config.in config BR2_PACKAGE_WEBKIT · line 21

Quoted 10 lines
package/webkit/Config.in +1 -0
index b7f903c..f42a96f 100644
@@ -17,6 +17,7 @@ config BR2_PACKAGE_WEBKIT
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT # icu
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS # cairo
 	select BR2_PACKAGE_CAIRO_PNG

This should also 'select BR2_PACKAGE_CAIRO' but that's not the fault of your patch.

I'll send a fix for that shortly.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'