From cb554de22232dd60f35883efa86e9470022a4569 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 22 Oct 2012 19:44:17 +0000 Subject: [PATCH] Allow building libc++ with any custom -std=xxx flag. Note that using -std=gnu++98 will give a lot of warnings with clang, so please use -std=c++0x or higher, or use NO_WERROR. MFC after: 1 week --- lib/libc++/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 6e95823677e3..26877eebe51b 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -53,7 +53,9 @@ cxxrt_${_S}: WARNS= 0 CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT +.if !defined(CXXFLAGS) || ${CXXFLAGS:M-std=*}" == "" CXXFLAGS+= -std=c++0x +.endif DPADD= ${LIBCXXRT} LDADD= -lcxxrt