Nathan Wilcox
9 years ago
18 changed files with 239 additions and 146 deletions
@ -0,0 +1,17 @@ |
|||
package=ate-pairing |
|||
$(package)_version=0.1 |
|||
$(package)_download_path=https://github.com/herumi/$(package)/archive/ |
|||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz |
|||
$(package)_download_file=$($(package)_git_commit).tar.gz |
|||
$(package)_sha256_hash=37c05b4a60653b912a0130d77ac816620890d65a51dd9629ed65c15b54c2d8e0 |
|||
$(package)_dependencies=xbyak libgmp |
|||
|
|||
$(package)_git_commit=dd7889f2881e66f87165fcd180a03cf659bcb073 |
|||
|
|||
define $(package)_build_cmds |
|||
$(MAKE) -j SUPPORT_SNARK=1 INC_DIR='-I../include $($(package)_cppflags)' LIB_DIR='-L../lib $($(package)_ldflags)' |
|||
endef |
|||
|
|||
define $(package)_stage_cmds |
|||
cp -rv include/ lib/ $($(package)_staging_dir)$(host_prefix) |
|||
endef |
@ -0,0 +1,20 @@ |
|||
package=crypto++ |
|||
$(package)_version=5.6.2 |
|||
$(package)_download_path=http://www.cryptopp.com/ |
|||
$(package)_file_name=cryptopp562.zip |
|||
$(package)_sha256_hash=5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574 |
|||
$(package)_dependencies= |
|||
|
|||
# SECURITY BUG: _extract_cmds is responsible for verifying the archive
|
|||
# hash, but does not do so here:
|
|||
define $(package)_extract_cmds |
|||
unzip $($(package)_source_dir)/$($(package)_file_name) |
|||
endef |
|||
|
|||
define $(package)_build_cmds |
|||
$(MAKE) static CXXFLAGS='-DNDEBUG -g -O2 -fPIC' |
|||
endef |
|||
|
|||
define $(package)_stage_cmds |
|||
$(MAKE) install PREFIX=$($(package)_staging_dir)$(host_prefix) |
|||
endef |
@ -0,0 +1,19 @@ |
|||
package=libgmp |
|||
$(package)_version=6.0.0a |
|||
$(package)_download_path=https://gmplib.org/download/gmp/ |
|||
$(package)_file_name=gmp-6.0.0a.tar.bz2 |
|||
$(package)_sha256_hash=7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf |
|||
$(package)_dependencies= |
|||
$(package)_config_opts=--enable-cxx --disable-shared |
|||
|
|||
define $(package)_config_cmds |
|||
$($(package)_autoconf) |
|||
endef |
|||
|
|||
define $(package)_build_cmds |
|||
$(MAKE) CPPFLAGS='-fPIC' |
|||
endef |
|||
|
|||
define $(package)_stage_cmds |
|||
$(MAKE) DESTDIR=$($(package)_staging_dir) install ; echo '=== staging find for $(package):' ; find $($(package)_staging_dir) |
|||
endef |
@ -0,0 +1,22 @@ |
|||
package=libsnark |
|||
$(package)_version=0.1 |
|||
$(package)_download_path=https://github.com/scipr-lab/$(package)/archive/ |
|||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz |
|||
$(package)_download_file=$($(package)_git_commit).tar.gz |
|||
$(package)_sha256_hash=b5ec84a836d0d305407d5f39c8176bae2bb448abe802a8d11ba0f88f17e6d358 |
|||
$(package)_git_commit=69f312f149cc4bd8def8e2fed26a7941ff41251d |
|||
|
|||
$(package)_dependencies=crypto++ libgmp xbyak ate-pairing |
|||
$(package)_patches=1_fix_Wl_flag.patch |
|||
|
|||
define $(package)_preprocess_cmds |
|||
patch -p1 < $($(package)_patch_dir)/1_fix_Wl_flag.patch |
|||
endef |
|||
|
|||
define $(package)_build_cmds |
|||
CXXFLAGS="-fPIC -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 |
|||
endef |
|||
|
|||
define $(package)_stage_cmds |
|||
$(MAKE) install STATIC=1 DEPINST=$(host_prefix) PREFIX=$($(package)_staging_dir)$(host_prefix) CURVE=ALT_BN128 NO_SUPERCOP=1 |
|||
endef |
@ -0,0 +1,38 @@ |
|||
package=libzerocash |
|||
$(package)_download_path=https://github.com/Electric-Coin-Company/$(package)/archive/ |
|||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz |
|||
$(package)_download_file=$($(package)_git_commit).tar.gz |
|||
$(package)_sha256_hash=b79290e4ef412c07d519995caa1016d78d8263c6805a8ecfa1f42f8754978f95 |
|||
$(package)_git_commit=29df1b8bb28dff1c3e7b5952944aa55b42c36f7b |
|||
|
|||
$(package)_dependencies=libsnark crypto++ openssl boost libgmp |
|||
$(package)_patches= |
|||
|
|||
define $(package)_preprocess_cmds |
|||
rm libzerocash/allocators.h libzerocash/serialize.h libzerocash/streams.h |
|||
endef |
|||
|
|||
# FIXME: How do we know, at the point where the _build_cms are run, that the
|
|||
# $(host_prefix)/include/libsnark folder is there? The lifecycle of that folder
|
|||
# is as follows:
|
|||
# 1. First, the _stage_cmds of libsnark.mk create it in the staging directory.
|
|||
# 2. At some point in time, the depends system moves it from the staging
|
|||
# directory to the actual $(host_prefix)/include/libsnark directory.
|
|||
#
|
|||
# If (2) happens after the libzerocash_build_cmds get run, then what's in the
|
|||
# $(host_prefix)/include/libsnark directory will be an *old* copy of the
|
|||
# libsnark headers, and we might have to build twice in order for libzerocash to
|
|||
# get the changes. If (2) happens before, then all is well, and it works.
|
|||
#
|
|||
# ** Which is it? **
|
|||
#
|
|||
$(package)_cppflags += -I$(BASEDIR)/../src -I. -I$(host_prefix)/include -I$(host_prefix)/include/libsnark -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=c++11 -pipe -O2 -O0 -g -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden |
|||
$(package)_cppflags += -I$(BASEDIR)/../src -I. -I$(host_prefix)/include -I$(host_prefix)/include/libsnark -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=c++11 -pipe -O2 -O0 -g -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden -fPIC |
|||
|
|||
define $(package)_build_cmds |
|||
$(MAKE) all DEPINST=$(host_prefix) CXXFLAGS="$($(package)_cppflags)" STATIC=1 MINDEPS=1 USE_MT=1 LINK_RT=1 |
|||
endef |
|||
|
|||
define $(package)_stage_cmds |
|||
$(MAKE) install DEPINST=$(host_prefix) PREFIX=$($(package)_staging_dir)$(host_prefix) STATIC=1 MINDEPS=1 USE_MT=1 |
|||
endef |
@ -0,0 +1,17 @@ |
|||
package=xbyak |
|||
$(package)_version=0.1 |
|||
$(package)_download_path=https://github.com/herumi/$(package)/archive/ |
|||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz |
|||
$(package)_download_file=$($(package)_git_commit).tar.gz |
|||
$(package)_sha256_hash=467a9037c29bc417840177f3ff5d76910d3f688f2f216dd86ced4a7ac837bfb0 |
|||
$(package)_dependencies= |
|||
|
|||
$(package)_git_commit=62fd6d022acd83209e2a5af8ec359a3a1bed3a50 |
|||
|
|||
define $(package)_build_cmds |
|||
echo 'xbyak build is unnecessary for consumer ate-pairing.' |
|||
endef |
|||
|
|||
define $(package)_stage_cmds |
|||
$(MAKE) install PREFIX=$($(package)_staging_dir)$(host_prefix) |
|||
endef |
@ -1,35 +0,0 @@ |
|||
diff --git a/include/boost/atomic/detail/cas128strong.hpp b/include/boost/atomic/detail/cas128strong.hpp
|
|||
index 906c13e..dcb4d7d 100644
|
|||
--- a/include/boost/atomic/detail/cas128strong.hpp
|
|||
+++ b/include/boost/atomic/detail/cas128strong.hpp
|
|||
@@ -196,15 +196,17 @@ class base_atomic<T, void, 16, Sign>
|
|||
|
|||
public: |
|||
BOOST_DEFAULTED_FUNCTION(base_atomic(void), {}) |
|||
- explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
|
|||
+ explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
|
|||
{ |
|||
+ memset(&v_, 0, sizeof(v_));
|
|||
memcpy(&v_, &v, sizeof(value_type)); |
|||
} |
|||
|
|||
void |
|||
store(value_type const& value, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT |
|||
{ |
|||
- storage_type value_s = 0;
|
|||
+ storage_type value_s;
|
|||
+ memset(&value_s, 0, sizeof(value_s));
|
|||
memcpy(&value_s, &value, sizeof(value_type)); |
|||
platform_fence_before_store(order); |
|||
platform_store128(value_s, &v_); |
|||
@@ -247,7 +249,9 @@ class base_atomic<T, void, 16, Sign>
|
|||
memory_order success_order, |
|||
memory_order failure_order) volatile BOOST_NOEXCEPT |
|||
{ |
|||
- storage_type expected_s = 0, desired_s = 0;
|
|||
+ storage_type expected_s, desired_s;
|
|||
+ memset(&expected_s, 0, sizeof(expected_s));
|
|||
+ memset(&desired_s, 0, sizeof(desired_s));
|
|||
memcpy(&expected_s, &expected, sizeof(value_type)); |
|||
memcpy(&desired_s, &desired, sizeof(value_type)); |
|||
|
@ -1,55 +0,0 @@ |
|||
diff --git a/include/boost/atomic/detail/gcc-atomic.hpp b/include/boost/atomic/detail/gcc-atomic.hpp
|
|||
index a130590..4af99a1 100644
|
|||
--- a/include/boost/atomic/detail/gcc-atomic.hpp
|
|||
+++ b/include/boost/atomic/detail/gcc-atomic.hpp
|
|||
@@ -958,14 +958,16 @@ class base_atomic<T, void, 16, Sign>
|
|||
|
|||
public: |
|||
BOOST_DEFAULTED_FUNCTION(base_atomic(void), {}) |
|||
- explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
|
|||
+ explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
|
|||
{ |
|||
+ memset(&v_, 0, sizeof(v_));
|
|||
memcpy(&v_, &v, sizeof(value_type)); |
|||
} |
|||
|
|||
void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT |
|||
{ |
|||
- storage_type tmp = 0;
|
|||
+ storage_type tmp;
|
|||
+ memset(&tmp, 0, sizeof(tmp));
|
|||
memcpy(&tmp, &v, sizeof(value_type)); |
|||
__atomic_store_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order)); |
|||
} |
|||
@@ -980,7 +982,8 @@ class base_atomic<T, void, 16, Sign>
|
|||
|
|||
value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT |
|||
{ |
|||
- storage_type tmp = 0;
|
|||
+ storage_type tmp;
|
|||
+ memset(&tmp, 0, sizeof(tmp));
|
|||
memcpy(&tmp, &v, sizeof(value_type)); |
|||
tmp = __atomic_exchange_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order)); |
|||
value_type res; |
|||
@@ -994,7 +997,9 @@ class base_atomic<T, void, 16, Sign>
|
|||
memory_order success_order, |
|||
memory_order failure_order) volatile BOOST_NOEXCEPT |
|||
{ |
|||
- storage_type expected_s = 0, desired_s = 0;
|
|||
+ storage_type expected_s, desired_s;
|
|||
+ memset(&expected_s, 0, sizeof(expected_s));
|
|||
+ memset(&desired_s, 0, sizeof(desired_s));
|
|||
memcpy(&expected_s, &expected, sizeof(value_type)); |
|||
memcpy(&desired_s, &desired, sizeof(value_type)); |
|||
const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, false, |
|||
@@ -1010,7 +1015,9 @@ class base_atomic<T, void, 16, Sign>
|
|||
memory_order success_order, |
|||
memory_order failure_order) volatile BOOST_NOEXCEPT |
|||
{ |
|||
- storage_type expected_s = 0, desired_s = 0;
|
|||
+ storage_type expected_s, desired_s;
|
|||
+ memset(&expected_s, 0, sizeof(expected_s));
|
|||
+ memset(&desired_s, 0, sizeof(desired_s));
|
|||
memcpy(&expected_s, &expected, sizeof(value_type)); |
|||
memcpy(&desired_s, &desired, sizeof(value_type)); |
|||
const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, true, |
@ -1,37 +0,0 @@ |
|||
From eec808554936ae068b23df07ab54d4dc6302a695 Mon Sep 17 00:00:00 2001 |
|||
From: jzmaddock <jzmaddock@gmail.com> |
|||
Date: Sat, 23 Aug 2014 09:38:02 +0100 |
|||
Subject: [PATCH] Fix BOOST_NO_CXX11_VARIADIC_TEMPLATES definition - the |
|||
feature was introduced in GCC 4.4. |
|||
|
|||
---
|
|||
include/boost/config/compiler/gcc.hpp | 9 +-------- |
|||
1 file changed, 1 insertion(+), 8 deletions(-) |
|||
|
|||
diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp
|
|||
index f37159d..97d8a18 100644
|
|||
--- a/include/boost/config/compiler/gcc.hpp
|
|||
+++ b/include/boost/config/compiler/gcc.hpp
|
|||
@@ -154,14 +154,6 @@
|
|||
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS |
|||
# define BOOST_NO_CXX11_RVALUE_REFERENCES |
|||
# define BOOST_NO_CXX11_STATIC_ASSERT |
|||
-
|
|||
-// Variadic templates compiler:
|
|||
-// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
|
|||
-# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
|
|||
-# define BOOST_HAS_VARIADIC_TMPL
|
|||
-# else
|
|||
-# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
|||
-# endif
|
|||
#endif |
|||
|
|||
// C++0x features in 4.4.n and later |
|||
@@ -176,6 +168,7 @@
|
|||
# define BOOST_NO_CXX11_DELETED_FUNCTIONS |
|||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES |
|||
# define BOOST_NO_CXX11_INLINE_NAMESPACES |
|||
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
|||
#endif |
|||
|
|||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) |
@ -0,0 +1,19 @@ |
|||
commit 728c1ace30f2338b86331f0b83559409198e1f74 |
|||
Author: Taylor Hornby <havoc@defuse.ca> |
|||
Date: Wed Sep 9 16:46:48 2015 -0600 |
|||
|
|||
g++-4.9 requires commas to include the argument to ``rpath`` as a linker flag. |
|||
|
|||
diff --git a/Makefile b/Makefile
|
|||
index 5f59388..68e91bb 100644
|
|||
--- a/Makefile
|
|||
+++ b/Makefile
|
|||
@@ -18,7 +18,7 @@ DEPSRC = depsrc
|
|||
DEPINST = depinst |
|||
|
|||
CXXFLAGS += -I$(DEPINST)/include -Isrc |
|||
-LDFLAGS += -L$(DEPINST)/lib -Wl,-rpath $(DEPINST)/lib
|
|||
+LDFLAGS += -L$(DEPINST)/lib -Wl,-rpath,$(DEPINST)/lib
|
|||
LDLIBS += -lgmpxx -lgmp -lboost_program_options |
|||
# OpenSSL and its dependencies (needed explicitly for static builds): |
|||
LDLIBS += -lcrypto -ldl -lz |
Loading…
Reference in new issue