darwin 333
This commit is contained in:
@@ -19,6 +19,7 @@ $(package)_config_opts_i686_linux=address-model=32 architecture=x86
|
||||
$(package)_toolset_$(host_os)=gcc
|
||||
$(package)_archiver_$(host_os)=$($(package)_ar)
|
||||
$(package)_toolset_darwin=gcc
|
||||
$(package)_archiver_darwin=$($(package)_ar)
|
||||
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
|
||||
$(package)_cxxflags=-fvisibility=hidden
|
||||
$(package)_cxxflags_linux=-fPIC
|
||||
@@ -34,10 +35,18 @@ define $(package)_config_cmds
|
||||
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
|
||||
endef
|
||||
|
||||
ifeq ($(host_os),linux)
|
||||
define $(package)_build_cmds
|
||||
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 stage
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 install
|
||||
endef
|
||||
else
|
||||
define $(package)_build_cmds
|
||||
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
|
||||
endef
|
||||
define $(package)_stage_cmds
|
||||
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -29,9 +29,15 @@ define $(package)_config_cmds
|
||||
$($(package)_autoconf) --host=$(host) --build=$(build)
|
||||
endef
|
||||
|
||||
ifeq ($(build_os),darwin)
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
else
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) CPPFLAGS='-fPIC'
|
||||
endef
|
||||
endif
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install ; echo '=== staging find for $(package):' ; find $($(package)_staging_dir)
|
||||
|
||||
@@ -9,8 +9,12 @@ $(package)_git_commit=3854b20c25e8bc567aab2b558dec84d45f4a3e73
|
||||
$(package)_dependencies=libgmp libsodium
|
||||
|
||||
ifeq ($(build_os),darwin)
|
||||
define $(package)_set_vars
|
||||
$(package)_build_env=CC="$($(package)_cc)" CXX="$($(package)_cxx)"
|
||||
$(package)_build_env+=CXXFLAGS="$($(package)_cxxflags) -DBINARY_OUTPUT -DSTATICLIB -DNO_PT_COMPRESSION=1 "
|
||||
endef
|
||||
define $(package)_build_cmds
|
||||
CC=gcc-5 CXX=g++-5 CXXFLAGS="-arch x86_64 -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=0 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT
|
||||
$(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64"
|
||||
endef
|
||||
else ifeq ($(host_os),mingw32)
|
||||
define $(package)_build_cmds
|
||||
@@ -23,9 +27,6 @@ endef
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) install STATIC=1 DEPINST=$(host_prefix) PREFIX=$($(package)_staging_dir)$(host_prefix) CURVE=ALT_BN128 NO_SUPERCOP=1
|
||||
endef
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
rust_packages := rust librustzcash
|
||||
zcash_packages := libsnark libgmp libsodium
|
||||
|
||||
ifeq ($(build_os),linux)
|
||||
ifeq ($(host_os),linux)
|
||||
packages := boost openssl libevent zeromq $(zcash_packages) googletest googlemock
|
||||
else
|
||||
packages := boost openssl libevent zeromq $(zcash_packages) googletest googlemock libcurl
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
/*
|
||||
#ifdef __APPLE__
|
||||
#include <machine/endian.h>
|
||||
#include <libkern/OSByteOrder.h>
|
||||
@@ -51,7 +52,7 @@
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
#endif
|
||||
|
||||
*/
|
||||
EhSolverCancelledException solver_cancelled;
|
||||
|
||||
template<unsigned int N, unsigned int K>
|
||||
|
||||
@@ -38,8 +38,13 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
libzcash::JSOutput(addr, 50),
|
||||
libzcash::JSOutput(addr, 50)
|
||||
};
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
boost::array<uint64_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||
#else
|
||||
boost::array<size_t, ZC_NUM_JS_INPUTS> inputMap;
|
||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> outputMap;
|
||||
#endif
|
||||
|
||||
{
|
||||
auto jsdesc = JSDescription::Randomized(
|
||||
@@ -48,12 +53,22 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
inputMap, outputMap,
|
||||
0, 0, false);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
std::set<uint64_t> inputSet(inputMap.begin(), inputMap.end());
|
||||
std::set<uint64_t> expectedInputSet {0, 1};
|
||||
#else
|
||||
std::set<size_t> inputSet(inputMap.begin(), inputMap.end());
|
||||
std::set<size_t> expectedInputSet {0, 1};
|
||||
#endif
|
||||
EXPECT_EQ(expectedInputSet, inputSet);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
std::set<uint64_t> outputSet(outputMap.begin(), outputMap.end());
|
||||
std::set<uint64_t> expectedOutputSet {0, 1};
|
||||
#else
|
||||
std::set<size_t> outputSet(outputMap.begin(), outputMap.end());
|
||||
std::set<size_t> expectedOutputSet {0, 1};
|
||||
#endif
|
||||
EXPECT_EQ(expectedOutputSet, outputSet);
|
||||
}
|
||||
|
||||
@@ -64,8 +79,13 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
inputMap, outputMap,
|
||||
0, 0, false, GenZero);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
boost::array<uint64_t, ZC_NUM_JS_INPUTS> expectedInputMap {1, 0};
|
||||
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {1, 0};
|
||||
#else
|
||||
boost::array<size_t, ZC_NUM_JS_INPUTS> expectedInputMap {1, 0};
|
||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {1, 0};
|
||||
#endif
|
||||
EXPECT_EQ(expectedInputMap, inputMap);
|
||||
EXPECT_EQ(expectedOutputMap, outputMap);
|
||||
}
|
||||
@@ -77,8 +97,13 @@ TEST(Transaction, JSDescriptionRandomized) {
|
||||
inputMap, outputMap,
|
||||
0, 0, false, GenMax);
|
||||
|
||||
#ifdef __LP64__ // required for building on MacOS
|
||||
boost::array<uint64_t, ZC_NUM_JS_INPUTS> expectedInputMap {0, 1};
|
||||
boost::array<uint64_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {0, 1};
|
||||
#else
|
||||
boost::array<size_t, ZC_NUM_JS_INPUTS> expectedInputMap {0, 1};
|
||||
boost::array<size_t, ZC_NUM_JS_OUTPUTS> expectedOutputMap {0, 1};
|
||||
#endif
|
||||
EXPECT_EQ(expectedInputMap, inputMap);
|
||||
EXPECT_EQ(expectedOutputMap, outputMap);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
#include "serialize.h"
|
||||
#include "uint256.h"
|
||||
#include "consensus/consensus.h"
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <boost/array.hpp>
|
||||
|
||||
|
||||
1
user-config.jam
Normal file
1
user-config.jam
Normal file
@@ -0,0 +1 @@
|
||||
using : : : <cxxflags>" " <linkflags>"" <archiver>"" <striper>"" <ranlib>"" <rc>"" : ;
|
||||
Reference in New Issue
Block a user