From 7b9308bd349530d7073c04641b326a79918656ba Mon Sep 17 00:00:00 2001 From: mattmcw Date: Wed, 22 Sep 2021 02:10:58 -0400 Subject: [PATCH] Try with most of the old flags --- povray_wasm/build_ubuntu.sh | 45 ++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/povray_wasm/build_ubuntu.sh b/povray_wasm/build_ubuntu.sh index 3425bbe..e4a0eb5 100644 --- a/povray_wasm/build_ubuntu.sh +++ b/povray_wasm/build_ubuntu.sh @@ -2,14 +2,47 @@ EMAIL="hi@mmcwilliams.com" NAME="Matt McWilliams" -#CPPFLAGS="-Wall -Wextra -Werror -I/usr/include/OpenEXR" -#CPPFLAGS="-pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -Wno-non-template-friend -s -O3 -ffast-math -march=native" -CPPFLAGS="-include uint-hack.h -I/usr/include/OpenEXR" + +CFLAGS="-pthread " #-DBOOST_THREAD_USE_LIB -s USE_BOOST_HEADERS=1 +LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB +CONFIG_ARGS=( + --arch=x86_32 # use x86_32 to achieve minimal architectural optimization + --enable-cross-compile # enable cross compile + --disable-x86asm # disable x86 asm + --disable-inline-asm # disable inline asm + --disable-stripping # disable stripping + --disable-programs # disable programs build (incl. ffplay, ffprobe & ffmpeg) + --disable-doc # disable doc + --extra-cflags="$CFLAGS" + --extra-cxxflags="$CFLAGS" + --extra-ldflags="$LDFLAGS" + --nm="llvm-nm -g" + --ar=emar + --as=llvm-as + --ranlib=llvm-ranlib + --cc=emcc + --cxx=em++ + --objcc=emcc + --dep-cc=emcc +) + +ARGS=( + #LIBS="-lboost_system -lboost_thread -lboost_date_time" + COMPILED_BY="$NAME <$EMAIL>" + CC=emcc + CXX=em++ + CFLAGS="$CFLAGS" + CXXFLAGS="$CFLAGS" + LDFLAGS="$LDFLAGS" + --host=wasm32 +) cd unix/ ./prebuild.sh cd ../ -emconfigure ./configure COMPILED_BY="$NAME <$EMAIL>" LDFLAGS="-Wl,-V" -echo "typedef unsigned int uint;" > uint-hack.h -emmake make -j CPPFLAGS="${CPPFLAGS}" + +#BOOST_ROOT=$BOOST_ROOT +emconfigure ./configure "${ARGS[@]}" + +#emmake make -j CPPFLAGS="${CPPFLAGS}" #make install \ No newline at end of file