Windows cross compiles

Salter, Thomas A Thomas.Salter at unisys.com
Mon Aug 26 15:02:31 UTC 2013


Thanks for the various suggestions.  So far, I've not found a way to get through configure for a 64-bit JVM on a 32-bit OS.  (I am able to build both 32- and 64-bit JVMs on a 64-bit OS and I can build a 32-bit JVM on a 32-bit OS.)

Here's what I've found so far:

1. With-target-bits=64 and no other special changes:
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking openjdk-build os-cpu... windows-x86
checking openjdk-target os-cpu... windows-x86
configure: error: It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead.
configure exiting with result code 1


2. Configuring as a cross-compile:
    --build=i686-pc-cygwin
    --host=x86_64-pc-cygwin
Configure references the 64-bit MS VC configure file, VC\bin\amd64\vcvars64.bat, which doesn't exist on a 32-bit installation. The correct cross-compile file is VC\bin\x86_amd64\vcvarsx86_amd64.bat.

I worked around that, and then configure compiled fixpath.exe as a 64-bit executable and of course it failed to execute.
checking if fixpath can be created... yes
checking if fixpath.exe works... no
/cygdrive/g/SALTERTA/PMBASE8/FILES/common/autoconf/../../jdk/make/closed/autoconf/generated-configure.sh: line 33396: /cygdrive/g/SALTERTA/Output8/x64/fixpath.exe: cannot execute binary file
configure: error: fixpath did not work!
configure exiting with result code 1

I presume there's no support for cross-compiling fixpath since it's only used on Windows and cross-compiling is only working for Linux..



I'm not inclined to learn autoconf so I can fix this myself.  I suspect it'll be easier to convince our internal build team to move to a 64-bit build system.


  
Tom Salter  |  Software Engineer  |  Java & Middleware Development 
Unisys  |  2476 Swedesford Road  |  Malvern, PA  19355   |  610-648-2568 |  N385-2568 






More information about the build-dev mailing list