adjustments for cross build of aarch64 binaries on x86_64 linux
This commit is contained in:
@@ -9,6 +9,11 @@ define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
|
||||
$(package)_config_opts_mingw32=--enable-mingw
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
$(package)_config_opts_freebsd=--with-pic
|
||||
ifneq ($(build_os),darwin)
|
||||
$(package)_config_opts_darwin=--disable-atomicsupport
|
||||
endif
|
||||
$(package)_config_opts_aarch64=--disable-atomicsupport
|
||||
$(package)_cxxflags=-std=c++11
|
||||
endef
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ $(package)_dependencies=openssl
|
||||
$(package)_download_path=https://curl.haxx.se/download
|
||||
$(package)_file_name=curl-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=52af3361cf806330b88b4fe6f483b6844209d47ae196ac46da4de59bb361ab02
|
||||
$(package)_config_opts_linux=--disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-unknown-linux-gnu
|
||||
$(package)_config_opts_linux=--disable-shared --enable-static --prefix=$(host_prefix) --host=$(host)
|
||||
$(package)_config_opts_mingw32=--enable-mingw --disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-w64-mingw32
|
||||
$(package)_config_opts_darwin=--disable-shared --enable-static --prefix=$(host_prefix)
|
||||
$(package)_cflags_darwin=-mmacosx-version-min=10.9
|
||||
|
||||
@@ -8,15 +8,29 @@ $(package)_git_commit=06da3b9ac8f278e5d4ae13088cf0a4c03d2c13f5
|
||||
$(package)_dependencies=rust $(rust_crates)
|
||||
$(package)_patches=cargo.config 0001-Start-using-cargo-clippy-for-CI.patch remove-dev-dependencies.diff no-groth16.patch
|
||||
|
||||
$(package)_rust_target=$(if $(rust_rust_target_$(canonical_host)),$(rust_rust_target_$(canonical_host)),$(canonical_host))
|
||||
|
||||
ifeq ($(host_os),mingw32)
|
||||
$(package)_library_file=target/x86_64-pc-windows-gnu/release/rustzcash.lib
|
||||
else ifneq ($(canonical_host),$(build))
|
||||
ifeq ($(host_os),darwin)
|
||||
$(package)_library_file=target/x86_64-apple-darwin/release/librustzcash.a
|
||||
else
|
||||
$(package)_library_file=target/$($(package)_rust_target)/release/librustzcash.a
|
||||
endif
|
||||
else
|
||||
$(package)_library_file=target/release/librustzcash.a
|
||||
endif
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_build_opts=--frozen --release
|
||||
$(package)_build_opts_mingw32=--target=x86_64-pc-windows-gnu
|
||||
ifneq ($(canonical_host),$(build))
|
||||
ifeq ($(host_os),darwin)
|
||||
$(package)_build_opts+=--target=x86_64-apple-darwin
|
||||
else
|
||||
$(package)_build_opts+=--target=$($(package)_rust_target)
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
@@ -27,7 +41,7 @@ define $(package)_preprocess_cmds
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
cargo build --package librustzcash $($(package)_build_opts)
|
||||
$(host_prefix)/native/bin/cargo build --package librustzcash $($(package)_build_opts)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
rust_packages := rust librustzcash
|
||||
|
||||
ifeq ($(build_os),darwin)
|
||||
zcash_packages := libgmp libsodium utfcpp
|
||||
else
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package=proton
|
||||
$(package)_version=0.26.0
|
||||
$(package)_version=0.30.0
|
||||
$(package)_download_path=https://archive.apache.org/dist/qpid/proton/$($(package)_version)
|
||||
$(package)_file_name=qpid-proton-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=0eddac870f0085b9aeb0c9da333bd3f53fedb7c872164171a7cc06761ddbbd75
|
||||
$(package)_sha256_hash=e37fd8fb13391c3996f927839969a8f66edf35612392d0611eeac6e39e48dd33
|
||||
$(package)_patches=minimal-build.patch
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
@@ -11,7 +11,7 @@ define $(package)_preprocess_cmds
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
cd build; cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_INSTALL_PREFIX=/ -DSYSINSTALL_BINDINGS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_PYTHON=OFF -DBUILD_PHP=OFF -DBUILD_JAVA=OFF -DBUILD_PERL=OFF -DBUILD_RUBY=OFF -DBUILD_JAVASCRIPT=OFF -DBUILD_GO=OFF -DBUILD_STATIC_LIBS=ON
|
||||
cd build; cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_INSTALL_PREFIX=/ -DSYSINSTALL_BINDINGS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_PYTHON=OFF -DBUILD_RUBY=OFF -DBUILD_GO=OFF -DBUILD_STATIC_LIBS=ON -DLIB_SUFFIX= -DENABLE_JSONCPP=
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
@@ -21,3 +21,4 @@ endef
|
||||
define $(package)_stage_cmds
|
||||
cd build; $(MAKE) VERBOSE=1 DESTDIR=$($(package)_staging_prefix_dir) install
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,28 +1,33 @@
|
||||
package=rust
|
||||
$(package)_version=1.32.0
|
||||
$(package)_version=1.42.0
|
||||
$(package)_download_path=https://static.rust-lang.org/dist
|
||||
|
||||
$(package)_file_name_linux=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz
|
||||
$(package)_sha256_hash_linux=e024698320d76b74daf0e6e71be3681a1e7923122e3ebd03673fcac3ecc23810
|
||||
$(package)_sha256_hash_linux=7d1e07ad9c8a33d8d039def7c0a131c5917aa3ea0af3d0cc399c6faf7b789052
|
||||
$(package)_file_name_darwin=rust-$($(package)_version)-x86_64-apple-darwin.tar.gz
|
||||
$(package)_sha256_hash_darwin=f0dfba507192f9b5c330b5984ba71d57d434475f3d62bd44a39201e36fa76304
|
||||
$(package)_file_name_mingw32=rust-$($(package)_version)-x86_64-pc-windows-gnu.tar.gz
|
||||
$(package)_sha256_hash_mingw32=358e1435347c67dbf33aa9cad6fe501a833d6633ed5d5aa1863d5dffa0349be9
|
||||
$(package)_sha256_hash_darwin=db1055c46e0d54b99da05e88c71fea21b3897e74a4f5ff9390e934f3f050c0a8
|
||||
$(package)_file_name_freebsd=rust-$($(package)_version)-x86_64-unknown-freebsd.tar.gz
|
||||
$(package)_sha256_hash_freebsd=230bcf17e4383fba85d3c87fe25d17737459fe561a5f4668fe70dcac2da4e17c
|
||||
|
||||
ifeq ($(build_os),darwin)
|
||||
$(package)_file_name=$($(package)_file_name_darwin)
|
||||
$(package)_sha256_hash=$($(package)_sha256_hash_darwin)
|
||||
else ifeq ($(host_os),mingw32)
|
||||
$(package)_file_name=$($(package)_file_name_mingw32)
|
||||
$(package)_sha256_hash=$($(package)_sha256_hash_mingw32)
|
||||
else
|
||||
$(package)_file_name=$($(package)_file_name_linux)
|
||||
$(package)_sha256_hash=$($(package)_sha256_hash_linux)
|
||||
endif
|
||||
# Mapping from GCC canonical hosts to Rust targets
|
||||
# If a mapping is not present, we assume they are identical, unless $host_os is
|
||||
# "darwin", in which case we assume x86_64-apple-darwin.
|
||||
$(package)_rust_target_x86_64-w64-mingw32=x86_64-pc-windows-gnu
|
||||
|
||||
ifeq ($(host_os),mingw32)
|
||||
# Mapping from Rust targets to SHA-256 hashes
|
||||
$(package)_rust_std_sha256_hash_aarch64-unknown-linux-gnu=1343f51fc87049327233cee8941629c3d7dfdc425d359385f93665de3d46711b
|
||||
$(package)_rust_std_sha256_hash_x86_64-apple-darwin=1d61e9ed5d29e1bb4c18e13d551c6d856c73fb8b410053245dc6e0d3b3a0e92c
|
||||
$(package)_rust_std_sha256_hash_x86_64-pc-windows-gnu=8a8389f3860df6f42fbf8b76a62ddc7b9b6fe6d0fb526dcfc42faab1005bfb6d
|
||||
|
||||
define rust_target
|
||||
$(if $($(1)_rust_target_$(2)),$($(1)_rust_target_$(2)),$(if $(findstring darwin,$(3)),x86_64-apple-darwin,$(2)))
|
||||
endef
|
||||
|
||||
ifneq ($(canonical_host),$(build))
|
||||
$(package)_rust_target=$(call rust_target,$(package),$(canonical_host),$(host_os))
|
||||
$(package)_exact_file_name=rust-std-$($(package)_version)-$($(package)_rust_target).tar.gz
|
||||
$(package)_exact_sha256_hash=$($(package)_rust_std_sha256_hash_$($(package)_rust_target))
|
||||
$(package)_build_subdir=buildos
|
||||
$(package)_extra_sources = $($(package)_file_name_$(build_os))
|
||||
$(package)_extra_sources=$($(package)_file_name_$(build_os))
|
||||
|
||||
define $(package)_fetch_cmds
|
||||
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
|
||||
@@ -34,19 +39,19 @@ define $(package)_extract_cmds
|
||||
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||
echo "$($(package)_sha256_hash_$(build_os)) $($(package)_source_dir)/$($(package)_file_name_$(build_os))" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
|
||||
mkdir mingw32 && \
|
||||
tar --strip-components=1 -xf $($(package)_source) -C mingw32 && \
|
||||
mkdir $(canonical_host) && \
|
||||
tar --strip-components=1 -xf $($(package)_source) -C $(canonical_host) && \
|
||||
mkdir buildos && \
|
||||
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_file_name_$(build_os)) -C buildos
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig && \
|
||||
cp -r ../mingw32/rust-std-x86_64-pc-windows-gnu/lib/rustlib/x86_64-pc-windows-gnu $($(package)_staging_dir)$(host_prefix)/native/lib/rustlib
|
||||
bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig && \
|
||||
../$(canonical_host)/install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
|
||||
endef
|
||||
else
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
|
||||
bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
|
||||
endef
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user