2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

windows: Fixed MSYS detection in CCCL.

Fixed a path mapping problem (slash replaced by path) with current msys versions.

cccl assumes that MACHTYPE contains "-msys" on msys and then configures slashes to
'-' to avoid path mapping problems with slashes. However, at least in the current
MSYS version, MACHTYPE reports as cygwin. A better way to detect MSYS is to use
the MSYSTEM variable.
I'm assuming that this check has been failing for a while, but not causing cccl
to fail, but in current MSYS versions the path mapping logic has changed.

See also https://github.com/swig/cccl/issues/20

Signed-off-by: Frank Wagner <frank.wagner@dbosoft.eu>
Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
This commit is contained in:
Frank Wagner 2025-02-28 19:37:33 +00:00 committed by Alin Gabriel Serdean
parent caa2c8c773
commit a68887e1f1

View File

@ -33,6 +33,13 @@ EOF
exit $1
}
# Check for MSYS which now reports itself as cygwin in MACHTYPE
if [[ -n "$MSYSTEM" ]]; then
slash="-"
else
# fallback to old behavior
case $MACHTYPE in
*-msys)
slash="-"
@ -41,6 +48,7 @@ case $MACHTYPE in
slash="/"
;;
esac
fi
# prog specifies the program that should be run (cl.exe or link.exe)
# We'll assume cl to start out
prog=cl