From dbc983a513a6dff9973490d013b144812ec707aa Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 26 Mar 2018 12:58:23 +0200 Subject: Revert "Detect C standard and try using the most recent" The change causes a crash when compiling the xkbcommon 3rdparty library and compile failures (qtimageformats on Android). This reverts commit a47cb146809e32f43449dcfe9932833c2f0ab987. Task-number: QTBUG-67326 Task-number: QTBUG-67327 Change-Id: I5ddc4eccad699e3eaec535fd6a63d11b0026b42e Reviewed-by: Sami Nurmenniemi Reviewed-by: Liang Qi Reviewed-by: Gatis Paeglis --- mkspecs/features/default_post.prf | 15 --------------- mkspecs/features/qt_common.prf | 2 -- mkspecs/features/qt_configure.prf | 13 ++----------- 3 files changed, 2 insertions(+), 28 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index bf5acdefc4..9eba5bcf00 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -143,21 +143,6 @@ c++11|c++14|c++1z { unset(cxxstd) } -c99|c11 { - c11: cstd = C11 - else: cstd = C99 - - # Check if we should disable compiler extensions or not - !isEmpty(QMAKE_CFLAGS_GNU$$cstd) { - # Let strict C++ imply strict C - !strict_c++: cstd = GNU$$cstd - } - - QMAKE_CFLAGS += $$eval(QMAKE_CFLAGS_$$cstd) - - unset(cstd) -} - utf8_source { QMAKE_CFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index 40f03d2186..f4ae5bde80 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -17,8 +17,6 @@ DEFINES *= QT_NO_NARROWING_CONVERSIONS_IN_CONNECT qtConfig(c++11): CONFIG += c++11 strict_c++ qtConfig(c++14): CONFIG += c++14 qtConfig(c++1z): CONFIG += c++1z -qtConfig(c99): CONFIG += c99 -qtConfig(c11): CONFIG += c11 qtConfig(stack-protector-strong): CONFIG += stack_protector_strong contains(TEMPLATE, .*lib) { # module and plugins diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index a7da26c745..98fff59ea1 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -866,15 +866,6 @@ defineTest(qtConfTestPrepare_compile) { defineTest(qtConfPrepareCompileTestSource) { test_dir = $$2 - test_lang = $$eval($${1}.lang) - isEmpty(test_lang): test_lang = "c++" - - equals(test_lang, "c++"): suffix = "cpp" - else: equals(test_lang, "c"): suffix = "c" - else: equals(test_lang, "objc"): suffix = "m" - else: equals(test_lang, "objc++"): suffix = "mm" - else: error("Unknown language '$$test_lang' in compile test $$1") - # Create source code contents = "/* Generated by configure */" # Custom code before includes @@ -898,10 +889,10 @@ defineTest(qtConfPrepareCompileTestSource) { " /* END TEST */" \ " return 0;" \ "}" - write_file($$test_dir/main.$$suffix, contents)|error() + write_file($$test_dir/main.cpp, contents)|error() # Create stub .pro file - contents = "SOURCES = main.$$suffix" + contents = "SOURCES = main.cpp" # Custom project code for (ent, $$qtConfScalarOrList($${1}.qmake)): \ contents += $$ent -- cgit v1.2.3