Backport patch to fix the build on i686
This commit is contained in:
parent
9507f405d2
commit
ab31b8224a
36
python-tpm2-pytss-2.1.0-i686.patch
Normal file
36
python-tpm2-pytss-2.1.0-i686.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 916c47ef6c30c2c6688f207bb780a2f4e6ef5384 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alberto Planas <aplanas@suse.com>
|
||||||
|
Date: Fri, 17 Feb 2023 13:58:18 +0100
|
||||||
|
Subject: [PATCH] setup: define __float128 for pycparse
|
||||||
|
|
||||||
|
When compiling in 32bit stddef.h makes use of the __float128 type, that
|
||||||
|
pycparse cannot recognize.
|
||||||
|
|
||||||
|
This patch define the type as "long double", fixing the issue in 32bits
|
||||||
|
platforms.
|
||||||
|
|
||||||
|
Fix #497
|
||||||
|
|
||||||
|
Signed-off-by: Alberto Planas <aplanas@suse.com>
|
||||||
|
---
|
||||||
|
setup.py | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 17736597..4554db0b 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -204,7 +204,11 @@ def get_mappings(self):
|
||||||
|
if policy_header_path:
|
||||||
|
pdata = preprocess_file(
|
||||||
|
policy_header_path,
|
||||||
|
- cpp_args=["-D__extension__=", "-D__attribute__(x)="],
|
||||||
|
+ cpp_args=[
|
||||||
|
+ "-D__extension__=",
|
||||||
|
+ "-D__attribute__(x)=",
|
||||||
|
+ "-D__float128=long double",
|
||||||
|
+ ],
|
||||||
|
)
|
||||||
|
parser = c_parser.CParser()
|
||||||
|
past = parser.parse(pdata, "tss2_policy.h")
|
||||||
|
|
@ -10,8 +10,8 @@ License: BSD-2-Clause
|
|||||||
URL: https://github.com/tpm2-software/tpm2-pytss
|
URL: https://github.com/tpm2-software/tpm2-pytss
|
||||||
Source: %{pypi_source %{pypi_name}}
|
Source: %{pypi_source %{pypi_name}}
|
||||||
Patch0: python-tpm2-pytss-1.2.0-openssl.patch
|
Patch0: python-tpm2-pytss-1.2.0-openssl.patch
|
||||||
|
# https://github.com/tpm2-software/tpm2-pytss/commit/916c47ef6c30c2c6688f207bb780a2f4e6ef5384
|
||||||
ExcludeArch: i686
|
Patch1: python-tpm2-pytss-2.1.0-i686.patch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
|
Loading…
Reference in New Issue
Block a user