<HTML><HEAD><TITLE>Mail</TITLE>
<META name=GENERATOR
content="KsDHTMLEDLib.ocx, FreeWare HTML Editor 1.164.2, ?Kurt Senfer">
<META content="text/html; charset=GB2312" http-equiv=Content-Type>
<STYLE id=owaParaStyle type=text/css>P {margin-top:0;margin-bottom:0;}</STYLE>
</HEAD>
<BODY style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体" leftMargin=5 topMargin=5 #ffffff>
<DIV>I have tried this patch with lldb git version
d3a8d6565ff40fd99533f50a085ace806a9300ee,</DIV>
<DIV>compiled by both version 4.6.3 and 4.7.2 ,this flag works as
expected.</DIV>
<DIV> </DIV>
<DIV>comicfans44,<A
href="mailto:comicfans44@gmail.com">comicfans44@gmail.com</A></DIV>
<DIV>2013-3-21 </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; PADDING-RIGHT: 0px; MARGIN-RIGHT: 0px">
<DIV
style="FONT-SIZE: 9pt; FONT-VARIANT: normal; FONT-WEIGHT: normal; FONT-STYLE: normal; LINE-HEIGHT: normal">-----
Original Message ----- </DIV>
<DIV
style="FONT-SIZE: 9pt; FONT-VARIANT: normal; BACKGROUND: #e4e4e4; FONT-WEIGHT: normal; FONT-STYLE: normal; LINE-HEIGHT: normal; font-color: black"><B>From:
</B><A href="mailto:matt.kopec@intel.com">Kopec, Matt</A> </DIV>
<DIV
style="FONT-SIZE: 9pt; FONT-VARIANT: normal; FONT-WEIGHT: normal; FONT-STYLE: normal; LINE-HEIGHT: normal"><B>To:
</B><A href="mailto:comicfans44@gmail.com">comicfans44</A> </DIV>
<DIV
style="FONT-SIZE: 9pt; FONT-VARIANT: normal; FONT-WEIGHT: normal; FONT-STYLE: normal; LINE-HEIGHT: normal"><B>Date:
</B>2013-03-20, 07:05:54</DIV>
<DIV
style="FONT-SIZE: 9pt; FONT-VARIANT: normal; FONT-WEIGHT: normal; FONT-STYLE: normal; LINE-HEIGHT: normal"><B>Subject:
</B>RE: [lldb-dev] CMake build script not work with gcc 4.6</DIV>
<DIV><BR></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>
<DIV
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; COLOR: #000000; DIRECTION: ltr">CMake
isn't my area but I found starting with CMake 2.8.8 there is support for
compiler version. This would mean you have to use CMake 2.8.8 or greater. I
believe -std=c++11 is preferred for gcc 4.7+.<BR><BR>diff --git
a/CMakeLists.txt b/CMakeLists.txt<BR>index d5a28ea..7187af7 100644<BR>---
a/CMakeLists.txt<BR>+++ b/CMakeLists.txt<BR>@@ -82,7 +82,14 @@
endmacro(add_lldb_definitions)<BR> include_directories(/usr/include/python2.7)<BR> include_directories(../clang/include)<BR> include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")<BR>-set(CMAKE_CXX_FLAGS
"-std=c++11")<BR>+<BR>+if (CMAKE_CXX_COMPILER_ID STREQUAL
"GNU")<BR>+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"4.7")<BR>+ set(CMAKE_CXX_FLAGS
"-std=c++0x")<BR>+ else()<BR>+
set(CMAKE_CXX_FLAGS "-std=c++11")<BR>+
endif()<BR>+endif()<BR> <BR> # Disable MSVC warnings<BR> if(
MSVC )<BR><BR>Let me know if this works.<BR><BR>Matt
<DIV style="FONT-SIZE: 16px; FONT-FAMILY: Times New Roman; COLOR: #000000">
<HR tabIndex=-1>
<DIV id=divRpF453850 style="DIRECTION: ltr"><FONT color=#000000 size=2
face=Tahoma><B>From:</B> lldb-dev-bounces@cs.uiuc.edu
[lldb-dev-bounces@cs.uiuc.edu] on behalf of comicfans44
[comicfans44@gmail.com]<BR><B>Sent:</B> Sunday, March 17, 2013 8:51
PM<BR><B>To:</B> lldb-dev<BR><B>Subject:</B> [lldb-dev] CMake build script not
work with gcc 4.6<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>
<DIV>LLDB offical build help page said that gcc>=4.6.2 is supported
,and should set CXXFLAGS=-std=c++0x</DIV>
<DIV>bug CMake build script set CXX_FLAGS to -std=c++11 ,which gcc 4.6 does
not understand.I suggest a </DIV>
<DIV>patch ,just simply set -std=c++0x when compiler is gcc, which makes gcc
4.6 works all right. I did not </DIV>
<DIV>add gcc version check because it requires gcc -version output parse,which
is not very stable across</DIV>
<DIV>different build-config</DIV>
<DIV> </DIV>
<DIV>diff --git a/CMakeLists.txt b/CMakeLists.txt<BR>index d5a28ea..2837a8d
100644<BR>--- a/CMakeLists.txt<BR>+++ b/CMakeLists.txt<BR>@@ -82,7 +82,14 @@
endmacro(add_lldb_definitions)<BR> include_directories(/usr/include/python2.7)<BR> include_directories(../clang/include)<BR> include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")<BR>-set(CMAKE_CXX_FLAGS
"-std=c++11")<BR>+<BR>+<BR>+<BR>+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL
"GNU")<BR>+ set(CMAKE_CXX_FLAGS
"-std=c++0x")<BR>+else()<BR>+ set(CMAKE_CXX_FLAGS
"-std=c++11")<BR>+endif()<BR> <BR> # Disable MSVC
warnings<BR> if( MSVC )</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>
<DIV><U><STRONG>本邮件附件清单如下:</STRONG></U></DIV>
<DIV> (1) gcc4.6-cmake.patch (0.5 K)</DIV><BR></DIV>
<DIV>comicfans44,<A href="mailto:comicfans44@gmail.com"
target=_blank>comicfans44@gmail.com</A></DIV>
<DIV>2013-3-18 </DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></BODY></HTML>