More compatibility it's possible?

Thomas Schwinge
Wed Nov 13 09:23:00 GMT 2019


On 2019-11-11T04:01:46+0100, Gabriel Cortés Garcia <> wrote:
> Hello, i'm looking for some help.

I'm not completely sure what you're asking for, but let me try.

> It's possible port gcc to wasm?

You mean write a GCC back end so that GCC can generate WebAssembly (wasm)
code?  Yes, that can be done, but has not yet been done, and requires
quite a bit of effort.

It's on my (long...) list of interesting things to look into.  ;-)

I'm aware of Pip Cet's effort from two, three years ago: "Partial
WebAssembly backend",
<>.  See also the
referenced GitHub repositories ("asmjs" branches):
<>, and "Dynamic Linking" blos posts on

Some code got committed to binutils, but not (yet?) to GCC, and I don't
know what the overall status is.

> Cross-browser compiler :)

Once GCC supports '--target=[WebAssembly]', it can then be ported so that
it can itself be compiled for/on a WebAssembly system (GCC native build),
and then run inside a WebAssembly "machine" (web browser).

> Wasm to . netstandard -> compile c/c++ everywhere :D

You lost me here.  Is this about Microsoft's ".NET Standard"?

Are you asking for a GCC front end for WebAssembly (can be done, a lot of
effort), another GCC back end for ".NET Standard" (if that makes sense;
probably can be done, a lot of effort).


> Sorry my bad English.
> Thanks for your attention.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 658 bytes
Desc: not available
URL: <>

More information about the Gcc mailing list