Skip to contentSkip to conversation

erlang: Remove BR2_TOOLCHAIN_HAS_THREADS dependency

PATCH New Ezequiel Garcia 2 participants 2 messages Oct 20, 2015 – Oct 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erlang: Remove BR2_TOOLCHAIN_HAS_THREADS dependency

Erlang can be built without threads support, by passing an appropriate config option.

This commit drops the config dependency on BR2_TOOLCHAIN_HAS_THREADS and instead passes --disable-threads if the toolchain doesn't support threads.

While here, change the wording of the config comment to "dynamic library" to be consistent with similar comments elsewhere.

---
 package/erlang/Config.in | 5 ++---
 package/erlang/erlang.mk | 4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)
package/erlang/Config.in +2 -3
index 625b7c1b829f..0ec01bb749b4 100644
@@ -1,12 +1,11 @@
-comment "erlang needs a toolchain w/ threads, shared library"
+comment "erlang needs a toolchain w/ dynamic library"
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+	depends on BR2_STATIC_LIBS
 
 config BR2_PACKAGE_ERLANG
 	bool "erlang"
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS
 	select BR2_PACKAGE_LIBATOMIC_OPS
package/erlang/erlang.mk +4 -0
index 499f62c1539b..848d1ddc44c5 100644
@@ -40,6 +40,10 @@ HOST_ERLANG_CONF_OPTS = --without-javac --with-ssl=$(HOST_DIR)/usr
 
 HOST_ERLANG_CONF_OPTS += --without-termcap
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
+ERLANG_CONF_OPTS += --disable-threads
+endif
+
 ifeq ($(BR2_PACKAGE_NCURSES),y)
 ERLANG_CONF_OPTS += --with-termcap
 ERLANG_DEPENDENCIES += ncurses
Signature · 1 line
2.5.2
#1 lore raw

PATCH 1/1 erlang: Remove BR2_TOOLCHAIN_HAS_THREADS dependency

Dear Ezequiel Garcia,

Quoted 7 lines · Ezequiel Garcia

Erlang can be built without threads support, by passing an appropriate config option.

This commit drops the config dependency on BR2_TOOLCHAIN_HAS_THREADS and instead passes --disable-threads if the toolchain doesn't support threads.

Quoted 8 lines

While here, change the wording of the config comment to "dynamic library" to be consistent with similar comments elsewhere.

---
 package/erlang/Config.in | 5 ++---
 package/erlang/erlang.mk | 4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)

Applied, thanks.

Thomas

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