Skip to content

Commit a68887e

Browse files
dbosoft-fwaserdean
authored andcommitted
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 swig/cccl#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>
1 parent caa2c8c commit a68887e

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

build-aux/cccl

+16-8
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,22 @@ EOF
3333
exit $1
3434
}
3535

36-
case $MACHTYPE in
37-
*-msys)
38-
slash="-"
39-
;;
40-
*)
41-
slash="/"
42-
;;
43-
esac
36+
37+
38+
# Check for MSYS which now reports itself as cygwin in MACHTYPE
39+
if [[ -n "$MSYSTEM" ]]; then
40+
slash="-"
41+
else
42+
# fallback to old behavior
43+
case $MACHTYPE in
44+
*-msys)
45+
slash="-"
46+
;;
47+
*)
48+
slash="/"
49+
;;
50+
esac
51+
fi
4452
# prog specifies the program that should be run (cl.exe or link.exe)
4553
# We'll assume cl to start out
4654
prog=cl

0 commit comments

Comments
 (0)