X-Recipient: archive-cygwin AT delorie DOT 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=tmIm lzADtWcjltVGO3DxDOU+x3Az8VrTMrYcjvTew6YXLEJgiA3aMTnR/WmUzBWD8QI0 HPBka2MXaHXc9CneUpK76E9zqx682+XiGE2wbYrNvyetzuumQ3NfYOwDFz8UMQay +/KfYukRRQ+KL9GoknuqHvQMCa/jwziQNah9Gj4= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=XqUSOGg4AX 4rLPcmwP2g9o2Vq/I=; b=oZ3ZHzKo9xo5wMdYe0JnWKv4wFELF4fSjesgJWBsDD uK99VaMZKf4d7oZKunOjwPyESmPzqJHlcfEcH69F7CNYzwmabkIw3tq6xU2Zyygw WLUyZsGL3oHBJDxPWftpJkpGhbrDf7HUJl0RErSIcq+H/0+HLjIBEU1DpXcGfDIn 4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=(unknown), Compare, cygwincom, UD:cygwin.com X-HELO: mail-pf1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to; bh=hlXnwfvAoD41pN5f4TLSJWOvTMPFf/QFB1213e70rvc=; b=sOGUQlcYmMFk4Nizq6L7RSsA0OvuBskUzXU/dGQaOCKP5h0J1mWpjP9s47t9Q/9Y+J mHTVLIIerHAyIS1R7RjJZDKsbnPQ3d8M17VD5BRXWozsx6DrF3nQVFe4vFrXfQeFS12P kO/pDMgwWUVkDubQZ1RnOYVgo21OnGDZmhzsWQU7uFgsFlEXIaog2r06BWhdNWd/ZL4o D4+rqPc5H7sCfX5sU77OFJJ9PhjPZOJ7h0So+/PSJEgK83j2L7699yT+jUxsgN+ZJY9w OLMScmqg4IzHAVxYFw3sZLR+zvtiCnLG1OuaOaHC/ceok38rLgNbPOkiA49kqvqiRPis Xy0Q== Subject: Re: [ANNOUNCEMENT] [Updated] mingw64-{i686,x86_64}-gcc-7.3.0-1 (Test) To: cygwin AT cygwin DOT com References: <5b7b846f DOT 1c69fb81 DOT fdb19 DOT 08eb AT mx DOT google DOT com> From: JonY <10walls AT gmail DOT com> Openpgp: preference=signencrypt Message-ID: Date: Fri, 24 Aug 2018 10:11:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: <5b7b846f.1c69fb81.fdb19.08eb@mx.google.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="REJRn6KMthCkBYyCwcVULOj4sA2jKZZ5d" X-IsSubscribed: yes --REJRn6KMthCkBYyCwcVULOj4sA2jKZZ5d Content-Type: multipart/mixed; boundary="fPHiEa5F0h7RUYC0CsYgUPOgr6hHJrV7j"; protected-headers="v1" From: JonY <10walls AT gmail DOT com> To: cygwin AT cygwin DOT com Message-ID: Subject: Re: [ANNOUNCEMENT] [Updated] mingw64-{i686,x86_64}-gcc-7.3.0-1 (Test) References: <5b7b846f DOT 1c69fb81 DOT fdb19 DOT 08eb AT mx DOT google DOT com> In-Reply-To: <5b7b846f DOT 1c69fb81 DOT fdb19 DOT 08eb AT mx DOT google DOT com> --fPHiEa5F0h7RUYC0CsYgUPOgr6hHJrV7j Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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. >=20 > http://cygwin.com/ml/cygwin/2018-07/msg00168.html >=20 > Using this file: >=20 > =C2=A0=C2=A0 $ cat stoi.cpp > =C2=A0=C2=A0 #include > =C2=A0=C2=A0 #include > =C2=A0=C2=A0 main() { > =C2=A0=C2=A0=C2=A0=C2=A0 std::string q =3D "23456"; > =C2=A0=C2=A0=C2=A0=C2=A0 std::cout << std::stoi(q) << std::endl; > =C2=A0=C2=A0 } >=20 > I have noticed an issue with the Cygwin "x86_64-w64-mingw32-g++" > compiler. If I > strip the executable, all is well: >=20 > =C2=A0=C2=A0 $ time x86_64-w64-mingw32-g++ -s -static-libstdc++ stoi.cpp;= wc -c a.exe > =C2=A0=C2=A0 real=C2=A0=C2=A0=C2=A0 0m0.889s > =C2=A0=C2=A0 845824 a.exe >=20 > Same with Msys2: >=20 > =C2=A0=C2=A0 # time x86_64-w64-mingw32-g++ -s -static-libstdc++ stoi.cpp;= wc -c a.exe > =C2=A0=C2=A0 real=C2=A0=C2=A0=C2=A0 0m0.718s > =C2=A0=C2=A0 835584 a.exe >=20 > However if I do not strip the executable, the compile time nearly > triples and > the size increases 10 fold: >=20 > =C2=A0=C2=A0 $ time x86_64-w64-mingw32-g++ -static-libstdc++ stoi.cpp; wc= -c a.exe > =C2=A0=C2=A0 real=C2=A0=C2=A0=C2=A0 0m2.340s > =C2=A0=C2=A0 11695660 a.exe >=20 > Compare with Msys2, where the time only increases 17%, and the size only > increases 3 fold: >=20 > =C2=A0=C2=A0 # time x86_64-w64-mingw32-g++ -static-libstdc++ stoi.cpp; wc= -c a.exe > =C2=A0=C2=A0 real=C2=A0=C2=A0=C2=A0 0m0.842s > =C2=A0=C2=A0 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. --fPHiEa5F0h7RUYC0CsYgUPOgr6hHJrV7j-- --REJRn6KMthCkBYyCwcVULOj4sA2jKZZ5d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5QrdnbBX9Ppk4bbPcTtf4pwUXUUFAlt/2fQACgkQcTtf4pwU XUX02w/+JolNSWYXkgpi5PaBylUdV3m8gL6POQCSTGbA7UBYjCQ4fKqbfEfibQ// NBtdwSHEU7r7GyW+bdgK1NJGsvVtI7zkiZZ55DfLZ+VubWrT0vEUQIMEgwLsaziX CKawtZ6O9B1NVH1D55b4GfDzlFjsTBzhnGfdod7a7goOW6jpHoqRleYOz6sSTIZ4 CDppVib7GsQ41hg+QOw/XBB0IKhKGntgprZgepo1QqmDxp4/q5RVxipUXZuPJ+6k z+J7gAdgEMFxj+adtDEJLWK/iC2fyzf7JyGJ2SM4j+44tMKnltoSyp+T3mv6JDlD ltMIcEGnihyYN2MWSkJ5/zlyb/KO4W9vzneFyrmQf8ELCEjrGgD+97s6e+aa3U3a blsDxTLpW3F2eae/5JknhxwXGKVNiXO4FD8lkaK32en+4fvs89Uw1GNG63kawzBZ 0zI6TIFmeapB99KBo33DkOSdUs5p6j9idd69KIFLh+fY9YfIsAENql5HtfqW5I5I ocAEX7X276LuRxYcc77UEkzOWvE+GT2N8l/FkyqblDWt61OkcKEWVER9rK8JwbZU QRaa44eQp8crqERusobR5z4l1NJQDZKPN8nxAszWBNhKv2Xld01r4HClt9xEC8V4 tTTJa+LzZNYhXPam7K1llNei2aYm+INdWgYy43tbSASt0Nt8ti8= =v4J9 -----END PGP SIGNATURE----- --REJRn6KMthCkBYyCwcVULOj4sA2jKZZ5d--