From 83be24a13f45909c9ae17eed44fb0591a516fd8d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 2 Sep 2022 08:28:17 +0300 Subject: gnu: qtdeclarative-5: Fix linking on riscv64-linux. * gnu/packages/qt.scm (qtdeclarative-5)[arguments]: Add phase when building for riscv64-linux to adjust the linker flags. --- gnu/packages/qt.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gnu/packages') diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 4937addf1e..9359a9f382 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1045,7 +1045,17 @@ xmlpatternsvalidator."))) ;; is provided by qtdeclarative-5. (substitute* "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake" - (("\\$\\{_qt5Core_install_prefix\\}") out))))))))) + (("\\$\\{_qt5Core_install_prefix\\}") out))))) + ;; TODO: Add phase unconditionally. + ,@(if (target-riscv64?) + '((add-after 'unpack 'fix-linking-riscv64 + (lambda _ + (substitute* "src/qml/qml.pro" + (("DEFINES \\+= QT_NO_FOREACH") + (string-append + "isEqual(QT_ARCH, \"riscv64\"): QMAKE_LIBS += -latomic\n\n" + "DEFINES += QT_NO_FOREACH")))))) + '()))))) (native-inputs (list perl pkg-config -- cgit 1.4.1