X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:references:to:subject
	:content-type; q=dns; s=default; b=jLT9rIlo2xRZ+SP8jnINxxEaicKed
	oXwJ3nP3b4+XaxmhZbOxZ4kW7lhrATQtrIOMXg8UOZJhowN9cGFv0U4zZoSjRRuu
	o7bTJ0VFNGHbvUBHEVKu2M157sIyFG5YD6C9iziUG5dMLaKuhODmKClpdjhD69Xw
	8fNUWkIWRqklis=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:references:to:subject
	:content-type; s=default; bh=DDRJhc6ue2QYiLgqfPzwGxUt6eA=; b=Ir0
	lmlP5ImPhwbotH6Mhhh1oZJjST8gXK8XA0ioYNk3g/Ewr2rRPHqI4es2WdLPP47Y
	uLVtcbgvmsjFkjUG/1kXVkJ2k2JdobeUVwrNXr4ZOC4O4bse7Z2YdtslJGj0dxk0
	oZ/zbqmYYvN8ZkvNkXla4eU0f9pilW1APMR6yoco=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=spoke, H*UA:github.com, H*M:google
X-HELO: mail-io0-f179.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:message-id:date:from:references:to:subject         :user-agent;        bh=obslZ6Z67c+b+nErLn1qJXaaGiB2nyyyRItLpIeU1Gc=;        b=E1EkIGXGX5umfOCYappK3hCbM24MLFl+bB6tr9/uoVyCfETpkNUu+BvrjWrN5rVlX4         Rhm7tv/lSNxhg9BvM5utrx/z+xLTBh1BTMxqNHN9pa1U38sbm7xc+q9r7tdutrd6Ffch         ZBOi6XULm/s871pCt/VjpyMyWg8dAWXyPuZOeE2WsmneF022gsL9Lfbu3mNpb8ZYRVal         ZlA55OjgQqeh5fR7N3qkm1CVUVDgA9hhuHfa2a5xIIUf1z+Pb3tkqgTQhrbuHHYU+SSI         /MsTnUk4CcBbZDVwZYoqfoKiLsi0/39jG8Jw+8vTafvYArjdERVXPKgx7XDCfSnITPiw         2YJQ==
X-Gm-Message-State: AHPjjUiw9Hd/VdR3FXKEAAh+1PaMAUA2rJnfGlb9PDF8zT6KQsPnDO2v	x53mEh4oQBVqBOVNHyACWOkFMA==
X-Google-Smtp-Source: AOwi7QB90OZCiFpWbbYxvIpL1KRMjmmMwoVD3Pt8TvP43DuBkMs8AW85a3yctzGkMdR6KzRJg4HDDA==
X-Received: by 10.202.50.195 with SMTP id y186mr469562oiy.237.1505952637918;        Wed, 20 Sep 2017 17:10:37 -0700 (PDT)
Message-ID: <59c3037d.4cfdca0a.795e7.29d7@mx.google.com>
Date: Wed, 20 Sep 2017 17:10:37 -0700 (PDT)
From: Steven Penny <svnpenn@gmail.com>
X-Google-Original-From: Steven Penny
References: <59c1a4d8.072d9d0a.f9f88.5663@mx.google.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] [Updated] mingw64-{i686,x86_64} binutils, gcc (Test)
Content-Type: text/plain; charset=utf8; format=flowed
User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst)

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

