Subject: Re: USE_LIBSTDCXX
To: Ian Lance Taylor <ian@wasabisystems.com>
From: Nick Hudson <skrll@netbsd.org>
List: tech-toolchain
Date: 08/18/2004 09:18:19
--Boundary-00=_LDxIBj+HnlgKDmN
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 17 August 2004 20:00, Ian Lance Taylor wrote:
[...]
> The usual way to use libsupc++ instead of libstdc++ is to link with
> gcc instead of g++, and to explicitly link against -lsupc++.

OK, to fix USE_LIBSTDCXX how about this patch?

Nick





--Boundary-00=_LDxIBj+HnlgKDmN
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="USE_LIBSTDCXX.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="USE_LIBSTDCXX.diff"

Index: share/mk/bsd.prog.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.prog.mk,v
retrieving revision 1.202
diff -u -r1.202 bsd.prog.mk
--- share/mk/bsd.prog.mk	4 Aug 2004 05:32:47 -0000	1.202
+++ share/mk/bsd.prog.mk	18 Aug 2004 07:16:56 -0000
@@ -140,11 +140,11 @@
 .endif
 
 .if defined(PROG_CXX)
-_CCLINK=	${CXX}
 .if ${USE_LIBSTDCXX} == "no"
-_SUPCXX=	-lsupc++ -lm
+_CCLINK=	${CC}
+LDADD+=		-lsupc++
 .else
-_SUPCXX=	-lstdc++ -lm
+_CCLINK=	${CXX}
 .endif
 .else
 _CCLINK=	${CC}

--Boundary-00=_LDxIBj+HnlgKDmN--