[MLton] Patch for modern x86_64-pc-cygwin and x86_64-w64-mingw32
Kent Wilson <[email protected]> Mon, 17 Apr 2017 12:08:38 -0400
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <CABYib37uufnCdau9p51N+4NT-JAWeDSUYRP021Cr3t5Y=Q+GsA@mail.gmail.com> |
--001a11414e2c0ebd5d054d5f01f7 Content-Type: multipart/alternative; boundary=001a11414e2c0ebd58054d5f01f5 --001a11414e2c0ebd58054d5f01f5 Content-Type: text/plain; charset=UTF-8 Hi, I've been working with these platforms for a while and have been self patching the source code to get the runtimes, and mlton-compile executable to work. I have attached a patch that gets the mentioned platforms working. There are two problems that I have identified: 1) GCC compilers newer than 4.8 create the same symbol names as *NIX platforms (at least for the x86_64 code generators). I have added Architecture checks to the Control.labelsHaveExtra_ call in mlton/main/main.fun that correct the compiler on those platforms. I do not know if the Darwin platform has changed, so it is left as is. 2) The recent git commits that added SIGALT_STACK checks have broken compiling the runtime for the mentioned platforms. I have added the necessary defines to the platform headers. As a side note, I have a native amd64 codegen compiler working on OpenBSD amd64 for both 5.9 and 6.0. Thank you, -- Kent Wilson --001a11414e2c0ebd58054d5f01f5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi,<div><br></div><div>I've been working with these pl= atforms for a while and have been self patching the source code to get the = runtimes, and mlton-compile executable to work. I have attached a patch tha= t gets the mentioned platforms working.</div><div><br></div><div>There are = two problems that I have identified:</div><div><br></div><div>1) GCC compil= ers newer than 4.8 create the same symbol names as *NIX platforms (at least= for the x86_64 code generators). I have added Architecture checks to the= =C2=A0Control.labelsHaveExtra_ call in mlton/main/main.fun that correct the= compiler on those platforms. I do not know if the Darwin platform has chan= ged, so it is left as is.</div><div><br></div><div>2) The recent git commit= s that added SIGALT_STACK checks have broken compiling the runtime for the = mentioned platforms. I have added the necessary defines to the platform hea= ders.</div><div><br></div><div>As a side note, I have a native amd64 codege= n compiler working on OpenBSD amd64 for both 5.9 and 6.0.</div><div><br></d= iv><div>Thank you,<br clear=3D"all"><div><br></div>-- <br><div class=3D"gma= il_signature">Kent Wilson<br><br></div> </div></div> --001a11414e2c0ebd58054d5f01f5-- --001a11414e2c0ebd5d054d5f01f7 Content-Type: application/octet-stream; name="mingw-cygwin-fixes.patch" Content-Disposition: attachment; filename="mingw-cygwin-fixes.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j1mba9gy0 RnJvbSBiMzA4ZDU0YjNmYzZlNWY0NDNlMTgxZmVmNzQ0NGMxMjE1M2NjYTY1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLZW50IFdpbHNvbiA8a2VudGxhbmV3aWxzb25AZ21haWwuY29t PgpEYXRlOiBNb24sIDE3IEFwciAyMDE3IDExOjI2OjUxIC0wNDAwClN1YmplY3Q6IFtQQVRDSCAx LzNdIEFkZGVkIG5lZWRlZCBkZWZpbmUgZm9yIE5FRURTX1NJR0FMVFNUQUNLX0VYRUMgZm9yIHRo ZQogbWluZ3cgcGxhdGZvcm0KCi0tLQogcnVudGltZS9wbGF0Zm9ybS9taW5ndy5oIHwgMSArCiAx IGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKykKCmRpZmYgLS1naXQgYS9ydW50aW1lL3BsYXRm b3JtL21pbmd3LmggYi9ydW50aW1lL3BsYXRmb3JtL21pbmd3LmgKaW5kZXggNWZjZDQ0YS4uZjk5 MzUyZSAxMDA2NDQKLS0tIGEvcnVudGltZS9wbGF0Zm9ybS9taW5ndy5oCisrKyBiL3J1bnRpbWUv cGxhdGZvcm0vbWluZ3cuaApAQCAtMzQsNiArMzQsNyBAQAogI2RlZmluZSBIQVNfTVNHX0RPTlRX QUlUIEZBTFNFCiAjZGVmaW5lIEhBU19SRU1BUCBUUlVFCiAjZGVmaW5lIEhBU19TSUdBTFRTVEFD SyBGQUxTRQorI2RlZmluZSBORUVEU19TSUdBTFRTVEFDS19FWEVDIEZBTFNFCiAjZGV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ICAgICAgIHwgRGFyd2luID0+IHRydWUKLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHwgTWluR1cgPT4gdHJ1ZQorICAgICAgICAgQ29udHJv bC5sYWJlbHNIYXZlRXh0cmFfIDo9IChjYXNlICh0YXJnZXRPUywgdGFyZ2V0QXJjaCkgb2YKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEN5Z3dpbiwgWDg2KSA9PiB0 cnVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IChEYXJ3aW4sIFg4 NikgPT4gdHJ1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAoRGFy d2luLCBBbWQ2NCkgPT4gdHJ1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgfCAoTWluR1csIFg4NikgPT4gdHJ1ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgfCBfID0+IGZhbHNlKQogICAgICAgdmFsIF8gPQogICAgICAgICAgY2h1bmsgOj0K LS0gCjIuNy40Cgo= --001a11414e2c0ebd5d054d5f01f7 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --001a11414e2c0ebd5d054d5f01f7 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ MLton-devel mailing list [email protected]; [email protected] https://lists.sourceforge.net/lists/listinfo/mlton-devel --001a11414e2c0ebd5d054d5f01f7--