target/4609: Using the `-mno-cygwin' gcc option causes an `Output filename specified twice' bug
sergey_gromov@cybiko.com
sergey_gromov@cybiko.com
Thu Oct 18 11:56:00 GMT 2001
>Number: 4609
>Category: target
>Synopsis: Using the `-mno-cygwin' gcc option causes an `Output filename specified twice' bug
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 18 11:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: sergey_gromov@cybiko.com
>Release: gcc-3.0, no patches applied
>Organization:
>Environment:
MS Windows 2000 Pro SP1 Build 2195, Intel PII-400, 128MB RAM, Cygwin binaries snapshot on 10/6/2001
>Description:
When using the `-mno-cygwin' gcc option, an `Output filename specified twice' error is reported by the cc1:
$ gcc -mno-cygwin empty.c
cc1.exe: Output filename specified twice
GCC 3.0 was compiled for a native target (i686-pc-cygwin):
$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0/specs
Configured with: /src/gcc/gcc-3.0/configure --with-gnu-as --with-gnu-ld --with-newlib -v
Thread model: single
gcc version 3.0
>How-To-Repeat:
No source code is required to repeat this bug. An empty file will go. Assuming that the `empty.c' file contains no text, just execute the command:
$ gcc -mno-cygwin empty.c
>Fix:
The bug is caused by a misprint in the `gcc/config/i386/cygwin.h' line 83:
81: #define MINGW_INCLUDES "-isystem /usr/include/mingw/g++-3 "\
82: "-isystem /usr/include/mingw/g++ "\
83: "-isystem /usr/local/include/mingw" \
^^
84: "-idirafter /usr/include/mingw"
The trailing space is happened to be -outside- of the quotes instead of being inside them. This causes the resulting macro to read like this:
... -isystem /usr/local/include/mingw-idirafter /usr/include/mingw
which leads to the loss of the `-idirafter' option and leaves the `/usr/include/mingw/' without any preceding option. Moving the trailing space on the line 81 -inside- the quotes fixes the problem:
81: #define MINGW_INCLUDES "-isystem /usr/include/mingw/g++-3 "\
82: "-isystem /usr/include/mingw/g++ "\
83: "-isystem /usr/local/include/mingw "\
^^
84: "-idirafter /usr/include/mingw"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list