Add debug heap support on AIX with IBM XLC

pull/748/head
Jeffrey Walton 2018-11-21 20:19:06 -05:00
parent be437504c7
commit e26b1a0b2a
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 19 additions and 2 deletions

View File

@ -1064,7 +1064,16 @@ ifneq ($(filter -DDEBUG -DDEBUG=1,$(CXXFLAGS)),)
endif # CXXFLAGS
endif # HAS_NEWLIB
endif # USING_GLIBCXX
endif # GNU Debug build
ifeq ($(XLC_COMPILER),1)
TPROG = TestPrograms/test_cxx.cxx
TOPT = -qheapdebug -qro
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l)
ifeq ($(strip $(HAVE_OPT)),0)
CXXFLAGS += -qheapdebug -qro
endif # CXXFLAGS
endif # XLC_COMPILER
endif # Debug build
# Dead code stripping. Issue 'make lean'.
ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)

View File

@ -32,6 +32,14 @@ namespace std {
}
#endif
// workaround needed for IBM XLC and debug heaps on AIX
#if defined(_AIX) && (defined(__xlc__) || defined(__xlC__) || defined(__ibmxl__))
namespace std {
using ::_debug_memset;
using ::_debug_memcpy;
}
#endif
// make_unchecked_array_iterator
#if _MSC_VER >= 1600
#include <iterator>
@ -81,4 +89,4 @@ namespace std {
using std::log;
#endif
#endif
#endif // CRYPTOPP_STDCPP_H