I'm trying to cross-compile OpenJDK from x86_64 to mingw64. There are some minor fixes necessary on the OpenJDK side, but the largest discrepancy is the difference in file system layout between mingw and native builds: native import libraries use .lib, mingw uses .dll.a, native import libraries are in the same directory as the DLL, but with mingw, it's separate.
Are there some tricks to work around this, or is this just how things are? Why isn't the file system layout closer to what appears to be typical for native builds?
Florian Weimer schreef op di 29-04-2014 om 13:07 [+0200]:
I'm trying to cross-compile OpenJDK from x86_64 to mingw64. There are some minor fixes necessary on the OpenJDK side, but the largest discrepancy is the difference in file system layout between mingw and native builds: native import libraries use .lib, mingw uses .dll.a, native import libraries are in the same directory as the DLL, but with mingw, it's separate.
Are there some tricks to work around this, or is this just how things are? Why isn't the file system layout closer to what appears to be typical for native builds?
Hi,
I guess with 'native' you mean a native Windows environment, correct? When you try to build libraries using MSVC then you'll end up with .dll and .lib files. These .lib files are import libraries which are incompatible with the ones generated by gcc (mingw). Therefore we only provide .dll.a files in Fedora and no .lib files.
Because we are using gcc the shared libraries are placed automatically in a 'bin' folder while all import libraries are placed automatically in a 'lib' folder. End-users usually can ignore files in the 'lib' folder.
Regards,
Erik van Pienbroek
On 04/30/2014 02:34 PM, Erik van Pienbroek wrote:
I guess with 'native' you mean a native Windows environment, correct? When you try to build libraries using MSVC then you'll end up with .dll and .lib files. These .lib files are import libraries which are incompatible with the ones generated by gcc (mingw). Therefore we only provide .dll.a files in Fedora and no .lib files.
Oh, this is kind of surprising. I'll treat these files like .lib files in the build system nevertheless, and we'll see how that will work out.
It turns out that all the issues I encountered so far are really just very minor, compared to what's coming up. :-/