This is the mail archive of the
cygwin
mailing list for the Cygwin project.
R: -static not working with gcc 4.3.4
- From: Marco Atzeri <marco_atzeri at yahoo dot it>
- To: cygwin at cygwin dot com
- Date: Sun, 17 Oct 2010 06:33:39 +0100 (BST)
- Subject: R: -static not working with gcc 4.3.4
--- 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