Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Aug 2012 13:15:45 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239680 - head/lib/libc++
Message-ID:  <201208251315.q7PDFj25042495@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Aug 25 13:15:44 2012
New Revision: 239680
URL: http://svn.freebsd.org/changeset/base/239680

Log:
  Add libcxxrt's objects (prefixing them with cxxrt_ to avoid collisions)
  to libc++.a and libc++_p.a, to make static linking of C++ executables
  with libc++ easier.  This is similar to the approach used in libstdc++.
  
  MFC after:	2 weeks

Modified:
  head/lib/libc++/Makefile

Modified: head/lib/libc++/Makefile
==============================================================================
--- head/lib/libc++/Makefile	Sat Aug 25 12:02:13 2012	(r239679)
+++ head/lib/libc++/Makefile	Sat Aug 25 13:15:44 2012	(r239680)
@@ -35,8 +35,25 @@ SRCS+=		algorithm.cpp\
 		utility.cpp\
 		valarray.cpp
 
+CXXRT_SRCS+=	libelftc_dem_gnu3.c\
+		terminate.cc\
+		dynamic_cast.cc\
+		memory.cc\
+		auxhelper.cc\
+		exception.cc\
+		stdexcept.cc\
+		typeinfo.cc\
+		guard.cc
+
+.for _S in ${CXXRT_SRCS}
+STATICOBJS+=	cxxrt_${_S:R}.o
+cxxrt_${_S}:
+	ln -sf ${LIBCXXRTDIR}/${_S} ${.TARGET}
+.endfor
+
 WARNS=		0
-CXXFLAGS+=	-I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT
+CFLAGS+=	-I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT
+CXXFLAGS+=	-std=c++0x
 
 DPADD=		${LIBCXXRT}
 LDADD=		-lcxxrt



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