From f30d131bd979e29b68fb7d9ff515c61a246201f4 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 21 Mar 2017 13:40:08 +0100 Subject: erts: Deprecate the non-smp emulators --- erts/configure.in | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) (limited to 'erts/configure.in') diff --git a/erts/configure.in b/erts/configure.in index b488ba9171..9ab5b4cfd2 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -154,6 +154,14 @@ AS_HELP_STRING([--disable-smp-support], [disable smp support]), *) enable_smp_support=yes ;; esac ], enable_smp_support=unknown) +AC_ARG_ENABLE(plain-emulator, +AS_HELP_STRING([--enable-plain-emulator], [enable plain emulator]) +AS_HELP_STRING([--disable-plain-emulator], [disable plain emulator]), +[ case "$enableval" in + no) enable_plain_emulator=no ;; + *) enable_plain_emulator=yes ;; + esac ], enable_plain_emulator=unknown) + AC_ARG_ENABLE(smp-require-native-atomics, AS_HELP_STRING([--disable-smp-require-native-atomics], [disable the SMP requirement of a native atomic implementation]), @@ -993,7 +1001,7 @@ else found_threads=yes fi - +FLAVORS= ERTS_BUILD_SMP_EMU=$enable_smp_support AC_MSG_CHECKING(whether an emulator with smp support should be built) case $ERTS_BUILD_SMP_EMU in @@ -1078,6 +1086,9 @@ EOF if test $ERTS_BUILD_SMP_EMU = yes; then + DEFAULT_FLAVOR=smp + FLAVORS="$FLAVORS smp" + if test $found_threads = no; then AC_MSG_ERROR([cannot build smp enabled emulator since no thread library was found]) fi @@ -1153,6 +1164,66 @@ fi AC_SUBST(ERTS_BUILD_SMP_EMU) +ERTS_BUILD_PLAIN_EMU=$enable_plain_emulator +AC_MSG_CHECKING(whether an emulator without smp support should be built) +case $ERTS_BUILD_PLAIN_EMU in + yes) + AC_MSG_RESULT(yes; enabled by user) + ;; + no) + AC_MSG_RESULT(no; disabled by user) + ;; + unknown) + case "$enable_threads-$ERTS_BUILD_SMP_EMU" in + no-*) + ERTS_BUILD_PLAIN_EMU=yes + AC_MSG_RESULT(yes) + ;; + *-no) + ERTS_BUILD_PLAIN_EMU=yes + AC_MSG_RESULT(yes; enabled as smp emulator was disabled) + ;; + *) + ERTS_BUILD_PLAIN_EMU=no + AC_MSG_RESULT(no) + ;; + esac + ;; +esac + +case $ERTS_BUILD_PLAIN_EMU in + yes) + AC_DEFINE(ERTS_HAVE_PLAIN_EMU, 1, [Define if the non-smp emulator is built]) + FLAVORS="$FLAVORS plain" + test -f "$ERL_TOP/erts/CONF_INFO" || echo "" > "$ERL_TOP/erts/CONF_INFO" + cat >> $ERL_TOP/erts/CONF_INFO <