From owner-cvs-all Mon Apr 8 11:51:37 2002 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 904) id F319D37B416; Mon, 8 Apr 2002 11:51:21 -0700 (PDT) Date: Mon, 8 Apr 2002 11:51:21 -0700 From: Max Khon To: Peter Wemm 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 Message-ID: <20020408115121.A50619@hub.freebsd.org> References: <20020408164449.GD93885@elvis.mu.org> <20020408183757.36E4E38CC@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020408183757.36E4E38CC@overcee.wemm.org>; from peter@wemm.org on Mon, Apr 08, 2002 at 11:37:57AM -0700 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 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 on. > > 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} /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message