Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53446 - in trunk/tools/build/v2/tools: . types
From: ghost_at_[hidden]
Date: 2009-05-30 07:51:49


Author: vladimir_prus
Date: 2009-05-30 07:51:46 EDT (Sat, 30 May 2009)
New Revision: 53446
URL: http://svn.boost.org/trac/boost/changeset/53446

Log:
Generate import libs on cygwin, and fix naming to match conventions.

Patch from Ronald Landheer-Cieslak.

Text files modified:
   trunk/tools/build/v2/tools/gcc.jam | 23 +++++++++++++++++++++++
   trunk/tools/build/v2/tools/types/lib.jam | 2 +-
   2 files changed, 24 insertions(+), 1 deletions(-)

Modified: trunk/tools/build/v2/tools/gcc.jam
==============================================================================
--- trunk/tools/build/v2/tools/gcc.jam (original)
+++ trunk/tools/build/v2/tools/gcc.jam 2009-05-30 07:51:46 EDT (Sat, 30 May 2009)
@@ -542,6 +542,28 @@
 generators.override gcc.mingw.link : gcc.link ;
 generators.override gcc.mingw.link.dll : gcc.link.dll ;
 
+# Cygwin is similar to msvc and mingw in that it uses import libraries.
+# While in simple cases, it can directly link to a shared library,
+# it is believed to be slower, and not always possible. Define cygwin-specific
+# generators here.
+
+g = [ new gcc-linking-generator gcc.cygwin.link
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : EXE
+ : <toolset>gcc <target-os>cygwin ] ;
+$(g).set-rule-name gcc.link ;
+generators.register $(g) ;
+
+g = [ new gcc-linking-generator gcc.cygwin.link.dll
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : IMPORT_LIB SHARED_LIB
+ : <toolset>gcc <target-os>cygwin ] ;
+$(g).set-rule-name gcc.link.dll ;
+generators.register $(g) ;
+
+generators.override gcc.cygwin.link : gcc.link ;
+generators.override gcc.cygwin.link.dll : gcc.link.dll ;
+
 # Declare flags for linking.
 # First, the common flags.
 toolset.flags gcc.link OPTIONS <debug-symbols>on : -g ;
@@ -553,6 +575,7 @@
 toolset.flags gcc.link LIBRARIES <library-file> ;
 
 toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>windows : "-Wl,--out-implib," ;
+toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>cygwin : "-Wl,--out-implib," ;
 
 # For <runtime-link>static we made sure there are no dynamic libraries in the
 # link. On HP-UX not all system libraries exist as archived libraries (for

Modified: trunk/tools/build/v2/tools/types/lib.jam
==============================================================================
--- trunk/tools/build/v2/tools/types/lib.jam (original)
+++ trunk/tools/build/v2/tools/types/lib.jam 2009-05-30 07:51:46 EDT (Sat, 30 May 2009)
@@ -9,7 +9,7 @@
 
 type.set-generated-target-prefix LIB : : "lib" ;
 type.set-generated-target-prefix LIB : <target-os>windows : "" ;
-type.set-generated-target-prefix LIB : <target-os>cygwin : "" ;
+type.set-generated-target-prefix LIB : <target-os>cygwin : "cyg" ;
 
 # FIXME: should not register both extensions on both
 # platforms.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk