caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien Nader <adrien@notk.org>
To: Stefan Hellermann <stefan@the2masters.de>
Cc: Gerd Stolpmann <info@gerd-stolpmann.de>,
	Nicolas Ojeda Bar <n.oje.bar@gmail.com>,
	caml-list@inria.fr
Subject: Re: [Caml-list] Broken 32 bit cross-compiler on 64bit host
Date: Tue, 13 Oct 2015 18:22:23 +0200	[thread overview]
Message-ID: <20151013162223.GA19702@notk.org> (raw)
In-Reply-To: <CAANYUdDBx=0i24-d_V_29cCkzEn=rgtii7nWeibR+Gmg6EOeyQ@mail.gmail.com>

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

      reply	other threads:[~2015-10-13 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08  9:43 Stefan Hellermann
2015-10-08  9:52 ` Nicolas Ojeda Bar
2015-10-08 16:42   ` Gerd Stolpmann
2015-10-09 12:27     ` Stefan Hellermann
2015-10-13 16:22       ` Adrien Nader [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151013162223.GA19702@notk.org \
    --to=adrien@notk.org \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    --cc=n.oje.bar@gmail.com \
    --cc=stefan@the2masters.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).