This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFA: Use $(COMPILER) to build objects


Joseph S. Myers wrote:

>  (There is no -static-libstdc++ option 
> so you can't readily make the C++ compiler link with static libstdc++ when 
> desired.)

  I must be misunderstanding what you're getting at; it's implied by plain old
-static I thought?  Certainly appears to WFM:

admin@ubik /tmp/cxx
$ cat hello.cpp

#include <iostream>

int main (int argc, const char **argv)
{
  std::cout << "Hello world!" << std::endl;
  return 0;
}

admin@ubik /tmp/cxx
$ g++-4 hello.cpp -o hello.shared.exe

admin@ubik /tmp/cxx
$ g++-4 -static hello.cpp -o hello.static.exe

admin@ubik /tmp/cxx
$ cygcheck ./hello.shared.exe
F:\cygwin-1.7\tmp\cxx\hello.shared.exe
  F:\cygwin-1.7\bin\cygwin1.dll
    C:\WINNT\system32\ADVAPI32.DLL
      C:\WINNT\system32\NTDLL.DLL
      C:\WINNT\system32\KERNEL32.DLL
      C:\WINNT\system32\RPCRT4.DLL
  F:\cygwin-1.7\bin\cyggcc_s-1.dll
  F:\cygwin-1.7\tmp\cxx\cygstdc++-6.dll

admin@ubik /tmp/cxx
$ cygcheck ./hello.static.exe
F:\cygwin-1.7\tmp\cxx\hello.static.exe
  F:\cygwin-1.7\bin\cygwin1.dll
    C:\WINNT\system32\ADVAPI32.DLL
      C:\WINNT\system32\NTDLL.DLL
      C:\WINNT\system32\KERNEL32.DLL
      C:\WINNT\system32\RPCRT4.DLL

admin@ubik /tmp/cxx

    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]