diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-10-26 22:13:10 -0700 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2020-11-03 17:01:57 +0100 |
| commit | f60771c37c2940734a04674bcf91dcb64711fc12 (patch) | |
| tree | 32edb43eb51946b3ea1aef460f1617a201fcde76 | |
| parent | 8d5672cc6ca327576a814d35dfb5d59ab24043cb (diff) | |
| download | meta-qt5-f60771c37c2940734a04674bcf91dcb64711fc12.tar.gz | |
qtbase: Fix build on 32-bit arches with 64bit time_t only
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | recipes-qt/qt5/nativesdk-qtbase_git.bb | 1 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase-native_git.bb | 1 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch | 36 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 1 |
4 files changed, 39 insertions, 0 deletions
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb index f8d6c7e2..ff989c2f 100644 --- a/recipes-qt/qt5/nativesdk-qtbase_git.bb +++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb | |||
| @@ -43,6 +43,7 @@ SRC_URI += "\ | |||
| 43 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ | 43 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ |
| 44 | file://0017-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ | 44 | file://0017-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ |
| 45 | file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ | 45 | file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ |
| 46 | file://0019-Define-__NR_futex-if-it-does-not-exist.patch \ | ||
| 46 | " | 47 | " |
| 47 | 48 | ||
| 48 | # common for qtbase-native and nativesdk-qtbase | 49 | # common for qtbase-native and nativesdk-qtbase |
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 44160963..7ed63851 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb | |||
| @@ -38,6 +38,7 @@ SRC_URI += "\ | |||
| 38 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ | 38 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ |
| 39 | file://0017-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ | 39 | file://0017-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ |
| 40 | file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ | 40 | file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ |
| 41 | file://0019-Define-__NR_futex-if-it-does-not-exist.patch \ | ||
| 41 | " | 42 | " |
| 42 | 43 | ||
| 43 | # common for qtbase-native and nativesdk-qtbase | 44 | # common for qtbase-native and nativesdk-qtbase |
diff --git a/recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch b/recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch new file mode 100644 index 00000000..2accb08e --- /dev/null +++ b/recipes-qt/qt5/qtbase/0019-Define-__NR_futex-if-it-does-not-exist.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From bf314645e665d82c65771fb0d5f58558bbe1ba87 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 26 Oct 2020 22:10:02 -0700 | ||
| 4 | Subject: [PATCH] Define __NR_futex if it does not exist | ||
| 5 | |||
| 6 | __NR_futex is not defines by newer architectures e.g. arc, riscv32 as | ||
| 7 | they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on | ||
| 8 | __NR_futex, since this is used in applications, such applications start | ||
| 9 | to fail to build for these newer architectures. This patch defines a | ||
| 10 | fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps | ||
| 11 | working | ||
| 12 | |||
| 13 | Upstream-Status: Pending | ||
| 14 | |||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | src/corelib/thread/qfutex_p.h | 3 +++ | ||
| 18 | 1 file changed, 3 insertions(+) | ||
| 19 | |||
| 20 | diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h | ||
| 21 | index f287b752d7..fa5307a604 100644 | ||
| 22 | --- a/src/corelib/thread/qfutex_p.h | ||
| 23 | +++ b/src/corelib/thread/qfutex_p.h | ||
| 24 | @@ -76,6 +76,9 @@ QT_END_NAMESPACE | ||
| 25 | # include <unistd.h> | ||
| 26 | # include <asm/unistd.h> | ||
| 27 | # include <linux/futex.h> | ||
| 28 | +# if !defined(__NR_futex) && defined(__NR_futex_time64) | ||
| 29 | +# define __NR_futex __NR_futex_time64 | ||
| 30 | +# endif | ||
| 31 | # define QT_ALWAYS_USE_FUTEX | ||
| 32 | |||
| 33 | // if not defined in linux/futex.h | ||
| 34 | -- | ||
| 35 | 2.29.1 | ||
| 36 | |||
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index 129c4084..a2e87651 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb | |||
| @@ -34,6 +34,7 @@ SRC_URI += "\ | |||
| 34 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ | 34 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ |
| 35 | file://0017-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ | 35 | file://0017-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ |
| 36 | file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ | 36 | file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ |
| 37 | file://0019-Define-__NR_futex-if-it-does-not-exist.patch \ | ||
| 37 | " | 38 | " |
| 38 | 39 | ||
| 39 | # for syncqt | 40 | # for syncqt |
