Skip to content

Commit

Permalink
depends: patch explicit -lm usage out of Qt tools
Browse files Browse the repository at this point in the history
  • Loading branch information
fanquake committed Jul 25, 2024
1 parent 5d28013 commit 0b2aeee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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/ &&\
Expand Down
17 changes: 17 additions & 0 deletions depends/patches/qt/darwin_no_libm.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0b2aeee

Please sign in to comment.