OCaml Forge
SCM

Detail: [#1169] modify tools search order for cross compilation

Bugs: Browse | Download .csv | Monitor

[#1169] modify tools search order for cross compilation

Date:
2012-06-11 22:10
Priority:
3
State:
Open
Submitted by:
William R (william)
Assigned to:
Gabriel Kerneis (kerneis)
Hardware:
None
Resolution:
None
Severity:
None
Version:
v1.1
Component:
None
Operating System:
None
Product:
None
 
URL:
Summary:
modify tools search order for cross compilation

Detailed description
Default search order is from 1 to 8, highest number has priority :
[1-i686-pc-mingw32-ocamlc]
2-ocamlc
[3-i686-pc-mingw32-ocamlopt]
4-ocamlopt
[5-i686-pc-mingw32-ocamlc.opt]
6-ocamlc.opt
[7-i686-pc-mingw32-ocamlopt.opt]
8-ocamlopt.opt

My problem is that if i686-pc-mingw32-ocamlc is not there :
ocamlc is present and captured
i686-pc-mingw32-ocamlopt is present but not captured (version mismatch)
ocamlopt is present and captured

Now, with the patch, it becomes (1 is first searched, with highest priority) :
[1-i686-pc-mingw32-ocamlc.opt]
[2-i686-pc-mingw32-ocamlc]
3-ocamlc.opt
4-ocamlc
[5-i686-pc-mingw32-ocamlopt.opt]
[6-i686-pc-mingw32-ocamlopt]
7-ocamlopt.opt
8-ocamlopt

Other features :
- ac_check_tools instead of ac_check_tool to allow the new more intuitive search order
- ac_check_prog instead of ac_check_tool for camlp4*, ocamllex, ocamlyacc (in cross-compilation mode, those tools are searched as is without the cross prefix)
- ac_subst removed when not needed (after ac_check_prog/tool, when the value is not changed between ac_check_prog/tool and ac_subst)

This patched version is used in mxe to cross-compile cairo-ocaml, lablgtk2 and camlimages.

Regards,
William

Followup

Message
Date: 2013-08-26 07:43
Sender: Gabriel Kerneis

Thanks for the update. adrien and wmeyer discussed on #ocaml yesterday the possibility to merge cross-compilation into ocaml trunk in the next few weeks. I'll see how that goes before I merge your patches. Don't worry, I'm not forgetting them.
Date: 2013-08-22 21:09
Sender: William R

concerning the message I just sent, please consider file "patches.tar.gz"
Date: 2013-08-22 21:06
Sender: William R

Hello,
sorry I missed your questions. I think I do not receive them directly on my email (though the last one from august I got it on my email).

attached is a set of patches I took from my local fork on github.

0001-update-licence.patch : my name (do not put it if you don't want to, maybe your name would be more suitable)

0002-introduce-use-of-ac_check_tools.patch : this one is really related to the problem I explained in my first message, with default search order

0003-introduce-use-of-ac_check_prog-and-ac_check_progs-fo.patch : when cross compiling, we tell to use a special prefix, in order to use for example i686-w64-mingw32-ocamlc instead of ocamlc. But for other tools, such as camlp4, we do not need to use a prefixed i686-w64-mingw32-camlp4. In that case, we always want to use "camlp4". The appropriate command to do this is ac_check_prog, instead of ac_check_tool

0004-ac_subst-not-required-after-ac_check_tool.patch : ac_subst is not useful after ac_check_tool ...

0005-modified-README-added-markup-support-rename-in-READM.patch : ".md" is for "markdown". With this extension, github knows how to print the file nicely (see https://github.com/william3/ocaml-autoconf).

0006-update-README.patch : in my local fork, I made several changes to the README file. Please use what you want inside. I tried to make it more understandable, and to focus on real important features of ocaml-autoconf.

best regards
William R
Date: 2013-08-12 15:11
Sender: Gabriel Kerneis

Moved from Patches to Bugs
Date: 2013-08-12 14:11
Sender: Gabriel Kerneis

I would be happy to apply this, but:
- the patch you sent is incomplete (it contains only a few chunks, changing ac_check_tool to ac_check_tools.
- could you please split it in several patches, one for each logical change?

It seems that it is hidden somewhere here:
https://github.com/mxe/mxe/blob/master/src/ocaml-cairo-1-fixes.patch
But it's hard to tell what is really relevant in this big patch.

Changes:

Field Old Value Date By
File Added229: patches.tar.gz2013-08-22 21:06william
typePatches2013-08-12 15:11kerneis
assigned_tonone2013-08-12 14:11kerneis
ResolutionNone2013-08-12 14:11kerneis
File Added180: 0001-modified-behavior-when-looking-for-ocamlc-ocamlc.opt.patch2012-06-11 22:10william