From 61e3e8f15d214e3c4ae39b6c7747aa49d2367d89 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 | 5 +++++ 2 files changed, 20 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 3fc87a9..4113ac4 100644 --- a/cmake.spec +++ b/cmake.spec @@ -67,6 +67,10 @@ Patch2: %{name}-findruby.patch # replace release flag -O3 with -O2 for fedora Patch3: %{name}-fedora-flag_release.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 @@ -177,6 +181,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}. # We cannot use backups with patches to Modules as they end up being installed %patch2 -p1 %patch3 -p1 +%patch5 -p1 %if %{with python3} echo '#!%{__python3}' > %{name}.prov