fix binaryen on aarch64

This commit is contained in:
Josh Stone 2018-01-09 14:18:01 -08:00
parent 04482640db
commit e11de07846
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fbd0bedb9109..e863ae9f2a05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,6 +122,8 @@ ELSE()
set(TARGET_ARCH "x86-64")
elseif (${FILE_OUTPUT} MATCHES "Intel 80386")
set(TARGET_ARCH "i386")
+ elseif (${FILE_OUTPUT} MATCHES "aarch64")
+ set(TARGET_ARCH "ARM64")
elseif (${FILE_OUTPUT} MATCHES "ARM")
set(TARGET_ARCH "ARM")
else ()

View File

@ -62,6 +62,8 @@ ExclusiveArch: %{rust_arches}
%endif
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
Patch1: binaryen-cmake-aarch64.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
local abi = "gnu"
@ -282,6 +284,10 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
pushd src/binaryen
%patch1 -p1 -b.aarch64
popd
# We're disabling jemalloc, but rust-src still wants it.
# rm -rf src/jemalloc/