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 E77C57FA80 for ; Sat, 24 Oct 2015 11:29:27 +0200 (CEST) IronPort-PHdr: 9a23:B4BznhRh+rqQ/Bj8Osqg6R64WNpsv+yvbD5Q0YIujvd0So/mwa65ZhON2/xhgRfzUJnB7Loc0qyN4/2mATRIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbqo9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4CnKUwqC/DM4X38Rg1IcMwHb7RzgGLP8qCzrnut7wiiTe8PsG/R8Ez+r6qMuTB7zlA8GMSQ4+SfZkIY42KlSpRbkox1k36bVZpuUPbxwZPWOU8kdQD8LZcFcWDBbBZv4J64OBOoIMOIS5934plAOpBa6QxKrCezz0DhQrn7wwaA+le8mFFeVj0QbA9sSvSGM/53OP6AIXLXwlfGQwA== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=michael.soegtrop@intel.com; spf=Pass smtp.mailfrom=michael.soegtrop@intel.com; spf=None smtp.helo=postmaster@mga02.intel.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of michael.soegtrop@intel.com) identity=pra; client-ip=134.134.136.20; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of michael.soegtrop@intel.com designates 134.134.136.20 as permitted sender) identity=mailfrom; client-ip=134.134.136.20; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="michael.soegtrop@intel.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mga02.intel.com) identity=helo; client-ip=134.134.136.20; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="michael.soegtrop@intel.com"; x-sender="postmaster@mga02.intel.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BLAACMTitWnBSIhoZdhApvBr4zAQ0jgTcdhgACgSw4FAEBAQEBAQEBEAEBAQEBBg0JCSEugiuCCAEBBDoPQAIBCBACEBQQMhcBDQEBBAEaiCcBDcVTAQEBAQEFAQEBAQEBAQEBGoZ5g3aBBoQ7AQEfMwWDGoEUBZY2AYUbpDUfAQGCUxYHgVVyhVg6gQYBAQE X-IPAS-Result: A0BLAACMTitWnBSIhoZdhApvBr4zAQ0jgTcdhgACgSw4FAEBAQEBAQEBEAEBAQEBBg0JCSEugiuCCAEBBDoPQAIBCBACEBQQMhcBDQEBBAEaiCcBDcVTAQEBAQEFAQEBAQEBAQEBGoZ5g3aBBoQ7AQEfMwWDGoEUBZY2AYUbpDUfAQGCUxYHgVVyhVg6gQYBAQE X-IronPort-AV: E=Sophos;i="5.20,192,1444687200"; d="scan'208";a="151624896" Received: from mga02.intel.com ([134.134.136.20]) by mail3-smtp-sop.national.inria.fr with ESMTP; 24 Oct 2015 11:29:25 +0200 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 24 Oct 2015 02:29:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,192,1444719600"; d="scan'208";a="587144262" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by FMSMGA003.fm.intel.com with ESMTP; 24 Oct 2015 02:29:22 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.98]) by IRSMSX104.ger.corp.intel.com ([169.254.5.150]) with mapi id 14.03.0248.002; Sat, 24 Oct 2015 10:29:21 +0100 From: "Soegtrop, Michael" To: Xavier Leroy , "caml-list@inria.fr" Thread-Topic: [Caml-list] Effect of Windows LLP64 architecture on 64 bit MingW OCaml Thread-Index: AdENmsKQlrGb4SdjTW+mxn2nfuieSgACo8EAACYH9CA= Date: Sat, 24 Oct 2015 09:29:20 +0000 Message-ID: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3315A@IRSMSX102.ger.corp.intel.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE32E38@IRSMSX102.ger.corp.intel.com> <562A5C92.50206@inria.fr> In-Reply-To: <562A5C92.50206@inria.fr> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Effect of Windows LLP64 architecture on 64 bit MingW OCaml Dear Xavier, yes, it answers my question, thanks! Andreas Hauptmann gave a similar answe= r before, but apparently as private mail. So let me post my reply here on t= he list: Dear Andreas, thanks for the pointers and details! Because the web doc is way outdated (h= ttps://ocaml.org/docs/install.html states there is just a 32 bit mingw buil= d) I mistakenly tried to build mingw64 with configure and stumbled over a f= ew bad uses of long in auto-aux stuff. But I agree that the main part of Oc= aml looks clean in this respect. Just some libraries look a bit fishy, e.g. CAMLprim value unix_write(value fd, value buf, value vofs, value vlen) { long ofs, len, written; int numbytes, ret; char iobuf[UNIX_BUFFER_SIZE]; Begin_root (buf); ofs =3D Long_val(vofs); len =3D Long_val(vlen); This assignment of Long_val to a long doesn't seem to be correct. Or is thi= s function just used for Linux? There are just 190 occurrences of \blong\b = in the whole sources. It might make sense to remove all such uses outside o= f OS abstraction files. Btw.: The configure mechanism is not that bad for Mingw builds on Cygwin, i= f host, target and prefix are set properly. The main problems are: - config/auto-aux/runtest and its users get confused by Mingw test apps ret= urning strings terminated with \r\n instead of \n. Piping the output throug= h tr -d '\r' fixes this. - bad uses of long in auto-aux files, e.g. endian.c - The flexlink handling needs some fixes - 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 compiler= is build, the one on which the built compiler runs and the one for which i= t generates code. For gcc all 3 are configurable. Some configure/make thing= s are clearer and easier if all 3 OSes are known. E.g. pathes tend to be d= ifferent on the build and host OS when building a Mingw compiler on Cygwin. I think it might be not so much work to get rid of the separate make files = and use configure for mingw and cygwin builds as well. Best regards, Michael Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul Chairperson of the Supervisory Board: Tiffany Doon Silva Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928