From 8046b314a507976f73f0ae3fb4a5a376255e161f Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 23 Nov 2016 15:55:16 +0100 Subject: [PATCH] attempt to fix x32 build --- vulkan-sdk.spec | 3 +++ x32.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 x32.patch diff --git a/vulkan-sdk.spec b/vulkan-sdk.spec index 291ae70..9b2717d 100644 --- a/vulkan-sdk.spec +++ b/vulkan-sdk.spec @@ -20,6 +20,7 @@ Patch1: demos_out_of_src.patch Patch2: rpath.patch Patch3: always_xcb.patch Patch4: vktrace_wayland.patch +Patch5: x32.patch URL: http://lunarg.com/vulkan-sdk/ BuildRequires: bison BuildRequires: cmake @@ -42,6 +43,7 @@ Requires: vulkan-devel = %{version}-%{release} Requires: vulkan-loader = %{version}-%{release} Requires: vulkan-sdk-tools = %{version}-%{release} Requires: %{name}-validation-layers = %{version}-%{release} +ExclusiveArch: %{ix86} %{x8664} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -110,6 +112,7 @@ Vulkan tools. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build install -d build diff --git a/x32.patch b/x32.patch new file mode 100644 index 0000000..39efc04 --- /dev/null +++ b/x32.patch @@ -0,0 +1,12 @@ +diff -dur -x '*~' VulkanTools-sdk-1.0.32.0.orig/layers/threading.h VulkanTools-sdk-1.0.32.0/layers/threading.h +--- VulkanTools-sdk-1.0.32.0.orig/layers/threading.h 2016-11-10 18:52:27.000000000 +0100 ++++ VulkanTools-sdk-1.0.32.0/layers/threading.h 2016-11-23 15:54:32.000000000 +0100 +@@ -26,7 +26,7 @@ + #include "vk_layer_config.h" + #include "vk_layer_logging.h" + +-#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || \ ++#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || \ + defined(__aarch64__) || defined(__powerpc64__) + // If pointers are 64-bit, then there can be separate counters for each + // NONDISPATCHABLE_HANDLE type. Otherwise they are all typedef uint64_t. -- 2.43.0