Re: Why does MLton depend on GCC?

Matthew Fluet <[email protected]> Wed, 30 Jan 2019 10:38:55 -0500
Newsgroups gmane.comp.lang.ml.mlton.user
Message-ID <CAMrhFL6tMdL0ZtxMSVSrdXmFaaVdz8_gmD9=Whf+aWaqHHTcXA@mail.gmail.com>
--===============7399331019985707084==
Content-Type: multipart/alternative; boundary="000000000000ca94dd0580aeb537"

--000000000000ca94dd0580aeb537
Content-Type: text/plain; charset="UTF-8"

On Wed, Jan 30, 2019 at 8:14 AM Mayuresh Kathe <[email protected]> wrote:

> I thought MLton was an independent ML compiler project with a supported
> runtime, then why does it have to depend on GCC?
>
> I just did a "sudo apt install mlton" on Ubuntu 18.04 x86_64 and I got
> the following as installables;
>    gcc gcc-7 libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrts5
>    libgcc-7-dev libgmp-dev libgmpxx4ldbl libitm1 liblsan0 libmpx2
> libquadmath0
>    libtsan0 libubsan0 linux-libc-dev manpages-dev mlton mlton-basis
>    mlton-compiler mlton-doc mlton-runtime-native
> mlton-runtime-x86-64-linux-gnu
>    mlton-tools
>
> Of the above, I can completely understand "mlton*" packages, but why
> "gcc" and it's libraries?
>

While MLton does have native x86/amd64 codegens (as well as C and LLVM
codegens), for compilation it simply generates textual .c and .s files and
uses `gcc` to compile and link them.  Thus, to compile a program with
MLton, you need a C compiler (and any of its dependencies).

--000000000000ca94dd0580aeb537
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:courier new,monospace;font-size:large"><span style=3D"font-family:=
Arial,Helvetica,sans-serif;font-size:small">On Wed, Jan 30, 2019 at 8:14 AM=
 Mayuresh Kathe &lt;<a href=3D"mailto:[email protected]">[email protected]<=
/a>&gt; wrote:</span><br></div></div><div class=3D"gmail_quote"><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex">I thought MLton was an independent M=
L compiler project with a supported <br>
runtime, then why does it have to depend on GCC?<br>
<br>
I just did a &quot;sudo apt install mlton&quot; on Ubuntu 18.04 x86_64 and =
I got <br>
the following as installables;<br>
=C2=A0 =C2=A0gcc gcc-7 libasan4 libatomic1 libc-dev-bin libc6-dev libcilkrt=
s5<br>
=C2=A0 =C2=A0libgcc-7-dev libgmp-dev libgmpxx4ldbl libitm1 liblsan0 libmpx2=
 <br>
libquadmath0<br>
=C2=A0 =C2=A0libtsan0 libubsan0 linux-libc-dev manpages-dev mlton mlton-bas=
is<br>
=C2=A0 =C2=A0mlton-compiler mlton-doc mlton-runtime-native <br>
mlton-runtime-x86-64-linux-gnu<br>
=C2=A0 =C2=A0mlton-tools<br>
<br>
Of the above, I can completely understand &quot;mlton*&quot; packages, but =
why <br>
&quot;gcc&quot; and it&#39;s libraries?<br></blockquote><div><br></div><div=
 class=3D"gmail_default" style=3D"font-family:&quot;courier new&quot;,monos=
pace;font-size:large">While MLton does have native x86/amd64 codegens (as w=
ell as C and LLVM codegens), for compilation it simply generates textual .c=
 and .s files and uses `gcc` to compile and link them.=C2=A0 Thus, to compi=
le a program with MLton, you need a C compiler (and any of its dependencies=
).</div></div></div>

--000000000000ca94dd0580aeb537--


--===============7399331019985707084==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7399331019985707084==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
MLton-user mailing list
[email protected]; [email protected]
https://lists.sourceforge.net/lists/listinfo/mlton-user

--===============7399331019985707084==--