public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco_atzeri@yahoo.it>
To: cygwin@cygwin.com
Subject: R: -static not working with gcc 4.3.4
Date: Sun, 17 Oct 2010 08:15:00 -0000	[thread overview]
Message-ID: <811032.23652.qm@web25502.mail.ukl.yahoo.com> (raw)
In-Reply-To: <20101017005857.GA28900@const.famille.thibault.fr>

--- Dom 17/10/10, Samuel Thibault  ha scritto:

> Data: Domenica 17 ottobre 2010, 02:58
> Hello,
> 
> gcc -static doesn't seem to be working any more using gcc
> 4.3.4:
> 
> $ cat test.c
> int main(void) {}
> $ gcc test.c -o test -static
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld:
> cannot find -lgcc_s
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld:
> cannot find -lgcc_s
> 
> There indeed is libgcc_s.dll.a in
> /usr/lib/gcc/i686-pc-cygwin/, but for
> some reason gcc doesn't seem to be happy with it. This is
> using gcc4 and
> gcc4-core 4.3.4-3.  gcc-3 works fine.
> 
> Samuel

$ gcc test.c -o test -static-libgcc

$ cygcheck ./test.exe
C:\cygwin\tmp\test.exe
  C:\cygwin\bin\cygwin1.dll
    C:\WINDOWS\system32\ADVAPI32.DLL
      C:\WINDOWS\system32\KERNEL32.dll
        C:\WINDOWS\system32\ntdll.dll
      C:\WINDOWS\system32\RPCRT4.dll
        C:\WINDOWS\system32\Secur32.dll

see gcc documetation

Regards





--
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

  reply	other threads:[~2010-10-17  7:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17  7:02 Samuel Thibault
2010-10-17  8:15 ` Marco Atzeri [this message]
2010-10-17 22:46   ` R: " Samuel Thibault
2010-10-18 12:58 ` Nellis, Kenneth
2010-10-18 13:12   ` Samuel Thibault
2010-10-18 13:53     ` Marco Atzeri
2010-10-19  7:46       ` Samuel Thibault
2011-02-03 19:34         ` gvidaver
2011-02-03 19:48           ` marco atzeri
2011-02-03 21:21             ` gvidaver
2011-02-03 22:19               ` Christopher Faylor
2011-02-03 19:50           ` Charles Wilson

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=811032.23652.qm@web25502.mail.ukl.yahoo.com \
    --to=marco_atzeri@yahoo.it \
    --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).