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 30EA57ED1D for ; Tue, 13 Oct 2015 18:22:25 +0200 (CEST) IronPort-PHdr: 9a23:JLLB3hJhmVMDtDLGltmcpTZWNBhigK39O0sv0rFitYgULfvxwZ3uMQTl6Ol3ixeRBMOAu64C27ed4/uocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC04LniqvioNX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4CLfQAWG4DM8X2ESnwBNCg7DpEXhQpr/uy3SqupwgiyTJtH7V6tyVTn0vIlxTxq9oSsdNjM/uEfehsFqxPZSrAigqhpXxYnIY8eSLvUoLfCVRs8TWWcUBpUZbCdGGI7pKtJXV+c= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=adrien@notk.org; spf=PermError smtp.mailfrom=adrien@notk.org; spf=None smtp.helo=postmaster@nautica.notk.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: PermError (mail3-smtp-sop.national.inria.fr: cannot correctly interpret sender authenticity information from domain of adrien@notk.org) identity=mailfrom; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; 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@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ACBgApLx1W/5NHeVtegyaEH7tEgVqDE4IKfwKBQjoSAQEBAQEBAQGBCYIfggcBAQEDASNWBQsLGAICBRMOAgIPBRgxiDkMrkiTSwEBAQcCAR+BIoVThH6FDQeCaTGBFAWWFo0SCFp+lkGDbygDOIQEPIckAQEB X-IPAS-Result: A0ACBgApLx1W/5NHeVtegyaEH7tEgVqDE4IKfwKBQjoSAQEBAQEBAQGBCYIfggcBAQEDASNWBQsLGAICBRMOAgIPBRgxiDkMrkiTSwEBAQcCAR+BIoVThH6FDQeCaTGBFAWWFo0SCFp+lkGDbygDOIQEPIckAQEB X-IronPort-AV: E=Sophos;i="5.17,678,1437429600"; d="scan'208";a="150420069" Received: from nautica.notk.org ([91.121.71.147]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 13 Oct 2015 18:22:24 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 6EA2EC009; Tue, 13 Oct 2015 18:22:23 +0200 (CEST) Date: Tue, 13 Oct 2015 18:22:23 +0200 From: Adrien Nader To: Stefan Hellermann Cc: Gerd Stolpmann , Nicolas Ojeda Bar , caml-list@inria.fr Message-ID: <20151013162223.GA19702@notk.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Broken 32 bit cross-compiler on 64bit host On Fri, Oct 09, 2015, Stefan Hellermann wrote: > So I think I have to build a 32 bit and a 64 bit host OCaml and select the > right one when building a cross-compiler. I faced a similar issue with luajit recently. Except that for luajit it is completely hopeless. Absolutely completely hopeless. I would expect some things to have already been done for luajit in openwrt and would advise you to check there. I forgot to look at it myself. What I'm currently doing is to setup a small private toolchain based on a static musl for the libc, libfirm/cparser for the C compiler, pcc-libs for the C runtime and binutils (cparser is a single multi-target binary that knows how to invoke binutils properly across archs). Obviously I'm not entirely happy with that but in practice it doesn't need much more CPU time and it should just work (I haven't packaged it fully yet but I can't think of possible issues there). > I sent a patch series which changes the way the configure script checks for > pointer sizes and endianess. Is this okay? It should work for all native > and cross compilation cases. Can you test and comment on them? These are > the only patches I need against OCaml to make it usable on openwrt. I haven't checked your pull request in details but the approach (complemented with XL's input in particular) seemed good to me. In any case, I am sorry that I forgot the check about endianness or more probably (it's been some time already) that I thought I would be able to solve the incompatibility itself quite quickly. Thanks for fixing that and adding one. :) -- Adrien Nader