summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-05-17 20:56:55 +0000
committerGreg Clayton <gclayton@apple.com>2013-05-17 20:56:55 +0000
commit9826c3f33da9939dd9d9ff8d3d32f43d5111a682 (patch)
tree00882ece5bc80e89a8b75f1f019bd14f57ad1e70
parent01b384c978cc91975bbeb765b9766ce252429adb (diff)
downloadbcm5719-llvm-9826c3f33da9939dd9d9ff8d3d32f43d5111a682.tar.gz
bcm5719-llvm-9826c3f33da9939dd9d9ff8d3d32f43d5111a682.zip
Allow LLDB to be built on a system with an installed gcc/g++ that isn't the default. I recently installed gcc-4.7/g++-4.7 on Ubuntu and tried to build by specifying:
CC=gcc-4.7 CXX=g++-4.7 as configure and make args, but it didn't work when being run with makefiles. This patch fixes that. llvm-svn: 182158
-rw-r--r--lldb/lib/Makefile2
-rw-r--r--lldb/source/Core/Makefile2
2 files changed, 2 insertions, 2 deletions
diff --git a/lldb/lib/Makefile b/lldb/lib/Makefile
index 7e76b52402e..e6f21821916 100644
--- a/lldb/lib/Makefile
+++ b/lldb/lib/Makefile
@@ -71,7 +71,7 @@ USEDLIBS = lldbAPI.a \
# Because GCC requires RTTI enabled for lldbCore (see source/Core/Makefile) it is
# necessary to also link the clang rewriter libraries so vtable references can
# be resolved correctly, if we are building with GCC.
-ifeq (g++,$(shell basename $(CXX)))
+ifeq (g++,$(shell basename $(CXX) | colrm 4))
USEDLIBS += clangRewriteCore.a \
clangRewriteFrontend.a
endif
diff --git a/lldb/source/Core/Makefile b/lldb/source/Core/Makefile
index 78b7e3d5dde..d52443bd0f0 100644
--- a/lldb/source/Core/Makefile
+++ b/lldb/source/Core/Makefile
@@ -17,7 +17,7 @@ include $(LLDB_LEVEL)/Makefile
# (cxa_demangle.cpp) uses dynamic_cast<> and GCC (at least 4.6 and 4.7)
# complain if we try to compile it with -fno-rtti.
$(info shell basename CXX is $(shell basename $(CXX)))
-ifeq (g++,$(shell basename $(CXX)))
+ifeq (g++,$(shell basename $(CXX) | colrm 4))
$(ObjDir)/cxa_demangle.o: Compile.CXX := $(filter-out -fno-rtti,$(Compile.CXX)) -frtti
endif
OpenPOWER on IntegriCloud