ocaml / flexdll

a dlopen-like API for Windows
Other
98 stars 30 forks source link

Cygwin64 support #1

Closed elfmimi closed 9 years ago

elfmimi commented 9 years ago

I wanted to use ocaml, shared libraries enabled, in x86_64 Cygwin. So I tryed to figure out how good the flexdll development version is doing. I've found several minor problems and managed to fix those myself. Could you please take a look and merge these changes?

Now I'm thinking of generating "JMP *__imp_XXX" thunks to avoid "target is too far" error.

alainfrisch commented 9 years ago

Thanks! I'm concerned by the change to the Makefile: it will build the support objects using "gcc", which is either the 32-bit version or the 64-bit one (depending on whether you are under Cygwin32 or Cygwin64). In order to produce a binary distribution including both the 32-bit and the 64-bit versions of the cygwin objects, one would need to have the two versions of Cygwin installed and call their respective gcc. Unless there is a way to cross-compile from Cygwin32 to Cygwin64 or the opposite?

elfmimi commented 9 years ago

This must make it possible to build the support objects for both Cygwin32 and Cygwin64 at the same time. Still, "make demo_cygwin" wouldn't work under Cygwin64 and vice versa. Because flexlink under Cygwin32/64 is solely using "gcc" as to facilitate the linking process. To cross-compile, one will need to have cygwin32-gcc-core installed under Cygwin64 or cygwin64-gcc-core for Cygwin32.

alainfrisch commented 9 years ago

Thanks! I've pushed a change to support running the demo_cygwin64 target under Cygwin32 (assuming Cygwin64 is installed under c:/cygwin64).

elfmimi commented 9 years ago

Thanks, Alain. I appreciate your quick response. Just in case you might want to attribute the patch, please use the name Ein Terakawa.