Loading ...
Sorry, an error occurred while loading the content.

[PATCH] Makes it possible to link libstdc++ statically with mingw

Expand Messages
  • Guopeng Wen
    Hi, I recently upgraded to gcc 4.5.0 (mingw) as the previous version gives me segmentation fault when compiling the latest code. After the upgrade, I found
    Message 1 of 1 , Dec 22, 2010
    • 0 Attachment
      Hi,

      I recently upgraded to gcc 4.5.0 (mingw) as the previous version
      gives me segmentation fault when compiling the latest code. After
      the upgrade, I found two extra DLL dependencies was introduced:
      libstdc++-6.dll (gvim.exe, gvimext.dll)
      libgcc_s_dw2-1.dll (gvimext.dll)

      I created a patch for mingw makefile to makes it possible to link
      those libraries statically. A new control variable was introduced:
      STATIC_STDCPLUS
      Set that to "yes" would link those libraries statically. The
      default setting is "no" (default to the current behavior). Please
      note for old gcc (before 4.5.x), the setting should be kept as "no"
      as one of the link flag used (-static-libstdc++) is not available
      until gcc 4.5.x.

      The patch also splits the original WINDRES variable to several parts
      so it's easier to tune that setting from command line:
      WINDRES : The command itself
      WINDRES_CC/WINDRES_CXX : Name of the preprocessor
      WINDRES_FLAGS : Command line options for windres

      The rationale behind the change is: I use make from cygwin to call
      mingw compiler/linker, instead of using mingw make. In such
      scenario, the full path to CC should be cygwin style, while the full
      preprocessor path for windres, though identical to CC, should be
      Windows style (since windres is a Windows executable). What a mess!
      Breaking up WINDRES setting helps a lot since it gives me a lot of
      flexibility to tune that setting from command line.

      As a side note, windres used to accept cygwin style path, it changes
      after I upgraded to the latest release.

      Regards!

      --
      Guopeng

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.