Patchwork fix config.rpath for cygwin/mingw

login
register
mail settings
Submitter Yaakov (Cygwin/X)
Date July 20, 2011, 6:19 a.m.
Message ID <1311142784.7796.35.camel@YAAKOV04>
Download mbox | patch
Permalink /patch/105586/
State New
Headers show

Comments

Yaakov (Cygwin/X) - July 20, 2011, 6:19 a.m.
The gettext macros use config.rpath to determine the link library name
of libiconv and libintl (on non-glibc platforms); the import library
suffix is of importance, not the runtime library suffix.  On PE
platforms, these differ, and by using the latter in config.rpath, the
gettext macros think shared import libraries aren't available, and
forces linking with the static library instead.

(FWIW, gettext itself has already been fixed in this regard, but
updating to the latest version of those files is much more invasive.)

The attached patch fixes linking with the shared import libraries.  We
have been using this patch for over a year on i686-pc-cygwin hosted
toolchains (both native- and cross-target).


Yaakov
Cygwin Ports

Patch

2011-07-20  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>

	* config.rpath [cygwin|mingw*|pw32] (shrext): Change to .dll.a,
	to match the import library suffix.

Index: config.rpath
===================================================================
--- config.rpath	(revision 176494)
+++ config.rpath	(working copy)
@@ -438,7 +438,7 @@ 
   bsdi4*)
     ;;
   cygwin* | mingw* | pw32*)
-    shrext=.dll
+    shrext=.dll.a
     ;;
   darwin* | rhapsody*)
     shrext=.dylib