Hello, Jan.
On Tuesday, 16 August 2022 at 12:12, Jan Staněk wrote:
Hi list,
in order to be able to compile WASM natively on Fedora,
I'm trying to package wasi-libc[1] to provide the Web Assembly System
Interface.
[1]:
https://github.com/WebAssembly/wasi-libc
My trouble is that this is in essence a cross-compilation environment,
and I have zero experience in trying to package these.
Also, I did not have much luck in trying to find any related
documentation.
I'd go and take a look at the existing cross-compilation targets like
musl or avr:
https://src.fedoraproject.org/rpms/musl/blob/rawhide/f/musl.spec
https://src.fedoraproject.org/rpms/avr-libc/blob/rawhide/f/avr-libc.spec
Some issues I have run into so far:
- This is a libc implementation, which would probably conflict with the
glibc package by default. Looking at musl, the solution seems to be to
install into `/usr/{target}` prefix (i.e. `/usr/wasm32-wasi/include`).
Not really sure how this works, any pointers appreciated.
That's correct. See
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_filesystem_la...
Exceptions
* Fedora allows cross-compilers to place files in /usr/target.
- Clang seems to have issue with `-fstack-clash-protection` flag for
the
`wasm32-wasi` target. What's the proper way to adjust these?
You can filter them out. There was some discussion recently about
filtering troublesome flags from Fedora default flags:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.o...
PS. I'm maintaining two WASM-related packages which I needed to build
some Firefox extensions from source: binaryen and wabt. I'm definitely
not a good maintainer for them as I know next to nothing about WASM.
I'd appreciate a co-maintainer who knows a bit about WASM.
Regards,
Dominik
--
Fedora
https://getfedora.org | RPM Fusion
http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan