Summary: | dev-qt/*: please replace USE=c++0x with USE=c++11 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
Component: | [OLD] Library | Assignee: | Qt Bug Alias <qt> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 488536 |
Description
Michał Górny
2013-10-16 04:06:57 UTC
We could possibly just drop the useflag and always enable it, if the active gcc version supports it. Doesn't it affect the package ABI? I was wondering about the same thing but use of std::pair<> in the API made it impossible. (In reply to Michał Górny from comment #2) AFAIK, ABI is unaffected. (In reply to Davide Pesavento from comment #3) > (In reply to Michał Górny from comment #2) > > AFAIK, ABI is unaffected. I suspect Qt overrides all standard types anyway but please take a look at [1] just to make sure :). [1]:http://gcc.gnu.org/wiki/Cxx11AbiCompatibility Thiago (QtCore maintainer) confirmed that ABI does not change. (In reply to Davide Pesavento from comment #5) > Thiago (QtCore maintainer) confirmed that ABI does not change. Thanks for checking this. Then I'm all for auto-enabling it whenever available. And I think the build system should autodetect it then. Actually, upstream said that building qt4 with C++11 is pointless. Real C++11 support came only in qt5. Therefore I completely removed c++0x/c++11 USE flags from qt 4.8.5 and later. Qt5's configure detects and enables C++11 automatically. (In reply to Davide Pesavento from comment #7) > Actually, upstream said that building qt4 with C++11 is pointless. Real > C++11 support came only in qt5. > > Therefore I completely removed c++0x/c++11 USE flags from qt 4.8.5 and later. > Qt5's configure detects and enables C++11 automatically. I found that this is partially true only. When trying to compile Qt 5.3.2 with gcc 4.9.2, Qt detects c++11 support, but watching compile lines, I see it is using only -std=c++0x instead. AN example with qtopengl-5.3.2-r1 ebuild (despite it is common for all qt5 ebuilds): (I highlighted the issue between ** symbols in compilation line) Build parts ............ libs tools Mode ................... release Using C++11 ............ yes Using PCH .............. no Target compiler supports: SSE2/SSE3/SSSE3 ...... yes/yes/yes SSE4.1/SSE4.2 ........ yes/yes AVX/AVX2 ............. yes/yes (......) make -j4 x86_64-pc-linux-gnu-g++ -c -O2 -pipe -mtune=native -march=native -fomit-frame-pointer -fvisibility=hidden -fvisibility-inlines-hidden **-std=c++0x** -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_USING_NAMESPACE -DQT_BUILD_OPENGL_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtOpenGL -I../../include/QtOpenGL/5.3.2 -I../../include/QtOpenGL/5.3.2/QtOpenGL -isystem /usr/include/qt5/QtWidgets/5.3.2 -isystem /usr/include/qt5/QtWidgets/5.3.2/QtWidgets -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.3.2 -isystem /usr/include/qt5/QtGui/5.3.2/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore/5.3.2 -isystem /usr/include/qt5/QtCore/5.3.2/QtCore -isystem /usr/include/qt5/QtCore -I.moc -o .obj/qgl.o qgl.cpp (...) Should I open a new bugreport? There's no difference between -std=c++11 and -std=c++0x AFAIK. They use the latter because it's understood by earlier versions of gcc too. |