various fixes for gcc6
authorRex Dieter <rdieter@math.unl.edu>
Sun, 20 Sep 2020 19:01:50 +0000 (20:01 +0100)
committerAdrian Bunk <bunk@debian.org>
Sun, 20 Sep 2020 19:01:50 +0000 (20:01 +0100)
Origin: http://pkgs.fedoraproject.org/cgit/rpms/qt.git/tree/qt-everywhere-opensource-src-4.8.7-gcc6.patch
Forwarded: not-needed
Last-Update: 2016-05-03

This patch solves two issues:
- Use the correct key for the compiler.
- Avoid a shift overflow.

Gbp-Pq: Name qt-everywhere-opensource-src-4.8.7-gcc6.patch

configure
src/xmlpatterns/api/qcoloroutput_p.h

index 5eca02ab4adc1c030ee62944245cb523d9d33992..e2c1ab2605b3a117ec763f45f46c32af84ca8000 100755 (executable)
--- a/configure
+++ b/configure
@@ -7797,7 +7797,7 @@ case "$XPLATFORM" in
     *-g++*)
        # Check gcc's version
        case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
-           5*|4*|3.4*)
+           8*|7*|6*|5*|4*|3.4*)
                ;;
             3.3*)
                 canBuildWebKit="no"
@@ -8113,7 +8113,7 @@ g++*)
     3.*)
         COMPILER_VERSION="3.*"
         ;;
-    5*|4.*)
+    8*|7*|6*|5*|4.*)
         COMPILER_VERSION="4"
         ;;
     *)
index 7911e8962501211cf209710706be5cc6d838279a..be284d14096eb56f71571552b85ef0b9407bacd6 100644 (file)
@@ -70,8 +70,8 @@ namespace QPatternist
             ForegroundShift = 10,
             BackgroundShift = 20,
             SpecialShift    = 20,
-            ForegroundMask  = ((1 << ForegroundShift) - 1) << ForegroundShift,
-            BackgroundMask  = ((1 << BackgroundShift) - 1) << BackgroundShift
+            ForegroundMask  = 0x1f << ForegroundShift,
+            BackgroundMask  = 0x7 << BackgroundShift
         };
 
     public: