From e11de0784672ab69252c9d68595168284d85bc36 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 9 Jan 2018 14:18:01 -0800 Subject: [PATCH] fix binaryen on aarch64 --- binaryen-cmake-aarch64.patch | 13 +++++++++++++ rust.spec | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 binaryen-cmake-aarch64.patch diff --git a/binaryen-cmake-aarch64.patch b/binaryen-cmake-aarch64.patch new file mode 100644 index 0000000..48752da --- /dev/null +++ b/binaryen-cmake-aarch64.patch @@ -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 () diff --git a/rust.spec b/rust.spec index 64c3e53..b589e48 100644 --- a/rust.spec +++ b/rust.spec @@ -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/