From owner-cvs-all Mon Apr 8 16:13:10 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 427F537B400; Mon, 8 Apr 2002 16:13:00 -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 g38NDpQ17416; Mon, 8 Apr 2002 16:13:51 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 4A0423811; Mon, 8 Apr 2002 16:19:50 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Max Khon Cc: Alfred Perlstein , Ruslan Ermilov , Gerald Pfeifer , "M. Warner Losh" , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: (using g++ for linkage) Re: cvs commit: src/gnu/usr.bin/gperf In-Reply-To: <20020408115121.A50619@hub.freebsd.org> Date: Mon, 08 Apr 2002 16:19:50 -0700 From: Peter Wemm Message-Id: <20020408231950.4A0423811@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 Max Khon wrote: > hi, there! > > On Mon, Apr 08, 2002 at 11:37:57AM -0700, Peter Wemm wrote: > > > > * Ruslan Ermilov [020408 01:39] wrote: > > > > > > > > > OK, how about backing these out and committing this instead? > > > > > > > > %%% > > > > Index: bsd.prog.mk > > > > +.if ${SRCS:M*.cc} != "" || ${SRCS:M*.C} != "" || ${SRCS:M*.cpp} != "" || \ > > > > + ${SRCS:M*.cxx} != "" > > > > + ${CXX} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD} > > > > +.else > > > > ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} $ {LDADD} > > > > +.endif > > > > > > > > .else !defined(SRCS) > > > > > > > > %%% > > > > > > I was about to propose something like this, nice work. :) > > > > That's a partial solution, but would probably be enough for these few > > cases. For example, it doesn't detect when you have libxxx.a file with C++ > > objects in it. > > > > Also, it leaves out the dependency on libstdc++. linking everything with > > c++(1) is a subset of adding to LDADD/DPADD. The LDADD is taken care of, > > but the DPADD of ${LIBSTDCPLUSPLUS} is missing. Only ${LIBC} is depended o n. > > > > It might be better to have a switch to specify c++ linking. > > > > Or we could just leave it the way it is. > > NetBSD's allows to use PROG_CXX=foobar instead of PROG=foobar > to link using ${CXX} instead of ${CC} I like this even better. 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