From 05abaf453cc1810399dba45a5ae3c92eb877c2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Mon, 4 Apr 2016 22:08:01 +0200 Subject: [PATCH] qt5: musl libc main thread stack bottom calc For musl libc, just as for Android, the main thread pretends to have a tiny stack space. Add a patch based on the one found at: https://bugreports.qt.io/browse/QTBUG-44268 Closes #3965 --- srcpkgs/qt5/patches/qt-musl-stackbottom.patch | 26 +++++++++++++++++++ srcpkgs/qt5/template | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/qt5/patches/qt-musl-stackbottom.patch diff --git a/srcpkgs/qt5/patches/qt-musl-stackbottom.patch b/srcpkgs/qt5/patches/qt-musl-stackbottom.patch new file mode 100644 index 0000000000..e9859356cc --- /dev/null +++ b/srcpkgs/qt5/patches/qt-musl-stackbottom.patch @@ -0,0 +1,26 @@ +For musl libc the stackBottom for the main thread is recalculated +just as it is for Android. See: https://bugreports.qt.io/browse/QTBUG-44268 + +--- qtdeclarative/src/qml/jsruntime/qv4engine.cpp 2016-02-26 10:34:34.000000000 +0100 ++++ qtdeclarative/src/qml/jsruntime/qv4engine.cpp 2016-04-04 21:52:43.780823136 +0200 +@@ -94,6 +94,11 @@ + #include + #endif + ++#if defined(Q_OS_LINUX) && !defined(__GLIBC__) ++#include ++#define gettid() syscall(SYS_gettid) ++#endif ++ + QT_BEGIN_NAMESPACE + + using namespace QV4; +@@ -147,7 +152,7 @@ + pthread_attr_getstack(&attr, &stackBottom, &stackSize); + pthread_attr_destroy(&attr); + +-# if defined(Q_OS_ANDROID) ++# if defined(Q_OS_ANDROID) || !defined(__GLIBC__) + // Bionic pretends that the main thread has a tiny stack; work around it + if (gettid() == getpid()) { + rlimit limit; diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index 464f585d73..983004ad0d 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -1,7 +1,7 @@ # Template file for 'qt5' pkgname=qt5 version=5.6.0 -revision=4 +revision=5 wrksrc="qt-everywhere-opensource-src-${version}" homepage="http://qt.io/" short_desc="A cross-platform application and UI framework (QT5)"