[sr #111333] AC_CHECK_FUNCS fails when cross-compiling to wasm32

Paul Eggert <[email protected]> Tue, 4 Nov 2025 10:48:25 -0500 (EST)
Newsgroups gmane.comp.sysutils.autoconf.bugs
Message-ID <[email protected]>
Follow-up Comment #1, sr #111333 (group autoconf):


> While calling with incompatible arguments is undefined
> behavior in C but compiles, in WASM this is fully unsupported and linking
> fails.
That's too bad, as it breaks autoconf-generated shell scripts. Perhaps you can
add a flag (or lobby for a flag) to wasm-ld so that it does not emit this
overenthusiastic diagnostic.
> Is it possible to run autoconf in a wasm32 cross-compile argument without
> invoking this wasm-ld-unsupported undefined behavior?
Not conveniently.

You can work around this particular problem by hotwiring the appropriate shell
variable, e.g., './configure ac_cv_func_strnlen=yes'. But you'll probably run
into more problems like that. Your best bet is to cajole wasm-ld into
succeeding on tests like that.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?111333>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaQogSQAKCRCqLAuaBUf3
Ti4PAQDRtrZOPUPgh5dYI5qfULxGU9vprjejPmd2IMu4loS7YAEAsvZZiFThXijw
5hbF3f4C0d59tt1vcIhnQQZ/GDi9jQM=
=OO/f
-----END PGP SIGNATURE-----