qtbase: include GCC 8 compatibility patch

This commit is contained in:
Mark Brand 2018-05-17 21:55:27 +02:00
parent 85eb1af5dd
commit 430de95668
1 changed files with 66 additions and 12 deletions

View File

@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
From 618f569eb0d00789917050c5d0bc7cb959599821 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 26 Aug 2015 12:45:43 +0100
Subject: [PATCH 1/6] cmake: Rearrange STATIC vs INTERFACE targets
Subject: [PATCH 1/7] cmake: Rearrange STATIC vs INTERFACE targets
Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED)
for header-only modules when building Qt5 statically.
@ -34,13 +34,13 @@ index 55c74aad66..d7bcffeb9c 100644
add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
!!ENDIF
--
2.14.1
2.17.0
From 68f406b40eb3708809c042dfaf41b5366b437308 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sat, 16 Jul 2016 20:31:07 +1000
Subject: [PATCH 2/6] Fix pkgconfig file and library naming
Subject: [PATCH 2/7] Fix pkgconfig file and library naming
See: https://codereview.qt-project.org/#/c/165394/
https://bugreports.qt.io/browse/QTBUG-30898
@ -103,13 +103,13 @@ index e6a0d97f1a..5aefea28e5 100644
-
-TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end
--
2.14.1
2.17.0
From d0ccaee377241a6b661ccb9a6d57ebc694b50f76 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sun, 29 Jan 2017 13:02:16 +0100
Subject: [PATCH 3/6] reenable fontconfig for win32 (MXE-specific)
Subject: [PATCH 3/7] reenable fontconfig for win32 (MXE-specific)
Change-Id: I05b036366bd402e43309742412bcf8ca91fe125f
@ -143,13 +143,13 @@ index ca33689cd7..194523eee0 100644
m_fontDatabase = new QWinRTFontDatabase;
#elif defined(Q_OS_WIN)
--
2.14.1
2.17.0
From 35e8ce1f490f973045c77385f96acaa3736c8787 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sun, 29 Jan 2017 16:22:03 +0100
Subject: [PATCH 4/6] fix treatment of SYBASE_LIBS
Subject: [PATCH 4/7] fix treatment of SYBASE_LIBS
Change-Id: I4c9914cf7ef9d91feb0718a57f2551c1eeed47e0
@ -167,13 +167,13 @@ index b69b51b679..d37423adbd 100644
}
return(true)
--
2.14.1
2.17.0
From 4474738cdb894d948b2e7b30c32bf05455d41001 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sun, 11 Jun 2017 00:27:41 +0200
Subject: [PATCH 5/6] use pkg-config for harfbuzz
Subject: [PATCH 5/7] use pkg-config for harfbuzz
Change-Id: Ia65cbb90fd180f1bc10ce077a9a8323a48e51421
@ -192,13 +192,13 @@ index b90ce6e4d9..fc9a3470c1 100644
},
"imf": {
--
2.14.1
2.17.0
From 8427c411a789c537b41d113d1f8f9ea7eb9d009a Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 23 Nov 2017 11:28:47 +0200
Subject: [PATCH 6/6] disable qt_random_cpu for i686-w64-mingw32
Subject: [PATCH 6/7] disable qt_random_cpu for i686-w64-mingw32
Workaround for gcc internal error compiling for mingw32:
global/qrandom.cpp: In function 'qsizetype qt_random_cpu(void*, qsizetype)':
@ -229,5 +229,59 @@ index 72ba299280..90a0f378ff 100644
# ifdef Q_PROCESSOR_X86_64
--
2.14.1
2.17.0
From 757881f896daa935361ec220733fe6c85af0002a Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Tue, 8 May 2018 21:57:07 -0700
Subject: [PATCH 7/7] Fix build with GCC 8: memset/memcpy/memmove of
non-trivials
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
qarraydataops.h:73:17: error: void* memset(void*, int, size_t) clearing an object of non-trivial type
struct TCBPoint; use assignment or value-initialization instead [-Werror=class-memaccess]
Change-Id: I5d0ee9389a794d80983efffd152ce10eb557341f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index b7c3bc1287..e7f9c8a2f4 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -65,7 +65,7 @@ struct QPodArrayOps
Q_ASSERT(newSize > uint(this->size));
Q_ASSERT(newSize <= this->alloc);
- ::memset(this->end(), 0, (newSize - this->size) * sizeof(T));
+ ::memset(static_cast<void *>(this->end()), 0, (newSize - this->size) * sizeof(T));
this->size = int(newSize);
}
@@ -120,8 +120,9 @@ struct QPodArrayOps
Q_ASSERT(e <= where || b > this->end()); // No overlap
Q_ASSERT(size_t(e - b) <= this->alloc - uint(this->size));
- ::memmove(where + (e - b), where, (static_cast<const T*>(this->end()) - where) * sizeof(T));
- ::memcpy(where, b, (e - b) * sizeof(T));
+ ::memmove(static_cast<void *>(where + (e - b)), static_cast<void *>(where),
+ (static_cast<const T*>(this->end()) - where) * sizeof(T));
+ ::memcpy(static_cast<void *>(where), static_cast<const void *>(b), (e - b) * sizeof(T));
this->size += (e - b);
}
@@ -132,7 +133,8 @@ struct QPodArrayOps
Q_ASSERT(b >= this->begin() && b < this->end());
Q_ASSERT(e > this->begin() && e < this->end());
- ::memmove(b, e, (static_cast<T *>(this->end()) - e) * sizeof(T));
+ ::memmove(static_cast<void *>(b), static_cast<void *>(e),
+ (static_cast<T *>(this->end()) - e) * sizeof(T));
this->size -= (e - b);
}
};
--
2.17.0