Fix Cygwin debug build (Binutil PR 20268)

pull/200/head
Jeffrey Walton 2016-06-17 06:36:22 -04:00
parent 805a843977
commit 8a563177b3
1 changed files with 4 additions and 0 deletions

View File

@ -323,12 +323,16 @@ endif # -coverage
endif # GCC code coverage
# Debug testing on GNU systems. Triggered by -DDEBUG.
# Newlib test due to http://sourceware.org/bugzilla/show_bug.cgi?id=20268
ifneq ($(filter -DDEBUG -DDEBUG=1,$(CXXFLAGS)),)
USING_GLIBCXX := $(shell $(CXX) -x c++ $(CXXFLAGS) -E adhoc.cpp.proto 2>&1 | $(EGREP) -i -c "__GLIBCXX__")
ifneq ($(USING_GLIBCXX),0)
HAS_NEWLIB := $(shell $(CXX) -x c++ $(CXXFLAGS) -E adhoc.cpp.proto 2>&1 | $(EGREP) -i -c "__NEWLIB__")
ifeq ($(HAS_NEWLIB),0)
ifeq ($(findstring -D_GLIBCXX_DEBUG,$(CXXFLAGS)),)
CXXFLAGS += -D_GLIBCXX_DEBUG
endif # CXXFLAGS
endif # NAS_NEWLIB
endif # USING_GLIBCXX
endif # GNU Debug build