From ce57a49469bfc7d14a93cf5adecce054b4b6964f Mon Sep 17 00:00:00 2001 From: pcpa Date: Wed, 15 Nov 2017 05:32:01 -0500 Subject: [PATCH] Add s390x support --- nvidia-texture-tools-s390.patch | 27 +++++++++++++++++++++++++++ nvidia-texture-tools.spec | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 nvidia-texture-tools-s390.patch diff --git a/nvidia-texture-tools-s390.patch b/nvidia-texture-tools-s390.patch new file mode 100644 index 0000000..93d2463 --- /dev/null +++ b/nvidia-texture-tools-s390.patch @@ -0,0 +1,27 @@ +diff -up nvidia-texture-tools/src/nvcore/nvcore.h.orig nvidia-texture-tools/src/nvcore/nvcore.h +--- nvidia-texture-tools/src/nvcore/nvcore.h.orig 2017-11-15 05:24:04.826858170 -0500 ++++ nvidia-texture-tools/src/nvcore/nvcore.h 2017-11-15 05:24:18.980858712 -0500 +@@ -78,6 +78,8 @@ + # define NV_CPU_MIPS 1 + #elif defined POSH_CPU_MIPS64 + # define NV_CPU_MIPS64 1 ++#elif defined POSH_CPU_S390 ++# define NV_CPU_S390 1 + #else + # error "Unsupported CPU" + #endif +diff -up nvidia-texture-tools/src/nvcore/poshlib/posh.h.orig nvidia-texture-tools/src/nvcore/poshlib/posh.h +--- nvidia-texture-tools/src/nvcore/poshlib/posh.h.orig 2017-11-15 05:22:08.066853699 -0500 ++++ nvidia-texture-tools/src/nvcore/poshlib/posh.h 2017-11-15 05:23:05.949855915 -0500 +@@ -527,6 +527,11 @@ Metrowerks: + # define POSH_CPU_STRING "PA-RISC" + #endif + ++#if defined __s390__ || defined __s390x__ ++# define POSH_CPU_S390 1 ++# define POSH_CPU_STRING "S390" ++#endif ++ + #if !defined POSH_CPU_STRING + # error POSH cannot determine target CPU + # define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */ diff --git a/nvidia-texture-tools.spec b/nvidia-texture-tools.spec index 2c35135..1175e29 100644 --- a/nvidia-texture-tools.spec +++ b/nvidia-texture-tools.spec @@ -35,6 +35,8 @@ Patch6: %{name}-aarch64.patch Patch7: %{name}-bool-null.patch # add MIPS support Patch8: %{name}-mips.patch +# add S390 support +Patch9: %{name}-s390.patch %description The NVIDIA Texture Tools is a collection of image processing and texture @@ -67,6 +69,7 @@ Headers and libraries for development with %{name}. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build mkdir -p build