From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4BA677FA80 for ; Sat, 24 Oct 2015 13:16:55 +0200 (CEST) IronPort-PHdr: 9a23:g7AFYhOxLIy5HUdyabol6mtUPXoX/o7sNwtQ0KIMzox0KPT8rarrMEGX3/hxlliBBdydsKIZzbKO+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStOU15z//tvx0qOQSj0AvCC6b7J2IUf+hiTqne5Sv7FfLL0swADCuHpCdrce72ppIVWOg0S0vZ/or9ZLuh5dsPM59sNGTb6yP+FhFeQZX3waNDV/38rmugXZShPLrl4dWWUfnx4CS1zA7Rr6V5r19DD9u+Vhwi6CFczwUb0wHz+l6vE4ZgXvjXIoOiQ1uFrLjchoiatdplr1phpxxKbbbZuZceFieafFeNocQyxNU5ACBGR6HoqgYt5XXKI6NuFCoty4/gNWoA== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=info@gerd-stolpmann.de; spf=None smtp.mailfrom=info@gerd-stolpmann.de; spf=None smtp.helo=postmaster@mout.kundenserver.de Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.17.24; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.17.24; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.17.24; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DDAAB5ZytWnBgR49RdhApvwCEXBoYAAoEsPBABAQEBAQEBARABAQEBAQYNCQkhLoIrgggBAQMBVSQFCwsSNEkBDQYTCYgfDAmzNm+RDwEBAQEBBQEBAQEWCYV8hXmEZyYHgi4MQ4ExBYdCjnSBAQKMH4FZhzwEjyaDcDiCPBYHgVdwAYcXAQEB X-IPAS-Result: A0DDAAB5ZytWnBgR49RdhApvwCEXBoYAAoEsPBABAQEBAQEBARABAQEBAQYNCQkhLoIrgggBAQMBVSQFCwsSNEkBDQYTCYgfDAmzNm+RDwEBAQEBBQEBAQEWCYV8hXmEZyYHgi4MQ4ExBYdCjnSBAQKMH4FZhzwEjyaDcDiCPBYHgVdwAYcXAQEB X-IronPort-AV: E=Sophos;i="5.20,192,1444687200"; d="asc'?scan'208";a="151630664" Received: from mout.kundenserver.de ([212.227.17.24]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2015 13:16:54 +0200 Received: from office1.lan.sumadev.de ([178.4.216.3]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0Linfx-1aNu7o0xVV-00cuyS; Sat, 24 Oct 2015 13:16:49 +0200 Received: from [192.168.65.10] (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 16775DC05D; Sat, 24 Oct 2015 13:16:48 +0200 (CEST) Message-ID: <1445685398.4567.70.camel@e130.lan.sumadev.de> From: Gerd Stolpmann To: "Soegtrop, Michael" Cc: Xavier Leroy , "caml-list@inria.fr" Date: Sat, 24 Oct 2015 13:16:38 +0200 In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3315A@IRSMSX102.ger.corp.intel.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE32E38@IRSMSX102.ger.corp.intel.com> <562A5C92.50206@inria.fr> <0F7D3B1B3C4B894D824F5B822E3E5A172CE3315A@IRSMSX102.ger.corp.intel.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-+58aFozwillTGAFcUaja" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-Provags-ID: V03:K0:a+CTix8H4a7vhqZiwrSkdVqrPCMCRa2wM1qcb4TEDQZe81PPub3 gQo3I5+QXK/qFLqRTBp8iUodJWf4K0Ic/q+M01zTcy5d0lm4FAn1aEN2InNiCeHQwVgY8ri WXqKuRh4w37PCu2TBI64B4pal+3qoWy76RfWwgMZhVTsR2sRC6B2w8z78kinc3RFVEuPqY8 bqeNLIBncXcc7Lr7QHHZg== X-UI-Out-Filterresults: notjunk:1;V01:K0:f3j4dEFibDU=:4uU5eTHyy4sh0NutMCDI9I 8QD38mW7hvpAFcCwncZgA3DGb3ofaqGxVuVTkrjdAshhDKI65c62+/6uQt5KL+x66k3d+1YYn +4XfvZyTgQizztGP9IElih9L17ccE5IK6K8wcZ+NCFOSUVUEOTfwFlkYQ+keYwdjzT/R+a3mY owZMetu/aIDA3v6LB9alEZYhFM2srle9HzX5jxk71cL2pnAdbnEMIdmJTnpLcVYNCShJex7fg mR9oAR7zB4VTgUExsUzxkyCh5yYWtVW2+FZeorlpQ52zCD238IjNTir2FchX4A4rzgKWoJePh 0lEegoHUcSPWsFJFBs7cuMhkWByG420cI20Y17b0kGAWMACTAfL49EJcsG+T8GJiMnkaSkVjy cpiS9rsWqneemKtJAFdDNaI4Xf73XXyYJCdnDrssrhvUbqXhLNgBnzSZGm3b3zYaXhkxXH0du eVSagymESHIn+hxnxhci/eCnYs8jgXuh0TGxlHZLMHwQLr4cwXwNLuNgqD9dPUI60P6ixVzRU Cu9fcLnur7JNOUg2383BCz2DliuFtGjiPpKC1+E/ymWG2Xe0ClUIdCnVzrhWP6gpzFyYPKi/J TrQFeYpJSdXoLHiRGXUObY8YXnUi9ofDYiKhTfdXGiZ6F6x2lOxqL34S2R3APa70hbGNZqM+X etfaF1A2Og0CuD+zYT+g15YUL2CviOKv5OAIzblDCDa2uDBzGWTHb9dCFsnD1XAyoKz8= Subject: Re: [Caml-list] Effect of Windows LLP64 architecture on 64 bit MingW OCaml --=-+58aFozwillTGAFcUaja Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Am Samstag, den 24.10.2015, 09:29 +0000 schrieb Soegtrop, Michael: > Just some libraries look a bit fishy, e.g. >=20 > CAMLprim value unix_write(value fd, value buf, value vofs, value vlen) { > long ofs, len, written; > int numbytes, ret; > char iobuf[UNIX_BUFFER_SIZE]; >=20 > Begin_root (buf); > ofs =3D Long_val(vofs); > len =3D Long_val(vlen); >=20 > This assignment of Long_val to a long doesn't seem to be correct. Or is t= his function just used for Linux? Exactly. There is also win32unix/write.c: CAMLprim value unix_write(value fd, value buf, value vofs, value vlen) { intnat ofs, len, written; DWORD numbytes, numwritten; char iobuf[UNIX_BUFFER_SIZE]; DWORD err =3D 0; Begin_root (buf); ofs =3D Long_val(vofs); len =3D Long_val(vlen); The organization of the sources is a bit tricky there. Some files are copied from unix/ to win32unix/ and some aren't, like write.c. > - It is way odd that there is no -build option to configure like with gcc= . A compiler build needs to be aware of 3 OSes: the one on which the compil= er is build, the one on which the built compiler runs and the one for which= it generates code. For gcc all 3 are configurable. Some configure/make thi= ngs are clearer and easier if all 3 OSes are known. E.g. pathes tend to be= different on the build and host OS when building a Mingw compiler on Cygwi= n. Officially, the OCaml build doesn't support that host arch <> build arch. (Remember, this is a feature gcc supports, and nothing "a compiler needs to be aware of".) But anyway, the situation is a little bit different than for a C compiler. OCaml uses bytecode for bootstrapping, and you can e.g. run the bytecode executables built for arch X on arch Y with the ocamlrun for arch Y. So, if you wanted, you can have host <> build on your own. Windows in particular is very special, because the distinction build/host makes only sense for some aspects, as you can run the host executables on the build system. You mention paths, but this is also non-critical, because Cygwin also accepts native paths with forward slashes. What remains is finally LF vs CR/LF, but this can also be addressed by other means. That said, this is only the explanation why host<>build was so far not of special interest. > I think it might be not so much work to get rid of the separate make file= s and use configure for mingw and cygwin builds as well. The Makefile.nt system exists mainly for the MSVC build. I also think that the mingw build would be better done with the Makefiles. Gerd --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-+58aFozwillTGAFcUaja Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJWK2iWAAoJEAaM4b9ZLB5Tfp0IAIwWG9FwojpjGvFqZoTNcIEt jzQ2EsVQhXFo8n+TVAn1TYov0T0/4bvx289u/sQHgq3IbGdTtQEp1J+uAaPyNZmb ZXWLLOt5m62nLhWKBUwfG9pz1ljCx6z8kj2ChWh4phYUng2T+nlW/yi2VFw44DEC 3grCu5JaMJowTsMLGTt/UMdGvZ13uAeKd7v85FoFe9yahAJv/MYRiTAN14/OIXmY 9zfzTSbNlws9DzSOVuX2w5uLc0np7cImIPiT0izDwW1amD9iJ6gobICZhyZzlw0k 67tnyh171U4fqitHHMAHdnb+vYhZDZjqRrtjPlA5HCua2VHs550POAppOqDCh1M= =zMcp -----END PGP SIGNATURE----- --=-+58aFozwillTGAFcUaja--