Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pyodide_build/_f2c_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def scipy_fix_cfile(path: Path) -> None:
text = text.replace("void(*)", "int(*)")
text = text.replace("static void f2py_setup_", "static int f2py_setup_")

# Fix Cython-generated function pointer casts for __Pyx_IsSameCFunction
# for _matfuncs_sqrtm
# TODO: not sure if this is the best place to put this, but it works
text = re.sub(
r"(__Pyx_IsSameCFunction\([^,]+,\s*)\(int\(\*\)\(void\)\)",
r"\1(void(*)(void))",
text,
)

if path.name.endswith("_flapackmodule.c"):
text = text.replace(",size_t", "")
text = re.sub(r",slen\([a-z]*\)\)", ")", text)
Expand Down
3 changes: 3 additions & 0 deletions pyodide_build/pywasmcross.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def replay_genargs_handle_linker_opts(arg: str) -> str | None:
# wasm-ld does not recognize some link flags
"--sort-common",
"--as-needed",
# macOS-specific linker flags that wasm-ld doesn't understand
"-headerpad_max_install_names",
"-dead_strip_dylibs",
]:
continue

Expand Down