Hello,
I'd like to finally follow up on my suggestion to enable C++11 by default back in March. As more and more targets are selectively using the current standard by manually adding 'CC_CXX_OPT += -std=gnu++11' to their respective target-description files, I will make this option the default. This will remove thos repetitive declarations and, more importantly, open the opportunity to use the new standard for simplifying the base system as well.
Admittedly, I have not thoroughly followed up on the corner cases cited by Andreas. The best would be to enable the option consistently across all C++ software packages linked against Genode programs, which sounds reasonable to me. For all programs built within Genode's build system, this will be the case anyway. External libraries linked against hybrid Linux/Genode programs must be considered. But for those, the change to enabling C++11 seems natural, too.
I hope that everyone (in particular Andreas) is fine with the changed default for Genode.
Regards Norman
On 03/25/2013 06:50 PM, Norman Feske wrote:
Hi Andreas,
I'm no expert in that field but somebody who is might take a look at http://gcc.gnu.org/wiki/Cxx11AbiCompatibility and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646
thank you for these insightful (and admittedly frightening) links. Given these discussions, mixing compilation units compiled with -std=c++11 and -std=c++98 looks risky indeed. It seems that the problem can be avoided only by compiling the whole C++ code base consistently with one kind of -std argument. But I wonder how do Linux distributions do that? For example, if Qt5 uses C++11, does it mean that Qt5 must not be linked to programs compiled with -std=c++98? This is hard to believe.
As far as I understand the above deal mainly with issues within the standard library which might not be a problem when relying on the genode toolchain but could for the lx_hybrid platform.
I agree. But how should we go about this?
Cheers Norman