instead of defining _LIBCPP_DEBUG in debug.cpp which enables some debug
authorrobert <robert@openbsd.org>
Tue, 11 Sep 2018 18:31:58 +0000 (18:31 +0000)
committerrobert <robert@openbsd.org>
Tue, 11 Sep 2018 18:31:58 +0000 (18:31 +0000)
code which breaks quiet a few things, define _LIBCPP_BUILDING_LIBRARY
for the complete build to get the needed definitions in debug.cpp without
enabling debug code

lib/libcxx/Makefile
lib/libcxx/src/debug.cpp

index f65f023..6543b3c 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2018/09/11 18:29:53 robert Exp $
+# $OpenBSD: Makefile,v 1.8 2018/09/11 18:31:58 robert Exp $
 
 .include <bsd.own.mk>
 
@@ -51,7 +51,7 @@ SRCS+=                algorithm.cpp \
                variant.cpp \
                vector.cpp
 
-CPPFLAGS+=     -DLIBCXXABI -I${HDRDIR} \
+CPPFLAGS+=     -DLIBCXXABI -I${HDRDIR} -D_LIBCPP_BUILDING_LIBRARY \
                -DLIBCXX_BUILDING_LIBCXXABI -I${AHDRDIR} -I${UHDRDIR}
 CXXFLAGS+=     -nostdlib -nostdinc++
 .if empty(CXXFLAGS:M-std=*)
index c073927..f2fc1ce 100644 (file)
@@ -7,7 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define _LIBCPP_DEBUG 1
 #include "__config"
 #include "__debug"
 #include "functional"