From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 11:34:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7611065672; Sat, 8 Sep 2012 11:34:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8E448FC12; Sat, 8 Sep 2012 11:34:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88BYMY8078292; Sat, 8 Sep 2012 11:34:22 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88BYMLe078287; Sat, 8 Sep 2012 11:34:22 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209081134.q88BYMLe078287@svn.freebsd.org> From: Dimitry Andric Date: Sat, 8 Sep 2012 11:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240236 - in stable/9: gnu/lib/libstdc++ gnu/lib/libsupc++ lib/libc++ share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 11:34:23 -0000 Author: dim Date: Sat Sep 8 11:34:22 2012 New Revision: 240236 URL: http://svn.freebsd.org/changeset/base/240236 Log: MFC r239680: 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 r239686: When using -stdlib=libc++, add the correct dependency to .depend in bsd.prog.mk. Submitted by: Yamaya Takashi MFC r239695: For building libstdc++ and libsupc++, filter out any -stdlib=libc++ option from CXXFLAGS, otherwise these libraries will not build. Similarly, filter out any -std=xxx options that aren't supported. Submitted by: Yamaya Takashi Modified: stable/9/gnu/lib/libstdc++/Makefile stable/9/gnu/lib/libsupc++/Makefile stable/9/lib/libc++/Makefile stable/9/share/mk/bsd.prog.mk Directory Properties: stable/9/gnu/lib/libstdc++/ (props changed) stable/9/gnu/lib/libsupc++/ (props changed) stable/9/lib/libc++/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/gnu/lib/libstdc++/Makefile ============================================================================== --- stable/9/gnu/lib/libstdc++/Makefile Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/gnu/lib/libstdc++/Makefile Sat Sep 8 11:34:22 2012 (r240236) @@ -22,6 +22,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} Modified: stable/9/gnu/lib/libsupc++/Makefile ============================================================================== --- stable/9/gnu/lib/libsupc++/Makefile Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/gnu/lib/libsupc++/Makefile Sat Sep 8 11:34:22 2012 (r240236) @@ -24,6 +24,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h Modified: stable/9/lib/libc++/Makefile ============================================================================== --- stable/9/lib/libc++/Makefile Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/lib/libc++/Makefile Sat Sep 8 11:34:22 2012 (r240236) @@ -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 Modified: stable/9/share/mk/bsd.prog.mk ============================================================================== --- stable/9/share/mk/bsd.prog.mk Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/share/mk/bsd.prog.mk Sat Sep 8 11:34:22 2012 (r240236) @@ -131,10 +131,14 @@ _EXTRADEPEND: .else echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} .if defined(PROG_CXX) +.if !empty(CXXFLAGS:M-stdlib=libc++) + echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} +.else echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} .endif .endif .endif +.endif .if !target(install)