From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19901 invoked by alias); 3 Feb 2011 19:34:35 -0000 Received: (qmail 19667 invoked by uid 22791); 3 Feb 2011 19:34:32 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Feb 2011 19:34:27 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Pl4wj-0004dI-Ue for cygwin@cygwin.com; Thu, 03 Feb 2011 11:34:25 -0800 Message-ID: <30838541.post@talk.nabble.com> Date: Thu, 03 Feb 2011 19:34:00 -0000 From: gvidaver To: cygwin@cygwin.com Subject: Re: -static not working with gcc 4.3.4 In-Reply-To: <20101018213923.GO6369@const.famille.thibault.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <20101017005857.GA28900@const.famille.thibault.fr> <2BF01EB27B56CC478AD6E5A0A28931F201762C09@A1DAL1SWPES19MB.ams.acs-inc.net> <20101018125833.GB25504@const> <252576.94771.qm@web25508.mail.ukl.yahoo.com> <20101018213923.GO6369@const.famille.thibault.fr> X-IsSubscribed: yes 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 X-SW-Source: 2011-02/txt/msg00106.txt.bz2 It still requires the cygwin1.dll: $ g++ -v ... gcc version 4.5.0 (GCC) $ g++ test.c -o test -static $ ldd test.exe ... cygwin1.dll =3D> /usr/bin/cygwin1.dll (0x61000000) ... And apparently the only alternative is mingw, see: http://cygwin.com/faq/faq-nochunks.html#faq.programming.static-linking "it is not possible to statically link with a Cygwin library to obtain an independent, self-contained executable. " $ i686-w64-mingw32-g++ -v ... gcc version 4.5.1 (GCC) $ i686-w64-mingw32-g++ test.c -o test -static $ ldd test.exe ntdll.dll =3D> ... path to Windows dlls kernel32.dll =3D> ...=20 KERNELBASE.dll =3D> ... msvcrt.dll =3D> ... (I.e. no dependencies on anything besides system dlls.) Samuel Thibault wrote: >=20 > Marco Atzeri, le Mon 18 Oct 2010 14:22:02 +0100, a =C3=A9crit : >> have you checked if 4.5 has the same problem ? >>=20 >> http://cygwin.com/ml/cygwin-announce/2010-08/msg00016.html >=20 > It doesn't have the problem any more. >=20 > Samuel >=20 > -- > 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 >=20 >=20 >=20 --=20 View this message in context: http://old.nabble.com/-static-not-working-wit= h-gcc-4.3.4-tp29981383p30838541.html Sent from the Cygwin list mailing list archive at Nabble.com. -- 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