forked from NixOS/nixpkgs
-
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.
Merge pull request NixOS#303009 from baloo/baloo/tpm2-pytss/fixup-cro…
…ss-compilation python311Packages.tpm2-pytss: fix cross-compilation
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
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,22 @@ | ||
diff --git a/setup.py b/setup.py | ||
index 1b5f513..d660b9a 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -184,7 +184,8 @@ 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=["-D__extension__=", "-D__attribute__(x)="], | ||
+ cpp_path="@crossPrefix@-cpp", | ||
) | ||
parser = c_parser.CParser() | ||
ast = parser.parse(pdata, "tss2_tpm2_types.h") | ||
@@ -210,6 +211,7 @@ class type_generator(build_ext): | ||
"-D__float128=long double", | ||
"-D_FORTIFY_SOURCE=0", | ||
], | ||
+ cpp_path="@crossPrefix@-cpp", | ||
) | ||
parser = c_parser.CParser() | ||
past = parser.parse(pdata, "tss2_policy.h") |
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