aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2024-07-15 09:32:56 +0100
committerfanquake <fanquake@gmail.com>2024-07-25 14:14:23 +0100
commit0b2aeee21d24645394d70086e992408948952952 (patch)
tree2eb05a369fdd1cc5e518675e89754f8979d7854a /depends
parent5d280130446d57d653c749005a2e363265d87686 (diff)
depends: patch explicit -lm usage out of Qt tools
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/qt.mk2
-rw-r--r--depends/patches/qt/darwin_no_libm.patch17
2 files changed, 19 insertions, 0 deletions
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index d35139dd2d..b133539495 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -23,6 +23,7 @@ $(package)_patches += memory_resource.patch
$(package)_patches += clang_18_libpng.patch
$(package)_patches += utc_from_string_no_optimize.patch
$(package)_patches += windows_lto.patch
+$(package)_patches += darwin_no_libm.patch
$(package)_patches += zlib-timebits64.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
@@ -236,6 +237,7 @@ define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \
+ patch -p1 -i $($(package)_patch_dir)/darwin_no_libm.patch && \
patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
diff --git a/depends/patches/qt/darwin_no_libm.patch b/depends/patches/qt/darwin_no_libm.patch
new file mode 100644
index 0000000000..38a94beeb7
--- /dev/null
+++ b/depends/patches/qt/darwin_no_libm.patch
@@ -0,0 +1,17 @@
+build: remove explicit -lm link from qttools
+
+This causes issues with at least the macOS cross build, and shouldn't
+actually be required anywhere else. GCC with libstdc++ will already get libm.
+
+--- a/qtbase/src/corelib/tools/tools.pri
++++ b/qtbase/src/corelib/tools/tools.pri
+@@ -111,9 +111,6 @@ qtConfig(easingcurve) {
+ tools/qtimeline.cpp
+ }
+
+-# Note: libm should be present by default becaue this is C++
+-unix:!macx-icc:!vxworks:!haiku:!integrity:!wasm: LIBS_PRIVATE += -lm
+-
+ TR_EXCLUDE += ../3rdparty/*
+
+ # MIPS DSP