Can I use C++11 for newlib

19 views
Skip to first unread message

张华

unread,
Sep 29, 2015, 5:05:55 AM9/29/15
to Native-Client-Discuss
It seems only pnacl supports c++11. My toolchain is newlib. When I set -std=gnu++11, it says unrecognized compiler option. How can I build C++11 on newlib?

I choose newlib instead of pnacl due to the reason that glib library cannot be installed on pnacl.

Victor Khimenko

unread,
Sep 29, 2015, 6:18:31 AM9/29/15
to Native Client Discuss
On Tue, Sep 29, 2015 at 11:05 AM, 张华 <yuezhi...@gmail.com> wrote:
It seems only pnacl supports c++11. My toolchain is newlib. When I set -std=gnu++11, it says unrecognized compiler option. How can I build C++11 on newlib?

You can't use C++11 with GCC for one simple reason: NaCl's GCC is 4.4-based one. GCC 4.4 was released in 2009 and it's developers had no time machine. They have support for -std=gnu++0x mode, but, again, due to lack of time machine it's limited one.
 
I choose newlib instead of pnacl due to the reason that glib library cannot be installed on pnacl.

For C++11 you'll want clang. It could be combined with newlib (and, most likely, glib), although I'm not sure if it's documented anywhere.

JF Bastien

unread,
Sep 29, 2015, 12:34:55 PM9/29/15
to native-cli...@googlegroups.com
I choose newlib instead of pnacl due to the reason that glib library cannot be installed on pnacl.

For C++11 you'll want clang. It could be combined with newlib (and, most likely, glib), although I'm not sure if it's documented anywhere.

Reply all
Reply to author
Forward
0 new messages