diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-03 10:34:30 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-03 10:34:48 +0100 |
commit | e8a6639176f6da9508b4b71e612fcadbf86dd536 (patch) | |
tree | 15298d7f1bfa7641436be55c022b303297bc7903 | |
parent | 70477a0bdf6eb6d123ce256f064bbd3bc356c82a (diff) | |
parent | 4caad26ba1230a26f45f3c0279a24617ec809bab (diff) |
Merge pull request #5582
4caad26 depends: bump cctools to a custom version with less deps (Cory Fields)
46f54bf build: osx builders no longer need 32bit compiler support (Cory Fields)
4fe6c3c depends: major upgrade to darwin toolchain (Cory Fields)
ec90c97 depends: osx: fix qt5 build against 10.10 sdk (Cory Fields)
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | contrib/gitian-descriptors/gitian-osx.yml | 2 | ||||
-rw-r--r-- | depends/hosts/darwin.mk | 5 | ||||
-rw-r--r-- | depends/packages/native_cctools.mk | 88 | ||||
-rw-r--r-- | depends/packages/native_libuuid.mk | 24 | ||||
-rw-r--r-- | depends/packages/native_openssl.mk | 21 | ||||
-rw-r--r-- | depends/packages/packages.mk | 2 | ||||
-rw-r--r-- | depends/packages/qt.mk | 5 | ||||
-rw-r--r-- | depends/patches/qt/mac-qmake.conf | 2 | ||||
-rw-r--r-- | depends/patches/qt/qt5-yosemite.patch | 52 |
10 files changed, 94 insertions, 109 deletions
diff --git a/.travis.yml b/.travis.yml index 1630c1d02a..8b9ede3e1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ matrix: - compiler: ": 32-bit + dash" env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash" - compiler: ": Cross-Mac" - env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy" + env: HOST=x86_64-apple-darwin11 PACKAGES="cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy" - compiler: ": Win64" env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2" - compiler: ": Win32" diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 4f05aad233..0732d35301 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -6,7 +6,7 @@ suites: architectures: - "amd64" packages: -- "g++-multilib" +- "g++" - "git-core" - "pkg-config" - "autoconf2.13" diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 8d718eba17..c1070d8775 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,8 +1,9 @@ OSX_MIN_VERSION=10.6 OSX_SDK_VERSION=10.7 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk -darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) +LD64_VERSION=241.9 +darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 1675afe781..951ad4fb29 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -1,61 +1,37 @@ package=native_cctools -$(package)_version=809 -$(package)_download_path=http://www.opensource.apple.com/tarballs/cctools -$(package)_file_name=cctools-$($(package)_version).tar.gz -$(package)_sha256_hash=03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad -$(package)_build_subdir=cctools2odcctools/odcctools-$($(package)_version) -$(package)_dependencies=native_libuuid native_openssl -$(package)_ld64_download_file=ld64-127.2.tar.gz -$(package)_ld64_download_path=http://www.opensource.apple.com/tarballs/ld64 -$(package)_ld64_file_name=$($(package)_ld64_download_file) -$(package)_ld64_sha256_hash=97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142 -$(package)_dyld_download_file=dyld-195.5.tar.gz -$(package)_dyld_download_path=http://www.opensource.apple.com/tarballs/dyld -$(package)_dyld_file_name=$($(package)_dyld_download_file) -$(package)_dyld_sha256_hash=2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c -$(package)_toolchain4_download_file=10cc648683617cca8bcbeae507888099b41b530c.tar.gz -$(package)_toolchain4_download_path=https://github.com/mingwandroid/toolchain4/archive -$(package)_toolchain4_file_name=toolchain4-1.tar.gz -$(package)_toolchain4_sha256_hash=18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca -$(package)_clang_download_file=clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz -$(package)_clang_download_path=http://llvm.org/releases/3.2 -$(package)_clang_file_name=clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz -$(package)_clang_sha256_hash=b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff - +$(package)_version=ee31ae567931c426136c94aad457c7b51d844beb +$(package)_download_path=https://github.com/theuni/cctools-port/archive +$(package)_file_name=$($(package)_version).tar.gz +$(package)_sha256_hash=ef107e6ab1b3994cb22e14f4f5c59ea0c0b5a988e6b21d42ed9616b018bbcbf9 +$(package)_build_subdir=cctools +$(package)_clang_version=3.3 +$(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version) +$(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-amd64-Ubuntu-12.04.2.tar.gz +$(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-amd64-Ubuntu-12.04.2.tar.gz +$(package)_clang_sha256_hash=60d8f69f032d62ef61bf527857ebb933741ec3352d4d328c5516aa520662dab7 define $(package)_fetch_cmds $(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_ld64_download_path),$($(package)_ld64_download_file),$($(package)_ld64_file_name),$($(package)_ld64_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_dyld_download_path),$($(package)_dyld_download_file),$($(package)_dyld_file_name),$($(package)_dyld_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_toolchain4_download_path),$($(package)_toolchain4_download_file),$($(package)_toolchain4_file_name),$($(package)_toolchain4_sha256_hash)) +$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) endef -define $(package)_set_vars -$(package)_config_opts=--target=$(host) --with-sysroot=$(OSX_SDK) -$(package)_cflags+=-m32 -$(package)_cxxflags+=-m32 -$(package)_cppflags+=-D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -$(package)_ldflags+=-m32 -Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib -$(package)_ldflags+=-L$$(native_cctools_extract_dir)/clang+llvm-3.2-x86-linux-ubuntu-12.04/lib -endef define $(package)_extract_cmds - tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_toolchain4_file_name) && \ - ln -sf $($(package)_source) cctools2odcctools/$($(package)_file_name) && \ - ln -sf $($(package)_source_dir)/$($(package)_ld64_file_name) cctools2odcctools/$($(package)_ld64_file_name) && \ - ln -sf $($(package)_source_dir)/$($(package)_dyld_file_name) cctools2odcctools/$($(package)_dyld_file_name) && \ - tar xf $($(package)_source_dir)/$($(package)_clang_file_name) && \ - mkdir -p $(SDK_PATH) sdks &&\ - cd sdks; ln -sf $(OSX_SDK) MacOSX$(OSX_SDK_VERSION).sdk + mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \ + tar --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \ + echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \ + echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \ + chmod +x toolchain/bin/$(host)-dsymutil && \ + tar --strip-components=1 -xf $($(package)_source) +endef + +define $(package)_set_vars +$(package)_config_opts=--target=$(host) --disable-libuuid +$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib +$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang +$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ endef define $(package)_preprocess_cmds - sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" cctools2odcctools/extract.sh && \ - sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" cctools2odcctools/extract.sh && \ - sed -i "s|/llvmCore/include/llvm-c|/include/llvm-c \$$$${LLVM_CLANG_DIR}/include/llvm |" cctools2odcctools/extract.sh && \ - sed -i "s|fAC_INIT|AC_INIT|" cctools2odcctools/files/configure.ac && \ - sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' cctools2odcctools/files/configure.ac && \ - cd cctools2odcctools; ./extract.sh --osxver $(OSX_SDK_VERSION) && \ - sed -i "s|define\tPC|define\tPC_|" odcctools-809/include/architecture/sparc/reg.h + cd $($(package)_build_subdir); ./autogen.sh endef define $(package)_config_cmds @@ -68,13 +44,13 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install && \ - cd ../../clang+llvm-3.2-x86-linux-ubuntu-12.04 && \ - mkdir -p $($(package)_staging_prefix_dir)/lib/clang/3.2/include && \ - mkdir -p $($(package)_staging_prefix_dir)/bin && \ + cd $($(package)_extract_dir)/toolchain && \ + mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include && \ + mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \ cp -P bin/clang bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ - cp lib/clang/3.2/include/* $($(package)_staging_prefix_dir)/lib/clang/3.2/include/ && \ - echo "#!/bin/sh" > $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ - echo "exit 0" >> $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ - chmod +x $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil + cp -rf lib/clang/$($(package)_clang_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include/ && \ + cp bin/$(host)-dsymutil $($(package)_staging_prefix_dir)/bin && \ + if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \ + if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi endef diff --git a/depends/packages/native_libuuid.mk b/depends/packages/native_libuuid.mk deleted file mode 100644 index b25540f80d..0000000000 --- a/depends/packages/native_libuuid.mk +++ /dev/null @@ -1,24 +0,0 @@ -package:=native_libuuid -$(package)_version=1.41.14 -$(package)_download_path=http://downloads.sourceforge.net/e2fsprogs -$(package)_file_name=e2fsprogs-libs-$($(package)_version).tar.gz -$(package)_sha256_hash=dbc7a138a3218d9b80a0626b5b692d76934d6746d8cbb762751be33785d8d9f5 - -define $(package)_set_vars -$(package)_config_opts=--disable-elf-shlibs --disable-uuidd -$(package)_cflags+=-m32 -$(package)_ldflags+=-m32 -$(package)_cxxflags+=-m32 -endef - -define $(package)_config_cmds - $($(package)_autoconf) -endef - -define $(package)_build_cmds - $(MAKE) -C lib/uuid -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) -C lib/uuid install -endef diff --git a/depends/packages/native_openssl.mk b/depends/packages/native_openssl.mk deleted file mode 100644 index 1f25d6afcc..0000000000 --- a/depends/packages/native_openssl.mk +++ /dev/null @@ -1,21 +0,0 @@ -package=native_openssl -$(package)_version=1.0.1h -$(package)_download_path=https://www.openssl.org/source -$(package)_file_name=openssl-$($(package)_version).tar.gz -$(package)_sha256_hash=9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093 -define $(package)_set_vars -$(package)_build_config_opts= --prefix=$(build_prefix) no-zlib no-shared no-krb5C linux-generic32 -m32 -endef - -define $(package)_config_cmds - ./Configure $($(package)_build_config_opts) &&\ - sed -i "s|engines apps test|engines|" Makefile -endef - -define $(package)_build_cmds - $(MAKE) -j1 -endef - -define $(package)_stage_cmds - $(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw -endef diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index bbf53cc2dc..08fd8a5247 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -19,5 +19,5 @@ wallet_packages=bdb upnp_packages=miniupnpc ifneq ($(build_os),darwin) -darwin_native_packages=native_libuuid native_openssl native_cctools native_cdrkit native_libdmg-hfsplus +darwin_native_packages=native_cctools native_cdrkit native_libdmg-hfsplus endif diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 6a8e714a48..59c12d22f1 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -7,7 +7,7 @@ $(package)_dependencies=openssl $(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext $(package)_build_subdir=qtbase $(package)_qt_libs=corelib network widgets gui plugins testlib -$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch qt5-tablet-osx.patch +$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch qt5-tablet-osx.patch qt5-yosemite.patch define $(package)_set_vars $(package)_config_opts_release = -release @@ -34,7 +34,7 @@ $(package)_config_opts += -qt-libpng -qt-libjpeg -qt-zlib -qt-pcre ifneq ($(build_os),darwin) $(package)_config_opts_darwin = -xplatform macx-clang-linux -device-option MAC_SDK_PATH=$(OSX_SDK) -device-option CROSS_COMPILE="$(host)-" -$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION) -device-option MAC_TARGET=$(host) +$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION) -device-option MAC_TARGET=$(host) -device-option MAC_LD64_VERSION=$(LD64_VERSION) endif $(package)_config_opts_linux = -qt-xkbcommon -qt-xcb -no-eglfs -no-linuxfb -system-freetype -no-sm -fontconfig -no-xinput2 -no-libudev -no-egl -no-opengl @@ -56,6 +56,7 @@ define $(package)_preprocess_cmds cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \ patch -p1 < $($(package)_patch_dir)/qt5-tablet-osx.patch && \ + patch -d qtbase -p1 < $($(package)_patch_dir)/qt5-yosemite.patch && \ echo "QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index f7302265bc..a97945bc8c 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -15,7 +15,7 @@ QMAKE_MAC_SDK.macosx.platform_name = macosx QMAKE_CFLAGS += -target $${MAC_TARGET} QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_LFLAGS += -target $${MAC_TARGET} +QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION} QMAKE_AR = $${CROSS_COMPILE}ar cq QMAKE_RANLIB=$${CROSS_COMPILE}ranlib QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool diff --git a/depends/patches/qt/qt5-yosemite.patch b/depends/patches/qt/qt5-yosemite.patch new file mode 100644 index 0000000000..d569d34d47 --- /dev/null +++ b/depends/patches/qt/qt5-yosemite.patch @@ -0,0 +1,52 @@ +The following patch was taken from upstream: +https://qt.gitorious.org/qt/qtbase/commit/70e4428b6f1c6a4bad112203f67ee7d22107616c.patch + +The first hunk was removed because it conflicts with 5.2.1, and is not currently needed. + +From 70e4428b6f1c6a4bad112203f67ee7d22107616c Mon Sep 17 00:00:00 2001 +From: Gabriel de Dietrich <gabriel.dedietrich@digia.com> +Date: Tue, 3 Jun 2014 14:20:20 +0200 +Subject: [PATCH] Cocoa: Adapt to Xcode 6 clang version sudden pickiness +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Yes, that means OS X Yosemite fix. + +Change-Id: I236f7af7b803de24ff0895e04c9a9253b5cfdb3b +Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> +--- + .../platforms/cocoa/qcocoaaccessibilityelement.mm | 2 +- + .../platforms/cocoa/qcocoaapplicationdelegate.mm | 2 +- + src/plugins/platforms/cocoa/qcocoamenuloader.mm | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +index f841184..548c6a2 100644 +--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm ++++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +@@ -124,7 +124,7 @@ static void cleanupCocoaApplicationDelegate() + [dockMenu release]; + [qtMenuLoader release]; + if (reflectionDelegate) { +- [NSApp setDelegate:reflectionDelegate]; ++ [[NSApplication sharedApplication] setDelegate:reflectionDelegate]; + [reflectionDelegate release]; + } + [[NSNotificationCenter defaultCenter] removeObserver:self]; +diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm +index 60bc3b5..9340e94 100644 +--- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm ++++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm +@@ -174,7 +174,7 @@ QT_END_NAMESPACE + - (void)removeActionsFromAppMenu + { + for (NSMenuItem *item in [appMenu itemArray]) +- [item setTag:nil]; ++ [item setTag:0]; + } + + - (void)dealloc +-- +1.7.1 + |