[LLVMbugs] [Bug 21674] New: Stand-alone compilation fails, due to std=c++11 flag missing.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Nov 26 07:33:08 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21674
Bug ID: 21674
Summary: Stand-alone compilation fails, due to std=c++11 flag
missing.
Product: libc++abi
Version: 3.4
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: hannes_weisbach at gmx.net
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
Classification: Unclassified
I tried to do a "stand alone" compilation of libcxxabi according to
http://libcxxabi.llvm.org:
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141126/5dadbcef/attachment.html>
More information about the llvm-bugs
mailing list