The only error I can see in my logs is:
dyld[76899]: __DATA_CONST segment missing SG_READ_ONLY flag in /Users/jschwender/Dev/mozjs/target/aarch64-unknown-linux-ohos/debug/build/mozjs_sys-fcf429334e10f692/out/build/config/nsinstall
dyld[76899]: __DATA_CONST segment missing SG_READ_ONLY flag
make[4]: *** [../../dist/include/ProfilingCategoryList.h] Abort trap: 6
make[3]: *** [mozglue/baseprofiler/export] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [export] Error 2
make[1]: *** [default] Error 2
make: *** [all] Error 2
Googling the error pointed me to leanprover/lean4#5649, which suggests that LLVM 16+ is needed. This might mean we either need to use a newer clang when cross-compiling (the SDK clang is clang-15), or check if the spidermonkey build-system knows the concept of Host compiler (where we could use a newer clang version)