Boost logo

Boost-Build :

From: Craig Rodrigues (rodrigc_at_[hidden])
Date: 2005-05-25 14:44:21


On Wed, May 25, 2005 at 10:09:22AM +0400, Vladimir Prus wrote:
> IIRC, V1 has had this problem recently, and now has:
>
> if ! [ MATCH "(g[+][+])" : $(.GXX) ]
> {
> flags darwin C++FLAGS : -fcoalesce-templates ;
> }
>
> I guess the idea is to add "-fcoalesce-templates" only if compiler name is not
> g++-4.0? Can anybody clarify?

Actually, v1's darwin-jam does the following:

# GCC 4.0, the default compiler in Darwin 8.0.0, does not have
# -fcoalesce-templates. GCC 3.3 needs it.
if ! [ MATCH "(g[+][+])" : $(.GXX) ] && $(JAMUNAME[3]) < "8.0.0" ||
[ MATCH "(g[+][+]-3.3)" : $(.GXX) ]
{
flags darwin C++FLAGS : -fcoalesce-templates ;
}

We want to do a similar thing in V2, IMHO.

I propose this patch.
(I am throwing in my other patch to remove the registration of dylib
suffix from darwin.jam since you added it elsewhere :)

Index: darwin.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/darwin.jam,v
retrieving revision 1.10
diff -u -r1.10 darwin.jam
--- darwin.jam 27 Dec 2004 09:07:04 -0000 1.10
+++ darwin.jam 25 May 2005 19:40:51 -0000
@@ -29,16 +29,19 @@
gcc.init-link-flags darwin darwin $(condition) ;
}

-# Darwin has a different shared library suffix
-type.set-generated-target-suffix SHARED_LIB : <toolset>darwin : dylib ;
-# we need to be able to tell the type of .dylib files
-type.register-suffixes dylib : SHARED_LIB ;
-
feature framework : : free ;

flags darwin.compile OPTIONS <link>shared : -dynamic ;
flags darwin.compile OPTIONS : -Wno-long-double -no-cpp-precomp ;
-flags darwin.compile.c++ OPTIONS : -fcoalesce-templates ;
+
+# GCC 4.0, the default compiler in Darwin 8.0.0, does not have
+# -fcoalesce-templates. GCC 3.3 needs it.
+if ! [ MATCH "(g[+][+])" : $(.GXX) ] && $(JAMUNAME[3]) < "8.0.0" ||
+ [ MATCH "(g[+][+]-3.3)" : $(.GXX) ]
+{
+ flags darwin.compile.c++ OPTIONS : -fcoalesce-templates ;
+}
+

flags darwin.link FRAMEWORK <framework> ;

-- 
Craig Rodrigues 
rodrigc_at_[hidden]
 

Boost-Build 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