From ba0cad2702e01860d3539f170343d8d9f9c5b75a Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 3 Dec 2019 17:45:55 -0500 Subject: [PATCH 1/2] build: pass -dead_strip_dylibs to ld on macOS This strips some unused dylibs from bitcoin-qt. From man ld: Remove dylibs that are unreachable by the entry point or exported symbols. That is, suppresses the generation of load command commands for dylibs which supplied no symbols during the link. This option should not be used when linking against a dylib which is required at runtime for some indirect reason such as the dylib has an important initializer. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index ed9ccade6..e0bec0882 100644 --- a/configure.ac +++ b/configure.ac @@ -783,6 +783,7 @@ fi dnl this flag screws up non-darwin gcc even when the check fails. special-case it. if test x$TARGET_OS = xdarwin; then AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) + AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"]) fi AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h]) From 2359a4790d93ffd17b8afc2fea3775dd858ef50d Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 5 Dec 2019 08:42:03 -0500 Subject: [PATCH 2/2] depends: don't use OpenGL in Qt on macOS --- depends/packages/qt.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index c9ffc1036..f1d234ccf 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -105,6 +105,7 @@ $(package)_config_opts += -no-feature-wizard $(package)_config_opts += -no-feature-xml $(package)_config_opts_darwin = -no-dbus +$(package)_config_opts_darwin += -no-opengl ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux