wok-current rev 25613

Silence warn for qt4 build
author Stanislas Leduc <shann@slitaz.org>
date Sun Sep 03 07:35:58 2023 +0000 (9 months ago)
parents e5202cbaa4a3
children e21aa7673385
files qt4/stuff/gcc6_build_fix.patch
line diff
     1.1 --- a/qt4/stuff/gcc6_build_fix.patch	Sun Sep 03 06:53:43 2023 +0000
     1.2 +++ b/qt4/stuff/gcc6_build_fix.patch	Sun Sep 03 07:35:58 2023 +0000
     1.3 @@ -53,6 +53,97 @@
     1.4   
     1.5       public:
     1.6  
     1.7 +From e03ee6b5bca6ab457a16faa8399ba20cd5cc1fbc Mon Sep 17 00:00:00 2001
     1.8 +From: Jeroen Hofstee <jhofstee@victronenergy.com>
     1.9 +Date: Sat, 16 Nov 2019 16:50:00 +0100
    1.10 +Subject: [PATCH] silence some loud but innocent warnings
    1.11 +
    1.12 +These warnings are harmless for old code, so suppress them so real
    1.13 +issue are visible in the logs.
    1.14 +---
    1.15 + configure | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1.16 + 1 file changed, 66 insertions(+)
    1.17 +
    1.18 +diff --git a/configure b/configure
    1.19 +index a9ba7c8ccb..6ebf71ab21 100755
    1.20 +--- a/configure
    1.21 ++++ b/configure
    1.22 +@@ -3435,6 +3435,72 @@ if [ -n "$CFG_SYSROOT" ]; then
    1.23 + fi
    1.24 + export SYSROOT_FLAG    # used by config.tests/unix/compile.test
    1.25 + 
    1.26 ++# Since qt4 is no longer officialy maintained, silence the harmless warnings
    1.27 ++# since nobody is going to fix them anyway...
    1.28 ++
    1.29 ++if compilerSupportsFlag $TEST_COMPILER -Wunused-but-set-variable -Werror; then
    1.30 ++	QMakeVar add QMAKE_CFLAGS -Wno-unused-but-set-variable
    1.31 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-unused-but-set-variable
    1.32 ++fi
    1.33 ++
    1.34 ++if compilerSupportsFlag $TEST_COMPILER -Wunused-function -Werror; then
    1.35 ++	QMakeVar add QMAKE_CFLAGS -Wno-unused-function
    1.36 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-unused-function
    1.37 ++fi
    1.38 ++
    1.39 ++if compilerSupportsFlag $TEST_COMPILER -Wunused-variable -Werror; then
    1.40 ++	QMakeVar add QMAKE_CFLAGS -Wno-unused-variable
    1.41 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-unused-variable
    1.42 ++fi
    1.43 ++
    1.44 ++if compilerSupportsFlag $TEST_COMPILER -Wunused-local-typedefs; then
    1.45 ++	QMakeVar add QMAKE_CFLAGS -Wno-unused-local-typedefs
    1.46 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-unused-local-typedefs
    1.47 ++fi
    1.48 ++
    1.49 ++if compilerSupportsFlag $TEST_COMPILER -Wimplicit-fallthrough -Werror; then
    1.50 ++	QMakeVar add QMAKE_CFLAGS -Wno-implicit-fallthrough
    1.51 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-implicit-fallthrough
    1.52 ++fi
    1.53 ++
    1.54 ++if compilerSupportsFlag $TEST_COMPILER -Wunused-parameter -Werror; then
    1.55 ++	QMakeVar add QMAKE_CFLAGS -Wno-unused-parameter
    1.56 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-unused-parameter
    1.57 ++fi
    1.58 ++
    1.59 ++# when a compiler starts guessing it is often wrong..
    1.60 ++if compilerSupportsFlag $TEST_COMPILER -Wmaybe-uninitialized -Werror; then
    1.61 ++	QMakeVar add QMAKE_CFLAGS -Wno-maybe-uninitialized
    1.62 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-maybe-uninitialized
    1.63 ++fi
    1.64 ++
    1.65 ++if compilerSupportsFlag $TEST_COMPILER -Wswitch -Werror; then
    1.66 ++	QMakeVar add QMAKE_CFLAGS -Wno-switch
    1.67 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-switch
    1.68 ++fi
    1.69 ++
    1.70 ++if compilerSupportsFlag $TEST_COMPILER -Wdeprecated-copy -Werror; then
    1.71 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-deprecated-copy
    1.72 ++fi
    1.73 ++
    1.74 ++if compilerSupportsFlag $TEST_COMPILER -Wdeprecated-declarations -Werror; then
    1.75 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-deprecated-declarations
    1.76 ++fi
    1.77 ++
    1.78 ++if compilerSupportsFlag $TEST_COMPILER -Wparentheses -Werror; then
    1.79 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-parentheses
    1.80 ++fi
    1.81 ++
    1.82 ++if compilerSupportsFlag $TEST_COMPILER -Wclass-memaccess -Werror; then
    1.83 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-class-memaccess
    1.84 ++fi
    1.85 ++
    1.86 ++# note: parameter passing for argument of type 'QMap<QSettingsKey, QVariant>::iterator' changed in GCC 7.1
    1.87 ++# Assuming that OE is used to rebuild all sources, there is no need to worry about abi changes..
    1.88 ++if compilerSupportsFlag $TEST_COMPILER -Wpsabi -Werror; then
    1.89 ++	QMakeVar add QMAKE_CXXFLAGS -Wno-psabi
    1.90 ++fi
    1.91 ++
    1.92 + # auto-detect precompiled header support
    1.93 + if [ "$CFG_PRECOMPILE" = "auto" ]; then
    1.94 +     if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
    1.95 +-- 
    1.96 +2.17.1
    1.97 +
    1.98  Allow gcc v6 to build webkit. Without this, webkit isn't built
    1.99  when gcc v6 is used (silently but then python-pyqt fails to build).
   1.100