aboutsummaryrefslogtreecommitdiff
path: root/contrib/depends
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/depends/Makefile2
-rw-r--r--contrib/depends/README.md11
-rw-r--r--contrib/depends/hosts/darwin.mk8
-rw-r--r--contrib/depends/packages/darwin_sdk.mk10
-rw-r--r--contrib/depends/packages/packages.mk2
-rw-r--r--contrib/depends/toolchain.cmake.in2
6 files changed, 16 insertions, 19 deletions
diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile
index 9ffe8a106..3df1d677e 100644
--- a/contrib/depends/Makefile
+++ b/contrib/depends/Makefile
@@ -2,7 +2,6 @@
SOURCES_PATH ?= $(BASEDIR)/sources
BASE_CACHE ?= $(BASEDIR)/built
-SDK_PATH ?= $(BASEDIR)/SDKs
FALLBACK_DOWNLOAD_PATH ?= https://downloads.getmonero.org/depends-sources
BUILD = $(shell ./config.guess)
@@ -185,7 +184,6 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_
-e 's|@build_tests@|$(build_tests)|' \
-e 's|@depends@|$(host_cmake)|' \
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
- -e 's|@sdk@|$(SDK_PATH)|'\
-e 's|@arch@|$(host_arch)|'\
$< > $@
$(AT)touch $@
diff --git a/contrib/depends/README.md b/contrib/depends/README.md
index f7c0b922f..1aa5b276f 100644
--- a/contrib/depends/README.md
+++ b/contrib/depends/README.md
@@ -30,7 +30,7 @@ Common `host-platform-triplets` for cross compilation are:
- `i686-w64-mingw32` for Win32
- `x86_64-w64-mingw32` for Win64
-- `x86_64-apple-darwin11` for MacOSX
+- `x86_64-apple-darwin11` for MacOSX x86_64
- `arm-linux-gnueabihf` for Linux ARM 32 bit
- `aarch64-linux-gnu` for Linux ARM 64 bit
- `riscv64-linux-gnu` for Linux RISCV 64 bit
@@ -43,7 +43,6 @@ The following can be set when running make: make FOO=bar
```
SOURCES_PATH: downloaded sources will be placed here
BASE_CACHE: built packages will be placed here
-SDK_PATH: Path where sdk's can be found (used by OSX)
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
DEBUG: disable some optimizations and enable more runtime checking
HOST_ID_SALT: Optional salt to use when generating host package ids
@@ -59,14 +58,6 @@ download-win: run 'make download-win' to fetch all sources needed for win builds
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
```
-#Darwin (macos) builds:
-
-To build with the x86_64-apple-darwin11 you require the mac os developer tools in MacOSX11.1.sdk.
-Download it from apple, or search for it on github. Create a new directoty called SDKs in this
-directory and place the entire MacOSX11.1.sdk folder in it. The depends build will then pick it up automatically
-(without requiring SDK_PATH).
-
-
#Mingw builds
Building for 32/64bit mingw requires switching alternatives to a posix mode
diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
index 2226f779c..d8b16f969 100644
--- a/contrib/depends/hosts/darwin.mk
+++ b/contrib/depends/hosts/darwin.mk
@@ -1,14 +1,12 @@
OSX_MIN_VERSION=10.8
-OSX_SDK_VERSION=11.1
-OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
LD64_VERSION=609
ifeq (aarch64, $(host_arch))
CC_target=arm64-apple-darwin11
else
CC_target=$(host)
endif
-darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
-darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
+darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
+darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS)
@@ -20,4 +18,4 @@ darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
darwin_debug_CFLAGS=-O1
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
-darwin_native_toolchain=native_cctools
+darwin_native_toolchain=native_cctools darwin_sdk
diff --git a/contrib/depends/packages/darwin_sdk.mk b/contrib/depends/packages/darwin_sdk.mk
new file mode 100644
index 000000000..d639c422e
--- /dev/null
+++ b/contrib/depends/packages/darwin_sdk.mk
@@ -0,0 +1,10 @@
+package=darwin_sdk
+$(package)_version=11.1
+$(package)_download_path=https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/
+$(package)_file_name=MacOSX$($(package)_version).sdk.tar.xz
+$(package)_sha256_hash=68797baaacb52f56f713400de306a58a7ca00b05c3dc6d58f0a8283bcac721f8
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\
+ mv * $($(package)_staging_dir)/$(host_prefix)/native/SDK
+endef
diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
index 416b59801..11e2cb7be 100644
--- a/contrib/depends/packages/packages.mk
+++ b/contrib/depends/packages/packages.mk
@@ -34,6 +34,6 @@ mingw32_packages = icu4c sodium $(hardware_packages)
mingw32_native_packages = $(hardware_native_packages)
ifneq ($(build_os),darwin)
-darwin_native_packages += native_clang native_cctools native_libtapi
+darwin_native_packages += darwin_sdk native_clang native_cctools native_libtapi
endif
diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
index 3ed97633b..5f9501329 100644
--- a/contrib/depends/toolchain.cmake.in
+++ b/contrib/depends/toolchain.cmake.in
@@ -95,7 +95,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(BUILD_64 ON)
SET(BREW OFF)
SET(PORT OFF)
- SET(CMAKE_OSX_SYSROOT "@sdk@/MacOSX11.1.sdk/")
+ SET(CMAKE_OSX_SYSROOT "@prefix@/native/SDK/")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
SET(CMAKE_CXX_STANDARD 14)
SET(LLVM_ENABLE_PIC OFF)