From 235c1c17662bca229537a560b79bd33b5fd3131b Mon Sep 17 00:00:00 2001 From: Chuang Zhu Date: Thu, 28 Apr 2022 12:54:49 +0800 Subject: [PATCH] qtbase: use -pthread instead of -lpthread This fixes "undefined reference to `__atomic_*'" errors when building qt5.qtdeclarative on riscv64-linux. --- pkgs/development/libraries/qt-5/modules/qtbase.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index c3da951ca523e..ba5f959ea4412 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -116,6 +116,9 @@ stdenv.mkDerivation { sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in + + # https://bugs.gentoo.org/803470 + sed -i 's/-lpthread/-pthread/' mkspecs/common/linux.conf src/corelib/configure.json '' + lib.optionalString (compareVersion "5.15.0" >= 0) '' patchShebangs ./bin '' + (