From d56cca173d646371eb04bcda48bbfd4583f5d6a3 Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 28 Sep 2016 17:57:32 -0500 Subject: [PATCH 1/4] (ems) try a different libco implementation for emscripten --- dist-scripts/dist-cores.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist-scripts/dist-cores.sh b/dist-scripts/dist-cores.sh index af651d5a29..825f2fbbf9 100755 --- a/dist-scripts/dist-cores.sh +++ b/dist-scripts/dist-cores.sh @@ -148,6 +148,8 @@ for f in `ls -v *_${platform}.${EXT}`; do big_stack="BIG_STACK=1" elif [ $name = "mupen64plus" ] ; then async=1 + elif [ $name = "dosbox" ] ; then + async=1 fi echo "-- Building core: $name --" if [ $PLATFORM = "unix" ]; then From 3e7517e95b29449caa2a3aab0219efddb1a4b323 Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 28 Sep 2016 19:26:15 -0500 Subject: [PATCH 2/4] be more verbose --- dist-scripts/dist-cores.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dist-scripts/dist-cores.sh b/dist-scripts/dist-cores.sh index 825f2fbbf9..00967c6a06 100755 --- a/dist-scripts/dist-cores.sh +++ b/dist-scripts/dist-cores.sh @@ -175,6 +175,7 @@ for f in `ls -v *_${platform}.${EXT}`; do if [ $MAKEFILE_GRIFFIN = "yes" ]; then make -C ../ -f Makefile.griffin platform=${platform} $whole_archive $big_stack -j3 || exit 1 elif [ $PLATFORM = "emscripten" ]; then + echo "BUILD COMMAND: make -C ../ -f Makefile.emscripten PTHREAD=$pthread ASYNC=$async LTO=$lto -j7 TARGET=${name}_libretro.js" make -C ../ -f Makefile.emscripten PTHREAD=$pthread ASYNC=$async LTO=$lto -j7 TARGET=${name}_libretro.js || exit 1 elif [ $PLATFORM = "unix" ]; then make -C ../ -f Makefile LINK=g++ $whole_archive $big_stack -j3 || exit 1 From a23f5b10ff0e2500ca971872945dc867d86090eb Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 28 Sep 2016 19:32:14 -0500 Subject: [PATCH 3/4] fix ASYNCIFY --- Makefile.emscripten | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile.emscripten b/Makefile.emscripten index 5a0214e301..02c08e3064 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -21,8 +21,7 @@ HAVE_ZLIB = 1 HAVE_FBO = 1 WANT_ZLIB = 1 MEMORY = 536870912 -LTO = 0 -ASYNC = 0 + # XXX: setting this to 1/2 currently crashes Firefox nightly PRECISE_F32 = 2 @@ -46,7 +45,7 @@ ifneq ($(PTHREAD), 0) LDFLAGS += -s USE_PTHREADS=$(PTHREAD) -s PTHREAD_POOL_SIZE=2 endif -ifneq ($(ASYNC), 0) +ifeq ($(ASYNC), 1) LDFLAGS += -s ASYNCIFY=$(ASYNC) endif From a09ed703cbebb8c713f2bd41694d858de7616ca4 Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 28 Sep 2016 19:43:39 -0500 Subject: [PATCH 4/4] be more verbose on this script --- dist-scripts/dist-cores.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dist-scripts/dist-cores.sh b/dist-scripts/dist-cores.sh index 00967c6a06..09e643239d 100755 --- a/dist-scripts/dist-cores.sh +++ b/dist-scripts/dist-cores.sh @@ -134,11 +134,12 @@ COUNTER=0 #for f in *_${platform}.${EXT} ; do for f in `ls -v *_${platform}.${EXT}`; do name=`echo "$f" | sed "s/\(_libretro_${platform}\|\).${EXT}$//"` + async=0 + pthread=0 lto=0 whole_archive= big_stack= - async=0 - pthread=0 + if [ $name = "nxengine" ] ; then echo "Applying whole archive linking..." whole_archive="WHOLE_ARCHIVE_LINK=1" @@ -157,6 +158,9 @@ for f in `ls -v *_${platform}.${EXT}`; do else cp -f "$f" ../libretro_${platform}.${EXT} fi + echo NAME: $name + echo ASYNC: $async + echo LTO: $lto # Do cleanup if this is a big stack core if [ "$big_stack" = "BIG_STACK=1" ] ; then