mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 23:07:59 +01:00
Merge bitcoin/bitcoin#30198: depends: qt 5.15.14 and fix macOS build with Clang 18
0a3631fc35
depends: fix Qt macOS build with Clang 18 (fanquake)b018bd779d
depends: qt 5.15.14 (fanquake) Pull request description: Also adds a patch to Qts internal libpng, to fix compilation using Clang 18, when targetting macOS. I'd like to get this patched, so we can continue working on removing `FORCE_USE_SYSTEM_CLANG` (#30201); otherwise builds will be broken using the default Clang (`18`) on the current Ubuntu LTS (`24.04`). With this PR, anyone using Ubuntu 24.04 should be able to `apt install clang llvm lld`, and then cross-compile for macOS using: ```bash # clang --version Ubuntu clang version 18.1.3 (1) make -C depends HOST=arm64-apple-darwin FORCE_USE_SYSTEM_CLANG=1 ./autogen.sh CONFIG_SITE=/path/to/depends/arm64-apple-darwin/share/config.site ./configure make # file src/qt/bitcoin-qt src/qt/bitcoin-qt: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE|HAS_TLV_DESCRIPTORS> ``` ACKs for top commit: TheCharlatan: ACK0a3631fc35
theuni: utACK0a3631fc35
hebasto: ACK0a3631fc35
, a new patch indeed fixes cross-compiling on Ubuntu 24.04 with `FORCE_USE_SYSTEM_CLANG=1`. Tree-SHA512: 711d321b1efbb1aeef802d1d7e72fff8f4e28aa2420d19df9db6f4449fc7d281e1d08ba242ce20122dfe21129e713bd59e7e6ade0b67d7271eea18b39ceb9283
This commit is contained in:
commit
3ac1465cd9
2 changed files with 46 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
|||
package=qt
|
||||
$(package)_version=5.15.13
|
||||
$(package)_version=5.15.14
|
||||
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
|
||||
$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz
|
||||
$(package)_file_name=qtbase-$($(package)_suffix)
|
||||
$(package)_sha256_hash=4cca51dcc1f22ceeee6b3e33cd1c3a60b14e85e24644dca3af89a2c2989ab809
|
||||
$(package)_sha256_hash=500d3b390048e9538c28b5f523dfea6936f9c2e10d24ab46580ff57d430b98be
|
||||
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
|
||||
$(package)_qt_libs=corelib network widgets gui plugins testlib
|
||||
$(package)_linguist_tools = lrelease lupdate lconvert
|
||||
|
@ -20,15 +20,16 @@ $(package)_patches += duplicate_lcqpafonts.patch
|
|||
$(package)_patches += guix_cross_lib_path.patch
|
||||
$(package)_patches += fix-macos-linker.patch
|
||||
$(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 += zlib-timebits64.patch
|
||||
|
||||
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
||||
$(package)_qttranslations_sha256_hash=24d4c58bc2a40c0f44f59ee64af4192c7d0038c1e45af61646cfc5b65058f271
|
||||
$(package)_qttranslations_sha256_hash=5b94d1a11b566908622fcca2f8b799744d2f8a68da20be4caa5953ed63b10489
|
||||
|
||||
$(package)_qttools_file_name=qttools-$($(package)_suffix)
|
||||
$(package)_qttools_sha256_hash=57c9794c572c4e02871f2e7581525752b0cf85ea16cfab23a4ac9ba7b39a5d34
|
||||
$(package)_qttools_sha256_hash=12061a85baf5f4de8fbc795e1d3872b706f340211b9e70962caeffc6f5e89563
|
||||
|
||||
$(package)_extra_sources = $($(package)_qttranslations_file_name)
|
||||
$(package)_extra_sources += $($(package)_qttools_file_name)
|
||||
|
@ -229,6 +230,7 @@ define $(package)_preprocess_cmds
|
|||
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/no_warnings_for_symbols.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/clang_18_libpng.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \
|
||||
|
|
40
depends/patches/qt/clang_18_libpng.patch
Normal file
40
depends/patches/qt/clang_18_libpng.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
fix Qt macOS build with Clang 18
|
||||
|
||||
See:
|
||||
https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24.
|
||||
|
||||
In a similar manner as zlib (madler/zlib#895),
|
||||
libpng contains a header configuration that's no longer valid and
|
||||
hasn't been exercised for the macOS target.
|
||||
|
||||
- The target OS conditional macros are misused. Specifically
|
||||
`TARGET_OS_MAC` covers all Apple targets, including iOS, and it
|
||||
should not be checked with `#if defined` as they would always be
|
||||
defined (to either 1 or 0) on Apple platforms.
|
||||
- `#include <fp.h>` no longer works for the macOS target and results
|
||||
in a compilation failure. macOS ships all required functions in
|
||||
`math.h`, and clients should use `math.h` instead.
|
||||
|
||||
--- a/qtbase/src/3rdparty/libpng/pngpriv.h
|
||||
+++ b/qtbase/src/3rdparty/libpng/pngpriv.h
|
||||
@@ -514,18 +514,8 @@
|
||||
*/
|
||||
# include <float.h>
|
||||
|
||||
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
|
||||
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
|
||||
- /* We need to check that <math.h> hasn't already been included earlier
|
||||
- * as it seems it doesn't agree with <fp.h>, yet we should really use
|
||||
- * <fp.h> if possible.
|
||||
- */
|
||||
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
|
||||
-# include <fp.h>
|
||||
-# endif
|
||||
-# else
|
||||
-# include <math.h>
|
||||
-# endif
|
||||
+# include <math.h>
|
||||
+
|
||||
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
|
||||
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
|
||||
* MATH=68881
|
Loading…
Add table
Reference in a new issue