@ai-ecoverse/wasix-f2c
v3.2.1-2
Published
Fortran 77 for slicc WASIX via f2c: static PIC libf2c.a (CLAPACK 3.2.1, Pyodide's patches), f2c.h, the f2c source with bin/build-f2c.sh, and bin/gfortran (gfortran -> f2c -> wasixcc)
Readme
@ai-ecoverse/wasix-f2c
Fortran 77 for wasm32-wasix through f2c: a build input (no slicc commands) that py-scipy compiles its Fortran with, fetched by sha256. It follows Pyodide's scipy build.
lib/libf2c.a: static and PIC (the ehpic tree's legacy wasm exceptions, as scipy's side modules), built from CLAPACK 3.2.1'sF2CLIBS/libf2cwith Pyodide's patches 0001–0007 on wasix-sysroot 2025.9.30-38. 0005 leavesc_abs/z_absto OpenBLAS (@ai-ecoverse/wasix-openblas), so the two link together.lib/pkgconfig/f2c.pchas a relocatable prefix.include/f2c.h: the header f2c output is compiled against (hoodmane/f2c's).share/f2c/src: the f2c translator's source (hoodmane/f2ccaa9abc, f2c 20240504). It's a host tool, sobin/build-f2c.sh [<out-dir>]builds it with the hostccand prints its path. Without an out dir, it builds it once into$WASIX_F2C_CACHE, else~/.cache/wasix-f2c/<version>. One tarball serves every build host.bin/gfortran: a gfortran for meson and other build systems (Python 3).- Fortran sources:
.f/.Fare translated withf2c -Rnext to the source (.Fthrough the C preprocessor first), then compiled with$WASIX_CC(defaultwasixcc) and-I<package>/include. - Links: link-only calls go to
$WASIX_CC. An executable link from Fortran addslibf2c.a, as gfortran adds libgfortran. - Identity probes: meson's (
--version,-v,-dumpversion,-dumpfullversion,-E -dM -) are answered as GNU Fortran 13.2.0 for wasm32, so no host gfortran is needed. Other queries without a source go to$REAL_GFORTRANif set. - Project fixes:
$F2C_FIXEScan name a Python file withfix_f2c_input(path),fix_f2c_output(path)andfix_args(args)hooks, for scipy's f2c fixes. - Overrides:
$F2C_PATHsets the f2c to run (an f2c on PATH isn't used unless named there), and$F2C_INCLUDEthe directory for f2c.h.
- Fortran sources:
libf2c and f2c are under the AT&T/Lucent/Bellcore notice (SMLNJ), and
bin/gfortran follows pyodide-build (MPL-2.0). See LICENSE and
THIRD-PARTY-NOTICES.md.
