Skip to content

Commit

Permalink
Fix pixman on wasm
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Dec 11, 2022
1 parent e8ae96d commit 7ff9bbd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bootstrap-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ fi # !MACOS
# ---------------------------------------------------------------------------------------------------------------------
# pixman

PIXMAN_EXTRAFLAGS="--disable-gtk --enable-libpng"

download pixman "${PIXMAN_VERSION}" "${PIXMAN_URL}"
build_autoconf pixman "${PIXMAN_VERSION}"
build_autoconf pixman "${PIXMAN_VERSION}" "${PIXMAN_EXTRAFLAGS}"

if [ "${CROSS_COMPILING}" -eq 0 ]; then
run_make pixman "${PIXMAN_VERSION}" check
Expand All @@ -114,7 +116,7 @@ FREETYPE_EXTRAFLAGS+=" -DFT_DISABLE_HARFBUZZ=TRUE"
# FREETYPE_EXTRAFLAGS+=" -DBROTLIDEC_INCLUDE_DIRS:PATH=${PAWPAW_PREFIX}/include"
# FREETYPE_EXTRAFLAGS+=" -DFREETYPE_INCLUDE_DIRS:PATH=${PAWPAW_PREFIX}/include"
# FREETYPE_EXTRAFLAGS+=" -DHarfBuzz_INCLUDE_DIR:PATH=${PAWPAW_PREFIX}/include/harfbuzz"
FREETYPE_EXTRAFLAGS+=" -DPNG_PNG_INCLUDE_DIR:PATH=${PAWPAW_PREFIX}/include"
FREETYPE_EXTRAFLAGS+=" -DPNG_INCLUDE_DIR:PATH=${PAWPAW_PREFIX}/include"

if [ "${MACOS}" -eq 0 ]; then
FREETYPE_EXTRAFLAGS+=" -DZLIB_INCLUDE_DIR:PATH=${PAWPAW_PREFIX}/include"
Expand Down
13 changes: 13 additions & 0 deletions patches/pixman/01_wasm-missing-sse2-calls-workaround.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/test/utils-prng.c b/test/utils-prng.c
index 0cf53dd..ecadbdc 100644
--- a/test/utils-prng.c
+++ b/test/utils-prng.c
@@ -83,7 +83,7 @@ store_rand_128_data (void *addr, prng_rand_128_data_t *d, int aligned)
}
else
{
-#ifdef __SSE2__
+#if defined(__SSE2__) && !defined(__EMSCRIPTEN__)
/* workaround for http://gcc.gnu.org/PR55614 */
_mm_storeu_si128 (addr, _mm_loadu_si128 ((__m128i *)d));
return;

0 comments on commit 7ff9bbd

Please sign in to comment.