1# config.site override for cross compiling to wasm32-emscripten platform 2# 3# CONFIG_SITE=Tools/wasm/config.site-wasm32-emscripten \ 4# emconfigure ./configure --host=wasm32-unknown-emscripten --build=... 5# 6# Written by Christian Heimes <christian@python.org> 7# Partly based on pyodide's pyconfig.undefs.h file. 8# 9 10# cannot be detected in cross builds 11ac_cv_buggy_getaddrinfo=no 12 13# Emscripten has no /dev/pt* 14ac_cv_file__dev_ptmx=no 15ac_cv_file__dev_ptc=no 16 17# new undefined symbols / unsupported features 18ac_cv_func_posix_spawn=no 19ac_cv_func_posix_spawnp=no 20ac_cv_func_eventfd=no 21ac_cv_func_memfd_create=no 22ac_cv_func_prlimit=no 23 24# unsupported syscall, https://github.com/emscripten-core/emscripten/issues/13393 25ac_cv_func_shutdown=no 26 27# The rest is based on pyodide 28# https://github.com/pyodide/pyodide/blob/main/cpython/pyconfig.undefs.h 29 30ac_cv_func_epoll_create=no 31ac_cv_func_epoll_create1=no 32ac_cv_header_linux_vm_sockets_h=no 33ac_cv_func_socketpair=no 34ac_cv_func_sigaction=no 35 36# symlinkat is implemented, but fails 37ac_cv_func_symlinkat=no 38 39# lchmod/lchown are implemented, but fail with ENOTSUP. 40ac_cv_func_lchmod=no 41ac_cv_func_lchown=no 42 43# geteuid / getegid are stubs and always return 0 (root). The stub breaks 44# code that assume effective user root has special permissions. 45ac_cv_func_geteuid=no 46ac_cv_func_getegid=no 47ac_cv_func_seteuid=no 48ac_cv_func_setegid=no 49ac_cv_func_getresuid=no 50ac_cv_func_getresgid=no 51ac_cv_func_setresuid=no 52ac_cv_func_setresgid=no 53 54# Syscalls not implemented in emscripten 55# [Errno 52] Function not implemented 56ac_cv_func_preadv2=no 57ac_cv_func_preadv=no 58ac_cv_func_pwritev2=no 59ac_cv_func_pwritev=no 60ac_cv_func_pipe2=no 61ac_cv_func_nice=no 62ac_cv_func_setpriority=no 63ac_cv_func_setitimer=no 64# unsupported syscall: __syscall_prlimit64 65ac_cv_func_prlimit=no 66# unsupported syscall: __syscall_getrusage 67ac_cv_func_getrusage=no 68ac_cv_func_posix_fallocate=no 69 70# Syscalls that resulted in a segfault 71ac_cv_func_utimensat=no 72ac_cv_header_sys_ioctl_h=no 73 74# sockets are supported, but only AF_INET / AF_INET6 in non-blocking mode. 75# Disable AF_UNIX and AF_PACKET support, see socketmodule.h. 76ac_cv_header_sys_un_h=no 77ac_cv_header_netpacket_packet_h=no 78 79# aborts with bad ioctl 80ac_cv_func_openpty=no 81ac_cv_func_forkpty=no 82 83# mkfifo and mknod are broken, create regular file 84ac_cv_func_mkfifo=no 85ac_cv_func_mkfifoat=no 86ac_cv_func_mknod=no 87ac_cv_func_mknodat=no 88 89# always fails with permission or not implemented error 90ac_cv_func_getgroups=no 91ac_cv_func_setgroups=no 92ac_cv_func_setresuid=no 93ac_cv_func_setresgid=no 94 95# Emscripten does not support hard links, always fails with errno 34 96# "Too many links". See emscripten_syscall_stubs.c 97ac_cv_func_link=no 98ac_cv_func_linkat=no 99 100# Emscripten's faccessat does not accept AT_* flags. 101ac_cv_func_faccessat=no 102 103# alarm signal is not delivered, may need a callback into the event loop? 104ac_cv_func_alarm=no 105