summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/default_post.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/default_post.prf')
-rw-r--r--mkspecs/features/default_post.prf13
1 files changed, 10 insertions, 3 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index cd8d8859aa..e7e9a5bd87 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -96,9 +96,16 @@ breakpad {
}
c++11|c++14|c++1z {
- c++1z: cxxstd = CXX1Z
- else: c++14: cxxstd = CXX14
- else: cxxstd = CXX11
+ # Disable special compiler flags for host builds
+ !host_build|!cross_compile {
+ c++1z: cxxstd = CXX1Z
+ else: c++14: cxxstd = CXX14
+ else: cxxstd = CXX11
+ } else {
+ # Fall back to c++11, because since 5.7 c++11 is required everywhere,
+ # including host builds
+ cxxstd = CXX11
+ }
# Check if we should disable the GNU extensions or not
!strict_c++:!isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd): cxxstd = GNU$$cxxstd