public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: JonY <10walls@gmail.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] [Updated] mingw64-{i686,x86_64}-gcc-7.3.0-1 (Test)
Date: Fri, 24 Aug 2018 19:06:00 -0000	[thread overview]
Message-ID: <c80de729-677c-5125-e703-efb784e8febe@gmail.com> (raw)
In-Reply-To: <5b7b846f.1c69fb81.fdb19.08eb@mx.google.com>


[-- Attachment #1.1: Type: text/plain, Size: 1643 bytes --]

On 08/21/2018 03:18 AM, Steven Penny wrote:
> On Wed, 18 Jul 2018 10:38:22, JonY wrote:
>> The mingw-w64 cross compilers have been updated:
>>
>> * mingw64-i686-gcc-7.3.0-1
>> * mingw64-x86_64-gcc-7.3.0-1
>>
>> It is available under the test version.
> 
> http://cygwin.com/ml/cygwin/2018-07/msg00168.html
> 
> Using this file:
> 
>    $ cat stoi.cpp
>    #include <iostream>
>    #include <string>
>    main() {
>      std::string q = "23456";
>      std::cout << std::stoi(q) << std::endl;
>    }
> 
> I have noticed an issue with the Cygwin "x86_64-w64-mingw32-g++"
> compiler. If I
> strip the executable, all is well:
> 
>    $ time x86_64-w64-mingw32-g++ -s -static-libstdc++ stoi.cpp; wc -c a.exe
>    real    0m0.889s
>    845824 a.exe
> 
> Same with Msys2:
> 
>    # time x86_64-w64-mingw32-g++ -s -static-libstdc++ stoi.cpp; wc -c a.exe
>    real    0m0.718s
>    835584 a.exe
> 
> However if I do not strip the executable, the compile time nearly
> triples and
> the size increases 10 fold:
> 
>    $ time x86_64-w64-mingw32-g++ -static-libstdc++ stoi.cpp; wc -c a.exe
>    real    0m2.340s
>    11695660 a.exe
> 
> Compare with Msys2, where the time only increases 17%, and the size only
> increases 3 fold:
> 
>    # time x86_64-w64-mingw32-g++ -static-libstdc++ stoi.cpp; wc -c a.exe
>    real    0m0.842s
>    3001138 a.exe


Can you try breaking it down by phases?
1. Preprocessor phase with -E -o file.ii
2. Compile phase (compile output from phase 1) with -c
3. Link phase, point gcc to the output from phase 2.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-08-24 10:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 23:52 JonY
2018-08-21 15:16 ` Steven Penny
2018-08-24 19:06   ` JonY [this message]
2018-08-25  4:55     ` Steven Penny
2018-08-26 14:04       ` JonY
2018-08-27  3:32         ` Steven Penny
2018-08-26 15:17       ` Hans-Bernhard Bröker
2018-08-26 21:41         ` Steven Penny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c80de729-677c-5125-e703-efb784e8febe@gmail.com \
    --to=10walls@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).