RFR(S): 8022177: Windows/MSYS builds broken
volker.simonis at gmail.com
Tue Aug 5 18:26:40 UTC 2014
could somebody please review these straightforward changes which fix
the MinGW7MSYS build on Windows:
The details of the change can be found below and in the webrev. I
think I need a sponsor for this change because it requires the
re-generation of generated-configure files (closed and open).
I also want to mention that we at SAP are using the MinGW/MSYS build
on Windows since more than a year for all our Java builds (from 4 to
8) on Windows and we're highly committed in keeping this build
Independently from this change I also have a general question related
to the MSYS build:
During an MSYS build the Windows command shell is usually called like this:
`cmd //c echo $unix_path`
As far as I understand, the double slash is needed to prevent MSYS
from rewriting '/c' to 'c:/' when calling a non-MSYS executable. But
sometimes (notably in BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS in
basic_windows.m4) we call the Windows command shell without a quoted
forward slash like this:
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"
and I don't understand why this works.
To complicate things, the MSYS environment contains its own 'cmd'
shell script in '/usr/bin/cmd' which only redirects to the
corresponding Windows command shell like so:
Unfortunately I didn't succeed in unifying all the calls to 'cmd' to a
single pattern (i.e. either `cmd //c ...`, or `/usr/bin/cmd /c ...`)
which would be desirable, because depending on the actual PATH
settings, `cmd` may either call "/usr/bin/cmd" or
Can anybody shed some light on this topic (i.e. which "cmd" we want to
call and why we have to quote "/c" differently)?
Thank you and best regards,
- Check for bsdcpio if cpio is not found. Also make the check for cpio
optional, as suggested in the bug report.
- Only do the BASIC_CHECK_SRC_PERMS check on Cygwin as it only seems
to be relavant there and because the stat utility isn't availabel in
- Same story like on Cygwin: '.bat' and '.cmd' files are not always
considered executable in MSYS causing which to not find them.
- Use "-WX" option syntax for cl options (instead of "/WX") to prevent
option rewriting by MSYS.
- Account for the fact that the MSYS file utility reports different
file types for Windows DLLs than its Cygwin counterpart.
More information about the build-dev