diff options
author | Peter Seiderer <ps.report@gmx.net> | 2016-03-03 15:17:31 +0100 |
---|---|---|
committer | Peter Seiderer <ps.report@gmx.net> | 2016-03-08 19:30:04 +0000 |
commit | e69e69519661954716d59bfa5bbd0626515cfda9 (patch) | |
tree | 770e0fd9a81aec2ddf3e39119a1bcca3a48db5f1 | |
parent | 4ef990ce4a15959c5eabc8f9731b5b5155db5b07 (diff) |
Disable c++ standard compiler flags for the host build
There is no test for c++ standard support for the host build
(only for the target compiler/build) which leads to trouble
in some cross compiling environments (old host compiler, new
cross compiler):
g++: error: unrecognized command line option ā-std=c++1zā
So disable c++ standard compiler flags unconditionally for host builds.
Task-number: QTBUG-51644
Change-Id: Ifb3042e125fe199a7e081740d1171d26ccacf0c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r-- | mkspecs/features/default_post.prf | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index cd8d8859aa..561c8f4858 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -95,7 +95,10 @@ breakpad { !isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote($$QMAKE_STRIP $$DEBUGFILENAME) } -c++11|c++14|c++1z { +# Disable special compiler flags for host builds (needs to be changed for 5.7 +# to fall back to c++11 because since 5.7 c++11 is required everywhere, +# including host builds). +if(!host_build|!cross_compile):if(c++11|c++14|c++1z) { c++1z: cxxstd = CXX1Z else: c++14: cxxstd = CXX14 else: cxxstd = CXX11 |