aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
Diffstat (limited to 'erts/etc')
-rw-r--r--erts/etc/common/erlexec.c12
-rw-r--r--erts/etc/unix/cerl.src7
2 files changed, 18 insertions, 1 deletions
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 78a50744ef..2cf7280ebc 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -829,7 +829,17 @@ int main(int argc, char **argv)
if (argv[i][2] == 'P') {
if (argv[i][3] != '\0')
goto the_default;
- } else if (argv[i][2] != '\0')
+ }
+#ifdef ERTS_DIRTY_SCHEDULERS
+ else if (argv[i][2] == 'D') {
+ char* type = argv[i]+3;
+ if (strcmp(type, "cpu") != 0 &&
+ strcmp(type, "Pcpu") != 0 &&
+ strcmp(type, "io") != 0)
+ goto the_default;
+ }
+#endif
+ else if (argv[i][2] != '\0')
goto the_default;
if (i+1 >= argc)
usage(argv[i]);
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index be8343e87e..78fefbea55 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -86,6 +86,7 @@ run_valgrind=no
# Default rootdir
ROOTDIR=%SRC_ROOTDIR%
BINDIR="$ROOTDIR/bin/`$ROOTDIR/erts/autoconf/config.guess`"
+TARGET=%TARGET%
#BINDIR="$ROOTDIR/bin/%TARGET%"
PROGNAME=$ROOTDIR/bin/cerl
EMU=beam
@@ -248,6 +249,12 @@ while [ $# -gt 0 ]; do
done
+if [ ! -f $BINDIR/erlexec -a -f $ROOTDIR/bin/$TARGET/erlexec ]; then
+ # We are in a strange target (I'm looking at you openbsd) where
+ # TARGET != config.guess
+ BINDIR=$ROOTDIR/bin/$TARGET
+fi
+
PATH=$BINDIR:$ROOTDIR/bin:$PATH
EXEC=$BINDIR/erlexec