From f54873c81a21084ae0671498c7b295615789ac32 Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Sun, 29 Dec 2013 17:14:20 +0100 Subject: Suppress unsafe warnings of MSVC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a define to suppress MSVC warning “C4996: This function or variable may be unsafe.” If the code is really "unsafe" then it is unsafe on other platforms as well; so fixing these warnings just for MSVC builds, would clutter the code and wouldn't help in fixing issues that might exist on other platforms. Using the same functions across all supported platforms keeps the code clean and helps in writing code that is safe across all platforms. Change-Id: I470072eda4f8174bb911567ef3f061a3582ba449 Reviewed-by: Thiago Macieira --- mkspecs/features/qt_module.prf | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 11509eeb40..c6369732c1 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -119,6 +119,14 @@ DEFINES += QT_BUILDING_QT win32 { INCLUDEPATH += tmp CONFIG += skip_target_version_ext + # If the code is really "unsafe" then it is unsafe on + # other platforms as well; so fixing these warnings just + # for MSVC builds, would clutter the code and wouldn't help + # in fixing issues that might exist on other platforms. + # Using the same functions across all supported platforms + # keeps the code clean and helps in writing code that is + # safe across all platforms. + DEFINES *= _CRT_SECURE_NO_WARNINGS } aix-g++* { -- cgit v1.2.3 From 3277233c2f04f902c1881822d49ccdaf4381fef4 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 17 Jan 2014 09:52:07 +0100 Subject: Do not limit clang generated debug info to dwarf-2 on mac. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dwarf-2 is treated as deprecated (at best) by llvm, and does not support a lot of C++ language features. Most notably, it does not support namespaces and template parameters. By not specifying the dwarf version, the compiler can decide which version to use. Change-Id: Ic32f9101c4db0f06a8ace8f5e04af9236d01598e Reviewed-by: Tor Arne Vestbø Reviewed-by: Morten Johan Sørvig --- mkspecs/common/gcc-base-mac.conf | 4 ---- 1 file changed, 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/common/gcc-base-mac.conf b/mkspecs/common/gcc-base-mac.conf index e0469f31cc..cb1e17bc90 100644 --- a/mkspecs/common/gcc-base-mac.conf +++ b/mkspecs/common/gcc-base-mac.conf @@ -12,10 +12,6 @@ include(gcc-base.conf) QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4 -QMAKE_CFLAGS_DEBUG += -gdwarf-2 - -QMAKE_CXXFLAGS_DEBUG += -gdwarf-2 - QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -- cgit v1.2.3