How do I stop MSYS from transforming my compiler options?
Posted
by Carl Norum
on Super User
See other posts from Super User
or by Carl Norum
Published on 2010-03-12T06:05:01Z
Indexed on
2010/03/12
6:07 UTC
Read the original article
Hit count: 544
Is there a way to stop MSYS/MinGW from transforming what it thinks are paths on my command lines? I have a project that's using nmake
& Microsoft Visual Studio 2003 (yeecccch). I have the build system all ported and ready to go for GNU make
(and tested with Cygwin). Something weird is happening to my compiler flags when I try to compile in an MSYS environment, though. Here's a simplified example:
$ cl /nologo
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
/out:nologo.exe
C:/msys/1.0/nologo
LINK : fatal error LNK1181: cannot open input file 'C:/msys/1.0/nologo.obj'
As you can see, MSYS is transforming the /nologo
compiler switch into a windows path, and then sending that to the compiler. I really don't want this to happen - in fact I'd be happy if MSYS never transformed any paths - my build system had to take care of all that when I first ported to Cygwin. Is there a way to make that happen?
It does work to change the command to
$ cl -nologo
Which produces the expected results, but this build system is very large and very painful to update. I really don't want to have to go in and change every use of a /
for a flag to a -
. In particular, there may be tools that don't support the use of the -
at all, and then I'll really be stuck.
Thanks for any suggestions!
© Super User or respective owner