[Lldb-commits] [lldb] r182158 - 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:

Greg Clayton gclayton at apple.com
Fri May 17 13:56:55 PDT 2013


Author: gclayton
Date: Fri May 17 15:56:55 2013
New Revision: 182158

URL: http://llvm.org/viewvc/llvm-project?rev=182158&view=rev
Log:
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.


Modified:
    lldb/trunk/lib/Makefile
    lldb/trunk/source/Core/Makefile

Modified: lldb/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lib/Makefile?rev=182158&r1=182157&r2=182158&view=diff
==============================================================================
--- lldb/trunk/lib/Makefile (original)
+++ lldb/trunk/lib/Makefile Fri May 17 15:56:55 2013
@@ -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

Modified: lldb/trunk/source/Core/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Makefile?rev=182158&r1=182157&r2=182158&view=diff
==============================================================================
--- lldb/trunk/source/Core/Makefile (original)
+++ lldb/trunk/source/Core/Makefile Fri May 17 15:56:55 2013
@@ -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
 





More information about the lldb-commits mailing list