Fix broken binary compatibility for C memory management functions
* Sun Jun 25 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.9.0-3 - Fix broken binary compatibility for C memory management functions (incomplete upstream fix for QTBUG-60565)
This commit is contained in:
parent
f4a3e4c1e3
commit
09a57d530c
@ -56,7 +56,7 @@
|
||||
Summary: Qt5 - QtWebEngine components
|
||||
Name: qt5-qtwebengine
|
||||
Version: 5.9.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
|
||||
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
|
||||
# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
|
||||
@ -117,6 +117,9 @@ Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch
|
||||
Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch
|
||||
# Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn
|
||||
Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch
|
||||
# Fix broken binary compatibility for C memory management functions (incomplete
|
||||
# upstream fix for QTBUG-60565)
|
||||
Patch23: qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch
|
||||
# Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128)
|
||||
# https://codereview.qt-project.org/196178
|
||||
Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch
|
||||
@ -368,6 +371,7 @@ BuildArch: noarch
|
||||
%patch20 -p1 -b .qt57
|
||||
%patch21 -p1 -b .gn-bootstrap-verbose
|
||||
%patch22 -p1 -b .system-re2
|
||||
%patch23 -p1 -b .qtbug-60565-c-symbols
|
||||
%patch100 -p1 -b .gn-aarch64
|
||||
%patch101 -p1 -b .aarch64-gcc-toolchain
|
||||
# fix // in #include in content/renderer/gpu to avoid debugedit failure
|
||||
@ -576,6 +580,10 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Jun 25 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.9.0-3
|
||||
- Fix broken binary compatibility for C memory management functions (incomplete
|
||||
upstream fix for QTBUG-60565)
|
||||
|
||||
* Tue Jun 13 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.9.0-2
|
||||
- arm-fpu-fix patch: Also build the host tools (i.e., GN) with the correct FPU
|
||||
|
||||
|
162
qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch
Normal file
162
qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch
Normal file
@ -0,0 +1,162 @@
|
||||
diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp
|
||||
--- qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp 2017-05-19 06:22:04.000000000 +0200
|
||||
+++ qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp 2017-06-25 22:33:28.508223362 +0200
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
#include <new>
|
||||
#include <unistd.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <malloc.h>
|
||||
|
||||
#if defined(__LP64__)
|
||||
# define SIZE_T_MANGLING "m"
|
||||
@@ -47,6 +49,7 @@
|
||||
#endif
|
||||
|
||||
#define SHIM_ALIAS_SYMBOL(fn) __attribute__((weak, alias(#fn)))
|
||||
+#define SHIM_HIDDEN __attribute__ ((visibility ("hidden")))
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -82,26 +85,100 @@
|
||||
void __ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept
|
||||
SHIM_ALIAS_SYMBOL(ShimCppDeleteArray);
|
||||
|
||||
+__asm__(".symver __ShimMalloc, malloc@Qt_5");
|
||||
+void* __ShimMalloc(size_t size) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimMalloc);
|
||||
+
|
||||
+__asm__(".symver __ShimCalloc, calloc@Qt_5");
|
||||
+void* __ShimCalloc(size_t n, size_t size) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimCalloc);
|
||||
+
|
||||
+__asm__(".symver __ShimRealloc, realloc@Qt_5");
|
||||
+void* __ShimRealloc(void* address, size_t size) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimRealloc);
|
||||
+
|
||||
+__asm__(".symver __ShimMemalign, memalign@Qt_5");
|
||||
+void* __ShimMemalign(size_t alignment, size_t size) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimMemalign);
|
||||
+
|
||||
+__asm__(".symver __ShimPosixMemalign, posix_memalign@Qt_5");
|
||||
+int __ShimPosixMemalign(void** res, size_t alignment, size_t size) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimPosixMemalign);
|
||||
+
|
||||
+__asm__(".symver __ShimValloc, valloc@Qt_5");
|
||||
+void* __ShimValloc(size_t size) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimValloc);
|
||||
+
|
||||
+__asm__(".symver __ShimPvalloc, pvalloc@Qt_5");
|
||||
+void* __ShimPvalloc(size_t size) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimPvalloc);
|
||||
+
|
||||
+__asm__(".symver __ShimFree, free@Qt_5");
|
||||
+void __ShimFree(void* address) noexcept
|
||||
+ SHIM_ALIAS_SYMBOL(ShimFree);
|
||||
+
|
||||
static void* __shimCppNew(size_t size);
|
||||
static void* __shimCppNewArray(size_t size);
|
||||
static void __shimCppDelete(void *address);
|
||||
static void __shimCppDeleteArray(void *address);
|
||||
+static void* __shimMalloc(size_t size) noexcept;
|
||||
+static void* __shimCalloc(size_t n, size_t size) noexcept;
|
||||
+static void* __shimRealloc(void* address, size_t size) noexcept;
|
||||
+static void* __shimMemalign(size_t alignment, size_t size) noexcept;
|
||||
+static int __shimPosixMemalign(void** res, size_t alignment, size_t size)
|
||||
+ noexcept;
|
||||
+static void* __shimValloc(size_t size) noexcept;
|
||||
+static void* __shimPvalloc(size_t size) noexcept;
|
||||
+static void __shimFree(void* address) noexcept;
|
||||
|
||||
-static void* ShimCppNew(size_t size) {
|
||||
+SHIM_HIDDEN void* ShimCppNew(size_t size) {
|
||||
return __shimCppNew(size);
|
||||
}
|
||||
|
||||
-static void* ShimCppNewArray(size_t size) {
|
||||
+SHIM_HIDDEN void* ShimCppNewArray(size_t size) {
|
||||
return __shimCppNewArray(size);
|
||||
}
|
||||
|
||||
-static void ShimCppDelete(void* address) {
|
||||
+SHIM_HIDDEN void ShimCppDelete(void* address) {
|
||||
__shimCppDelete(address);
|
||||
}
|
||||
|
||||
-static void ShimCppDeleteArray(void* address) {
|
||||
+SHIM_HIDDEN void ShimCppDeleteArray(void* address) {
|
||||
__shimCppDeleteArray(address);
|
||||
}
|
||||
+
|
||||
+SHIM_HIDDEN void* ShimMalloc(size_t size) noexcept {
|
||||
+ return __shimMalloc(size);
|
||||
+}
|
||||
+
|
||||
+SHIM_HIDDEN void* ShimCalloc(size_t n, size_t size) noexcept {
|
||||
+ return __shimCalloc(n, size);
|
||||
+}
|
||||
+
|
||||
+SHIM_HIDDEN void* ShimRealloc(void* address, size_t size) noexcept {
|
||||
+ return __shimRealloc(address, size);
|
||||
+}
|
||||
+
|
||||
+SHIM_HIDDEN void* ShimMemalign(size_t alignment, size_t size) noexcept {
|
||||
+ return __shimMemalign(alignment, size);
|
||||
+}
|
||||
+
|
||||
+SHIM_HIDDEN int ShimPosixMemalign(void** res, size_t alignment, size_t size)
|
||||
+ noexcept {
|
||||
+ return __shimPosixMemalign(res, alignment, size);
|
||||
+}
|
||||
+
|
||||
+SHIM_HIDDEN void* ShimValloc(size_t size) noexcept {
|
||||
+ return __shimValloc(size);
|
||||
+}
|
||||
+
|
||||
+SHIM_HIDDEN void* ShimPvalloc(size_t size) noexcept {
|
||||
+ return __shimPvalloc(size);
|
||||
+}
|
||||
+
|
||||
+SHIM_HIDDEN void ShimFree(void* address) noexcept {
|
||||
+ __shimFree(address);
|
||||
+}
|
||||
} // extern "C"
|
||||
|
||||
static void* __shimCppNew(size_t size) {
|
||||
@@ -119,3 +196,36 @@
|
||||
static void __shimCppDeleteArray(void* address) {
|
||||
operator delete[](address);
|
||||
}
|
||||
+
|
||||
+static void* __shimMalloc(size_t size) noexcept {
|
||||
+ return malloc(size);
|
||||
+}
|
||||
+
|
||||
+static void* __shimCalloc(size_t n, size_t size) noexcept {
|
||||
+ return calloc(n, size);
|
||||
+}
|
||||
+
|
||||
+static void* __shimRealloc(void* address, size_t size) noexcept {
|
||||
+ return realloc(address, size);
|
||||
+}
|
||||
+
|
||||
+static void* __shimMemalign(size_t alignment, size_t size) noexcept {
|
||||
+ return memalign(alignment, size);
|
||||
+}
|
||||
+
|
||||
+static int __shimPosixMemalign(void** res, size_t alignment, size_t size)
|
||||
+ noexcept {
|
||||
+ return posix_memalign(res, alignment, size);
|
||||
+}
|
||||
+
|
||||
+static void* __shimValloc(size_t size) noexcept {
|
||||
+ return valloc(size);
|
||||
+}
|
||||
+
|
||||
+static void* __shimPvalloc(size_t size) noexcept {
|
||||
+ return pvalloc(size);
|
||||
+}
|
||||
+
|
||||
+static void __shimFree(void* address) noexcept {
|
||||
+ free(address);
|
||||
+}
|
Loading…
Reference in New Issue
Block a user