Skip to content

Instantly share code, notes, and snippets.

@tiran
Last active November 26, 2021 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiran/5ccffa28723d3e4739db848451bd9efa to your computer and use it in GitHub Desktop.
Save tiran/5ccffa28723d3e4739db848451bd9efa to your computer and use it in GitHub Desktop.
CONFIG_SITE for CPython wasm cross builds
#
# CONFIG_SITE=config.site-wasm READELF=true emconfigure ./configure -C --host=wasm32-unknown-emscripten --build=$(./config.guess) --without-pymalloc --enable-big-digits=30
# ln -sfr Modules/Setup.stdlib Modules/Setup.local
# emmake make CROSS_COMPILE=yes FREEZE_MODULE=../x86_64/Programs/_freeze_module PYTHON_FOR_BUILD=../x86_64/python _PYTHON_HOST_PLATFORM=wasm32-unknown-emscripten
#
# cannot be detected for cross builds
ac_cv_buggy_getaddrinfo=no
ac_cv_file__dev_ptmx=yes
ac_cv_file__dev_ptc=no
# new undefined symbols / unsupported features
ac_cv_func_posix_spawn=no
ac_cv_func_posix_spawnp=no
ac_cv_func_eventfd=no
ac_cv_func_memfd_create=no
ac_cv_func_prlimit=no
# unsupported syscall, https://github.com/emscripten-core/emscripten/issues/13393
ac_cv_func_shutdown=no
# The rest is based on pyodide
# https://github.com/pyodide/pyodide/blob/main/cpython/pyconfig.undefs.h
ac_cv_func_epoll=no
ac_cv_func_epoll_create1=no
ac_cv_header_linux_vm_sockets_h=no
ac_cv_func_socketpair=no
ac_cv_func_utimensat=no
ac_cv_func_sigaction=no
# Untested syscalls in emscripten
ac_cv_func_openat=no
ac_cv_func_mkdirat=no
ac_cv_func_fchownat=no
ac_cv_func_renameat=no
ac_cv_func_linkat=no
ac_cv_func_symlinkat=no
ac_cv_func_readlinkat=no
ac_cv_func_fchmodat=no
ac_cv_func_dup3=no
# Syscalls not implemented in emscripten
ac_cv_func_preadv2=no
ac_cv_func_preadv=no
ac_cv_func_pwritev2=no
ac_cv_func_pwritev=no
ac_cv_func_pipe2=no
ac_cv_func_nice=no
# Syscalls that resulted in a segfault
ac_cv_func_utimensat=no
ac_cv_header_sys_socket_h=no
ac_cv_header_sys_ioctl_h=no
# Unsupported functionality
#undef HAVE_PTHREAD_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment