diff --git a/examples/sdk/gtk4/build.sh b/examples/sdk/gtk4/build.sh index 551acefb..dc471431 100755 --- a/examples/sdk/gtk4/build.sh +++ b/examples/sdk/gtk4/build.sh @@ -16,7 +16,7 @@ fi DIR=$(dirname "$(readlink -f "$CURRENT_SCRIPT")") -EXTRA_LDFLAGS="-g -sINITIAL_MEMORY=384MB \ +EXTRA_LDFLAGS="-g -sINITIAL_MEMORY=512MB '-fsanitize=undefined' \ --preload-file $DIR/fonts/inter@/usr/share/fonts/opentype/inter \ --preload-file $DIR/build/examples/application9/gschemas.compiled@/usr/share/glib-2.0/schemas/ \ --preload-file $_SDK_DIR/sysroot/share/X11/xkb@/home/web_user/.config/xkb \ diff --git a/sdk/sysrootlibs/emscripten-build.ini b/sdk/sysrootlibs/emscripten-build.ini index a0a9a0a9..8a88c1d4 100644 --- a/sdk/sysrootlibs/emscripten-build.ini +++ b/sdk/sysrootlibs/emscripten-build.ini @@ -1,6 +1,6 @@ [constants] -cflags = ['-g', '-pthread', '-flto', '-msimd128'] -ldflags = ['-v'] +cflags = ['-g', '-pthread', '-flto', '-msimd128', '-fsanitize=undefined'] +ldflags = ['-v', '-g', '-pthread', '-flto', '-msimd128', '-fsanitize=undefined'] [binaries] ar = toolchain / 'emar' diff --git a/sdk/sysrootlibs/jslibraries/library_unixsockfs.js b/sdk/sysrootlibs/jslibraries/library_unixsockfs.js index d2d89037..9583b3c1 100644 --- a/sdk/sysrootlibs/jslibraries/library_unixsockfs.js +++ b/sdk/sysrootlibs/jslibraries/library_unixsockfs.js @@ -2,7 +2,7 @@ $UNIXSOCKFS__postset: function() { addAtInit('UNIXSOCKFS.root = FS.mount(UNIXSOCKFS, {}, null);'); }, - $UNIXSOCKFS__deps: ['$FS', '$SOCKFS', '$Asyncify', '$MEMFS', '$PIPEFS'], + $UNIXSOCKFS__deps: ['$FS', '$SOCKFS', '$MEMFS', '$PIPEFS'], $UNIXSOCKFS: { mount: function(mount) { // If Module['messageport'] has already been defined use that, if not initialise it to a new object. diff --git a/sdk/toolkit/bin/gf++ b/sdk/toolkit/bin/gf++ index b04aba3a..fb371eee 100755 --- a/sdk/toolkit/bin/gf++ +++ b/sdk/toolkit/bin/gf++ @@ -4,7 +4,7 @@ _SDK_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/../.." _SDK_CFLAGS="-sENVIRONMENT=web,worker \ -sEXIT_RUNTIME=1 \ -sPTHREAD_POOL_SIZE=1 -sPROXY_TO_PTHREAD -sUSE_PTHREADS=1 \ --sJSPI -sJSPI_IMPORTS=[__syscall_poll] \ +-sJSPI -sJSPI_IMPORTS=[_emscripten_receive_on_main_thread_js] -sJSPI_EXPORTS=[_emscripten_check_mailbox] \ -sSTACK_SIZE=4MB \ --js-library $_SDK_DIR/sysrootlibs/jslibraries/library_unixsockfs.js \ --pre-js $_SDK_DIR/sysrootlibs/jslibraries/pre-main.js \ diff --git a/sdk/toolkit/bin/gfcc b/sdk/toolkit/bin/gfcc index a357f157..e92ba751 100755 --- a/sdk/toolkit/bin/gfcc +++ b/sdk/toolkit/bin/gfcc @@ -4,7 +4,7 @@ _SDK_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/../.." _SDK_CFLAGS="-sENVIRONMENT=web,worker \ -sEXIT_RUNTIME=1 \ -sPTHREAD_POOL_SIZE=1 -sPROXY_TO_PTHREAD -sUSE_PTHREADS=1 \ --sJSPI -sJSPI_IMPORTS=[__syscall_poll] \ +-sJSPI -sJSPI_IMPORTS=[_emscripten_receive_on_main_thread_js] -sJSPI_EXPORTS=[_emscripten_check_mailbox] \ -sSTACK_SIZE=4MB \ --js-library $_SDK_DIR/sysrootlibs/jslibraries/library_unixsockfs.js \ --pre-js $_SDK_DIR/sysrootlibs/jslibraries/pre-main.js \ diff --git a/sdk/toolkit/meson-gf-cross.ini b/sdk/toolkit/meson-gf-cross.ini index e873c86c..b9cfd63b 100644 --- a/sdk/toolkit/meson-gf-cross.ini +++ b/sdk/toolkit/meson-gf-cross.ini @@ -9,8 +9,8 @@ ;ldflags = ['-v', '-Wl,-u,htonl', '-Wl,-u,ntohs'] # flags for debugging -cflags = ['-pthread', '-g'] -ldflags = ['-pthread', '-g'] +cflags = ['-pthread', '-g', '-fsanitize=undefined'] +ldflags = ['-pthread', '-g', '-fsanitize=undefined'] [binaries] cpp = greenfield_sdk / 'toolkit/bin/gf++'