aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--examples/compile-php-to-wasm/Dockerfile3
-rw-r--r--examples/compile-php-to-wasm/php-wasm.js2
-rwxr-xr-xexamples/compile-php-to-wasm/php-wasm.wasmbin4862431 -> 4861440 bytes
4 files changed, 3 insertions, 4 deletions
diff --git a/README.md b/README.md
index 2701439..e7eb706 100644
--- a/README.md
+++ b/README.md
@@ -26,8 +26,6 @@ It works on the PHP runtime on my Wasm runtime.
$ composer example:rubyvm-on-php-on-wasm
```
-NOTE: there is a known bug where `munmap()`-related errors are reported.
-
## Talks
diff --git a/examples/compile-php-to-wasm/Dockerfile b/examples/compile-php-to-wasm/Dockerfile
index 1bdef61..eb58f15 100644
--- a/examples/compile-php-to-wasm/Dockerfile
+++ b/examples/compile-php-to-wasm/Dockerfile
@@ -11,6 +11,7 @@ RUN apt-get update && \
&& \
:
+# Define ZEND_MM_ERROR=0 for suppressing munmap() errors.
RUN cd php-src && \
./buildconf --force && \
emconfigure ./configure \
@@ -28,7 +29,7 @@ RUN cd php-src && \
--without-pdo-sqlite \
--without-sqlite3 \
&& \
- EMCC_CFLAGS='-s ERROR_ON_UNDEFINED_SYMBOLS=0' emmake make -j$(nproc) && \
+ EMCC_CFLAGS='-s ERROR_ON_UNDEFINED_SYMBOLS=0 -D ZEND_MM_ERROR=0' emmake make -j$(nproc) && \
mv libs/libphp.a .. && \
make clean && \
git clean -fd && \
diff --git a/examples/compile-php-to-wasm/php-wasm.js b/examples/compile-php-to-wasm/php-wasm.js
index 92ba924..dba15e0 100644
--- a/examples/compile-php-to-wasm/php-wasm.js
+++ b/examples/compile-php-to-wasm/php-wasm.js
@@ -7693,8 +7693,8 @@ var _malloc = createExportWrapper('malloc');
var setTempRet0 = createExportWrapper('setTempRet0');
var _fflush = Module['_fflush'] = createExportWrapper('fflush');
var _free = createExportWrapper('free');
-var ___errno_location = createExportWrapper('__errno_location');
var _memcpy = createExportWrapper('memcpy');
+var ___errno_location = createExportWrapper('__errno_location');
var _htons = createExportWrapper('htons');
var _ntohs = createExportWrapper('ntohs');
var _htonl = createExportWrapper('htonl');
diff --git a/examples/compile-php-to-wasm/php-wasm.wasm b/examples/compile-php-to-wasm/php-wasm.wasm
index cf5ca85..45f378c 100755
--- a/examples/compile-php-to-wasm/php-wasm.wasm
+++ b/examples/compile-php-to-wasm/php-wasm.wasm
Binary files differ