new file mode 100644
@@ -0,0 +1,51 @@
+From 39f87887bcdf037fe077e04f582db927cb35d2bc Mon Sep 17 00:00:00 2001
+From: Scott Murray <scott.murray@konsulko.com>
+Date: Thu, 29 Oct 2026 19:46:41 +0200
+Subject: [PATCH] Handle CC values with arguments
+
+OpenEmbedded / Yocto Project builds pass a value for CC that includes
+several arguments (e.g. --sysroot). The embedded spaces in the value
+break pycparser's expectation for the value of the cpp_path argument to
+its API calls. To handle this, add logic to split the value of CC for
+use in cpp_path and cpp_args. shlex is used to hopefully handle quoted
+spaces or potentially spaces in the compiler path, but this has not
+been tested.
+
+Upstream-Status: Pending
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ setup.py | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 1216065..0160a76 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2,6 +2,7 @@ import site
+ import sys
+ import os
+ import platform
++import shlex
+ from setuptools import setup
+ from setuptools.command.build_ext import build_ext
+ from pkgconfig import pkgconfig
+@@ -22,11 +23,17 @@ site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
+
+
+ def cpp_path():
+- return os.environ.get("CC", "cc")
++ cc = os.environ.get("CC", "cc")
++ return shlex.split(cc)[0]
+
+
+ def cpp_args(args=[]):
+- return ["-E"] + args
++ cc = os.environ.get("CC", "cc")
++ split = shlex.split(cc)
++ cc_args = ["-E"]
++ if len(split) > 1:
++ cc_args = split[1:] + ["-E"]
++ return cc_args + args
+
+
+ class type_generator(build_ext):
similarity index 80%
rename from meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss_2.3.0.bb
rename to meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss_3.0.0.bb
@@ -4,9 +4,10 @@ HOMEPAGE = "https://github.com/tpm2-software/tpm2-pytss"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
-PYPI_PACKAGE_SDIST = "tpm2-pytss"
+PYPI_PACKAGE_SDIST = "tpm2_pytss"
-SRC_URI[sha256sum] = "20071129379656f5f3c3bc16d364612672b147d81191fb4eb9f9ff9fbee48410"
+SRC_URI += "file://0001-Handle-CC-values-with-arguments.patch"
+SRC_URI[sha256sum] = "c193cf1908b482f93c4aa464132920fe3a37d4b9d802e267974ff2dfe37d4433"
inherit autotools pkgconfig pypi python_setuptools_build_meta
To fix build issues from the new version of python3-pycparser in oe-core, upgrade to 3.0.0. This uncovered a new pycparser related issue, so a patch has been added to fix building under OE. Changelog at: https://github.com/tpm2-software/tpm2-pytss/releases/tag/3.0.0 Signed-off-by: Scott Murray <scott.murray@konsulko.com> --- ...0001-Handle-CC-values-with-arguments.patch | 51 +++++++++++++++++++ ...s_2.3.0.bb => python3-tpm2-pytss_3.0.0.bb} | 5 +- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 meta-tpm/recipes-tpm2/tpm2-pytss/python3-tpm2-pytss/0001-Handle-CC-values-with-arguments.patch rename meta-tpm/recipes-tpm2/tpm2-pytss/{python3-tpm2-pytss_2.3.0.bb => python3-tpm2-pytss_3.0.0.bb} (80%)