1 |
commit: 980dc7e8d6fd082c77650dc05051af0f7e1b8b3a |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 17 15:18:56 2021 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 17 22:45:21 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=980dc7e8 |
7 |
|
8 |
dev-qt/qtdeclarative: riscv: fix missing atomic library |
9 |
|
10 |
this will workaroud the error when build in ARCH=riscv, |
11 |
tested with gcc-11 |
12 |
|
13 |
A likely better fix is to have qtcore detect the need for -latomic |
14 |
at configure time and, if needed, link to it |
15 |
|
16 |
Bug: https://bugs.gentoo.org/790689 |
17 |
Closes: https://github.com/gentoo/gentoo/pull/21689 |
18 |
Package-Manager: Portage-3.0.19, Repoman-3.0.3 |
19 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
20 |
|
21 |
.../files/qtdeclarative-5.15.2-riscv-atomic.patch | 12 ++++++++++++ |
22 |
dev-qt/qtdeclarative/qtdeclarative-5.15.2.ebuild | 1 + |
23 |
2 files changed, 13 insertions(+) |
24 |
|
25 |
diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-5.15.2-riscv-atomic.patch b/dev-qt/qtdeclarative/files/qtdeclarative-5.15.2-riscv-atomic.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..a619f3db833 |
28 |
--- /dev/null |
29 |
+++ b/dev-qt/qtdeclarative/files/qtdeclarative-5.15.2-riscv-atomic.patch |
30 |
@@ -0,0 +1,12 @@ |
31 |
+diff --git a/src/qml/qml.pro b/src/qml/qml.pro |
32 |
+index 7d5a92a..01f3b79 100644 |
33 |
+--- a/src/qml/qml.pro |
34 |
++++ b/src/qml/qml.pro |
35 |
+@@ -19,6 +19,7 @@ solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2 |
36 |
+ |
37 |
+ # Ensure this gcc optimization is switched off for mips platforms to avoid trouble with JIT. |
38 |
+ gcc:isEqual(QT_ARCH, "mips"): QMAKE_CXXFLAGS += -fno-reorder-blocks |
39 |
++gcc:isEqual(QT_ARCH, "riscv64"): LIBS += -latomic |
40 |
+ |
41 |
+ DEFINES += QT_NO_FOREACH |
42 |
+ |
43 |
|
44 |
diff --git a/dev-qt/qtdeclarative/qtdeclarative-5.15.2.ebuild b/dev-qt/qtdeclarative/qtdeclarative-5.15.2.ebuild |
45 |
index ccbde5b669e..6b32fc222cd 100644 |
46 |
--- a/dev-qt/qtdeclarative/qtdeclarative-5.15.2.ebuild |
47 |
+++ b/dev-qt/qtdeclarative/qtdeclarative-5.15.2.ebuild |
48 |
@@ -31,6 +31,7 @@ RDEPEND="${DEPEND} |
49 |
PATCHES=( |
50 |
"${FILESDIR}/${PN}-5.14.2-QQuickItemView-fix-maxXY-extent.patch" # QTBUG-83890 |
51 |
"${FILESDIR}/${P}-gcc11.patch" # bug 752093 |
52 |
+ "${FILESDIR}/${P}-riscv-atomic.patch" #bug 790689 |
53 |
) |
54 |
|
55 |
src_prepare() { |