From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2287 invoked by alias); 8 May 2015 21:57:59 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 2278 invoked by uid 89); 8 May 2015 21:57:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mailout01.t-online.de Received: from mailout01.t-online.de (HELO mailout01.t-online.de) (194.25.134.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 May 2015 21:57:58 +0000 Received: from fwd33.aul.t-online.de (fwd33.aul.t-online.de [172.20.27.144]) by mailout01.t-online.de (Postfix) with SMTP id A83A657E334 for ; Fri, 8 May 2015 23:57:54 +0200 (CEST) Received: from [192.168.2.103] (TF8EKvZbQhRFGgvR27AV5l6qaiiLjPkWznLaYfbcqIvBPigh0IKFCCwm0CZmNiwZOj@[79.224.104.54]) by fwd33.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1YqqHK-1fXSk40; Fri, 8 May 2015 23:57:54 +0200 Message-ID: <554D3160.1050101@t-online.de> Date: Fri, 08 May 2015 23:03:00 -0000 From: Christian Franke User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: mingw64-* regression: LTO builds fail Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00104.txt.bz2 After upgrading to recent mingw64 toolchain, builds with link time optimizer fail during linking. Testcase: $ cat true.c int main() { return 0; } $ cygcheck -f /usr/bin/i686-w64-mingw32-gcc mingw64-i686-gcc-core-4.9.2-1 $ cygcheck -f /usr/bin/i686-w64-mingw32-ld mingw64-i686-binutils-2.25.0.1.23f238d-1 $ i686-w64-mingw32-gcc -flto true.c /tmp/ccukCXyi.ltrans0.ltrans.o:ccukCXyi.ltrans0.o:(.text+0x0): multiple definition of `main' /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):/usr/src/debug/mingw64-i686-runtime-4.0.2-1/crt/crt0_c.c:17: first defined here /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o): In function `main': /usr/src/debug/mingw64-i686-runtime-4.0.2-1/crt/crt0_c.c:18: undefined reference to `WinMain@16' collect2: error: ld returned 1 exit status Same with x86_64 mingw. Downgrading the mingw64 binutils package helps: $ cygcheck -f /usr/bin/i686-w64-mingw32-gcc mingw64-i686-gcc-core-4.9.2-1 $ cygcheck -f /usr/bin/i686-w64-mingw32-ld mingw64-i686-binutils-2.24.0.3.85cf705-1 $ i686-w64-mingw32-gcc -flto true.c May or may not be an upstream issue. The current mingw64 toolchain on Debian jessie (gcc 4.9.1-19+14.3, binutils 2.25-5+5.2) works as expected. Christian -- 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