diff options
Diffstat (limited to 'libraries/qt5')
-rw-r--r-- | libraries/qt5/patches/gcc8.patch | 18 | ||||
-rw-r--r-- | libraries/qt5/patches/qt-5.7.1_gcc-7.patch | 122 | ||||
-rw-r--r-- | libraries/qt5/qt5.SlackBuild | 10 |
3 files changed, 150 insertions, 0 deletions
diff --git a/libraries/qt5/patches/gcc8.patch b/libraries/qt5/patches/gcc8.patch new file mode 100644 index 0000000000..8e05ab0e92 --- /dev/null +++ b/libraries/qt5/patches/gcc8.patch @@ -0,0 +1,18 @@ +diff -Naur qt-everywhere-opensource-src-5.7.1.orig/qtwebengine/src/3rdparty/chromium/mojo/public/c/system/macros.h qt-everywhere-opensource-src-5.7.1/qtwebengine/src/3rdparty/chromium/mojo/public/c/system/macros.h +--- qt-everywhere-opensource-src-5.7.1.orig/qtwebengine/src/3rdparty/chromium/mojo/public/c/system/macros.h 2016-11-07 15:46:18.000000000 +0100 ++++ qt-everywhere-opensource-src-5.7.1/qtwebengine/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-06-29 21:41:17.353727000 +0200 +@@ -48,7 +48,13 @@ + #endif + + // Like the C++11 |alignof| operator. +-#if __cplusplus >= 201103L ++#if defined(__GNUC__) && __GNUC__ >= 8 ++// GCC 8 has changed the alignof operator to return the minimal alignment ++// required by the target ABI, instead of the preferred alignment. ++// This means that on 32-bit x86, it will return 4 instead of 8. ++// Use __alignof__ instead to avoid this. ++#define MOJO_ALIGNOF(type) __alignof__(type) ++#elif __cplusplus >= 201103L + #define MOJO_ALIGNOF(type) alignof(type) + #elif defined(__GNUC__) + #define MOJO_ALIGNOF(type) __alignof__(type) diff --git a/libraries/qt5/patches/qt-5.7.1_gcc-7.patch b/libraries/qt5/patches/qt-5.7.1_gcc-7.patch new file mode 100644 index 0000000000..4eb4ca8041 --- /dev/null +++ b/libraries/qt5/patches/qt-5.7.1_gcc-7.patch @@ -0,0 +1,122 @@ +From 64fdd317d4127142ad9e967197a2df6ac81ef55f Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen <allan.jensen@qt.io> +Date: Wed, 29 Mar 2017 17:42:18 +0200 +Subject: [PATCH] Fix build with GCC 7.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes some ambiguities and outright wrong code GCC 7 doesn't accept but +earlier compilers did. + +Task-number:QTBUG-59776 +Change-Id: I012f121842ac6cde49db0d571efc62aabe2115e3 +Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> +--- + .../mojo/public/cpp/bindings/interface_ptr_info.h | 2 +- + .../third_party/WebKit/Source/wtf/LinkedHashSet.h | 2 ++ + chromium/v8/src/objects-body-descriptors.h | 2 +- + chromium/v8/src/objects-inl.h | 19 +++++++++++++++++++ + chromium/v8/src/objects.h | 16 ++-------------- + 5 files changed, 25 insertions(+), 16 deletions(-) + +diff --git a/chromium/mojo/public/cpp/bindings/interface_ptr_info.h b/chromium/mojo/public/cpp/bindings/interface_ptr_info.h +index 5bd29d542d..c94a5acdcd 100644 +--- a/chromium/mojo/public/cpp/bindings/interface_ptr_info.h ++++ b/chromium/mojo/public/cpp/bindings/interface_ptr_info.h +@@ -34,7 +34,7 @@ class InterfacePtrInfo { + + InterfacePtrInfo& operator=(InterfacePtrInfo&& other) { + if (this != &other) { +- handle_ = other.handle_.Pass(); ++ handle_ = std::move(other.handle_); + version_ = other.version_; + other.version_ = 0u; + } +diff --git a/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h b/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +index 58d97fbaac..839c7df114 100644 +--- a/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h ++++ b/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +@@ -495,6 +495,8 @@ inline LinkedHashSet<T, U, V, W>& LinkedHashSet<T, U, V, W>::operator=(const Lin + return *this; + } + ++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); ++ + template<typename T, typename U, typename V, typename W> + inline void LinkedHashSet<T, U, V, W>::swap(LinkedHashSet& other) + { +diff --git a/chromium/v8/src/objects-body-descriptors.h b/chromium/v8/src/objects-body-descriptors.h +index 91cb8883be..a1c3634bd7 100644 +--- a/chromium/v8/src/objects-body-descriptors.h ++++ b/chromium/v8/src/objects-body-descriptors.h +@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { + + template <typename StaticVisitor> + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody<StaticVisitor>(obj); + } + }; + +diff --git a/chromium/v8/src/objects-inl.h b/chromium/v8/src/objects-inl.h +index 177c0294dc..baca18d0ef 100644 +--- a/chromium/v8/src/objects-inl.h ++++ b/chromium/v8/src/objects-inl.h +@@ -3122,6 +3122,25 @@ void HashTableBase::SetNumberOfDeletedElements(int nod) { + + + template <typename Derived, typename Shape, typename Key> ++inline uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHash(key, GetHeap()->HashSeed()); ++ } else { ++ return Shape::Hash(key); ++ } ++} ++ ++template <typename Derived, typename Shape, typename Key> ++inline uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key, Object* object) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); ++ } else { ++ return Shape::HashForObject(key, object); ++ } ++} ++ ++ ++template <typename Derived, typename Shape, typename Key> + int HashTable<Derived, Shape, Key>::FindEntry(Key key) { + return FindEntry(GetIsolate(), key); + } +diff --git a/chromium/v8/src/objects.h b/chromium/v8/src/objects.h +index 0111c71311..d737a18fe9 100644 +--- a/chromium/v8/src/objects.h ++++ b/chromium/v8/src/objects.h +@@ -3157,21 +3157,9 @@ template <typename Derived, typename Shape, typename Key> + class HashTable : public HashTableBase { + public: + // Wrapper methods +- inline uint32_t Hash(Key key) { +- if (Shape::UsesSeed) { +- return Shape::SeededHash(key, GetHeap()->HashSeed()); +- } else { +- return Shape::Hash(key); +- } +- } ++ inline uint32_t Hash(Key key); + +- inline uint32_t HashForObject(Key key, Object* object) { +- if (Shape::UsesSeed) { +- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); +- } else { +- return Shape::HashForObject(key, object); +- } +- } ++ inline uint32_t HashForObject(Key key, Object* object); + + // Returns a new HashTable object. + MUST_USE_RESULT static Handle<Derived> New( +-- +2.12.2 + diff --git a/libraries/qt5/qt5.SlackBuild b/libraries/qt5/qt5.SlackBuild index 7b829ff5f3..ac5b138ff5 100644 --- a/libraries/qt5/qt5.SlackBuild +++ b/libraries/qt5/qt5.SlackBuild @@ -108,6 +108,10 @@ patch -p1 < $CWD/patches/qt5.mysql.h.diff # Patch for the newer mozilla-nss patch -p1 < $CWD/patches/nss-update-sslv3-nonce.patch +# Patch for gcc8 on 32bit +# https://bugzilla.redhat.com/show_bug.cgi?id=1563446 +patch -p1 < $CWD/patches/gcc8.patch + # Limit -reduce-relocations to ix86 and x86_64. # https://bugreports.qt-project.org/browse/QTBUG-36129 if echo $ARCH | grep -q '\(i.86\|x86_64\)' 2>/dev/null; then @@ -127,9 +131,15 @@ fi echo "$PRCOD" >> qtwebengine/.qmake.conf +# Needed for gcc-7.x +( cd qtwebengine/src/3rdparty + patch -p1 < $CWD/patches/qt-5.7.1_gcc-7.patch ) + export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" ./configure -v \ + -I /usr/include/openssl-1.0 \ + -L /usr/lib${LIBDIRSUFFIX}/openssl-1.0 \ -confirm-license \ -opensource \ -prefix "/usr/lib${LIBDIRSUFFIX}/$PRGNAM" \ |