Because cygwin should use / but MSYS should use - instead of a slash. But I had a discussion with the cccl maintainer on https://github.com/swig/cccl/issues/20 - he has noticed same issue and raised in in MSYS. They recommend using MSYSTEM to detect MSYS, but it is currently open if the fallback to the old behavior is necessary.
________________________________ Von: Mike Pattrick <[email protected]> Gesendet: Dienstag, 4. März 2025 18:27 An: Frank Wagner <[email protected]> Cc: [email protected] <[email protected]> Betreff: Re: [ovs-dev] [PATCH] windows: Fixed MSYS detection in CCCL. On Fri, Feb 28, 2025 at 3:32 PM Frank Wagner <[email protected]> wrote: > > 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 <[email protected]> > > --- > build-aux/cccl | 24 ++++++++++++++++-------- > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/build-aux/cccl b/build-aux/cccl > index e2426fb3e..855d24c6c 100644 > --- a/build-aux/cccl > +++ b/build-aux/cccl > @@ -33,14 +33,22 @@ EOF > exit $1 > } > > -case $MACHTYPE in > - *-msys) Hello Frank, Why not just add another case for "*-cygwin)" ? Cheers, M > - slash="-" > - ;; > - *) > - slash="/" > - ;; > -esac > + > + > +# 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="-" > + ;; > + *) > + 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 > -- > 2.48.1 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
