Skip to content

Commit 7e1130f

Browse files
committed
llvm17: changes to make cpython build with latest wasi-libc
1 parent f6890ba commit 7e1130f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Modules/Setup.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ _decimal _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/con
4040
# ctypes module - flags and sources derived from pyodide
4141
# https://github.com/pyodide/pyodide/blob/main/cpython/Setup.local#L22-L23
4242
CTYPES_FLAGS=-DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1
43-
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/cfield.c _ctypes/stgdict.c $(CTYPES_FLAGS) -L/usr/local/faasm/llvm-sysroot/lib/wasm32-wasi -lffi
43+
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/cfield.c _ctypes/stgdict.c $(CTYPES_FLAGS) -lffi
4444

4545
# Hashing support - build statically as pyodide does
4646
# https://github.com/pyodide/pyodide/blob/main/cpython/Setup.local#L37-L42

Modules/timemodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,10 +1765,10 @@ PyInit_time(void)
17651765
#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_CLOCK_SETTIME) || defined(HAVE_CLOCK_GETRES)
17661766

17671767
#ifdef CLOCK_REALTIME
1768-
PyModule_AddIntMacro(m, CLOCK_REALTIME);
1768+
PyModule_AddIntMacro(m, (long) CLOCK_REALTIME);
17691769
#endif
17701770
#ifdef CLOCK_MONOTONIC
1771-
PyModule_AddIntMacro(m, CLOCK_MONOTONIC);
1771+
PyModule_AddIntMacro(m, (long) CLOCK_MONOTONIC);
17721772
#endif
17731773
#ifdef CLOCK_MONOTONIC_RAW
17741774
PyModule_AddIntMacro(m, CLOCK_MONOTONIC_RAW);

config.sub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ case $maybe_os in
118118
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119119
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
120120
kopensolaris*-gnu* | cloudabi*-eabi* | \
121-
storm-chaos* | os2-emx* | rtmk-nova* | wasi )
121+
storm-chaos* | os2-emx* | rtmk-nova* | wasi* )
122122
os=-$maybe_os
123123
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124124
;;

0 commit comments

Comments
 (0)