title: How to stop MinGW and MSYS from mangling path names given at the command line
body: <p>On Windows, I'm cross-compiling a program for ARM/Linux using CodeSourcery's cross-compiler suite. I use MinGW MSYS as my command interpreter, and very often it will mangle my paths and pathnames. For example, to build my program, I invoke</p>
  
  <pre><code>arm-none-linux-gnueabi-gcc.exe -Wall -g \
      -Wl,--dynamic-linker=/usr/lib/myrpath/ld-linux.so.3 \
      -Wl,-rpath=/usr/lib/myrpath \
      -I../targetsysroot/usr/include \
      myprogram.c -o myprogram
  </code></pre>
  
  <p>Of course, I want <code>/usr/lib/myrpath</code> inserted verbatim into the <code>myprogram</code> executable - the ARM Linux target I'm compiling for doesn't use MinGW or MSYS. But here's what ends up going into it:</p>
  
  <pre><code>...
  0x0000000f (RPATH)            Library rpath: [C:/MinGW/msys/1.0/lib/myrpath]
  ...
  </code></pre>
  
  <p>Not exactly what I wanted. If I invoke GCC on the cmd.exe command line directly, I get the right rpath in the executable. If I invoke GCC on the MSYS command line, I get the mangled rpath. If I invoke GCC with a Makefile that is run with make from the cmd.exe command line, I still get a mangled rpath (!)</p>
  
  <p>Any ideas how I might turn off this annoying behavior?</p>