Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #450 from braydonf/build
Browse files Browse the repository at this point in the history
Updates to depends build
  • Loading branch information
braydonf authored May 10, 2018
2 parents 2614f77 + 3d29a31 commit 04e96a5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -110,8 +111,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)
Expand All @@ -122,7 +122,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)"
Expand Down
6 changes: 3 additions & 3 deletions depends/packages/clang.mk
Original file line number Diff line number Diff line change
@@ -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=
2 changes: 1 addition & 1 deletion depends/packages/gnutls.mk
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion depends/packages/libuv.mk
Original file line number Diff line number Diff line change
@@ -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=
Expand Down

0 comments on commit 04e96a5

Please sign in to comment.