Skip to content

Mingw cross compilation improvements#493

Merged
gasche merged 2 commits intoocaml:4.03from
adrien-n:mingw-cross-compilation-improvements
Mar 7, 2016
Merged

Mingw cross compilation improvements#493
gasche merged 2 commits intoocaml:4.03from
adrien-n:mingw-cross-compilation-improvements

Conversation

@adrien-n
Copy link
Copy Markdown
Contributor

@adrien-n adrien-n commented Mar 5, 2016

These two patches fix "regressions" for my use-case of cross-compilers to mingw-w64. They've been introduced less than two months ago.

First patch de-duplicates otherlibs/win32unix/Makefile{.nt,}; a duplication for which I was probably to blame in the first place.

Second patch ensures ".so" doesn't get hard-coded in the ocamlmklib configuration at compile-time.

PS: I use these on top of the changes mentionned in http://caml.inria.fr/mantis/view.php?id=7122 , http://caml.inria.fr/mantis/view.php?id=7121 and skipping the installation of ocamlyacc and ocamlrun when building the cross-compiler; the sum of all these and a bit of findlib config is all that is needed nowadays.

@gasche
Copy link
Copy Markdown
Member

gasche commented Mar 5, 2016

If this was a PR against trunk, I would merge it in confidence (I looked at it and it seemed fine). I won't merge last-minute changes in 4.03 without @damiendoligez's review.

@damiendoligez damiendoligez added this to the 4.03.0 milestone Mar 7, 2016
@damiendoligez
Copy link
Copy Markdown
Member

Looks good.

@adrien-n Do you have a document somewhere that summarizes how you do cross-compilation?

gasche added a commit that referenced this pull request Mar 7, 2016
…ments

Mingw cross compilation improvements
@gasche gasche merged commit bde0cbe into ocaml:4.03 Mar 7, 2016
@adrien-n
Copy link
Copy Markdown
Contributor Author

adrien-n commented Mar 7, 2016

Thanks!

I don't have a document, yet. I've been working on a large batch of changes in win-builds and I'm not finished with it yet.

There isn't much magic anymore exccept that I use a linux ocamlrun to run an ocamlc that got cross-compiled. That wasn't really planned and I think I got to that point by pure luck when updating my previous patchset to trunk in January. It just happened to work. As far as I understand, it's the same as for other platforms now but yes, it also works for Windows and can create .opt binaries even though I haven't tried using them.

stedolan pushed a commit to stedolan/ocaml that referenced this pull request May 24, 2022
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants