Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 78020 invoked from network); 14 Mar 2007 00:38:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 00:38:34 -0000 Received: (qmail 12419 invoked by uid 500); 14 Mar 2007 00:38:24 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 12356 invoked by uid 500); 14 Mar 2007 00:38:24 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 12344 invoked by uid 99); 14 Mar 2007 00:38:24 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2007 17:38:24 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2007 17:38:13 -0700 Received: from qxvcexch01.ad.quovadx.com ([192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id l2E0biUl014073 for ; Wed, 14 Mar 2007 00:37:45 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 13 Mar 2007 18:37:34 -0600 Message-ID: <45F74477.5080506@roguewave.com> Date: Tue, 13 Mar 2007 17:40:23 -0700 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: [PATCH] for STDCXX-262 "Multiple vtable definitions on Darwin platforms" References: <45F70AB5.6030702@roguewave.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Mar 2007 00:37:34.0504 (UTC) FILETIME=[F5380280:01C765D0] X-Virus-Checked: Checked by ClamAV on apache.org Eric Lemings wrote: > If LDSOFLAGS is only used when linking the library then I don't see > a problem with that since -dynamiclib is only need when linking the > library. I'm not sure what will happen if that flag is given when > linking executables. LDSOFLAGS is only used when building a shared library. I suppose the name could be improved :) > > Now that I think about it, the -dynamiclib flag probably needs to be > within the build mode conditionals that check see if a shared > library is being built. Not sure what will happen if that flag is > specified when building a static library. Right, it needs to be used only for shared library builds. Martin > > I guess you could define yet another platform-specific variable in > gcc.config that gets added to LDFLAGS only when linking the library > (if one doesn't already exist of course). > > Brad. > >> -----Original Message----- >> From: Martin Sebor [mailto:sebor@roguewave.com] >> Sent: Tuesday, March 13, 2007 2:34 PM >> To: stdcxx-dev@incubator.apache.org >> Subject: Re: [PATCH] for STDCXX-262 "Multiple vtable >> definitions on Darwin platforms" >> >> Eric Lemings wrote: >>> "[gcc/Mac OS X 10.4.6 Tiger] Multiple vtable definitions for >>> bad_exception and bad_alloc" >> Thanks Brad! Good to know there is an easy solution for this. >> >> As for the patch, my comment is the same as what I just said >> to Farid, i.e., that (like stdcxx C++ sources) the makefiles >> are intended to be platform-agnostic and free of platform >> specific ifs (and ifdefs). >> >> Fortunately, unlike in Farid's case, the solution here should >> be straightforward: add the -dynamiclib option to LDSOFLAGS >> in gcc.config instead of GNUmakefile.lib. >> >> If you post a (tested) patch that does that I'll be happy to >> commit it on trunk. >> >> Thanks >> Martin >> >>> $ svn diff etc/config/GNUmakefile.lib >>> Index: etc/config/GNUmakefile.lib >>> =================================================================== >>> --- etc/config/GNUmakefile.lib (revision 517771) >>> +++ etc/config/GNUmakefile.lib (working copy) >>> @@ -39,6 +39,10 @@ >>> ONE_REPOSITORY = 1 >>> include ../makefile.common >>> >>> +ifeq ($(findstring darwin,$(PLATFORM)),darwin) >>> +LDSOFLAGS += -dynamiclib >>> +endif >>> + >>> CXXFLAGS += $(PICFLAGS) >>> LDFLAGS += $(LDSOFLAGS) $(MAPFLAGS) $(MAPFILE) >>> >>> >>> Tested with gcc-4.2-20070307 snapshot on Mac OS X 10.4.8. >>> >>> Eric. >>