Skip to contentSkip to conversation

erlang: add option to enable SMP support

PATCH Superseded Frank Hunleth 2 participants 2 messages Dec 12, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 erlang: add option to enable SMP support

Erlang builds two emulators depending on whether SMP is supported or not. If it is known that the target does not support SMP, turning off the SMP emulator saves compile time and reduces the size of the installation.

---
Changes v1 -> v2:
- added sign-off

 package/erlang/Config.in | 10 ++++++++++
 package/erlang/erlang.mk |  4 ++++
 2 files changed, 14 insertions(+)
package/erlang/Config.in +10 -0
index 27206f3..9edb90b 100644
@@ -10,6 +10,16 @@ config BR2_PACKAGE_ERLANG
 
 	  http://www.erlang.org
 
+config BR2_PACKAGE_ERLANG_SMP
+	bool "enable SMP support"
+	depends on BR2_PACKAGE_ERLANG
+	help
+	  Erlang provides both a UP and an SMP emulator. The UP emulator
+	  is always built, and this option enables compilation of the SMP
+	  emulator. The choice of which emulator to use is made at runtime.
+	  If you do not need SMP support, turning this option off reduces
+	  compile time and the size of the Erlang installation.
+
 config BR2_PACKAGE_ERLANG_MEGACO
 	bool "install megaco application"
 	depends on BR2_PACKAGE_ERLANG
package/erlang/erlang.mk +4 -0
index 32d18e4..67010a2 100644
@@ -43,6 +43,10 @@ ERLANG_CONF_OPT += --enable-shared-zlib
 ERLANG_DEPENDENCIES += zlib
 endif
 
+ifneq ($(BR2_PACKAGE_ERLANG_SMP),y)
+ERLANG_CONF_OPT += --disable-smp-support
+endif
+
 # Remove source, example, gs and wx files from the target
 ERLANG_REMOVE_PACKAGES = gs wx
 
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v2 1/1 erlang: add option to enable SMP support

Quoted 6 lines · Frank Hunleth

Erlang builds two emulators depending on whether SMP is supported or not. If it is known that the target does not support SMP, turning off the SMP emulator saves compile time and reduces the size of the installation.

Hi Frank,

A few minor comments.

Quoted 13 lines

---
Changes v1 -> v2:
- added sign-off

  package/erlang/Config.in | 10 ++++++++++
  package/erlang/erlang.mk |  4 ++++
  2 files changed, 14 insertions(+)
package/erlang/Config.in +0 -0
index 27206f3..9edb90b 100644

package/erlang/Config.in config BR2_PACKAGE_ERLANG · line 15

Quoted 6 lines
package/erlang/Config.in +3 -0
@@ -10,6 +10,16 @@ config BR2_PACKAGE_ERLANG
 
  	  http://www.erlang.org
 
+config BR2_PACKAGE_ERLANG_SMP
+	bool "enable SMP support"
+	depends on BR2_PACKAGE_ERLANG

Instead of a separate 'depends on' in every sub-option, we prefer one
'if ... endif' around all the suboptions.

Quoted 15 lines
package/erlang/Config.in +7 -0
+	help
+	  Erlang provides both a UP and an SMP emulator. The UP emulator
+	  is always built, and this option enables compilation of the SMP
+	  emulator. The choice of which emulator to use is made at runtime.
+	  If you do not need SMP support, turning this option off reduces
+	  compile time and the size of the Erlang installation.
+
  config BR2_PACKAGE_ERLANG_MEGACO
  	bool "install megaco application"
  	depends on BR2_PACKAGE_ERLANG
package/erlang/erlang.mk +0 -0
index 32d18e4..67010a2 100644

package/erlang/erlang.mk ERLANG_CONF_OPT += --enable-shared-zlib · line 46

Quoted 4 lines
package/erlang/erlang.mk +1 -0
@@ -43,6 +43,10 @@ ERLANG_CONF_OPT += --enable-shared-zlib
  ERLANG_DEPENDENCIES += zlib
  endif
 
+ifneq ($(BR2_PACKAGE_ERLANG_SMP),y)

We prefer positive logic, i.e.

ifeq ($(BR2_PACKAGE_ERLANG_SMP),)

Regards,
Arnout

Quoted 7 lines
package/erlang/erlang.mk +3 -0
+ERLANG_CONF_OPT += --disable-smp-support
+endif
+
  # Remove source, example, gs and wx files from the target
  ERLANG_REMOVE_PACKAGES = gs wx
 
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F