[ANNOUNCEMENT] [Updated] mingw64-{i686,x86_64} binutils, gcc (Test)

Steven Penny svnpenn@gmail.com
Thu Sep 21 00:10:00 GMT 2017


On Tue, 19 Sep 2017 16:14:32, Steven Penny wrote:
> Looks like a Cmake error rather than GCC - thought you might like to know.
> Cmake is inserting "-isystem" instead of "-I":

Looks like I spoke too soon - I think it is a GCC error. Using this file:

$ cat alfa.cpp
#include <cstdio>
#include <functional>
int main() {
  puts("hello world");
}

5.4.0 compiles without issue:

$ x86_64-w64-mingw32-g++ --version
x86_64-w64-mingw32-g++ (GCC) 5.4.0

$ x86_64-w64-mingw32-g++ \
> -I /usr/x86_64-w64-mingw32/sys-root/mingw/include alfa.cpp

$ x86_64-w64-mingw32-g++ \
> -isystem /usr/x86_64-w64-mingw32/sys-root/mingw/include alfa.cpp

However 6.3.0 only works in certain cases:

$ x86_64-w64-mingw32-g++ \
> -I /usr/x86_64-w64-mingw32/sys-root/mingw/include alfa.cpp

$ x86_64-w64-mingw32-g++ \
> -isystem /usr/x86_64-w64-mingw32/sys-root/mingw/include alfa.cpp
In file included from
/usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/ext/string_conversions.h:41:0,
from /usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/bits/basic_string.h:5402,
from /usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/string:52,
from /usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/stdexcept:39,
from /usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/array:39,
from /usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/tuple:39,
from /usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/functional:55,
from alfa.cpp:2:
/usr/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/cstdlib:75:25: fatal error:
  stdlib.h: No such file or directory
#include_next <stdlib.h>

Now really "-I" and "-isystem" are not really needed for this example, because
that directory gets pulled in already - but it should work even with them
included. Also it is somewhat important that it do work even with the redundant
options included, because Cmake often dumps those options in with GCC commands.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list