Index: lldb/trunk/test/make/Makefile.rules =================================================================== --- lldb/trunk/test/make/Makefile.rules +++ lldb/trunk/test/make/Makefile.rules @@ -342,14 +342,16 @@ #---------------------------------------------------------------------- # Check if we are compiling with gcc 4.6 #---------------------------------------------------------------------- -ifneq (,$(filter g++,$(CXX))) - CXXVERSION = $(shell g++ -dumpversion | cut -b 1-3) +ifneq "$(strip $(CXX_SOURCES) $(OBJCXX_SOURCES))" "" +ifneq "$(filter g++,$(CXX))" "" + CXXVERSION = $(shell $(CXX) -dumpversion | cut -b 1-3) ifeq "$(CXXVERSION)" "4.6" # GCC 4.6 cannot handle -std=c++11, so replace it with -std=c++0x # instead. FIXME: remove once GCC version is upgraded. override CXXFLAGS := $(subst -std=c++11,-std=c++0x,$(CXXFLAGS)) endif endif +endif #---------------------------------------------------------------------- # DYLIB_ONLY variable can be used to skip the building of a.out.