From owner-cvs-all Sun Apr 7 23:33:51 2002 Delivered-To: cvs-all@freebsd.org Received: from fw.wemm.org (12-232-135-171.client.attbi.com [12.232.135.171]) by hub.freebsd.org (Postfix) with ESMTP id 0266E37B417; Sun, 7 Apr 2002 23:33:41 -0700 (PDT) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (8.11.6/8.11.6) with ESMTP id g386YRQ14193; Sun, 7 Apr 2002 23:34:27 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id EAE793810; Sun, 7 Apr 2002 23:39:37 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Gerald Pfeifer Cc: "M. Warner Losh" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/gnu/usr.bin/gperf Makefile src/gnu/usr.bin/groff/src/devices/grodvi Makefile src/gnu/usr.bin/groff/src/devices/grohtml Makefile src/gnu/usr.bin/groff/src/devices/grolbp Makefile sr In-Reply-To: Date: Sun, 07 Apr 2002 23:39:37 -0700 From: Peter Wemm Message-Id: <20020408063937.EAE793810@overcee.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Gerald Pfeifer wrote: > On Sun, 7 Apr 2002, M. Warner Losh wrote: > > Peter Wemm writes: > >: Add -lstdc++ to the link args for these C++ tools so that they can be > >: compiled with gcc-3.1. Somebody thought it was a good idea to move > >: the implementation of new and delete from libgcc to libstdc++. This > >: change doesn't harm the current compiler in the tree. > > Is this a band-aid until the compiler can be fixed, or a real solution > > long term? > > If I'm right, the problem is that the gcc driver is used to compile these > C++ sources. > > One of the differences between gcc and g++ is that the latter automagically > links in libstdc++ while the former does not. This has been the case since > (at least GCC 2.95), but we did get away with it because, as Peter observed, > new/delete have been in libgcc which got linked in anyway. > > GCC 3.0 and 3.1, however, have new/delete in libstdc++; the proper fix > long-term would be using the g++ driver instead of the gcc driver for > these C++ sources. The .cc files are compiled with 'c++' as expected. The problem is that the final link phase uses 'cc'. Our makefiles have no way to signal that the final link should be done with c++ instead since it just sees a bunch of .o files that need to be linked into an executable. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message