aboutsummaryrefslogtreecommitdiff
path: root/contrib/depends
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2018-03-20 00:33:49 +0100
committerTheCharlatan <seb.kung@gmail.com>2018-09-10 22:05:36 +0200
commit56b6e41ea7b7c17b513c24797d234e5cf9df8fa2 (patch)
tree7a319632b4178438e2578b22c37ad973e83994ad /contrib/depends
parentDisable stack unwinding for mingw32 depends build. (diff)
downloadmonero-56b6e41ea7b7c17b513c24797d234e5cf9df8fa2.tar.xz
Add support for apple and arm building
Add pcsc-lite to linux builds Fixup windows icu4c linking with depends, the static libraries have an 's' appended to them Compiling depends arm-linux-gnueabihf will allow you to compile armv6zk monero binaries
Diffstat (limited to '')
-rw-r--r--contrib/depends/Makefile4
-rw-r--r--contrib/depends/packages/boost.mk14
-rw-r--r--contrib/depends/packages/packages.mk5
-rw-r--r--contrib/depends/packages/unwind.mk4
-rw-r--r--contrib/depends/toolchain.cmake.in65
5 files changed, 67 insertions, 25 deletions
diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile
index be81626b1..b0c032c09 100644
--- a/contrib/depends/Makefile
+++ b/contrib/depends/Makefile
@@ -67,7 +67,7 @@ endif
ifeq ($(host_os),linux)
host_cmake=Linux
endif
-ifeq ($(host_os),darwin11)
+ifeq ($(host_os),darwin)
host_cmake=Darwin
endif
@@ -182,6 +182,8 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_
-e 's|@debug@|$(DEBUG)|' \
-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/packages/boost.mk b/contrib/depends/packages/boost.mk
index 9d3dda74a..89db5a415 100644
--- a/contrib/depends/packages/boost.mk
+++ b/contrib/depends/packages/boost.mk
@@ -1,8 +1,8 @@
-package=boost
-$(package)_version=1_58_0
-$(package)_download_path=https://sourceforge.net/projects/boost/files/boost/1.58.0
-$(package)_file_name=$(package)_$($(package)_version).tar.gz
-$(package)_sha256_hash=a004d9b3fa95e956383693b86fce1b68805a6f71c2e68944fa813de0fb8c8102
+package=boost
+$(package)_version=1_64_0
+$(package)_download_path=https://dl.bintray.com/boostorg/release/1.64.0/source/
+$(package)_file_name=$(package)_$($(package)_version).tar.bz2
+$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
define $(package)_set_vars
$(package)_config_opts_release=variant=release
@@ -19,13 +19,13 @@ $(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
-$(package)_config_libraries=system,filesystem,thread,date_time,chrono,regex,serialization,program_options,locale
+$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
$(package)_cxxflags_linux=-fPIC
endef
define $(package)_preprocess_cmds
- echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
+ echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STR IP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef
define $(package)_config_cmds
diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
index 1aca06096..af92191bb 100644
--- a/contrib/depends/packages/packages.mk
+++ b/contrib/depends/packages/packages.mk
@@ -1,4 +1,4 @@
-packages:=boost openssl libevent zeromq cppzmq zlib expat ldns unbound cppzmq readline libiconv icu4c
+packages:=boost openssl libevent zeromq cppzmq zlib expat ldns unbound cppzmq readline libiconv
native_packages := native_ccache
wallet_packages=bdb
@@ -13,6 +13,9 @@ endif
ifeq ($(host_os),darwin11)
package += unwind
endif
+ifeq ($(host_os),mingw32)
+packages += icu4c
+endif
ifneq ($(build_os),darwin)
darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
diff --git a/contrib/depends/packages/unwind.mk b/contrib/depends/packages/unwind.mk
index 06e142115..e1bcb35b2 100644
--- a/contrib/depends/packages/unwind.mk
+++ b/contrib/depends/packages/unwind.mk
@@ -5,7 +5,9 @@ $(package)_file_name=lib$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=1de38ffbdc88bd694d10081865871cd2bfbb02ad8ef9e1606aee18d65532b992
define $(package)_config_cmds
- $($(package)_autoconf) --disable-shared --enable-static
+ cp -f $(BASEDIR)/config.guess config/config.guess &&\
+ cp -f $(BASEDIR)/config.sub config/config.sub &&\
+ $($(package)_autoconf) --disable-shared --enable-static
endef
define $(package)_build_cmds
diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
index eb4fcba04..06217363c 100644
--- a/contrib/depends/toolchain.cmake.in
+++ b/contrib/depends/toolchain.cmake.in
@@ -1,12 +1,6 @@
-# this one is important
+# Set the system name, either Darwin, Linux, or Windows
SET(CMAKE_SYSTEM_NAME @depends@)
-
-#this one not so much
-SET(CMAKE_SYSTEM_VERSION 1)
-
-# specify the cross compiler
-SET(CMAKE_C_COMPILER @CC@)
-SET(CMAKE_CXX_COMPILER @CXX@)
+SET(CMAKE_BUILD_TYPE release)
SET(STATIC true)
SET(UNBOUND_STATIC true)
@@ -14,6 +8,8 @@ SET(UNBOUND_STATIC true)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH @prefix@ /usr)
+SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
+
SET(THREADS_PTHREAD_ARG "2" CACHE STRING "Forcibly set by CMakeLists.txt." FORCE)
SET(Readline_ROOT_DIR @prefix@)
@@ -28,18 +24,57 @@ SET(UNBOUND_LIBRARY @prefix@/lib/libunbound.a)
SET(ZMQ_INCLUDE_PATH @prefix@/include)
SET(ZMQ_LIB @prefix@/lib/libzmq.a)
-#SET(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT ON)
-#SET(BOOST_IGNORE_SYSTEM_PATH ON)
-#SET(BOOST_ROOT @prefix@)
-#SET(BOOST_LIBRARYDIR @prefix@/lib)
+SET(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT ON)
+SET(BOOST_IGNORE_SYSTEM_PATH ON)
+SET(BOOST_ROOT @prefix@)
+SET(BOOST_LIBRARYDIR @prefix@/lib)
+SET(Boost_COMPILER "-clang")
+SET(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
+SET(Boost_NO_SYSTEM_PATHS TRUE)
+SET(Boost_USE_STATIC_LIBS TRUE)
+SET(Boost_USE_STATIC_RUNTIME TRUE)
+
+SET(OpenSSL_DIR @prefix@/lib)
# for libraries and headers in the target directories
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
-#set (MINGW_FLAG "-m64")
-#set (USE_LTO_DEFAULT false)
+# specify the cross compiler to be used. Darwin uses clang provided by the SDK.
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ SET(CMAKE_C_COMPILER @prefix@/native/bin/clang)
+ SET(CMAKE_C_COMPILER_TARGET x86_64-apple-darwin11)
+ SET(CMAKE_CXX_COMPILER @prefix@/native/bin/clang++ -stdlib=libc++)
+ SET(CMAKE_CXX_COMPILER_TARGET x86_64-apple-darwin11)
+ SET(_CMAKE_TOOLCHAIN_PREFIX x86_64-apple-darwin11-)
+ SET(APPLE True)
+ SET(BUILD_TAG "mac-x64")
+ SET(BUILD_64 ON)
+ SET(ARCH "x86_64")
+ SET(BREW OFF)
+ SET(PORT OFF)
+ SET(CMAKE_OSX_SYSROOT "@sdk@/MacOSX10.11.sdk/")
+ SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
+ SET(CMAKE_CXX_STANDARD 11)
+ SET(CMAKE_OSX_ARCHITECTURES "x86_64")
+ SET(LLVM_ENABLE_PIC OFF)
+ SET(LLVM_ENABLE_PIE OFF)
+else()
+ SET(CMAKE_C_COMPILER @CC@)
+ SET(CMAKE_CXX_COMPILER @CXX@)
+endif()
+
+set(ARCH @arch@)
+
+if(ARCH STREQUAL "arm")
+ set(ARCH "armv6zk")
+ set(ARMID "armv6zk")
+ set(BUILD_64 OFF)
+ set(CMAKE_BUILD_TYPE release)
+ set(BUILD_TAG "linux-armv6")
+ set(ARM6)
+endif()
-#Create a new cmake flag that indicates building with depends
+#Create a new global cmake flag that indicates building with depends
set (DEPENDS true)