RFR (M): Enable OpenJDK builds on Windows with MinGW/MSYS (original) (raw)
Volker Simonis volker.simonis at gmail.com
Fri Mar 9 18:09:46 UTC 2012
- Previous message (by thread): RFR (M): Enable OpenJDK builds on Windows with MinGW/MSYS
- Next message (by thread): RFR (M): Enable OpenJDK builds on Windows with MinGW/MSYS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Mar 9, 2012 at 12:14 AM, David Holmes <david.holmes at oracle.com> wrote:
Hi Volker,
On 9/03/2012 3:39 AM, Volker Simonis wrote:
please review the following changes which make it possible to use MinGW/MSYS as underlying build environment for Windows. Because the changes touch several repositories I prepared three webrevs, all relative to http://hg.openjdk.java.net/jdk8/build For the main repository: http://cr.openjdk.java.net/~simonis/MinGWMSYS.v1/ Saw one typo: fastes
fixed
For the HotSpot repository: http://cr.openjdk.java.net/~simonis/MinGWMSYShotspot.v1/ I'm mainly looking at this from the "does it break anything" perspective, but note that in make/windows/makefiles/defs.make SYSTEMUNAME is only set when doing a full build (JDK/control). If you just try to build hotspot this will not be set, so I expect you will want to change this.
good catch! fixed.
I also found another problem if building HotSpot standalone and the output path does not exist. In that case, the computation of ABS_OUTPUTDIR for MinGW and MKS will fail for the first invocation because the directory is only created after the second, recursive invocation:
MinGW: ABS_OUTPUTDIR := (shell(shell (shell(CD) (OUTPUTDIR);(OUTPUTDIR);(OUTPUTDIR);(PWD)) MKS: ABS_OUTPUTDIR := (subst/,,(subst /,\,(subst/,,(shell (CD)(CD) (CD)(OUTPUTDIR);$(PWD)))
So I changed these to
MinGW: ABS_OUTPUTDIR := (shellmkdir−p(shell mkdir -p (shellmkdir−p(OUTPUTDIR); $(CD) (OUTPUTDIR);(OUTPUTDIR);(OUTPUTDIR);(PWD)) MKS: ABS_OUTPUTDIR := (subst/,,(subst /,\,(subst/,,(shell mkdir -p (OUTPUTDIR);<spanclass="katex"><spanclass="katex−mathml"><mathxmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mostretchy="false">(</mo><mi>C</mi><mi>D</mi><mostretchy="false">)</mo></mrow><annotationencoding="application/x−tex">(CD)</annotation></semantics></math></span><spanclass="katex−html"aria−hidden="true"><spanclass="base"><spanclass="strut"style="height:1em;vertical−align:−0.25em;"></span><spanclass="mopen">(</span><spanclass="mordmathnormal"style="margin−right:0.07153em;">C</span><spanclass="mordmathnormal"style="margin−right:0.02778em;">D</span><spanclass="mclose">)</span></span></span></span>(OUTPUTDIR);(OUTPUTDIR); <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mi>C</mi><mi>D</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(CD) </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.07153em;">C</span><span class="mord mathnormal" style="margin-right:0.02778em;">D</span><span class="mclose">)</span></span></span></span>(OUTPUTDIR);(OUTPUTDIR);<spanclass="katex"><spanclass="katex−mathml"><mathxmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mostretchy="false">(</mo><mi>C</mi><mi>D</mi><mostretchy="false">)</mo></mrow><annotationencoding="application/x−tex">(CD)</annotation></semantics></math></span><spanclass="katex−html"aria−hidden="true"><spanclass="base"><spanclass="strut"style="height:1em;vertical−align:−0.25em;"></span><spanclass="mopen">(</span><spanclass="mordmathnormal"style="margin−right:0.07153em;">C</span><spanclass="mordmathnormal"style="margin−right:0.02778em;">D</span><spanclass="mclose">)</span></span></span></span>(OUTPUTDIR);(PWD)))
which is more robust.
I was also wondering about the / to - changes but see in the README-builds.html changes that MSYS might otherwise misinterpret them.
make/windows/makefiles/rules.make As Kelly said: why the quotes? Does MinGW not handle spaces in paths the way Cygwin does? make/windows/makefiles/sa.make
Please see my answer to Kellys mail.
So changes from \ to / . Not sure about this. Seems odd that we had a mix of \ and / to start with so I can't help but wonder if there was some Cygwin issue that this was addressing. I guess as long as it works then it is okay in that sense.
This was exactly my approach here:)
I'll collect the other comments and prepare an updated webrev next week.
Thanks, Volker
Cheers, David -------
For the JDK repository http://cr.openjdk.java.net/~simonis/MinGWMSYSjdk.v1/ Please be so kind and also create three bug ids for the corresponding changes. The changes are minimal in the sense that I did "just enough" changes to be able to build on Windows with either one of the three Unix emulation environments (MKS, Cygwin, MinGW/MSYS). The main benefits of the new MinGW/MSYS based Windows build are: - no problems with make - one can simply use the make tool which comes with MinGW/MSYS - with the current MinGW/MSYS version the build is known to succeed, while the newest Cygwin 1.7.10 version is known to break the OpenJDK build (see: http://old.nabble.com/Is-anyone-able-to-build-on-Win-7-td33196055.html) - speed - the MinGW/MSYS build times are comparable to the MKS build times and is at least 50% faster than the Cygwin build times (see numbers below) The changes are intentionally against the old, "traditional" build system to fix the mentioned Cygwin problems and simplify the Windows build just now. I don't expect any problems in adapting the "new" build infrastructure to MinGW/MSYS as well in a follow-up step. More information on each change can be found in the corresponding webrevs. Timing results for the different build environments (MKS ver. 9.4, Cygwin ver. 1.7.9, MinGW/MSYS 1.0.17) for a full JDK 8 product build on a freshly booted, dual core i7 notebook with 8GB RAM, HDD and 64-bit Windows 7:
MKS -- Build times ---------- Target allproductbuild Start 2012-02-29 19:19:26 End 2012-02-29 20:07:44 00:03:10 corba 00:03:44 hotspot 00:00:30 jaxp 00:00:37 jaxws 00:39:39 jdk 00:00:36 langtools 00:48:18 TOTAL ------------------------- MinGW/MSYS -- Build times ---------- Target allproductbuild Start 2012-02-29 18:16:31 End 2012-02-29 19:10:59 00:02:57 corba 00:03:04 hotspot 00:00:32 jaxp 00:00:40 jaxws 00:46:36 jdk 00:00:36 langtools 00:54:28 TOTAL ------------------------- Cygwin -- Build times ---------- Target allproductbuild Start 2012-02-29 14:36:50 End 2012-02-29 16:05:50 00:05:47 corba 00:03:24 hotspot 00:00:33 jaxp 00:00:43 jaxws 01:17:45 jdk 00:00:39 langtools 01:29:00 TOTAL ------------------------- Regards, Volker
- Previous message (by thread): RFR (M): Enable OpenJDK builds on Windows with MinGW/MSYS
- Next message (by thread): RFR (M): Enable OpenJDK builds on Windows with MinGW/MSYS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]