From 1874d0daa601b855c6c925f0573d99220be974f2 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Wed, 9 May 2018 21:13:57 -0700 Subject: [PATCH 1/3] Updates to depends build --- depends/Makefile | 5 ++--- depends/packages/gnutls.mk | 2 +- depends/packages/libuv.mk | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/depends/Makefile b/depends/Makefile index c240658..1b8f1ba 100755 --- a/depends/Makefile +++ b/depends/Makefile @@ -110,8 +110,7 @@ endef define extract_toolchain_file_build mkdir -p "$(TOOLCHAIN_BUILD_DIR)"; \ - tar xfv "$(DOWNLOAD_DIR)$($(1)_file_name)" -C "$(TOOLCHAIN_BUILD_DIR)" --strip-components=1; \ - rm -f $(TOOLCHAIN_BUILD_DIR)lib/libc++abi.so + tar xfv "$(DOWNLOAD_DIR)$($(1)_file_name)" -C "$(TOOLCHAIN_BUILD_DIR)" --strip-components=1 endef ifeq ($(host_os), darwin) @@ -122,7 +121,7 @@ define build_darwin_toolchain $(foreach package,cctools,$(call extract_toolchain_file,$(package));) cd "$(TOOLCHAIN_SOURCE_DIR)cctools/cctools" && \ if test -f "./autogen.sh"; then ./autogen.sh; fi && \ - PATH="$(TOOLCHAIN_BUILD_DIR)bin:${PATH}" CC=clang CXX=clang++ ./configure --prefix="$(TOOLCHAIN_BUILD_DIR)" --target="x86_64-apple-darwin11" || exit && \ + ./configure --prefix="$(TOOLCHAIN_BUILD_DIR)" --target="x86_64-apple-darwin11" || exit && \ make || exit && \ make install || exit && \ cd "$(CURDIR)" diff --git a/depends/packages/gnutls.mk b/depends/packages/gnutls.mk index 9eda2c1..7fd6593 100755 --- a/depends/packages/gnutls.mk +++ b/depends/packages/gnutls.mk @@ -1,6 +1,6 @@ package=gnutls $(package)_version=3.5.8 -$(package)_download_path=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-$($(package)_version).tar.xz +$(package)_download_path=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/gnutls-$($(package)_version).tar.xz $(package)_file_name=$(package)-$($(package)_version).tar.xz $(package)_sha256_hash=0e97f243ae72b70307d684b84c7fe679385aa7a7a0e37e5be810193dcc17d4ff diff --git a/depends/packages/libuv.mk b/depends/packages/libuv.mk index 342501c..02abea5 100644 --- a/depends/packages/libuv.mk +++ b/depends/packages/libuv.mk @@ -1,6 +1,6 @@ package=libuv $(package)_version=1.9.1 -$(package)_download_path=http://dist.libuv.org/dist/v$($(package)_version)/libuv-v$($(package)_version).tar.gz +$(package)_download_path=https://dist.libuv.org/dist/v$($(package)_version)/libuv-v$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=e83953782c916d7822ef0b94e8115ce5756fab5300cca173f0de5f5b0e0ae928 $(package)_config_env= From 14986a76ded676e9a8bd39662c61985b9a5e30f4 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Thu, 10 May 2018 10:41:26 -0700 Subject: [PATCH 2/3] Updat clang, and include cxxflags --- depends/Makefile | 3 ++- depends/packages/clang.mk | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/depends/Makefile b/depends/Makefile index 1b8f1ba..6ef2491 100755 --- a/depends/Makefile +++ b/depends/Makefile @@ -36,13 +36,14 @@ endif # mac build DARWIN_SDK_PATH ?= "$(CURDIR)/MacOSX10.11.sdk" DARWIN_CFLAGS = "-target $(HOST) -isysroot $(DARWIN_SDK_PATH) -mmacosx-version-min=10.8 -mlinker-version=253.9 -pipe -I$(PREFIX_DIR)include" +DARWIN_CXXFLAGS = "-target $(HOST) -isysroot $(DARWIN_SDK_PATH) -mmacosx-version-min=10.8 -mlinker-version=253.9 -pipe -I$(PREFIX_DIR)include" DARWIN_LDFLAGS="-L$(TOOLCHAIN_BUILD_DIR)lib -L$(DARWIN_SDK_PATH)/usr/lib -L$(PREFIX_DIR)lib -Wl,-syslibroot $(DARWIN_SDK_PATH)" build_SHA256SUM = sha256sum -c build_env= ifeq ($(host_os), darwin) -build_env=PATH="$(TOOLCHAIN_BUILD_DIR)bin:${PATH}" CC=clang CXX=clang++ CFLAGS=$(DARWIN_CFLAGS) LDFLAGS=$(DARWIN_LDFLAGS) +build_env=PATH="$(TOOLCHAIN_BUILD_DIR)bin:${PATH}" CC=clang CXX=clang++ CFLAGS=$(DARWIN_CFLAGS) CXXFLAGS=$(DARWIN_CXXFLAGS) LDFLAGS=$(DARWIN_LDFLAGS) endif ifeq ($(HOST), i686-pc-linux-gnu) build_env=CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 diff --git a/depends/packages/clang.mk b/depends/packages/clang.mk index 992af6d..c20d482 100644 --- a/depends/packages/clang.mk +++ b/depends/packages/clang.mk @@ -1,7 +1,7 @@ package=clang -$(package)_version=3.9.1 -$(package)_download_path=http://releases.llvm.org/$($(package)_version)/clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz +$(package)_version=5.0.0 +$(package)_download_path=http://releases.llvm.org/$($(package)_version)/clang%2bllvm-$($(package)_version)-linux-x86_64-ubuntu16.04.tar.xz $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=99d1ffd4be8fd3331b4d2478ada7ee6ed352729bfe4a1070450cdb9a3ce8ef9b +$(package)_sha256_hash=171968549a12d8cf1e308004a1c31450f663359731e1524b952665f80149284b $(package)_config_env= $(package)_config_opts= From 3d29a31ccb09b1cda8ea065815c916498bb48e6e Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Thu, 10 May 2018 10:45:53 -0700 Subject: [PATCH 3/3] Update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2a6db9a..5c85ebf 100755 --- a/README.md +++ b/README.md @@ -194,6 +194,8 @@ rm -rf 5.hfs MacOSX10.11.sdk You may also need to symlink `/System/Library/Frameworks/Security.framework` to `/path/to/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework` to have `darwinssl` be enabled during the build. +A build of clang+llvm is downloaded for Ubuntu 16.04 and extracted, a port of cctools compiled with gcc and installed alongside, and the dependencies are build using that toolchain. + ``` cd ./depends make HOST="x86_64-apple-darwin11" DARWIN_SDK_PATH="/path/to/MacOSX10.11.sdk"