From 82b4873ab4e8b553f6dd0b93cb6d458bdde0d14f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 27 Sep 2016 15:48:37 +0100 Subject: [PATCH] Backport upstream RISC-V support. This is a trivial backport of an upstream patch: https://gitlab.kitware.com/utils/kwiml/commit/12f000d5b7b4c8394b16282da50126bccd4d4819 --- cmake-3.6.1-riscv.patch | 15 +++++++++++++++ cmake.spec | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 cmake-3.6.1-riscv.patch diff --git a/cmake-3.6.1-riscv.patch b/cmake-3.6.1-riscv.patch new file mode 100644 index 0000000..3a10ed6 --- /dev/null +++ b/cmake-3.6.1-riscv.patch @@ -0,0 +1,15 @@ +diff -ur cmake-3.6.1.old/Utilities/KWIML/include/kwiml/abi.h cmake-3.6.1.riscv/Utilities/KWIML/include/kwiml/abi.h +--- cmake-3.6.1.old/Utilities/KWIML/include/kwiml/abi.h 2016-07-22 14:50:23.000000000 +0100 ++++ cmake-3.6.1.riscv/Utilities/KWIML/include/kwiml/abi.h 2016-09-07 17:59:15.929447366 +0100 +@@ -467,6 +467,10 @@ + #elif defined(__XTENSA_EL__) + # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + ++/* RISC-V */ ++#elif defined(__riscv__) ++# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." +Only in cmake-3.6.1.riscv/Utilities/KWIML/include/kwiml: abi.h~ diff --git a/cmake.spec b/cmake.spec index 48534bf..5e4740d 100644 --- a/cmake.spec +++ b/cmake.spec @@ -71,6 +71,11 @@ Patch2: %{name}-findruby.patch Patch3: %{name}-fedora-flag_release.patch # add extra aarch32 to libarch for arm platform Patch4: %{name}-libarch-arm-findjni.patch + +# Upstream patch which adds RISC-V support. +# https://gitlab.kitware.com/utils/kwiml/commit/12f000d5b7b4c8394b16282da50126bccd4d4819 +Patch5: %{name}-3.6.1-riscv.patch + # Patch for renaming on EPEL %if 0%{?name_suffix:1} Patch1000: %{name}-rename.patch @@ -183,6 +188,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %if %{with python3} echo '#!%{__python3}' > %{name}.prov