forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/tpm2-pytss: Fix compile under gcc-15
Added a patch to force "-std=c99" when preprocessing. As pcyparser only supports completely C99, this shouldn't be an issue Closes: https://bugs.gentoo.org/943997 Closes: https://bugs.gentoo.org/945056 Signed-off-by: Christopher Byrne <[email protected]> Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
164a168
commit bd60fb0
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
dev-python/tpm2-pytss/files/tpm2-pytss-2.3.0-preprocess-as-C99.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/setup.py b/setup.py | ||
index 1b5f513..0e6208f 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -184,7 +184,7 @@ class type_generator(build_ext): | ||
f"unable to find tss2_tpm2_types.h in {pk['include_dirs']}" | ||
) | ||
pdata = preprocess_file( | ||
- header_path, cpp_args=["-D__extension__=", "-D__attribute__(x)="] | ||
+ header_path, cpp_args=["-std=c99", "-D__extension__=", "-D__attribute__(x)="] | ||
) | ||
parser = c_parser.CParser() | ||
ast = parser.parse(pdata, "tss2_tpm2_types.h") | ||
@@ -205,6 +205,7 @@ class type_generator(build_ext): | ||
pdata = preprocess_file( | ||
policy_header_path, | ||
cpp_args=[ | ||
+ "-std=c99", | ||
"-D__extension__=", | ||
"-D__attribute__(x)=", | ||
"-D__float128=long double", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters