Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Apr 2002 23:39:37 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Cc:        "M. Warner Losh" <imp@village.org>, 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 
Message-ID:  <20020408063937.EAE793810@overcee.wemm.org>
In-Reply-To: <Pine.BSF.4.44.0204080648390.76282-100000@naos.dbai.tuwien.ac.at> 

next in thread | previous in thread | raw e-mail | index | archive | help
Gerald Pfeifer wrote:
> On Sun, 7 Apr 2002, M. Warner Losh wrote:
> >            Peter Wemm <peter@FreeBSD.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020408063937.EAE793810>