Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
Date: Fri, 01 Apr 2022 18:23:53
Message-Id: 1648835869.ebcfd362f1047bbb7c09021bad242dc9fd8a030f.asturm@gentoo
1 commit: ebcfd362f1047bbb7c09021bad242dc9fd8a030f
2 Author: Han Gao <rabenda.cn <AT> gmail <DOT> com>
3 AuthorDate: Sun Mar 27 13:05:18 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 1 17:57:49 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=ebcfd362
7
8 dev-qt/qtcore: use link option -pthread instead of -lpthread
9
10 Bug: https://bugs.gentoo.org/803470
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Han Gao <rabenda.cn <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/24711
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch | 41 +++++++++++++++++++++++++
17 dev-qt/qtcore/qtcore-5.15.3.9999.ebuild | 1 +
18 2 files changed, 42 insertions(+)
19
20 diff --git a/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch b/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch
21 new file mode 100644
22 index 00000000..c83c59ac
23 --- /dev/null
24 +++ b/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch
25 @@ -0,0 +1,41 @@
26 +# Use link option -pthread instead of -lpthread
27 +
28 +# https://github.com/riscv-collab/riscv-gcc/issues/12 use Option 4
29 +# https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling
30 +# In riscv, "-pthread" equivalent to add link option "--push-state --as-needed -latomic --pop-state"
31 +
32 +diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
33 +index 544cc227..add969be 100644
34 +--- a/mkspecs/common/linux.conf
35 ++++ b/mkspecs/common/linux.conf
36 +@@ -33,7 +33,7 @@ QMAKE_LIBS_EGL = -lEGL
37 + QMAKE_LIBS_OPENGL = -lGL
38 + QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
39 + QMAKE_LIBS_OPENVG = -lOpenVG
40 +-QMAKE_LIBS_THREAD = -lpthread
41 ++QMAKE_LIBS_THREAD = -pthread
42 + QMAKE_LIBS_VULKAN =
43 +
44 + QMAKE_INCDIR_WAYLAND =
45 +diff --git a/src/corelib/configure.json b/src/corelib/configure.json
46 +index 9b5d19d4..da028fb2 100644
47 +--- a/src/corelib/configure.json
48 ++++ b/src/corelib/configure.json
49 +@@ -355,7 +355,7 @@
50 + "std::future<int> f = std::async([]() { return 42; });",
51 + "(void)f.get();"
52 + ],
53 +- "qmake": "unix:LIBS += -lpthread"
54 ++ "qmake": "unix:LIBS += -pthread"
55 + }
56 + },
57 + "cxx11_random": {
58 +@@ -466,7 +466,7 @@
59 + "shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666);",
60 + "shm_unlink(\"test\");"
61 + ],
62 +- "qmake": "linux: LIBS += -lpthread -lrt"
63 ++ "qmake": "linux: LIBS += -pthread -lrt"
64 + }
65 + },
66 + "linkat": {
67
68 diff --git a/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild
69 index 3d3b8751..f8c7d657 100644
70 --- a/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild
71 +++ b/dev-qt/qtcore/qtcore-5.15.3.9999.ebuild
72 @@ -44,6 +44,7 @@ QT5_GENTOO_PRIVATE_CONFIG=(
73
74 PATCHES=(
75 "${FILESDIR}"/${PN}-5.14.1-cmake-macro-backward-compat.patch # bug 703306
76 + "${FILESDIR}"/${PN}-5.15.3-pthread.patch # bug 803470
77 )
78
79 pkg_pretend() {