<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Stand-alone compilation fails, due to std=c++11 flag missing."
   href="http://llvm.org/bugs/show_bug.cgi?id=21674">21674</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Stand-alone compilation fails, due to std=c++11 flag missing.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++abi
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hannes_weisbach@gmx.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I tried to do a "stand alone" compilation of libcxxabi according to
<a href="http://libcxxabi.llvm.org">http://libcxxabi.llvm.org</a>:

svn co <a href="http://llvm.org/svn/llvm-project/libcxxabi/trunk">http://llvm.org/svn/llvm-project/libcxxabi/trunk</a> libcxxabi (rev 222832)
mkdir build
cd build
cmake -DLIBCXXABI_LIBCXX_INCLUDES=path/to/libcxx/include ..
DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
-- The C compiler identification is Clang 3.5.0
-- The CXX compiler identification is Clang 3.5.0
[...]

make
Scanning dependencies of target cxxabi
[  5%] Building CXX object src/CMakeFiles/cxxabi.dir/abort_message.cpp.o
[ 11%] Building CXX object src/CMakeFiles/cxxabi.dir/cxa_aux_runtime.cpp.o
[ 17%] Building CXX object src/CMakeFiles/cxxabi.dir/cxa_default_handlers.cpp.o
In file included from
/home/hannesweisbach/libcxxabi/src/cxa_default_handlers.cpp:19:
In file included from /home/hannesweisbach/libcxxabi/src/cxa_exception.hpp:19:
/home/hannesweisbach/libcxxabi/include/unwind.h:44:27: warning: commas at the
end of enumerator lists are a C++11 extension [-Wc++11-extensions]
  _URC_CONTINUE_UNWIND = 8,
                          ^
1 warning generated.
[ 23%] Building CXX object src/CMakeFiles/cxxabi.dir/cxa_demangle.cpp.o
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:10:33: warning: variadic
macros are a C99 feature [-Wvariadic-macros]
#define _LIBCPP_EXTERN_TEMPLATE(...)
                                ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:60:10: warning: 'auto' type
specifier is a C++11 extension [-Wc++11-extensions]
    for (auto& s : db.names)
         ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:60:18: warning: range-based
for loop is a C++11 extension [-Wc++11-extensions]
    for (auto& s : db.names)
                 ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:64:10: warning: 'auto' type
specifier is a C++11 extension [-Wc++11-extensions]
    for (auto& v : db.subs)
         ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:64:18: warning: range-based
for loop is a C++11 extension [-Wc++11-extensions]
    for (auto& v : db.subs)
                 ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:70:14: warning: 'auto' type
specifier is a C++11 extension [-Wc++11-extensions]
        for (auto& s : v)
             ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:70:22: warning: range-based
for loop is a C++11 extension [-Wc++11-extensions]
        for (auto& s : v)
                     ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:76:10: warning: 'auto' type
specifier is a C++11 extension [-Wc++11-extensions]
    for (auto& t : db.template_param)
         ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:76:18: warning: range-based
for loop is a C++11 extension [-Wc++11-extensions]
    for (auto& t : db.template_param)
                 ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:80:14: warning: 'auto' type
specifier is a C++11 extension [-Wc++11-extensions]
        for (auto& v : t)
             ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:80:22: warning: range-based
for loop is a C++11 extension [-Wc++11-extensions]
        for (auto& v : t)
                     ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:86:18: warning: 'auto' type
specifier is a C++11 extension [-Wc++11-extensions]
            for (auto& s : v)
                 ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:86:26: warning: range-based
for loop is a C++11 extension [-Wc++11-extensions]
            for (auto& s : v)
                         ^
/home/hannesweisbach/libcxxabi/src/cxa_demangle.cpp:141:12: error: unknown type
name 'constexpr'
    static constexpr const char* spec = "%af";
           ^
[...]

When adding the flag "-std=c++11" manually everything works fine:
rm -rf *
cmake -DCMAKE_CXX_FLAGS="-std=c++11"
-DLIBCXXABI_LIBCXX_INCLUDES=../../libcxx/include .. -DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-- The C compiler identification is Clang 3.5.0
-- The CXX compiler identification is Clang 3.5.0
[...]
make
[Usual output. *No errors, no warnings*]

Hope this helps.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>