From 30091807514470f51bee6057905415ddc853ca53 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 26 Jul 2022 09:38:42 +0100 Subject: [PATCH] depends: always use correct ar for win qt If we don't set this explicitly, then qt will still use it's default windows ar, when building with LTO (when we want it to use gcc-ar). So set `QMAKE_LIB` which is used for win32, and defaults to `ar -rc`. This way we always get the correct ar. Issue can be seen building in Guix with LTO. i.e: ```bash x86_64-w64-mingw32-ar: .obj/release/hb-blob.o: plugin needed to handle lto object ``` --- depends/packages/qt.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 25f483808c..bddc9b4871 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -177,6 +177,7 @@ $(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(pack $(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'" $(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cxxflags) $($(package)_cppflags)'" $(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'" +$(package)_config_opts_mingw32 += "QMAKE_LIB = '$($(package)_ar) rc'" $(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-" $(package)_config_opts_mingw32 += -pch