qt5: fix build w/ newer glibc and musl libc

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2018-10-22 17:46:44 +02:00
parent 5720fe7cc0
commit 7276e53b65
No known key found for this signature in database
GPG key ID: 6764EC32352D0647
2 changed files with 135 additions and 0 deletions

View file

@ -0,0 +1,14 @@
--- qtbase/src/corelib/io/qfilesystemengine_unix.cpp.orig 2018-10-22 00:35:10.154815542 +0200
+++ qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2018-10-22 00:38:16.066828801 +0200
@@ -98,9 +98,11 @@
#endif
# if !QT_CONFIG(renameat2) && defined(SYS_renameat2)
+# ifndef __GLIBC__
static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newpath, unsigned flags)
{ return syscall(SYS_renameat2, oldfd, oldpath, newfd, newpath, flags); }
# endif
+# endif
# if !QT_CONFIG(statx) && defined(SYS_statx) && QT_HAS_INCLUDE(<linux/stat.h>)
# include <linux/stat.h>

View file

@ -0,0 +1,121 @@
--- qtwebengine/src/3rdparty/chromium/base/message_loop/message_pump_libevent.cc
+++ qtwebengine/src/3rdparty/chromium/base/message_loop/message_pump_libevent.cc
@@ -14,7 +14,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
-#include "base/third_party/libevent/event.h"
+#include "event.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
--- qtwebengine/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2018-10-18 01:20:19.224169786 +0200
+++ qtwebengine/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2018-10-18 01:26:11.273148802 +0200
@@ -32,6 +32,7 @@
is_win = sys.platform.startswith('win')
is_linux = sys.platform.startswith('linux')
+is_gnu_linux = is_linux and os.path.exists('/lib/libc.so.6')
is_mac = sys.platform.startswith('darwin')
is_aix = sys.platform.startswith('aix')
is_posix = is_linux or is_mac or is_aix
@@ -193,7 +193,7 @@
{'ENABLE_MUTEX_PRIORITY_INHERITANCE': 'false'})
write_buildflag_header_manually(root_gen_dir, 'base/allocator/features.h',
- {'USE_ALLOCATOR_SHIM': 'true' if is_linux else 'false'})
+ {'USE_ALLOCATOR_SHIM': 'true' if is_gnu_linux else 'false'})
write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h',
{
@@ -453,8 +453,6 @@
'base/third_party/superfasthash/superfasthash.c',
])
static_libraries['base']['sources'].extend([
- 'base/allocator/allocator_check.cc',
- 'base/allocator/allocator_extension.cc',
'base/at_exit.cc',
'base/base_paths.cc',
'base/base_switches.cc',
@@ -625,6 +623,11 @@
'base/values.cc',
'base/vlog.cc',
])
+ if is_gnu_linux:
+ static_libraries['base']['sources'].extend([
+ 'base/allocator/allocator_check.cc',
+ 'base/allocator/allocator_extension.cc',
+ ])
if is_posix:
static_libraries['base']['sources'].extend([
@@ -663,29 +666,31 @@
'base/time/time_exploded_posix.cc',
])
- static_libraries['libevent'] = {
- 'sources': [
- 'base/third_party/libevent/buffer.c',
- 'base/third_party/libevent/evbuffer.c',
- 'base/third_party/libevent/evdns.c',
- 'base/third_party/libevent/event.c',
- 'base/third_party/libevent/event_tagging.c',
- 'base/third_party/libevent/evrpc.c',
- 'base/third_party/libevent/evutil.c',
- 'base/third_party/libevent/http.c',
- 'base/third_party/libevent/log.c',
- 'base/third_party/libevent/poll.c',
- 'base/third_party/libevent/select.c',
- 'base/third_party/libevent/signal.c',
- 'base/third_party/libevent/strlcpy.c',
- ],
- 'tool': 'cc',
- 'include_dirs': [],
- 'cflags': cflags + ['-DHAVE_CONFIG_H'],
- }
+ if is_gnu_linux:
+ static_libraries['libevent'] = {
+ 'sources': [
+ 'base/third_party/libevent/buffer.c',
+ 'base/third_party/libevent/evbuffer.c',
+ 'base/third_party/libevent/evdns.c',
+ 'base/third_party/libevent/event.c',
+ 'base/third_party/libevent/event_tagging.c',
+ 'base/third_party/libevent/evrpc.c',
+ 'base/third_party/libevent/evutil.c',
+ 'base/third_party/libevent/http.c',
+ 'base/third_party/libevent/log.c',
+ 'base/third_party/libevent/poll.c',
+ 'base/third_party/libevent/select.c',
+ 'base/third_party/libevent/signal.c',
+ 'base/third_party/libevent/strlcpy.c',
+ ],
+ 'tool': 'cc',
+ 'include_dirs': [],
+ 'cflags': cflags + ['-DHAVE_CONFIG_H'],
+ }
if is_linux or is_aix:
ldflags.extend(['-pthread'])
+ ldflags.extend(['-levent'])
static_libraries['xdg_user_dirs'] = {
'sources': [
@@ -709,7 +714,7 @@
'base/sys_info_linux.cc',
'base/threading/platform_thread_linux.cc',
])
- if is_linux:
+ if is_gnu_linux:
static_libraries['base']['sources'].extend([
'base/allocator/allocator_shim.cc',
'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
@@ -721,7 +726,7 @@
static_libraries['libevent']['sources'].extend([
'base/third_party/libevent/epoll.c',
])
- else:
+ if is_aix:
libs.extend(['-lrt'])
static_libraries['base']['sources'].extend([
'base/process/internal_aix.cc'