Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-05-27 10:08:41


On Thursday 26 May 2005 18:43, Craig Rodrigues wrote:
> On Thu, May 26, 2005 at 10:05:31AM +0400, Vladimir Prus wrote:
> > I don't think in V2's darwin.jam, the .GXX variable has any value at all
> > ;-) I also don't understand thie logic -- do we add -fcoalesce-templates
> > when - OS version is less than 8.0 (reasonable), and
> > - Compiler name is not "g++".
>
> Yes, because with MacOS X 10.4, there are multiple compiler binaries
> installed. g++ == gcc 4.0 (does not have -fcoalesce-templates)
> g++-3.3 == gcc 3.3 (has -fcoalesce-templates)

Ok, then isn't the logic somewhat reversed? We should be using
-fcoalesce-templates when either

1. We're not on 10.4
2. We're on 10.4 and compiler is not g++-3.3

The logic there:

if ! [ MATCH "(g[+][+])" : $(.GXX) ] && $(JAMUNAME[3]) < "8.0.0" ||
[ MATCH "(g[+][+]-3.3)" : $(.GXX) ]

sets the flag when:
- Compiler name is g++-3.3, or
- We're not on 10.4 and compiler name is not g++

Am I missing something? And .GXX is not defined in darwin.jam. I've committed
the attached modification of your patch, can you try it?

Thanks,
Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 --Boundary-00=_5fzlCcRI+Nn1nsG Content-Type: text/x-diff;
charset="iso-8859-1";
name="darwin.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="darwin.diff"
Index: darwin.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/darwin.jam,v
retrieving revision 1.11
diff -u -r1.11 darwin.jam
--- darwin.jam	27 May 2005 14:53:08 -0000	1.11
+++ darwin.jam	27 May 2005 15:06:22 -0000
@@ -26,6 +26,19 @@
common.handle-options darwin : $(condition) : $(command) : $(options) ;
+ local JAMUNAME = [ modules.peek : JAMUNAME ] ;
+
+ # GCC 4.0, the default compiler in Darwin 8.0.0, does not have
+ # -fcoalesce-templates. GCC 3.3 needs it. So, we add '-fcoalesce-templates'
+ # is either:
+ #
+ # 1. We're not on 10.4
+ # 2. We're on 10.4 and compiler is not g++-3.3
+ if $(JAMUNAME[3]) < "8.0.0" || ! [ "(g[+][+]-3.3)" : $(command) ]
+ {
+ flags darwin.compile.c++ OPTIONS : -fcoalesce-templates ;
+ }
+ 
gcc.init-link-flags darwin darwin $(condition) ;
}
@@ -33,7 +46,6 @@
flags darwin.compile OPTIONS <link>shared : -dynamic ;
flags darwin.compile OPTIONS : -Wno-long-double -no-cpp-precomp ;
-flags darwin.compile.c++ OPTIONS : -fcoalesce-templates ;
flags darwin.link FRAMEWORK <framework> ;
 --Boundary-00=_5fzlCcRI+Nn1nsG-- 

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